首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

把下部代码转换成C++ builder

2013-03-27 
把下面代码转换成C++ builderfunction SeeImageAndReport(const aHandle: THandleconst aPatientType: PC

把下面代码转换成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

热点排行