Shoutbox

CreateWindowEx (in Live Messenger process, vista OS) crash, why? - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Forum: Plug-Ins (/forumdisplay.php?fid=28)
+------ Thread: CreateWindowEx (in Live Messenger process, vista OS) crash, why? (/showthread.php?tid=77746)

CreateWindowEx (in Live Messenger process, vista OS) crash, why? by carlz on 09-24-2007 at 09:32 AM

Hello,

In several Vista OS, I use CreateWindowEx to create a window in Live Messenger's process, it crashed. I have checked, all parameters are right. And if I moved CreateWindowEx out of Live Messenger's process, no problems. And also, in most Vista computers and all other win98/2000/xp computers, no problems, only on several Vista computer, it crash. Who had encountered this problems?


RE: CreateWindowEx (in Live Messenger process, vista OS) crash, why? by RaceProUK on 09-24-2007 at 10:27 PM

Could you post the code snippet where you call the function?


RE: CreateWindowEx (in Live Messenger process, vista OS) crash, why? by carlz on 09-25-2007 at 08:55 AM

The code is like this:

class CAtMSNWnd :public CWindowImpl<CAtMSNWnd>
{
public :
    CAtMSNWnd(){};
    virtual ~CAtMSNWnd(){};   
public :
    BEGIN_MSG_MAP(CAtMSNWnd)
    MESSAGE_HANDLER(WM_COMMAND, OnCommand)
    END_MSG_MAP()
    LRESULT OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
};

SetWindowsHookEx(WH_GETMESSAGE, (HOOKPROC)MSNMsgFilter, _Module.GetModuleInstance(), GetWindowThreadProcessId(hWnd,&pid) ); //hWnd is MSN main window
CAtMSNWnd* g_pMSNWnd = NULL;
LRESULT CALLBACK __stdcall MSNMsgFilter(int nCode ,WPARAM wParam,LPARAM lParam)
{
...//following code will only be enterred once
    g_pMSNWnd = new CAtMSNWnd();
    if(!g_pMSNWnd)
        return FALSE;
    g_pMSNWnd->Create(GetDesktopWindow(), rc, "my test window", WS_POPUP, 0, 0); //Crashed at this place
...
}


Is there any wrong?


RE: CreateWindowEx (in Live Messenger process, vista OS) crash, why? by carlz on 09-27-2007 at 01:04 AM

No one meet this problems?


RE: CreateWindowEx (in Live Messenger process, vista OS) crash, why? by markee on 09-27-2007 at 01:11 AM

quote:
Originally posted by carlz
No one meet this problems?
A lot of people program scripts these days for Messenger Plus! Live and so Plug-Ins just don't get developed.  It has been many months since someone has even posted in the plug-ins section of the forums.  Because of this it is somewhat unlikely that someone is going to be of help to you unfortunately and that is mostly because we never deal with plug-ins ourselves or we haven't developed a plugin for about 18 months to 2 years.  I hope someone does help you out however.
RE: CreateWindowEx (in Live Messenger process, vista OS) crash, why? by RaceProUK on 09-27-2007 at 07:58 PM

Is that code MFC? If so, I'm afraid I can't help.


RE: CreateWindowEx (in Live Messenger process, vista OS) crash, why? by effection on 09-27-2007 at 08:40 PM

if its MFC for a start i dont think you can use MFC DLL for SetWindowsHook i read it somewhere