Print Page | Close Window

Compatibility problems with Matrox Imaging Library

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=10171
Printed Date: 22 November 2024 at 10:08pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Compatibility problems with Matrox Imaging Library
Posted By: pijnappel
Subject: Compatibility problems with Matrox Imaging Library
Date Posted: 10 April 2008 at 3:00am
Hello,
 
our application uses Matrox Imaging Library (MIL-LITE v. 8.0) to display a live video stream. When I load a skin using SkinFramework everything seems to work fine until I close the application window.
 
In the DeInitialization function for MIL components, where MIL Threads are cleaned up I get the following error message:
 
Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
 
Commenting out the LoadSkin function of SkinFramework everything shuts down without errors. I already reported this to Matrox, but no response till today. Could this be a problem caused by SkinFrameworks hooking functions? I'm thankfull for every suggestion.
 
Thanks
 
pijnappel



Replies:
Posted By: Simon HB9DRV
Date Posted: 10 April 2008 at 3:17am
Originally posted by pijnappel pijnappel wrote:

Hello,
 
our application uses Matrox Imaging Library (MIL-LITE v. 8.0) to display a live video stream. When I load a skin using SkinFramework everything seems to work fine until I close the application window.
 
In the DeInitialization function for MIL components, where MIL Threads are cleaned up I get the following error message:
 
Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
 
Commenting out the LoadSkin function of SkinFramework everything shuts down without errors. I already reported this to Matrox, but no response till today. Could this be a problem caused by SkinFrameworks hooking functions? I'm thankfull for every suggestion.
 
Thanks
 
pijnappel
 
I had this problem in something else where I incorrectly defined a function as __stdcall instead of __cdecl.
 
This function was access by loading the DLL then using GetProcAddress.
 
For example (wrong):
    typedef DWORD (__stdcalll REPORTERTICKLE)   ();
instead of
    typedef DWORD (__cdecl REPORTERTICKLE)   ();


-------------
Simon HB9DRV


Posted By: pijnappel
Date Posted: 10 April 2008 at 3:53am
Thanks, but unfortunately I have no access to the MIL libraries source code so I can't look into it.
 
I thought it could be a problem of the SkinFramework hooks because it hooks to Threads to skin Controls. Maybe the cleanup of hooked threads by MIL could cause this error? 
 
Update:
I searched the MIL Header files and found out that the MIL functions I need to use include __stdcall. Do you know a solution to handle this without changing the MIL Library (I can't do that anyway)?


Posted By: Simon HB9DRV
Date Posted: 10 April 2008 at 2:46pm
Originally posted by pijnappel pijnappel wrote:

Thanks, but unfortunately I have no access to the MIL libraries source code so I can't look into it.
 
I thought it could be a problem of the SkinFramework hooks because it hooks to Threads to skin Controls. Maybe the cleanup of hooked threads by MIL could cause this error? 
 
Update:
I searched the MIL Header files and found out that the MIL functions I need to use include __stdcall. Do you know a solution to handle this without changing the MIL Library (I can't do that anyway)?
 
Me - no, don't know, sorry.


-------------
Simon HB9DRV


Posted By: mgampi
Date Posted: 10 April 2008 at 3:16pm
Hi;
 
it's not only a problem of the calling convention. It also happens when you dynamically load a library and assign a function to a function pointer that has a wrong signature; e.g. you define a function pointer like this (using Simons)
 
typedef DWORD (__stdcall MYFUNCTIONPOINTER) (DWORD, LPCTSTR);

But the library implements the function with

DWORD _stdcall ThisIsMyFunction(DWORD dwData);
 
Now you call it using the function pointer, providing a wrong number and/or wrong type of parameter(s).


-------------
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022


Posted By: pijnappel
Date Posted: 23 April 2008 at 2:01am
I found the solution.

I removed the window handle I assigned to the Matrox live video from the codejock skin framework and now it works as expected.

Thanks for your suggestions

pijnappel


Posted By: bhuvidya
Date Posted: 25 March 2009 at 7:50pm
hi there

i have a similar problem, but with flash activex control - i think your solution may be mine as well! how exactly did you "remove the window handle you assigned to the Matrox live video from the codejock skin framework"??

any help greatly appreciated
bhu



Posted By: SuperMario
Date Posted: 26 March 2009 at 3:33pm
Yes, some dlls don't like when SkinFramework hook them and solution to exclude them using Exclude method.


You can run Process Explorer from sysinternals - http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
it can show list of loaded dlls and use exclude all ado related.

SkinFramework1.ExcludeModule "Module.dll"  



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