Einzelnen Beitrag anzeigen

sdean

Registriert seit: 5. Dez 2009
64 Beiträge
 
#1

C Structures into Delphi

  Alt 5. Jan 2012, 01:08
Delphi-Version: 7
Hi, i'm trying to port some C code into Pascal , i did some part .

Code:
struct DLL{
       char* Dllname;
       dword imagebase;
       dword size;
       dword vAddr;
};

struct API{
       char* ApiName;
       DLL*  libName;
       dword args;
       dword addr;
      int (*Start_func)(Thread*,dword*);
};
so i ported it in this way :

Delphi-Quellcode:
type
     PDll = ^TDll;
     TDLL = record
     Dllname: Pchar;
     imagebase: dword;
     size: dword;
     vAddr: dword;
end;
    API = record
    Apiname: PChar;
    libName: PDLL;
    args: dword;
    addr: dword;
   //*** But the problem is here
   int (*Start_func)(Thread*,dword*);
   //*** how it can be done ?

How this can be done inside a Structure
Code:
int (*Start_func)(Thread*,dword*);

many thanks
  Mit Zitat antworten Zitat