#ifdef _WIN32
typedef SOCKET dpl_socket_t;
#else
typedef int dpl_socket_t;
#endiftypedef struct conn_desc conn_desc;
struct conn_desc{
dpl_socket_t sock;
unsigned long seq;
int status;
char act_flag;
};
CMPP_API dpl_status_t cmpp_connect_to_ismg(char *host,dpl_port_t port,conn_desc *conn);本人在vb中定义:
Type CONN_DESC
sock As Long
seq As Long
status As Long
act_flag As Byte
End TypePublic Declare Function cmpp_connect_to_ismg Lib "api.dll" (ByVal host As String, ByVal port As Long, conn As CONN_DESC) As Long调用: Dim intState As Long intState = cmpp_connect_to_ismg("134.130.51.68", 7890, ConnDesc)
typedef SOCKET dpl_socket_t;
#else
typedef int dpl_socket_t;
#endiftypedef struct conn_desc conn_desc;
struct conn_desc{
dpl_socket_t sock;
unsigned long seq;
int status;
char act_flag;
};
CMPP_API dpl_status_t cmpp_connect_to_ismg(char *host,dpl_port_t port,conn_desc *conn);本人在vb中定义:
Type CONN_DESC
sock As Long
seq As Long
status As Long
act_flag As Byte
End TypePublic Declare Function cmpp_connect_to_ismg Lib "api.dll" (ByVal host As String, ByVal port As Long, conn As CONN_DESC) As Long调用: Dim intState As Long intState = cmpp_connect_to_ismg("134.130.51.68", 7890, ConnDesc)
解决方案 »
- 异地远程服务器连接问题???
- 解除hook RegSetValueEx or ZWSETVALUEKEY 等函数
- VB操作Excel问题
- 水晶报表自定义分页,急!!!
- 怎样实现listview控件中图标项向一个picture框中拖拽
- PRINTER 方向控制
- 高分询问(100分):Why imgedit.ocx做的图象显示部分,在不同的操作系统中,怎么有的实现黑屏!!
- 后台访问网页 并每隔5秒刷新一次
- 如何將WebBrowser中的內容 轉成 Mail 信件傳送!!!!!!請高手們速救救我!!!!!
- 保存文本文件的问题
- vb 应用程序如何接受外部参数
- 新手请教一个关于打开TIF图象的问题(高分)
故要在DLL导出函数前添加__stdcall或者WINAPI
要添加防崩溃模块代码请看 http://expert.csdn.net/Expert/TopicView1.asp?id=2859424
添加了防崩溃模块代码后就可以把 Call InitExceptionHandler前的注释号去掉但是这个地址不能访问,提示:缺少 ID 参数,请输入!!