把下边代码转换成C++ builder
把下面代码转换成C++ builder
function SeeImageAndReport(const aHandle: THandle;
const aPatientType: PChar;
const acode:PChar
):Integer; stdcall; external 'KPPacsInterface.dll';
function UnInitDll: integer; stdcall; external 'KPPacsInterface.dll';
function InitDll(const aDllPath :PChar;
const aLogID: PChar;
const aLogName: PChar;
const aDBIsWebService: Integer
) :Integer; stdcall; external 'KPPacsInterface.dll';
------解决方案--------------------
typedef int __stdcall (*PSeeImageAndReport)(const unsigned int aHandle,
const char *aPatientType,
const char *acode);
typedef int __stdcall (*PUnInitDll)();
typedef int __stdcall (*PInitDll(const char *aDllPath,
const char *aLogID,
const char *aLogName,
const int aDBIsWebService);
.........
PSeeImageAndReport SeeImageAndReport;
PUnInitDll UnInitDll;
PInitDll InitDll;
然后调用Loadlibrary和GetProcAddress
function SeeImageAndReport(const aHandle: THandle;
const aPatientType: PChar;
const acode:PChar
):Integer; stdcall; external 'KPPacsInterface.dll';
function UnInitDll: integer; stdcall; external 'KPPacsInterface.dll';
function InitDll(const aDllPath :PChar;
const aLogID: PChar;
const aLogName: PChar;
const aDBIsWebService: Integer
) :Integer; stdcall; external 'KPPacsInterface.dll';
------解决方案--------------------
typedef int __stdcall (*PSeeImageAndReport)(const unsigned int aHandle,
const char *aPatientType,
const char *acode);
typedef int __stdcall (*PUnInitDll)();
typedef int __stdcall (*PInitDll(const char *aDllPath,
const char *aLogID,
const char *aLogName,
const int aDBIsWebService);
.........
PSeeImageAndReport SeeImageAndReport;
PUnInitDll UnInitDll;
PInitDll InitDll;
然后调用Loadlibrary和GetProcAddress