哪位懂c++ builder啊,请帮忙转换成DELPHI(200)

  • 主题发起人 主题发起人 勇者
  • 开始时间 开始时间

勇者

Unregistered / Unconfirmed
GUEST, unregistred user!
void (__stdcall *LoadForm)(TApplication*,TADOConnection*)=NULL; //入口函数声明void (__stdcall *UnloadForm)(HINSTANCE inst )=NULL;int (__stdcall *AddScrn)(void)=NULL;HINSTANCE inst = LoadLibrary("appDll.dll"); if(inst) { (FARPROC)LoadForm = GetProcAddress(inst,"DllRegisterServer"); (FARPROC)UnloadForm = GetProcAddress(inst,"DllUnregisterServer"); (FARPROC)AddScrn = GetProcAddress(inst,"AddScrn"); }AddScrn();LoadForm(Application,NULL);UnloadForm(inst);
 
LoadForm : procedure( app : TApplication; adocon : TADOConnection);stdcall;UnloadForm : procedure(inst : Thandle);stdcall;AddScrn : function:integer; stdcall;inst : THandle;inst:=Loadlibrary('appDll.dll');if inst > 0 thenbegin @LoadForm := GetProcAddress(inst,'DllRegisterServer'); @UnloadForm := GetProcAddress(inst,'DllUnregisterServer'); @AddScrn := GetProcAddress(inst,'AddScrn');end;AddScrn();LoadForm(Application,nil);UnloadForm(inst);
 
不行,调用会报00002EC的地址错误
 
上面的应该没问题,是他们那边的问题,都没测就发过来,搞得我郁闷了半天,还以为写错了这行再帮忙转一下SetNetwork(BYTE para[512])
 
typeTPara=array[0..511] of BYte;setNetwork(Para:TPara);
 
多人接受答案了。
 
后退
顶部