typedef VOID (WINAPI*fg)(const TCHAR *,HWND);
fg pp=NULL;
HMODULE hand=NULL;
hand=LoadLibraryA("CoreInterface.dll");
pp=(fg)GetProcAddress(hand,"EncryptThread");
pp(_T("d:\\123456.txtww"),AfxGetMainWnd()->GetSafeHwnd());;
if (m_hEncryptEvent==NULL)
{
AfxMessageBox(_T("jhhlkhkl"));
}
//MessageBoxA(NULL,(LPSTR)m_hEncryptEvent,(LPSTR)m_EncryptEvent.m_hObject,MB_OK);
//HMODULE hand1=NULL;
WaitForSingleObject(m_hEncryptEvent,INFINITE); FreeLibrary(hand);
红色部分出错,在debug时通过,release时出错求高手帮忙看看。
这是以个类中的一个处理函数;m_hEncrypt是HANDLE对象已经初始化
fg pp=NULL;
HMODULE hand=NULL;
hand=LoadLibraryA("CoreInterface.dll");
pp=(fg)GetProcAddress(hand,"EncryptThread");
pp(_T("d:\\123456.txtww"),AfxGetMainWnd()->GetSafeHwnd());;
if (m_hEncryptEvent==NULL)
{
AfxMessageBox(_T("jhhlkhkl"));
}
//MessageBoxA(NULL,(LPSTR)m_hEncryptEvent,(LPSTR)m_EncryptEvent.m_hObject,MB_OK);
//HMODULE hand1=NULL;
WaitForSingleObject(m_hEncryptEvent,INFINITE); FreeLibrary(hand);
红色部分出错,在debug时通过,release时出错求高手帮忙看看。
这是以个类中的一个处理函数;m_hEncrypt是HANDLE对象已经初始化
if (m_hEncryptEvent==NULL)
这是红色部分吧,就判断一个句柄是否为空,怎么会出现你说的错误呢?
导致空引用谢谢两位高手