AFXWIN1.INL中ASSERT(afxCurrentInstanceHandle != NULL)的断言.
VB做的EXE,VC6.0做的AFXDLL类型的DLL.
DLL中封装了从CAsyncSocket继承的子类.
但是出现了
AFXWIN1.INL中ASSERT(afxCurrentInstanceHandle != NULL)的断言错误.
其中调用栈如下:
AfxGetInstanceHandle() line 19 + 33 bytes
AfxRegisterWndClass(unsigned int 0, HICON__ * 0x00000000, HBRUSH__ * 0x00000000, HICON__ * 0x00000000) line 1354 + 5 bytes
CAsyncSocket::AttachHandle(unsigned int 388, CAsyncSocket * 0x012e1a60 {CJTreeSocket}, int 0) line 418 + 34 bytes
CAsyncSocket::Socket(int 1, long 63, int 0, int 2) line 558
CAsyncSocket::Create(unsigned int 0, int 1, long 63, const char * 0x00000000) line 106 + 20 bytes
JAsyncSocket::bConnect() line 52
BeginSession() line 297 + 8 bytes
BeginSession()是裸露给VB的API.
该DLL是一直在本公司用的通讯用API包.
对于其他MFC写的EXE.没有问题.
事实上是AFXDLL中得到环境参数的
API对于VB写的EXE不适应.该怎么办呢?