Call c# dll from Delphi 7

Hi,
I have a call c# Dll VS2010 .Net Framework 4 from Delphi 7 Professional "add(a+b)".
C# code:
namespace dll_01
{
    public interface Iadd
    {
        Int32 add_dll(Int32 a, Int32 b);
    }

    public class Class1:Iadd
    {
        public Int32 add_dll()
        {
            return 0;
        }
                
        public Int32 add_dll(Int32 a, Int32 b){
            ws_linux_dll.CalculatorWSClient proxy = new ws_linux_dll.CalculatorWSClient();            
            return Convert.ToInt32(proxy.add(a,b));
        }
    }
}
After command:
regasm dll_01.dll /tlb
and "Project -> Import Type Library -> Add  -> Install" create file: dll_01_TLB.pas - see next
------------------------------------------
unit dll_01_TLB;

// ************************************************************************ //
// WARNING                                                                    
// -------                                                                    
// The types declared in this file were generated from data read from a       
// Type Library. If this type library is explicitly or indirectly (via        
// another type library referring to this type library) re-imported, or the   
// 'Refresh' command of the Type Library Editor activated while editing the   
// Type Library, the contents of this file will be regenerated and all        
// manual modifications will be lost.                                         
// ************************************************************************ //

// PASTLWTR : 1.2
// File generated on 19.4.2012 11:01:11 from Type Library described below.

// ************************************************************************  //
// Type Lib: C:\Program Files\Borland\Delphi7\Projects\test\Lib\dll_01.tlb (1)
// LIBID: {7570E134-5AEE-4E6B-BB0F-02A93A1C16DA}
// LCID: 0
// Helpfile: 
// HelpString: 
// DepndLst: 
//   (1) v2.0 stdole, (C:\WINDOWS\system32\stdole2.tlb)
// ************************************************************************ //
// *************************************************************************//
// NOTE:                                                                      
// Items guarded by $IFDEF_LIVE_SERVER_AT_DESIGN_TIME are used by properties  
// which return objects that may need to be explicitly created via a function 
// call prior to any access via the property. These items have been disabled  
// in order to prevent accidental use from within the object inspector. You   
// may enable them by defining LIVE_SERVER_AT_DESIGN_TIME or by selectively   
// removing them from the $IFDEF blocks. However, such items must still be    
// programmatically created via a method of the appropriate CoClass before    
// they can be used.                                                          
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers. 
{$WARN SYMBOL_PLATFORM OFF}
{$WRITEABLECONST ON}
{$VARPROPSETTER ON}
interface

uses Windows, ActiveX, Classes, Graphics, StdVCL, Variants;
  

// *********************************************************************//
// GUIDS declared in the TypeLibrary. Following prefixes are used:        
//   Type Libraries     : LIBID_xxxx                                      
//   CoClasses          : CLASS_xxxx                                      
//   DISPInterfaces     : DIID_xxxx                                       
//   Non-DISP interfaces: IID_xxxx                                        
// *********************************************************************//
const
  // TypeLibrary Major and minor versions
  dll_01MajorVersion = 1;
  dll_01MinorVersion = 0;

  LIBID_dll_01: TGUID = '{7570E134-5AEE-4E6B-BB0F-02A93A1C16DA}';


implementation

uses ComObj;
     
end.
-----------------------------------------------

How to use on button click method ?

procedure TForm1.Button1Click(Sender: TObject);
begin
       
end
---------


can you help me please ?
Thanks
0
Utf
4/30/2012 10:06:11 AM
embarcadero.delphi.database 1294 articles. 0 followers. Follow

10 Replies
5590 Views

Similar Articles

[PageSpeed] 44

Marián Mistrík wrote:

