在DLL中有一个函数: 
函数定义:extern "C" bool  __declspec(dllexport) __stdcall EvideoOpenRoom(BSTR RoomIP, BSTR ServerIP, int iFlag)
参数说明:RoomIP,房间IP,指定哪个包厢需要开房;ServerIP,系统服务器IP; iFlag,是否保留---------------------------------------------------------------------------------------------------------
如果用VB调用, 定义为:
function EvideoOpenRoom(RoomIP as String ,ServerIP as String , iFlag as Integer) as Boolean
在Windows 2000中和Vista 中运行, 都是同一个返回结果,如False但是Delphi 7中调用, 定义为:
function EvideoOpenRoom(RoomIP, ServerIP: WideString; iFlag: Integer): boolean在windows2000中运行,返回False, 在Vista 中返回True, 这不同的结果是什么导致的?请教,请教~~

解决方案 »

  1.   

    标准DLL嘛,要这样声明:
    private declare function EvideoOpenRoom lib "YouDLLName.dll"(byval RoomIP as String ,byval ServerIP as String ,byval iFlag as long) as long
      

  2.   

    这是VB声明 的Public Declare Function EvideoOpenRoom Lib "SendWineEV.DLL" (ByVal strRoom As String, ByVal strServerIP As String, ByVal nFlag As Integer) As Boolean这是Delphi声明 的
      function EvideoOpenRoom(RoomIP, ServerIP: WideString; iFlag: Integer): boolean;stdcall;
      far;external 'SendWineEV.dll' name 'EvideoOpenRoom';为何这两种函数在vista 中运行结果不同呢? 不过我觉得dephi 是有问题的