Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » assert on right click Collapse All
Subject Author Date
Ian McIntosh Jun 17, 2007 - 9:06 AM

I get an assert following right clicking on some items.

NB, this project uses dlls so the problem could be connected to module state maybe.

It appears to be something to do with _HookMouseProc. Can you tell me what triggers this code & how to stop it / override it?


call stack:

>    ProfUIS270md.dll!CExtPopupMenuSite::_HookMouseProc(int nCode=0, unsigned int wParam=512, long lParam=1242968) Line 1038    C++
    user32.dll!7e4318e3()     
    [Frames below may be incorrect and/or missing, no symbols loaded for user32.dll]    
    user32.dll!7e41f7f6()     
    user32.dll!7e431688()     
    ntdll.dll!7c90eae3()     
    user32.dll!7e431891()     
    user32.dll!7e46cd34()     
    CobraUtils.dll!CDevComboCtrl::OnRButtonDown(unsigned int nFlags=2, CPoint point={...}) Line 274 + 0x22 bytes    C++
    mfc80d.dll!CWnd::OnWndMsg(unsigned int message=516, unsigned int wParam=2, long lParam=458843, long * pResult=0x0012fa08) Line 2169    C++
    mfc80d.dll!CWnd::WindowProc(unsigned int message=516, unsigned int wParam=2, long lParam=458843) Line 1741 + 0x20 bytes    C++
    ProfUIS270md.dll!CExtComboBoxBase::WindowProc(unsigned int message=516, unsigned int wParam=2, long lParam=458843) Line 1559    C++
    ProfUIS270md.dll!CExtComboBox::WindowProc(unsigned int message=516, unsigned int wParam=2, long lParam=458843) Line 2879    C++
    mfc80d.dll!AfxCallWndProc(CWnd * pWnd=0x037fb470, HWND__ * hWnd=0x00111eaa, unsigned int nMsg=516, unsigned int wParam=2, long lParam=458843) Line 240 + 0x1c bytes    C++
    mfc80d.dll!AfxWndProc(HWND__ * hWnd=0x00111eaa, unsigned int nMsg=516, unsigned int wParam=2, long lParam=458843) Line 389    C++
    MercatorIV.cbr!AfxWndProcDllStatic(HWND__ * hWnd=0x00111eaa, unsigned int nMsg=516, unsigned int wParam=2, long lParam=458843) Line 73 + 0x15 bytes    C++
    user32.dll!7e418734()     
    user32.dll!7e418816()     
    user32.dll!7e41c63f()     
    user32.dll!7e41f65d()     
    ProfUIS270md.dll!CExtHookSink::HookChains_t::HookChainsWindowProc(unsigned int nMessage=516, unsigned int & wParam=2, long & lParam=458843) Line 236 + 0x20 bytes    C++
    ProfUIS270md.dll!CExtHookSink::HookChains_t::g_HookWndProc(HWND__ * hWnd=0x00111eaa, unsigned int nMessage=516, unsigned int wParam=2, long lParam=458843) Line 300 + 0x14 bytes    C++
    user32.dll!7e418734()     
    user32.dll!7e418816()     
    user32.dll!7e4189cd()     
    user32.dll!7e4196c7()     
    mfc80d.dll!AfxInternalPumpMessage() Line 183    C++
    mfc80d.dll!CWinThread::PumpMessage() Line 896    C++
    mfc80d.dll!CWinThread::Run() Line 625 + 0xd bytes    C++
    mfc80d.dll!CWinApp::Run() Line 894    C++
    mfc80d.dll!AfxWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00161f11, int nCmdShow=1) Line 47 + 0xd bytes    C++
    GuiMdi.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00161f11, int nCmdShow=1) Line 33    C++
    GuiMdi.exe!__tmainCRTStartup() Line 589 + 0x35 bytes    C
    GuiMdi.exe!WinMainCRTStartup() Line 414    C
    kernel32.dll!7c816fd7()     
    GuiMdi.exe!AfxWinMain() + 0x1c35b bytes    C++
    GuiMdi.exe!AfxWinMain() + 0x1c31a bytes    C++
    ffeb5983()    

Ian McIntosh Jun 18, 2007 - 2:23 AM

Thanks , this is very helpful.

You did not touch on the _HookMouseProc. Can you tell me what triggers this code & how to stop it / override it?

You mention "RDE configuration can be unsafe in particular cases when itaˆ™s used from more than one regular DLL loaded into the one running process" - can you give me any more info on this?
We do try to keep our footprint as small as possible so loading additional versions of prof-UIS is really not what we want to do.

Besides the InitExtension, are there any other functions in prof UIS that deal with Module State? In particular, do I need to call anything when I do an AFX_MANAGE_STATE?

Technical Support Jun 18, 2007 - 12:29 PM

We believe the problem is in an incorrect state managing and it should be gone by applying the correct RDE version in your regular DLLs. If more than one regular DLL uses Prof-UIS, you should link them with Prof-UIS statically. Otherwise, the state managing will not be performed correctly in any hook based components. This means you would not be able to use only simple non-hook based controls. If you want to save space and avoid multiple Prof-UIS copies, then you should convert your DLLs into MFC extension DLL type.



Technical Support Jun 17, 2007 - 11:57 AM

You said that you are using Prof-UIS as a DLL. Prof-UIS is an MFC extension DLL. Any MFC extension DLL can extend either EXE or DLL MFC based modules. Unfortunately it’s impossible to create one MFC extension DLL that can be used both from EXE and DLL modules. Prof-UIS supports simple (non-RDE) configurations for using in EXE projects and Regular DLL Extension (RDE) configurations for using in MFC based regular DLL projects including OCX projects. First of all, please ensure your regular DLL are using the correct RDE configuration of Prof-UIS. The MFC/Prof-UIS regular DLL project should have the __PROF_UIS_FOR_REGULAR_DLL preprocessor symbol defined in the project settings and should invoke the following code in the InitInstance() virtual method of a CWinApp-derived class:

CExt_ProfUIS_ModuleState::InitExtension( AfxGetStaticModuleState() );
This means you will use two Prof-UIS DLLs: one is simple (non-RDE) used by EXE and another one is RDE used in regular DLL. Please also note, RDE configuration can be unsafe in particular cases when it’s used from more than one regular DLL loaded into the one running process. If you want to use Prof-UIS from a regular DLL, then it’s recommended to link your regular DLL with Prof-UIS statically (static LIB also supports RDE configurations).

If you plan to use your DLL modules from your Prof-UIS based EXE modules only, we would recommend you convert them into MFC extension DLLs. The MFC extension DLLs take less memory and use the same Prof-UIS and MFC copies which are used by EXE’s code, i.e. there is no RDE configuration required. The only difference is in the following: if you are loading MFC extension DLL dynamically, you should use the AfxLoadLibrary() MFC API instead of LoadLibrary() Win32 API.