> Hi,
> I have a call c# Dll VS2010 .Net Framework 4 from Delphi 7
> Professional "add(a+b)".  C# code:
> namespace dll_01
> {
>     public interface Iadd
>     {
>         Int32 add_dll(Int32 a, Int32 b);
>     }
> 
>     public class Class1:Iadd
>     {
>         public Int32 add_dll()
>         {
>             return 0;
>         }
>                 
>         public Int32 add_dll(Int32 a, Int32 b){
>             ws_linux_dll.CalculatorWSClient proxy = new
> ws_linux_dll.CalculatorWSClient();             return
> Convert.ToInt32(proxy.add(a,b));         }
>     }
> }
> After command:
> regasm dll_01.dll /tlb
> and "Project -> Import Type Library -> Add  -> Install" create file:
> dll_01_TLB.pas - see next ------------------------------------------
> unit dll_01_TLB;
> 
> //
> **********************************************************************
> ** // // WARNING // -------
> // The types declared in this file were generated from data read from
> a // Type Library. If this type library is explicitly or indirectly
> (via // another type library referring to this type library)
> re-imported, or the // 'Refresh' command of the Type Library Editor
> activated while editing the // Type Library, the contents of this
> file will be regenerated and all // manual modifications will be
> lost.  //
> **********************************************************************
> ** //
> 
> // PASTLWTR : 1.2
> // File generated on 19.4.2012 11:01:11 from Type Library described
> below.
> 
> //
> **********************************************************************
> **  // // Type Lib: C:\Program
> Files\Borland\Delphi7\Projects\test\Lib\dll_01.tlb (1) // LIBID:
> {7570E134-5AEE-4E6B-BB0F-02A93A1C16DA} // LCID: 0 // Helpfile: 
> // HelpString: 
> // DepndLst: 
> //   (1) v2.0 stdole, (C:\WINDOWS\system32\stdole2.tlb)
> //
> **********************************************************************
> ** // //
> **********************************************************************
> ***// // NOTE:  // Items guarded by $IFDEF_LIVE_SERVER_AT_DESIGN_TIME
> are used by properties // which return objects that may need to be
> explicitly created via a function // call prior to any access via the
> property. These items have been disabled // in order to prevent
> accidental use from within the object inspector. You // may enable
> them by defining LIVE_SERVER_AT_DESIGN_TIME or by selectively //
> removing them from the $IFDEF blocks. However, such items must still
> be // programmatically created via a method of the appropriate
> CoClass before // they can be used.  {$TYPEDADDRESS OFF} // Unit must
> be compiled without type-checked pointers.  {$WARN SYMBOL_PLATFORM
> OFF} {$WRITEABLECONST ON} {$VARPROPSETTER ON}
> interface
> 
> uses Windows, ActiveX, Classes, Graphics, StdVCL, Variants;
>   
> 
> //
> *********************************************************************/
> / // GUIDS declared in the TypeLibrary. Following prefixes are used:
> //   Type Libraries     : LIBID_xxxx //   CoClasses          :
> CLASS_xxxx //   DISPInterfaces     : DIID_xxxx
> //   Non-DISP interfaces: IID_xxxx
> //
> *********************************************************************/
> / const   // TypeLibrary Major and minor versions
>   dll_01MajorVersion = 1;
>   dll_01MinorVersion = 0;
> 
>   LIBID_dll_01: TGUID = '{7570E134-5AEE-4E6B-BB0F-02A93A1C16DA}';
> 
> 
> implementation
> 
> uses ComObj;
>      
> end.
> -----------------------------------------------
> 
> How to use on button click method ?
> 
> procedure TForm1.Button1Click(Sender: TObject);
> begin
>        
> end
> ---------


This question has nothing whatsoever to do with Delphi database stuff.
The correct group for it would have been
embarcadero.public.delphi.com.interop.dotnet, or
https://forums.embarcadero.com/forum.jspa?forumID=76 if you use the web
interface.

If the imported type library is actually empty (no coclass or interface
declarations) your .NET DLL has not been set up correctly. As far as I
know (which may be wrong) you need to tag stuff you want to be
available via COM interop to COM clients with certain attributes in the
C# source.

-- 
Peter Below (TeamB)  
Don't be a vampire (http://slash7.com/pages/vampires), 
use the newsgroup archives :
http://codenewsfast.com
http://groups.google.com
0
Peter
4/30/2012 3:52:47 PM
Peter wrote:

> If the imported type library is actually empty (no coclass or
> interface declarations) your .NET DLL has not been set up correctly.
> As far as I know (which may be wrong) you need to tag stuff
> you want to be available via COM interop to COM clients with
> certain attributes in the C# source.

That is correct, specifically the "COMVisible" attribute.  If the .NET classes 
are not exported to COM, the only way to use them in Delphi is to use a third-party 
middleware, such as AToZed CrossTalk, that interacts with the .NET assembly 
directly in a native manner.

--
Remy Lebeau (TeamB)
0
Remy
4/30/2012 4:05:02 PM
Hi,
after setting attribute "COMVisble" in .NET Dll application *_TLB generate OK.
My code:

intRef : Iadd;  //interface
i_sum: Integer;

i_sum := intRef.dll_add(5,6);

Line "i_sum := intRef.dll_add(5,6);"
call exception "Project project1.exe raised exception class EAccessViolation at address 005C2FBF in module Project1.exe. Read of address 00000000. Process stoped, Use Step or Run for continue."


Generated file dll_01_TLB.pas
-------------------------------------------
unit dll_01_TLB;

// ************************************************************************ //
// WARNING                                                                    
// -------                                                                    
// The types declared in this file were generated from data read from a       
// Type Library. If this type library is explicitly or indirectly (via        
// another type library referring to this type library) re-imported, or the   
// 'Refresh' command of the Type Library Editor activated while editing the   
// Type Library, the contents of this file will be regenerated and all        
// manual modifications will be lost.                                         
// ************************************************************************ //

// PASTLWTR : 1.2
// File generated on 2.5.2012 9:33:12 from Type Library described below.

// ************************************************************************  //
// Type Lib: C:\Program Files\Borland\Delphi7\Projects\test\Lib\dll_01.tlb (1)
// LIBID: {7570E134-5AEE-4E6B-BB0F-02A93A1C16DA}
// LCID: 0
// Helpfile: 
// HelpString: 
// DepndLst: 
//   (1) v2.0 stdole, (C:\WINDOWS\system32\stdole2.tlb)
//   (2) v2.4 mscorlib, (C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\mscorlib.tlb)
// Errors:
//   Error creating palette bitmap of (TClass1) : Server mscoree.dll contains no icons
// ************************************************************************ //
// *************************************************************************//
// NOTE:                                                                      
// Items guarded by $IFDEF_LIVE_SERVER_AT_DESIGN_TIME are used by properties  
// which return objects that may need to be explicitly created via a function 
// call prior to any access via the property. These items have been disabled  
// in order to prevent accidental use from within the object inspector. You   
// may enable them by defining LIVE_SERVER_AT_DESIGN_TIME or by selectively   
// removing them from the $IFDEF blocks. However, such items must still be    
// programmatically created via a method of the appropriate CoClass before    
// they can be used.                                                          
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers. 
{$WARN SYMBOL_PLATFORM OFF}
{$WRITEABLECONST ON}
{$VARPROPSETTER ON}
interface

uses Windows, ActiveX, Classes, Graphics, mscorlib_TLB, OleServer, StdVCL, Variants;
  


// *********************************************************************//
// GUIDS declared in the TypeLibrary. Following prefixes are used:        
//   Type Libraries     : LIBID_xxxx                                      
//   CoClasses          : CLASS_xxxx                                      
//   DISPInterfaces     : DIID_xxxx                                       
//   Non-DISP interfaces: IID_xxxx                                        
// *********************************************************************//
const
  // TypeLibrary Major and minor versions
  dll_01MajorVersion = 1;
  dll_01MinorVersion = 0;

  LIBID_dll_01: TGUID = '{7570E134-5AEE-4E6B-BB0F-02A93A1C16DA}';

  IID_Iadd: TGUID = '{EF3AD614-4DDF-3BA5-8AD1-2C6A92292B91}';
  IID__Class1: TGUID = '{02BCA860-F859-3FA8-A084-0EAE327473E0}';
  CLASS_Class1: TGUID = '{D2D6E084-57BA-348C-A52E-3610576BBA23}';
type

// *********************************************************************//
// Forward declaration of types defined in TypeLibrary                    
// *********************************************************************//
  Iadd = interface;
  IaddDisp = dispinterface;
  _Class1 = interface;
  _Class1Disp = dispinterface;

// *********************************************************************//
// Declaration of CoClasses defined in Type Library                       
// (NOTE: Here we map each CoClass to its Default Interface)              
// *********************************************************************//
  Class1 = _Class1;


// *********************************************************************//
// Interface: Iadd
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {EF3AD614-4DDF-3BA5-8AD1-2C6A92292B91}
// *********************************************************************//
  Iadd = interface(IDispatch)
    ['{EF3AD614-4DDF-3BA5-8AD1-2C6A92292B91}']
    function add_dll(a: Integer; b: Integer): Integer; safecall;
  end;

// *********************************************************************//
// DispIntf:  IaddDisp
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {EF3AD614-4DDF-3BA5-8AD1-2C6A92292B91}
// *********************************************************************//
  IaddDisp = dispinterface
    ['{EF3AD614-4DDF-3BA5-8AD1-2C6A92292B91}']
    function add_dll(a: Integer; b: Integer): Integer; dispid 1610743808;
  end;

// *********************************************************************//
// Interface: _Class1
// Flags:     (4432) Hidden Dual OleAutomation Dispatchable
// GUID:      {02BCA860-F859-3FA8-A084-0EAE327473E0}
// *********************************************************************//
  _Class1 = interface(IDispatch)
    ['{02BCA860-F859-3FA8-A084-0EAE327473E0}']
  end;

// *********************************************************************//
// DispIntf:  _Class1Disp
// Flags:     (4432) Hidden Dual OleAutomation Dispatchable
// GUID:      {02BCA860-F859-3FA8-A084-0EAE327473E0}
// *********************************************************************//
  _Class1Disp = dispinterface
    ['{02BCA860-F859-3FA8-A084-0EAE327473E0}']
  end;

// *********************************************************************//
// The Class CoClass1 provides a Create and CreateRemote method to          
// create instances of the default interface _Class1 exposed by              
// the CoClass Class1. The functions are intended to be used by             
// clients wishing to automate the CoClass objects exposed by the         
// server of this typelibrary.                                            
// *********************************************************************//
  CoClass1 = class
    class function Create: _Class1;
    class function CreateRemote(const MachineName: string): _Class1;
  end;


// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object    : TClass1
// Help String      : 
// Default Interface: _Class1
// Def. Intf. DISP? : No
// Event   Interface: 
// TypeFlags        : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  TClass1Properties= class;
{$ENDIF}
  TClass1 = class(TOleServer)
  private
    FIntf:        _Class1;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    FProps:       TClass1Properties;
    function      GetServerProperties: TClass1Properties;
{$ENDIF}
    function      GetDefaultInterface: _Class1;
  protected
    procedure InitServerData; override;
  public
    constructor Create(AOwner: TComponent); override;
    destructor  Destroy; override;
    procedure Connect; override;
    procedure ConnectTo(svrIntf: _Class1);
    procedure Disconnect; override;
    property DefaultInterface: _Class1 read GetDefaultInterface;
  published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    property Server: TClass1Properties read GetServerProperties;
{$ENDIF}
  end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object    : TClass1
// (This object is used by the IDE's Property Inspector to allow editing
//  of the properties of this server)
// *********************************************************************//
 TClass1Properties = class(TPersistent)
  private
    FServer:    TClass1;
    function    GetDefaultInterface: _Class1;
    constructor Create(AServer: TClass1);
  protected
  public
    property DefaultInterface: _Class1 read GetDefaultInterface;
  published
  end;
{$ENDIF}


procedure Register;

resourcestring
  dtlServerPage = 'ActiveX';

  dtlOcxPage = 'ActiveX';

implementation

uses ComObj;

class function CoClass1.Create: _Class1;
begin
  Result := CreateComObject(CLASS_Class1) as _Class1;
end;

class function CoClass1.CreateRemote(const MachineName: string): _Class1;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_Class1) as _Class1;
end;

