Print Page | Close Window

winlogon.exe instruction error after XTPSkinM

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=14319
Printed Date: 16 June 2024 at 9:01am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: winlogon.exe instruction error after XTPSkinM
Posted By: doinIT
Subject: winlogon.exe instruction error after XTPSkinM
Date Posted: 18 May 2009 at 2:06am
Hi,
 
I'm using the latest Toolkit Pro V13.0 which I downloaded today.
I'll do my best to explain this annoying problem.
 
The GUI for our main app is written in Delphi. I write DLL's in VS2008 C++ (compiling on Vista SP1) that are called from the Delphi process.
Inside one DLL is an MFC Dialog app linked to MFC statically where I use the following two lines of code in the constructor.
 
// Constructor calls this
XTPSkinManager()->SetApplyOptions(XTPSkinManager()->GetApplyOptions() | xtpSkinApplyMetrics);
XTPSkinManager()->LoadSkin(m_strStylesPath + _T("Untitled1.cjstyles"), _T("NormalBlack.ini")); 
 
This works really well and gives all the dialogs inside my .dll a nice look.
 
After the Dialog in this DLL is closed the Delphi GUI does it's thing then calls another MFC .dll (contains routines only) where I setup a keyboard hook to prevent access to system keys and CTRL-ALT-DEL etc.. To accomplish this I use a routine that injects code into winlogon.exe enabling me to catch all keypresses.
 
When I run this app on XP after compiling on Vista with Toolkit Pro I get an exception with winlogon.exe.
 
"The instruction at "0x1024ab20" referenced memory at "0x1024ab20". The memory could not be written".
Then the machine restarts.
 
There is no problem if I remove the XTPSkinManager()->LoadSkin method.
 
I know this sounds a bit out there, but hopefully someone may have some suggestion.
 
Cheers,
 
Jai


-------------
Product: Xtreme Toolkit Pro v13.0
Platform: Windows Vista (32bit) - SP 1
Language: Visual C++ 2008



Replies:
Posted By: SuperMario
Date Posted: 18 May 2009 at 9:01am
You can try using ExclueModule to exclude winlogon.


Posted By: doinIT
Date Posted: 18 May 2009 at 7:21pm

Thanks for idea, but it didn't fix the problem.

I've also tried SetAutoApplyNewWindows(FALSE); and SetAutoApplyNewThreads(FALSE);, but the probelm persists.
 
XTPSkinManager()->ExcludeModule("winlogon.exe");

XTPSkinManager()->SetAutoApplyNewWindows(FALSE);

XTPSkinManager()->SetAutoApplyNewThreads(FALSE);

XTPSkinManager()->SetApplyOptions(XTPSkinManager()->GetApplyOptions() | xtpSkinApplyMetrics);

XTPSkinManager()->LoadSkin(m_strStylesPath + _T("Untitled1.cjstyles"), _T("NormalBlack.ini"));

Any other ideas?

Is there a way to manually shutdown the skin manager?
 
I've tried mk:@MSITStore:C:\Program%20Files\Codejock%20Software\MFC\Xtreme%20ToolkitPro%20v13.0.0\help\SymbolReference.chm::/CXTPSkinManager__RemoveAll@BOOL.html - RemoveAll  but this didn't fix the problem.


-------------
Product: Xtreme Toolkit Pro v13.0
Platform: Windows Vista (32bit) - SP 1
Language: Visual C++ 2008


Posted By: doinIT
Date Posted: 24 May 2009 at 5:07pm
For anyone wanting to know how to fix problems similar to this.
 
Oleg helped me with this one.

Calling XTPSkinManager()->LoadSkin(NULL, NULL); from my CDialog::OnDestroy method fixed the problem.



-------------
Product: Xtreme Toolkit Pro v13.0
Platform: Windows Vista (32bit) - SP 1
Language: Visual C++ 2008



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net