有三个函数,连续执行,前两个没问题,到第三个就出问题了,那位兄弟帮我看看啊,谢谢了!!!!!!!!
函数原型:
HHNET_Startup(IN HWND hNotifyWnd,
IN UINT nCommandID ,
IN DWORD dwFrameBufNum= 0,
IN BOOL bReadyRelay= FALSE,
IN BOOL bReadyCenter= FALSE,
IN char *pLocalAddr= NULL);
在DELPHI中
function HHNET_Startup(hNotifyWnd:HWND; //启动网络服务
nCommandID:Cardinal;
dwFrameBufNum:DWORD;
bReadyRelay:boolean;
bReadyCenter:boolean;
pLocalAddr:PChar
):Integer;stdcall;external 'HHNetClient.dll' name 'HHNET_Startup' ; Handle := Form1.Handle ;
nCommandID := WM_USER + 100 ;
fhz := HHNET_Startup(Handle,nCommandID,0,false,false,PChar('10.136.72.118')) ;
-----------------执行返回值为0,正确。
函数原型
HHNET_LogonServer(IN char *pServerIP,
IN UINT nServerPort,
IN char *pDeviceName,
IN char *pUserName,
IN char *pUserPassword,
IN DWORD wClientID,
OUT HANDLE &hLogonServer,
IN HWND hNotifyWindow = NULL);
在DELPHI中
function HHNET_LogonServer(pServerIP:PChar; //登陆服务器
nServerPort:Cardinal;
pDeviceName:PChar;
pUserName:PChar;
pUserPassword:PChar;
wClientID:Cardinal;
var hLogonServer:THANDLE;
hNotifyWindow:HWND):Integer;stdcall;external 'HHNetClient.dll' name 'HHNET_LogonServer'; HLogonServer : Thandle ;fhz := HHNET_LogonServer(PChar('10.136.72.128'),5000,PChar('DVS87528'),PChar('admin'),PChar('admin'),0,hLogonServer,Handle);
----------执行函数返回值为0,正确。函数原型:
HHNET_GetServerConfig( IN HANDLE hServer,
IN HHCMD_NET nConfigCommand,
OUT char *pConfigBuf,
IN OUT UINT &nConfigBufSize,
IN OUT DWORD *pAppend=NULL);在DELPHI中
function HHNET_GetServerConfig(hServer:THANDLE;
nConfigCommand:HHCMD_NET;
pConfigBuf:PChar;
var nConfigBufSize:Cardinal ;
pAppend:PDWORD):Integer;stdcall;external 'HHNetClient.dll' name 'HHNET_GetServerConfig'; type
user_config = packed Record
Level:DWORD;
name:String[16];
password:String[16] ;
end; pConfigBuf : PChar ;
nConfigBufSize : Cardinal ;
pAppend : PDWORD ; nconfigBufSize := SizeOf(user_config) ;fhz := HHNET_GetServerConfig(hLogonServer,HHCMD_GET_USER_CONFIG,pConfigBuf,nconfigBufSize,pAppend) ;
----执行后返回值是100,相应的错误代码是HERR_INVALID_PARAMETER =100, //输入参数无效HHCMD_NET是一个枚举类型
那位达人帮我看看,谢谢了啊!!!!!!!!
函数原型:
HHNET_Startup(IN HWND hNotifyWnd,
IN UINT nCommandID ,
IN DWORD dwFrameBufNum= 0,
IN BOOL bReadyRelay= FALSE,
IN BOOL bReadyCenter= FALSE,
IN char *pLocalAddr= NULL);
在DELPHI中
function HHNET_Startup(hNotifyWnd:HWND; //启动网络服务
nCommandID:Cardinal;
dwFrameBufNum:DWORD;
bReadyRelay:boolean;
bReadyCenter:boolean;
pLocalAddr:PChar
):Integer;stdcall;external 'HHNetClient.dll' name 'HHNET_Startup' ; Handle := Form1.Handle ;
nCommandID := WM_USER + 100 ;
fhz := HHNET_Startup(Handle,nCommandID,0,false,false,PChar('10.136.72.118')) ;
-----------------执行返回值为0,正确。
函数原型
HHNET_LogonServer(IN char *pServerIP,
IN UINT nServerPort,
IN char *pDeviceName,
IN char *pUserName,
IN char *pUserPassword,
IN DWORD wClientID,
OUT HANDLE &hLogonServer,
IN HWND hNotifyWindow = NULL);
在DELPHI中
function HHNET_LogonServer(pServerIP:PChar; //登陆服务器
nServerPort:Cardinal;
pDeviceName:PChar;
pUserName:PChar;
pUserPassword:PChar;
wClientID:Cardinal;
var hLogonServer:THANDLE;
hNotifyWindow:HWND):Integer;stdcall;external 'HHNetClient.dll' name 'HHNET_LogonServer'; HLogonServer : Thandle ;fhz := HHNET_LogonServer(PChar('10.136.72.128'),5000,PChar('DVS87528'),PChar('admin'),PChar('admin'),0,hLogonServer,Handle);
----------执行函数返回值为0,正确。函数原型:
HHNET_GetServerConfig( IN HANDLE hServer,
IN HHCMD_NET nConfigCommand,
OUT char *pConfigBuf,
IN OUT UINT &nConfigBufSize,
IN OUT DWORD *pAppend=NULL);在DELPHI中
function HHNET_GetServerConfig(hServer:THANDLE;
nConfigCommand:HHCMD_NET;
pConfigBuf:PChar;
var nConfigBufSize:Cardinal ;
pAppend:PDWORD):Integer;stdcall;external 'HHNetClient.dll' name 'HHNET_GetServerConfig'; type
user_config = packed Record
Level:DWORD;
name:String[16];
password:String[16] ;
end; pConfigBuf : PChar ;
nConfigBufSize : Cardinal ;
pAppend : PDWORD ; nconfigBufSize := SizeOf(user_config) ;fhz := HHNET_GetServerConfig(hLogonServer,HHCMD_GET_USER_CONFIG,pConfigBuf,nconfigBufSize,pAppend) ;
----执行后返回值是100,相应的错误代码是HERR_INVALID_PARAMETER =100, //输入参数无效HHCMD_NET是一个枚举类型
那位达人帮我看看,谢谢了啊!!!!!!!!
IN HHCMD_NET nConfigCommand,
OUT char *pConfigBuf,
IN OUT UINT &nConfigBufSize,
IN OUT DWORD *pAppend=NULL);那这个函数是不是应该改成
function HHNET_GetServerConfig(hServer:THANDLE;
nConfigCommand:HHCMD_NET;
var pConfigBuf:PChar;
var nConfigBufSize:Cardinal ;
var pAppend:PDWORD):Integer;stdcall;external 'HHNetClient.dll' name 'HHNET_GetServerConfig';