Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - winlogon.exe instruction error after XTPSkinM
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

winlogon.exe instruction error after XTPSkinM

 Post Reply Post Reply
Author
Message
doinIT View Drop Down
Newbie
Newbie


Joined: 16 March 2009
Location: Australia
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote doinIT Quote  Post ReplyReply Direct Link To This Post Topic: winlogon.exe instruction error after XTPSkinM
    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
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 18 May 2009 at 9:01am
You can try using ExclueModule to exclude winlogon.
Back to Top
doinIT View Drop Down
Newbie
Newbie


Joined: 16 March 2009
Location: Australia
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote doinIT Quote  Post ReplyReply Direct Link To This Post 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 RemoveAll but this didn't fix the problem.
Product: Xtreme Toolkit Pro v13.0
Platform: Windows Vista (32bit) - SP 1
Language: Visual C++ 2008
Back to Top
doinIT View Drop Down
Newbie
Newbie


Joined: 16 March 2009
Location: Australia
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote doinIT Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.