Print Page | Close Window

Stack Overflow with Windows 2003 Terminal Service

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Skin Framework
Forum Description: Topics Related to Codejock Skin Framework
URL: http://forum.codejock.com/forum_posts.asp?TID=6280
Printed Date: 23 November 2024 at 4:27pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Stack Overflow with Windows 2003 Terminal Service
Posted By: lemongrass
Subject: Stack Overflow with Windows 2003 Terminal Service
Date 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






Replies:
Posted By: inforapid
Date 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


Posted By: Oleg
Date 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


Posted By: inforapid
Date 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


Posted By: Oleg
Date 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


Posted By: inforapid
Date Posted: 12 February 2007 at 1:11pm
Hello Oleg,
 
Works great. Thank You.
 
Ingo



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