procedure TClass1.InitServerData;
const
  CServerData: TServerData = (
    ClassID:   '{D2D6E084-57BA-348C-A52E-3610576BBA23}';
    IntfIID:   '{02BCA860-F859-3FA8-A084-0EAE327473E0}';
    EventIID:  '';
    LicenseKey: nil;
    Version: 500);
begin
  ServerData := @CServerData;
end;

procedure TClass1.Connect;
var
  punk: IUnknown;
begin
  if FIntf = nil then
  begin
    punk := GetServer;
    Fintf:= punk as _Class1;
  end;
end;

procedure TClass1.ConnectTo(svrIntf: _Class1);
begin
  Disconnect;
  FIntf := svrIntf;
end;

procedure TClass1.DisConnect;
begin
  if Fintf <> nil then
  begin
    FIntf := nil;
  end;
end;

function TClass1.GetDefaultInterface: _Class1;
begin
  if FIntf = nil then
    Connect;
  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
  Result := FIntf;
end;

constructor TClass1.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps := TClass1Properties.Create(Self);
{$ENDIF}
end;

destructor TClass1.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps.Free;
{$ENDIF}
  inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TClass1.GetServerProperties: TClass1Properties;
begin
  Result := FProps;
end;
{$ENDIF}

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TClass1Properties.Create(AServer: TClass1);
begin
  inherited Create;
  FServer := AServer;
end;

function TClass1Properties.GetDefaultInterface: _Class1;
begin
  Result := FServer.DefaultInterface;
end;

{$ENDIF}

procedure Register;
begin
  RegisterComponents(dtlServerPage, [TClass1]);
end;

end.

