Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - Stack Overflow with Windows 2003 Terminal  Service
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Stack Overflow with Windows 2003 Terminal Service

 Post Reply Post Reply
Author
Message
lemongrass View Drop Down
Groupie
Groupie


Joined: 09 June 2006
Location: Austria
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote lemongrass Quote  Post ReplyReply Direct Link To This Post Topic: Stack Overflow with Windows 2003 Terminal Service
    Posted: 31 January 2007 at 3:44am
Hi,

I've a problem when running a skined application on a windows 2003 terminal server. Everytime I try to change a skin, I get an stack overflow at:

LRESULT WINAPI CXTPSkinManagerApiHook::OnHookCallWindowProcA(WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
    PROC pfnOrig = GetOriginalProc(xtpSkinApiCallWindowProcA);
    if (!pfnOrig)
        return CallWindowProcA(lpPrevWndFunc, hWnd, Msg, wParam, lParam);


giving the following stack-trace:

APPL! 007e3256() line 187 + 6 bytes
APPL! 007e453f() line 709 + 7 bytes
APPL! 007e4567() line 711 + 28 bytes
APPL! 007e4567() line 711 + 28 bytes
APPL! 007e4567() line 711 + 28 bytes
APPL! 007e4567() line 711 + 28 bytes
APPL! 007e4567() line 711 + 28 bytes
APPL! 007e4567() line 711 + 28 bytes
APPL! 007e4567() line 711 + 28 bytes
APPL! 007e4567() line 711 + 28 bytes
APPL! 007e4567() line 711 + 28 bytes
APPL! 007e4567() line 711 + 28 bytes
APPL! 007e4567() line 711 + 28 bytes
APPL! 007e4567() line 711 + 28 bytes
.
.
.

---------------------------------------------------------------------------------

all this happens if I try to unload a loaded skin with:
XTPSkinManager()->LoadSkin("", "");

as you do it in your demo applications. Any suggestions on this?

I'am using 10.40 and 10.42 -> no difference

Regards
Mario



Back to Top
inforapid View Drop Down
Groupie
Groupie


Joined: 31 March 2006
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote inforapid Quote  Post ReplyReply Direct Link To This Post Posted: 07 February 2007 at 1:54pm
Hello,

I have exactly the same problem. With Windows XP, not in a Terminal Session and it occures since version 10.4.2. Version 10.4 works without problems. The stack overflow occures after I call XTPSkinManager()->LoadSkin("", ""); to switch skinning off. The function
LRESULT WINAPI CXTPSkinManagerApiHook::OnHookDefFrameProcA(HWND hWnd, HWND hWndMDIClient, UINT Msg, WPARAM wParam, LPARAM lParam)
gets called and tries to get the pointer to the original windows procedure.
     PROC pfnOrig = GetOriginalProc(xtpSkinApiDefFrameProcA);
This pointer is NULL, so it calls
DefFrameProcA(hWnd, hWndMDIClient, Msg, wParam, lParam);
which is equal with OnHookDefFrameProcA, so the function gets called recursive after and after without an end, until the program crashes. Can someone please help us because I can't guess what I'm doing wrong.
Kind Regards
Ingo
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 07 February 2007 at 3:14pm
Hello,
 
We need some sample/project to debug it. Do you see same problem with our samples?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
inforapid View Drop Down
Groupie
Groupie


Joined: 31 March 2006
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote inforapid Quote  Post ReplyReply Direct Link To This Post Posted: 07 February 2007 at 11:50pm
Hello Oleg,
Yes, the stack overflow also occures within your SkinMDISample program. The one you have delivered (with dynamically linking MFC and CodeJock libraries) works. But when I change the project settings to statically link the MFC library, the stack overflow occures when I click in the "Skin and Themes" property sheet in the section "Default Skins" on the Default radio button. I am using Visual Studio .Net 2003. If you want to, I can send you a zip archive with the sample program.
Kind Regards
Ingo
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 08 February 2007 at 5:33am
Hi,
 
Ups. thanks. You right. our small bug.
 
Please patch CXTPSkinManagerApiFunction::ReplaceInAllModules method:
 
 
change
 
ReplaceInOneModule(pszCalleeModName, pfnCurrent, pfnNew, AfxGetInstanceHandle());
to
 
if (ReplaceInOneModule(pszCalleeModName, pfnCurrent, pfnNew, AfxGetInstanceHandle()))
  {
   bResult = TRUE;
  }
 
and recompile library.
 
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
inforapid View Drop Down
Groupie
Groupie


Joined: 31 March 2006
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote inforapid Quote  Post ReplyReply Direct Link To This Post Posted: 12 February 2007 at 1:11pm
Hello Oleg,
 
Works great. Thank You.
 
Ingo
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.141 seconds.