我编写了一个sockdll,使用的函数为: socket(AF_INET,SOCK_STREAM,0); connect(m_Sockfd, (struct sockaddr *)(&server_addr), sizeof(struct sockaddr)); send(m_Sockfd, pInbuf, nLen, 0); recv(m_Sockfd, pOutbuf,4096,0)。 调用时,dll中socket函数返回-1,查看windows底层错误为: 项目在本地不可用。 请问哪位大哥能帮帮我。
Hi All, 我遇到一个Perl调用外部dll函数传递指针变量的问题。 我查阅到Win32::API 之中,关于调用dll 之中有指针变量的部分,[code]P: value is a pointer (to a string, structure, etc...) padding out the buffer string is required, buffer overflow detection is performed. Pack and unpack the data yourself. If P is a return type, only null terminated strings or NULL pointer are supported. If P is an in type, N...
有时候未必能找到linux下的库,这个时候调用win32的dll就有点用了。不过这是有条件限制的: 就是: 仅仅在i386下能行的通。 方法嘛: 1、比较简单的是就行 wine一样,使用winegcc来编译就可以调用dll了,不过需要依赖于wine的库,并且wine有依赖于X11的库,未免有些大了。 2、复杂一些就是像Mplayer那样,把PE文件的装载从wine源码里面提取出来,或者自己另外写吧。这样虽然程序显得很NATIVE, 但是限制就更大了: 需要根据自己的情...