Compatibility problems with Matrox Imaging Library |
Post Reply |
Author | |
pijnappel
Groupie Joined: 30 November 2007 Status: Offline Points: 13 |
Post Options
Thanks(0)
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
|
|
Simon HB9DRV
Senior Member Joined: 07 July 2005 Location: Switzerland Status: Offline Points: 458 |
Post Options
Thanks(0)
|
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
|
|
pijnappel
Groupie Joined: 30 November 2007 Status: Offline Points: 13 |
Post Options
Thanks(0)
|
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)?
|
|
Simon HB9DRV
Senior Member Joined: 07 July 2005 Location: Switzerland Status: Offline Points: 458 |
Post Options
Thanks(0)
|
Me - no, don't know, sorry.
|
|
Simon HB9DRV
|
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
|
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 |
|
pijnappel
Groupie Joined: 30 November 2007 Status: Offline Points: 13 |
Post Options
Thanks(0)
|
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 |
|
bhuvidya
Newbie Joined: 25 March 2009 Location: Australia Status: Offline Points: 3 |
Post Options
Thanks(0)
|
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 |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
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" |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |