Valentina 3 COM and Delphi

Martin S. blackfin at elfenherz.de
Fri Jul 6 03:48:12 CDT 2007


Thanks!
But I think I got it....Delphi 2006 generates some wrong GUIDs for 
Valentina classes and overwrites these declared in ValentinaCOM2_TLB.
When I remove these wrong guids everything works fine. (I don't know 
where Delphi got this wrong GUIDs from...strange...maybe I should ask 
Borland :D)
Nevertheless, some examples would be very useful. I would be very happy 
if you can send me some to martin at mcmm.com

regards,

Martin



Ivan Smahin schrieb:
> Hello Martin,
>
> Friday, July 6, 2007, 10:57:57 AM, you wrote:
>
> MS> Ivan Smahin schrieb:
>   
>>>      V3 := CoValentina.Create;
>>>      V3.InitClient(10 * 1024 * 1024);
>>>      
>>>      V3Conn := CoVConnection.Create;
>>>      V3Conn.Init('localhost','sa','sa',15432,20,'');
>>>      V3Conn.Open;
>>>
>>>      
>>>   
>>>       
>
> MS> Unfortunately, it does not work ;(
> MS> In Delphi I've choosen "New => VCL Application", then "New => COM 
> MS> Object", named the new Object "Valentina" and selected "IValentina" in
> MS> VCOM.dll as interface.
> MS> Then, Delphi generates some wrapper-code. When I try to start my program
> MS> (without any additional code), I get an exception "For class TValentina
> MS> type information is missed".
> MS> When I comment out the TValentina class (which is not needed in my eyes
> MS> because everything goes over the interfaces an CO-Classes CoValentina,
> MS> CoVconnection etc.),
> MS> I get an exception "Class not registered" and the debugger points to 
> MS> this code, which is automatically generated from the VCOM interface:
>
> MS> class function CoValentina.Create: IValentina;
> MS> begin
> MS>   RegisterClass(CLASS_Valentina) ;
> =>>  Result := CreateComObject(CLASS_Valentina) as IValentina;
> MS> end;
>
> MS> I use BDS 2006 with all service packs installed.
>
> I  can  send you some little example. Works in Delphi 4. I don't think
> it  would  be  some  much  differences  in later versions regarding COM
> usage.
>
> About 7 years ago was last time I used Delphi. So sorry I can be wrong
> on   some  points.  But  as  far  as I recall you can easily build tlb
> files.  Try  following  -  Project  -  Import  type  library  - choose
> Valentina COM there - press Ok.
>
> Then, in Project
>
> uses
> ...
>   ValentinaCOM2_TLB in 'd:\Program Files\Borland\Delphi4\Imports\ValentinaCOM2_TLB.pas';
> ...
>
> ...
> unit Unit1;
>
> interface
>
> uses
>   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
>   StdCtrls, ValentinaCOM2_TLB;
>
> ...
>
>
>
>   



More information about the Valentina mailing list