> {quote:title=Marián Mistrík wrote:}{quote}
> Hi,
> I have a call c# Dll VS2010 .Net Framework 4 from Delphi 7 Professional "add(a+b)".
> C# code:
> namespace dll_01
> {
>     public interface Iadd
>     {
>         Int32 add_dll(Int32 a, Int32 b);
>     }
> 
>     public class Class1:Iadd
>     {
>         public Int32 add_dll()
>         {
>             return 0;
>         }
>                 
>         public Int32 add_dll(Int32 a, Int32 b){
>             ws_linux_dll.CalculatorWSClient proxy = new ws_linux_dll.CalculatorWSClient();            
>             return Convert.ToInt32(proxy.add(a,b));
>         }
>     }
> }
> After command:
> regasm dll_01.dll /tlb
> and "Project -> Import Type Library -> Add  -> Install" create file: dll_01_TLB.pas - see next
> ------------------------------------------
> unit dll_01_TLB;
> 
> // ************************************************************************ //
> // WARNING                                                                    
> // -------                                                                    
> // The types declared in this file were generated from data read from a       
> // Type Library. If this type library is explicitly or indirectly (via        
> // another type library referring to this type library) re-imported, or the   
> // 'Refresh' command of the Type Library Editor activated while editing the   
> // Type Library, the contents of this file will be regenerated and all        
> // manual modifications will be lost.                                         
> // ************************************************************************ //
> 
> // PASTLWTR : 1.2
> // File generated on 19.4.2012 11:01:11 from Type Library described below.
> 
> // ************************************************************************  //
> // Type Lib: C:\Program Files\Borland\Delphi7\Projects\test\Lib\dll_01.tlb (1)
> // LIBID: {7570E134-5AEE-4E6B-BB0F-02A93A1C16DA}
> // LCID: 0
> // Helpfile: 
> // HelpString: 
> // DepndLst: 
> //   (1) v2.0 stdole, (C:\WINDOWS\system32\stdole2.tlb)
> // ************************************************************************ //
> // *************************************************************************//
> // NOTE:                                                                      
> // Items guarded by $IFDEF_LIVE_SERVER_AT_DESIGN_TIME are used by properties  
> // which return objects that may need to be explicitly created via a function 
> // call prior to any access via the property. These items have been disabled  
> // in order to prevent accidental use from within the object inspector. You   
> // may enable them by defining LIVE_SERVER_AT_DESIGN_TIME or by selectively   
> // removing them from the $IFDEF blocks. However, such items must still be    
> // programmatically created via a method of the appropriate CoClass before    
> // they can be used.                                                          
> {$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers. 
> {$WARN SYMBOL_PLATFORM OFF}
> {$WRITEABLECONST ON}
> {$VARPROPSETTER ON}
> interface
> 
> uses Windows, ActiveX, Classes, Graphics, StdVCL, Variants;
>   
> 
> // *********************************************************************//
> // GUIDS declared in the TypeLibrary. Following prefixes are used:        
> //   Type Libraries     : LIBID_xxxx                                      
> //   CoClasses          : CLASS_xxxx                                      
> //   DISPInterfaces     : DIID_xxxx                                       
> //   Non-DISP interfaces: IID_xxxx                                        
> // *********************************************************************//
> const
>   // TypeLibrary Major and minor versions
>   dll_01MajorVersion = 1;
>   dll_01MinorVersion = 0;
> 
>   LIBID_dll_01: TGUID = '{7570E134-5AEE-4E6B-BB0F-02A93A1C16DA}';
> 
> 
> implementation
> 
> uses ComObj;
>      
> end.
> -----------------------------------------------
> 
> How to use on button click method ?
> 
> procedure TForm1.Button1Click(Sender: TObject);
> begin
>        
> end
> ---------
> 
> 
> can you help me please ?
> Thanks
0
Utf
5/2/2012 7:59:20 AM
Marián wrote:

> Line "i_sum := intRef.dll_add(5,6);"
> call exception "Project project1.exe raised exception class
> EAccessViolation at address 005C2FBF in module Project1.exe. Read of
> address 00000000. Process stoped, Use Step or Run for continue."
> Generated file dll_01_TLB.pas

You are accessing a nil pointer.  You have to create the object before you 
can use it, eg:

{code:delphi}
var
  intRef : Iadd;  //interface
  i_sum: Integer;
begin
  intRef := CoClass1.Create as Iadd; // <-- here
  i_sum := intRef.dll_add(5,6);
end;
{code}

--
Remy Lebeau (TeamB)
0
Remy
5/2/2012 5:20:00 PM
Marián Mistrík wrote:

> Hi,
> after setting attribute "COMVisble" in .NET Dll application *_TLB
> generate OK.  My code:
> 
> intRef : Iadd;  //interface
> i_sum: Integer;
> 
> i_sum := intRef.dll_add(5,6);
> 
> Line "i_sum := intRef.dll_add(5,6);"
> call exception "Project project1.exe raised exception class
> EAccessViolation at address 005C2FBF in module Project1.exe. Read of
> address 00000000. Process stoped, Use Step or Run for continue."

Have not created an instance of the class that implements IAdd, so your
intRef variable contains a Nil pointer.

Try to add

   intRef := coClass1.Create as IAdd;

before the i_sum :=  line.


-- 
Peter Below (TeamB)  
Don't be a vampire (http://slash7.com/pages/vampires), 
use the newsgroup archives :
http://codenewsfast.com
http://groups.google.com
0
Peter
5/2/2012 5:30:21 PM
In Line :
intRef := CoClass1.Create as Iadd;  
Compile Ok
Runtime Error: Project: Project1.exe raised exception class EIntfCastError with message: "Interface not supported".

regasm dll_01.dll /tlb
See message:
Types registered successfully
Type library exporter warning processing 'dll_01.ws_linux_dll.CalculatorWSClient, dll_01'. Warning: Type library exporter encountered a type that derives from a generic class and is not marked as [ClassInterface(ClassInterfaceType.None)]. Class interfaces cannot be exposed for such types. Consider marking the type with [ClassInterface(ClassInterfaceType.None)] and exposing an explicit interface as the default interface to COM using the ComDefaultInterface attribute.
Assembly exported to 'C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\dll_01.tlb', and the type library was registered successfully

..NET DLL Setting for:
 Project - Properties - Application - AssemblyInformation - Make Assembly COMVisible

Marián Mistrík


> {quote:title=Remy Lebeau (TeamB) wrote:}{quote}
> Marián wrote:
> 
> > Line "i_sum := intRef.dll_add(5,6);"
> > call exception "Project project1.exe raised exception class
> > EAccessViolation at address 005C2FBF in module Project1.exe. Read of
> > address 00000000. Process stoped, Use Step or Run for continue."
> > Generated file dll_01_TLB.pas
> 
> You are accessing a nil pointer.  You have to create the object before you 
> can use it, eg:
> 
> {code:delphi}
> var
>   intRef : Iadd;  //interface
>   i_sum: Integer;
> begin
>   intRef := CoClass1.Create as Iadd; // <-- here
>   i_sum := intRef.dll_add(5,6);
> end;
> {code}
> 
> --
> Remy Lebeau (TeamB)
0
Utf
5/3/2012 8:22:20 AM
Marián wrote:

> In Line :
> intRef := CoClass1.Create as Iadd;
> Compile Ok
> Runtime Error: Project: Project1.exe raised exception class
> EIntfCastError with message: "Interface not supported".

Try IaddDisp.  If that still does not work, then the object being exported 
from the assembly is still not set up correctly to expose access to the IAdd 
interface.

--
Remy Lebeau (TeamB)
0
Remy
5/3/2012 4:13:22 PM
COM managed - unmanaged OK

Thanks,
Marián

> {quote:title=Marián Mistrík wrote:}{quote}
> Hi,
> I have a call c# Dll VS2010 .Net Framework 4 from Delphi 7 Professional "add(a+b)".
> C# code:
> namespace dll_01
> {
>     public interface Iadd
>     {
>         Int32 add_dll(Int32 a, Int32 b);
>     }
> 
>     public class Class1:Iadd
>     {
>         public Int32 add_dll()
>         {
>             return 0;
>         }
>                 
>         public Int32 add_dll(Int32 a, Int32 b){
>             ws_linux_dll.CalculatorWSClient proxy = new ws_linux_dll.CalculatorWSClient();            
>             return Convert.ToInt32(proxy.add(a,b));
>         }
>     }
> }
> After command:
> regasm dll_01.dll /tlb
> and "Project -> Import Type Library -> Add  -> Install" create file: dll_01_TLB.pas - see next
> ------------------------------------------
> unit dll_01_TLB;
> 
> // ************************************************************************ //
> // WARNING                                                                    
> // -------                                                                    
> // The types declared in this file were generated from data read from a       
> // Type Library. If this type library is explicitly or indirectly (via        
> // another type library referring to this type library) re-imported, or the   
> // 'Refresh' command of the Type Library Editor activated while editing the   
> // Type Library, the contents of this file will be regenerated and all        
> // manual modifications will be lost.                                         
> // ************************************************************************ //
> 
> // PASTLWTR : 1.2
> // File generated on 19.4.2012 11:01:11 from Type Library described below.
> 
> // ************************************************************************  //
> // Type Lib: C:\Program Files\Borland\Delphi7\Projects\test\Lib\dll_01.tlb (1)
> // LIBID: {7570E134-5AEE-4E6B-BB0F-02A93A1C16DA}
> // LCID: 0
> // Helpfile: 
> // HelpString: 
> // DepndLst: 
> //   (1) v2.0 stdole, (C:\WINDOWS\system32\stdole2.tlb)
> // ************************************************************************ //
> // *************************************************************************//
> // NOTE:                                                                      
> // Items guarded by $IFDEF_LIVE_SERVER_AT_DESIGN_TIME are used by properties  
> // which return objects that may need to be explicitly created via a function 
> // call prior to any access via the property. These items have been disabled  
> // in order to prevent accidental use from within the object inspector. You   
> // may enable them by defining LIVE_SERVER_AT_DESIGN_TIME or by selectively   
> // removing them from the $IFDEF blocks. However, such items must still be    
> // programmatically created via a method of the appropriate CoClass before    
> // they can be used.                                                          
> {$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers. 
> {$WARN SYMBOL_PLATFORM OFF}
> {$WRITEABLECONST ON}
> {$VARPROPSETTER ON}
> interface
> 
> uses Windows, ActiveX, Classes, Graphics, StdVCL, Variants;
>   
> 
> // *********************************************************************//
> // GUIDS declared in the TypeLibrary. Following prefixes are used:        
> //   Type Libraries     : LIBID_xxxx                                      
> //   CoClasses          : CLASS_xxxx                                      
> //   DISPInterfaces     : DIID_xxxx                                       
> //   Non-DISP interfaces: IID_xxxx                                        
> // *********************************************************************//
> const
>   // TypeLibrary Major and minor versions
>   dll_01MajorVersion = 1;
>   dll_01MinorVersion = 0;
> 
>   LIBID_dll_01: TGUID = '{7570E134-5AEE-4E6B-BB0F-02A93A1C16DA}';
> 
> 
> implementation
> 
> uses ComObj;
>      
> end.
> -----------------------------------------------
> 
> How to use on button click method ?
> 
> procedure TForm1.Button1Click(Sender: TObject);
> begin
>        
> end
> ---------
> 
> 
> can you help me please ?
> Thanks
0
Utf
5/3/2012 7:51:06 PM
var
  intRef : Iadd;  
  i_sum: Integer;
begin
  intRef := CoClass1.Create as Iadd; //<-Err 
  i_sum := intRef.dll_add(5,6);
end;

in next Delphi (PC) runtime error for line:
intRef := CoClass1.Create as Iadd;

Project raised exception class EIntfCastError with message "Interface not supportef". Process stoped.
0
Utf
5/7/2012 12:16:56 PM
Marián wrote:

> Type library exporter warning processing
> 'dll_01.ws_linux_dll.CalculatorWSClient, dll_01'. Warning: Type
> library exporter encountered a type that derives from a generic class
> and is not marked as [ClassInterface(ClassInterfaceType.None)].
> Class interfaces cannot be exposed for such types. Consider marking
> the type with [ClassInterface(ClassInterfaceType.None)] and exposing
> an explicit interface as the default interface to COM using the
> ComDefaultInterface attribute.

Did you read this comment when you exported the TLB from C#?  It is telling 
you an important step that you have left out on the C# side.  It sounds like 
the COM CoClass that is being generated in the exported TLB does not implement 
the IAdd interface, which is what you are trying to access, because the exporter 
cannot handle the class without the additional markings mentioned in the 
warning.

--
Remy Lebeau (TeamB)
0
Remy
5/7/2012 4:56:34 PM
Reply:

Similar Artilces:

Calling C++ DLL call from Delphi
Hi All I have C++ DLL setup that exports the following function: bool ApplyRule(HANDLE DriverDevice, std::string *Path, PROTECTION_TYPE Type, PROTECTION_ACTION Action, bool Architecture64, bool AddRule) I am not sure how to convert it properly to delphi, inparticular the std::string parameter. ApplyRule : function (DriverDevice : THandle; Path : ????; Kind : PROTECTION_TYPE; Action : PROTECTION_ACTION; Architecture64 : Boolean; AddRule : Boolean) : boolean; stdcall; Thanks for the help. Chris Nillissen wrote: > I am not sure how to convert it properly to delphi,...

Calling Delphi 6 DLL from Delphi 2010
We have a Delphi 6 dll that has a PChar passed to it. The dll function then does a search and returns a PCHar. This works good using Delphi 6 to call and recieve the dll result. We have upgraded our calling program to Delphi 2010 and most of the time, the value is passed back just fine. However, we do have times when we get an access violation, when calling the dll. The dll does process the request. Below is the code. Has anyone had a similar issue using an older version Delphi Dll with Delphi 2010? I am sure that Unicode has something to do with it, but not sure how to fix th...

Calling a C++ DLL from Delphi
I use C++ as my main language and nedd to test some stuff with delphi. I have to call a C++ DLL from Delphi. The C++ header is this. class _declspec(novtable) OwnerOfMain { public: virtual void __stdcall DoStatus(long type, long value)=0; }; class _declspec(novtable) Main { public: virtual void __stdcall Delete() = 0; virtual const wchar_t * __stdcall GetTitle() = 0; virtual void __stdcall SetTitle(const wchar_t *) = 0; virtual bool __stdcall Startup(OwnerOfMain *mainOwner)=0; void operator delete(void* p) { if (p) { Main* w = static_cast<Main*>(p); w->Delete(); } } }; I have translated this to : unit MainLink; interface type TOwnerOfMain = class procedure DoStatus(status, value : LongInt); virtual; stdcall; abstract; end; TMain = class procedure Delete; virtual; stdcall; abstract; function GetTitle: PChar; virtual; stdcall; abstract; procedure SetTitle(title : PChar); virtual; stdcall; abstract; function Startup(var mainOwner : TOwnerOfMain): Boolean; virtual; stdcall; abstract; end; implementation end. I don't know how to translate the operator delete or if I need it in the Delphi program. I am also unsure if the translation of Startup is correct. The intent in C++ is to pass the owner that loads the DLL in to the DLL so that status messages can be passed back. I will be testing it as a console program only at this stage. Is this translation correc...

Calling Delphi DLL from C#
We have a delphi application that loads the dll dynamically and calls a couple of functions in a Delphi DLL using Load Library, GetProcAddress, and FreeLibrary and all works fine. The DLL is going to be called by a C# application developed in VS 2010. I have the C #code below to test sending and receiving data from the dll and it works ok, but when I close the application or try to resend data, I get an access violation. Do I need to make the calls to the dll using the Load Library, GetProcAddress, and FreeLibrary as well. If so how would I code this in C#? Also I am wondering if I need to allocate the memory for the data being passed to and from the dll. If so can I do this inside the Delphi Dll? TIA namespace TestApp { public partial class Form1 : Form { public Form1() { InitializeComponent(); } [DllImport("Search.dll")] public static extern string ContactSearch(string aData); public static extern string CompanySearch(string aData); private void button1_Click(object sender, EventArgs e) { string lRet=""; lRet = CompanySearch("ABC Doors"); MessageBox.Show(lRet); } The dll functions: function ContactSearch(aCriteria: PChar):PChar; stdcall; var searchcode: String; begin searchcode := aCriteria; Do Search ................ resu...

Debugging DLL compiled with Delphi 7 in Delphi XE5
Dear Sirs/Madams, We are considering changing from Delphi 7 to Delphi XE5. Our project consists of a dll and an .exe file. I have begun converting the .exe file to Delphi XE5 and have successfully accessed the DLL compiled with Delphi 7. When I debug the DLL (using the "run parameters" and changing "host application" to the .exe file) in Delphi 7 I can set breakpoints etc. and they are triggered. However, when I attempt to debug the project in XE5, I get the following message: Module Load: xxx.dll. No Debug Info. Base Address: $015A0000. Process xxx.exe (2928) Is it possible to somehow debug DLLs in XE5 compiled with an older Delphi version or is the debug info not compatible? Kind Regards, Jack. Jack wrote: > However, when I attempt to debug the project in XE5, I get the > following message: Module Load: xxx.dll. No Debug Info. Base Address: > $015A0000. Process xxx.exe (2928) > > Is it possible to somehow debug DLLs in XE5 compiled with an older > Delphi version or is the debug info not compatible? Since you are not recompiling the DLL in XE5, did you copy over D7's TDS file for the DLL when you copied over the DLL itself? The TDS file contains debug information. Although, I do not know if XE5 can use D7's debug info or not. -- Remy Lebeau (TeamB) Dear Remy, Thank you for your reply. I am not able to locate any "TDS" files when I build my dll in Delphi 7. I get a .map...

dynamical DLL loading in delphi 7 & delphi 2010
Hello, i am loading a DLL dynamical in Delphi 7 and Delphi 2010: [delphi] var hDLL: THandle; pCode: Pointer; type TProcMainEntry = function: TForm; begin hDll := 0; if FileExists(Pfad + vpeDllName) then hDLL := LoadLibrary(PChar(Pfad + vpeDllName)) else SetLastError(2); if hDLL = 0 then RaiseLastOSError; pCode := GetProcAddress(hDLL, PChar(vpeFunction)); if pCode = nil then RaiseLastOSError; Result := TProcMainEntry(pcode)(); [/delphi] in delphi 7 there's a variable filled with data of the main application which used in the DLL. In delphi 2010 this variable is NIL. If i am looking in delphi 7, the stack-trace begins from the main application, but in delphi 2010 it begins only from the DLL self. Is there anything changed in delphi 2010 with DLL handling between delphi 7? (maybe there is , but what I have to do to solve this) greatings, Andreas Andreas Thurm wrote: > Hello, > > i am loading a DLL dynamical in Delphi 7 and Delphi 2010: > > [delphi] > var > hDLL: THandle; > pCode: Pointer; > type > TProcMainEntry = function: TForm; You can't pass objects over module boundaries except if both sides are: - compiled with runtime packages - compiled with the same compiler/RTL version > {quote:title=Thorsten Engler wrote:}{quote} > Andreas Thurm wrote: > > > Hello, > > > > i am loading a DLL dynamical in De...

dll fails when compiled with delphi 2010, but works with delphi 7
I may be doing good if someone can just point me to the right forum I have not created a dll for some time and have not written one with 2010 before. The dll I am creating will be called as a cfx function by either a ColdFusion or BlueDragon webserver. I have written cfx DLLs in the past. The function declaration is below, it is the standard declaration from ColdFusion or Bluegradon documention on creating a CFX. procedure ProcessTagRequest(Request: TCFXRequest); export; cdecl; Since this was the first time using 2010 I wrote a very basic function to build off that was not much mor...

Trying to call a .DLL from Delphi XE (used to work with Delphi 6 :-) )
Hi everyone, I have a problem where perhaps some one could help point me in the right direction. In Delphi 6 I used a stand alone package to train a neural netowrk,. The trained neural network was stored as a .DEF file. The standalone software provided a .DLL and Delphi code to call the network and get the prediced values from your sw. (The .DLL was created in 2002 and apparently is 32 bit.) I have'nt used it for years but am now coming back to it.... I now use Delphi XE on Windows 7 (32 bit) The old .exe's I had compiled from that time work fine. However in Delphi XE when I try to compile the code below it seems that the call to the .DLL does'nt work Does anyone have any suggestions. I apologise for the length of this email. Kind regards, Adrian unit ns2delxe; {$F+,N+} interface type Pdouble = ^double; function OpenNet(Path: string; var NetNum, NumInputs, NumOutputs: smallint): smallint; stdcall; function FireNet(var NetNum: smallint; InAr, OutAr: Pdouble): smallint; stdcall; function CloseNet(var NetNum: smallint): smallint; stdcall; implementation function OpenNet; external 'NS2-32.DLL'; function FireNet; external 'NS2-32.DLL'; function CloseNet; external 'NS2-32.DLL'; end. procedure FireNetFromDelphi2; var PascalPath: string; {name of the definition file in Pascal notation} CPath : Pchar; {pointer to the name of the definition file in C n...

Delphi 2007 to Delphi 7
I've written a class in Delphi 2007 that is not supported in Delphi 7. What would be the best way to achive what I've done in Delphi 2007 in Delphi 7? Thanks, Tom type BondConstants = class { Bond Types } type BondType = record const TREASURY = 3; AGENCY = 0; CORP = 1; MUNI = 2; SBA = 5; MBS = 4; CMO = 6; end; { Day Count Methods } type DayCount = record const ACTUAL_360 = 2; ACTUAL_365 = 1; ACTUAL_ACTUAL = 1; d30_360 = 0; ...

Delphi 7 to Delphi XE2
Hi, Still using that old workhorse, Delphi7, but am going to the conference in London hosted by Embarcadero on Delphi XE2. Although I would like to "move with the times" and am keen to get the UNICODE and 64-bit support offered by the latest IDEs, I confess to being more than a little scared about all the UNICODE/String/AnsiString and 32/64 bit issues I'm probably going to fall over. Anyone recently upgraded from Delphi7 to one of the latest Delphi IDEs? Thanks, Alain On 03/02/2012 08:55, Alain Dekker wrote: > Still using that old workhorse, Delphi7, but am going to the conference in > London hosted by Embarcadero on Delphi XE2. > > Although I would like to "move with the times" and am keen to get the > UNICODE and 64-bit support offered by the latest IDEs, I confess to being > more than a little scared about all the UNICODE/String/AnsiString and 32/64 > bit issues I'm probably going to fall over. Anyone recently upgraded from > Delphi7 to one of the latest Delphi IDEs? I recently upgraded a sizeable (Paradox) app from D3 to XE2 and was pleasantly surprised. About 20-30 hours once I understood how XE2 works. Andrew -- Andrew Gabb email: agabb@tpgi.com.au Adelaide, South Australia phone: +61 8 8342-1021 ----- Recently moved a lexicographic application from D2007 to XE2 with little pain. As you would imagine, it is heavily string-based, with much use of TStringLists, cuttin...

Delphi 7 to Delphi XE
Have been using Delphi 7 for many moons ( have got later versions but never upgraded to ) My first problem is: Component Palette. in XE it is a small toolbar docked in top right in Delphi 7 it gives a large view of all the components. I am struggling to be able to cope/access my components.in Delphi XE. Can I make the component pallette tool bar the same size as Delphi 7, or is there a fast way to view/choose all available components in XE, that I have not spotted yet? Kind Regards, Robert. Hi, What I know is that in Delphi 2010 and XE you can choose between t...

Import C or C++ DLL in Delphi [Edit]
Hello, usually I can import a dll written in C in Delhi. To do that I write a unit (wrapper.pas) to link the dll with my VCL project. example: {code} function UCC_OpenCamera(CamId: LongWord; SpeedLimit: integer): UNI_RETURN_TYPE; stdcall external 'UniControl.DLL'; {code} This way works fine for me but it requires writing a lot of code to translate all calls and types in delphi. There isn't another way to "convert/import automaticcally" the .dll? 1) Can I create a package inside C++ Builder and use it inside Delphi? 2) The command line tools IMPLIB.EXE (for 32bit) or MKEXP.EXE (for 64bit) can help me? 3) I have the .dll, the .lib and the include files (.h), so.... can I import the lib and .h instead of the dll to create a Delphi/C++Builder Package or ActiveX? 4) Use some convert tool to translate the .h in .pas I use Embarcadero XE8 - Delphi VCL with Windows 7 32 or 64 bit. Thank you so much at everyone. Davide Edited by: Davide Visconti on May 8, 2015 2:11 AM Edited by: Davide Visconti on May 8, 2015 2:12 AM Edited by: Davide Visconti on May 8, 2015 2:13 AM Davide Visconti wrote: > Hello, > usually I can import a dll written in C in Delhi. To do that I write > a unit (wrapper.pas) to link the dll with my VCL project. > > example: > {code} > function UCC_OpenCamera(CamId: LongWord; SpeedLimit: integer): > UNI_RETURN_TYPE; stdcall external 'UniControl.DLL'; {code} > > This...

Delphi dll
I'm developing a dll file in Delphi 7 in order to use it in a Powerbuilder 10.5 application. I get strange results in PB when i try to pass a string through a function or procedure. I've tried pchar, pwidechar, lpstr, lpctstr in D7 and string or REF string in PB, but nothing seems to be working properly. The function in D7 is quite simple, i just take a string for input, encode it and return an encoded string for output. In PB i get a lot of "squares" in my output string. There seems to be a problem reading (from PB) the memory address that is pointed out from D...

C/C++ header from Delphi DLL project
I am currently writing a DLL in Delphi XE7 (64-bit) to be called from LabView. This is working fine, but it is cumbersome (and thus prone to errors) to create the LabView function, since it all has to be done by hand. If I could automatically create C header files from my Delphi project, there is a wizard in LabView that can read these and do most of the work for you. According to the Delphi documentation you can turn "C/C++ Output file generation" on but it only appears to work for Delphi packages and not for plain DLL's. Am I missing something? If not, is there any other han...

I wrote an application and used cracked delphi 7, after i bought delphi 7
I wrote an application and used cracked delphi 7, I sold it, after i bought delphi 7 and recompiled application, is now my application legal or? > {quote:title=Ivan Ivanov wrote:}{quote} > I wrote an application and used cracked delphi 7, I sold it, after i bought delphi 7 and recompiled application, is now my application legal or? "I embezzled some money from my employer, returned the funds, and then got it back as a bonus. Can I still be arrested?" Uhhh .... didn't you just confess to a crime? > {quote:title=Ivan Ivanov wrote:}{quote} > I wrote an application and used cracked delphi 7, I sold it, after i bought delphi 7 and recompiled application, is now my application legal or? Is there any legalization rules of embarcadero products? > {quote:title=Ivan Ivanov wrote:}{quote} > > Is there any legalization rules of embarcadero products? What does the license agreement say? (I don't think I've ever seen a license agreement that has amnesty clauses written into it.) Why do you think you violated the license? Were you caught? Do you WANT to be caught? Do you WANT to be sued? Thanks David that you answer my question, my english is too poor, can you tell me where is written about amnesty in licence, thanks in advance Am 29.12.2011 19:22, schrieb Ivan Ivanov: > Thanks David that you answer my question, my english is too poor, can you tell me where is written about amnesty in licence, thanks in adv...

calling a c++ dll from a delphi vcl app crashes the app upon exit [Edit]
I am using RAD Studio 2010 and I downloaded the latest updates. Since I can't see how I can attach a file to the message, I included in this message the source code for each file: To reproduce this problem follow these steps: Create a project group with two projects, one c++ dll project and one a Delphi VCL forms project. Save all the files in the same folder. 1. Use the wizard to create the c++ dll project, select c++ & Use VCL checkboxes. Make sure Project Options->C++ Linker->Dynamic RTL is set to true. I also added memmgr.lib and sharemem.obj to the project but I bel...

Moving from Delphi 7 to Delphi 2007
Is there any compelling reason to move (quite a large project) from Delphi 7 to Delphi 2007? Specifically, is there better Vista/Win7/Win8 integration provided by Delphi 2007? (In the project I am already using a custom manifest file for Vista/Win7 etc.. and not the std XPMan component) Does 2007 add any new bugs to the scene? Thanks Rael Rael wrote: > Is there any compelling reason to move (quite a large project) from > Delphi 7 to Delphi 2007? If you are going to upgrade, why not upgrade to something newer? > In the project I am already using a custom man...

Using Delphi 7 and Delphi 2010
I had a project in Delphi 7. I worked on it in Delphi 2010. When I try to open the .dpr again in Delphi 7, the IDE toolbar widens across both monitors, and Delphi 7 locks up. It appears that Delphi 2010 modifies the .dpr in a way that makes Delphi 7 unable to open it again. All my forms & units appear to open fine in D7 after D2010, except for the warnings on the ExplicitHeight and ExplicitWidth properties being missing... I can easily recreate the .dpr, but is this expected behavior? Thanks. Tom Field wrote: > I had a project in Delphi 7. > > I worked o...

Migrating From Delphi 7 to Delphi 2010
We did not know which forum was the best for this question. We have been wanting to migrate from Delphi 7 to a later version for years but it appears to be a daunting task. We first looked at D2006 and that was a radical new world. We bought D2010 a couple of years ago and not done much with it because there are so many parts to our applications. We have done a few new applications in D2010 and they seem to work okay. D2010 has not been impressive, perhaps because of the strangeness compared to D7. Is is possible for us to do a phased sort of migration where we do a form at a time? ...

Unofficial Delphi 7 updates
Anybody noticed, even tried this Enhanced Run Time library for Delphi ? It's a hack of the D7 RTL/VCL http://blog.synopse.info/post/2009/12/20/Enhanced-Run-Time-library-for-Delphi-7 It's very interesting and I'd like to know it's stability. Edwin Ye wrote: > Anybody noticed, even tried this Enhanced Run Time library for Delphi > ? It's a hack of the D7 RTL/VCL This library violates Delphi's license (redistributing of RTL/VCL source files is not allowed). The last post was deleted and I'm sure this one will be deleted, too. -- Andreas H...

Migrating from Delphi 7 to Delphi XE3
Hello, Its time to leave the old Delphi 7 and move to the new (but not the latest) XE3. I was wondering if there is a good book or reference to learn all new things XE3 added. Any suggestions? On 5/3/2013 10:17 PM, George Karatsiolis wrote: > Hello, Its time to leave the old Delphi 7 and move to the new (but not the latest) XE3. > I was wondering if there is a good book or reference to learn all new things XE3 added. Try this one for starters: http://tinyurl.com/cgsu243 Aside from that you really need to evaluate your application. XE3 is Unicode for example.... So her...

Delphi 2007 RTL in Delphi 7
I read somewhere that it is possible to use Delphi 2007's (or for that matter Delphi 2006's) RTL in Delphi 7 by just recompiling the source of RTL. Is this really possible? What are the benefits that we can derive using a higher version's RTL? TIA Yogi Yang Yogi Yang wrote: > I read somewhere that it is possible to use Delphi 2007's (or for > that matter Delphi 2006's) RTL in Delphi 7 by just recompiling the > source of RTL. If it actually compiles in Delphi 7, I guess it would be possible. OTOH, if one has Delphi 2007 already, I don't s...

Delphi 7 to Delphi 2009 conversion
Hello group, What do I need to do to comile the following code in D2009. Compiler error after the Else E2010: Incompatible Types 'AnsiChar' and 'Char' if isUnicode then SearchHandle := FindFirstFilew( PWideChar( fn ), FindDataW ) else SearchHandle := FindFirstFile( PAnsiChar( Ansistring( fn ) ), FindDataA ); <<<<<compiler error in the above line >>>>>>>>>>> Regards, Bryan > What do I need to do to comile the following code in D2009. > Compiler error after the Else > E2010: Incompati...

c to delphi #7
Hi, please help with struct iphdr { unsigned char ihl:4, version:4; unsigned char tos; unsigned short tot_len; unsigned short id; unsigned short frag_off; unsigned char ttl; unsigned char protocol; unsigned short check; unsigned int saddr; unsigned int daddr; } Thanks Bojan Gavrilovic wrote: > Hi, > please help with > struct iphdr { > unsigned char ihl:4, > version:4; > unsigned char tos; > unsigned short tot_len; The first two fields are C bitfields, which have no Delphi translation. You have to declare a single ...

Web resources about - Call c# dll from Delphi 7 - embarcadero.delphi.database

Delphi - Wikipedia, the free encyclopedia
... an archaeological site and a modern town in Greece on the south-western spur of Mount Parnassus in the valley of Phocis . The site of Delphi ...

Delphi Automotive (@DelphiAuto) on Twitter
Log in Sign up You are on Twitter Mobile because you are using an old version of Internet Explorer. Learn more here Delphi Automotive @ DelphiAuto ...

Delphi Connect for Verizon on the App Store on iTunes
Get Delphi Connect for Verizon on the App Store. See screenshots and ratings, and read customer reviews.


Audi working with Delphi to develop autonomous car tech
Audi is developing an iPad-sized device that will pack all the necessary computing power for a self-driving car

Domestic firms eye Delphi
BizChina offers latest business and market information of China, online updates of 17 industries, investment guides, business events and industry ...

Verizon And Delphi Officially Launch Vehicle Diagnostics Service - $250 For The Module, $5 A Month On ...
If you're a car nut, a paranoid parent, or a small business owner looking to do a little, uh, company vehicle economy analysis, Verizon's teamed ...

Watch out Google: Delphi gives Ars a ride in its self-driving car
The automotive components maker gave Ars a preview ride around the neighborhood. MOUNTAIN VIEW, CA—On Thursday morning I met with Delphi at its ...

Official: Verizon's Vehicle Diagnostics by Delphi now on sale for $250
Filed under: Technology Partnering with Verizon Wireless, Delphi Automotive has released its Vehicle Diagnostics by Delphi product that allows ...

Delphi partners with WiTricity on automated wireless charging system
One could easily argue that parking between the white lines at any local hangout presents a challenge for some inexperienced drivers. So, why ...

Resources last updated: 3/8/2016 11:42:27 AM