App crashes on exit when mixing MFC and ActiveX sk |
Post Reply |
Author | |
voltus
Newbie Joined: 17 April 2008 Status: Offline Points: 7 |
Post Options
Thanks(0)
Posted: 17 April 2008 at 6:26pm |
My team is currently using the Codejock MFC skin framework to skin our MFC app. We wanted to extend the functionality of our MFC app by using .NET forms. The problem we found is that Codejock skin framework that we were using does not extend to any .NET forms we may call from our MFC app. To skin these we downloaded the demo version of the ActiveX suite to see if we should buy that product also. We were able to get the skinning to work, Now when we call the .NET forms from MFC we get the correct skins. The problem is that when we exit the app we get a crash that says "The string binding is invalid".
Looking online it looked like this may be a problem with some linkage in mixed Managed and unmanaged dll's.
Can anyone provide me with any input or suggestions?
Thanks.
|
|
Voltus
|
|
voltus
Newbie Joined: 17 April 2008 Status: Offline Points: 7 |
Post Options
Thanks(0)
|
Actually, as we looked into it further, it was actually an unhandled exception that was handled by something. The app doesn't "crash" but allows you to "continue". The message only comes up in debug mode. In release it "looks" like it exits gracefully.
I am still concerned that there is a problem. Any ideas?
|
|
Voltus
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, Small sample will be great. Please send one to support@codejock.com.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Smucker
Senior Member Joined: 02 February 2008 Status: Offline Points: 156 |
Post Options
Thanks(0)
|
You can "cheat" and call TerminateProcess(GetCurrentProcess(), 0) once you've closed any buffered streams or connections. Your application will exit very quickly with no errors. Everything should be cleaned up fine (on true Win32/64 and server OSes) unless Microsoft decided to break something horribly with .NET.
|
|
Product: Xtreme Toolkit Pro version 13.2 (Unicode, static build)
Platform: Windows 200x/XP/Vista/Win7 (32/64 bit) Language: Visual C++ 9.0 (Studio 2008) |
|
voltus
Newbie Joined: 17 April 2008 Status: Offline Points: 7 |
Post Options
Thanks(0)
|
Thanks Sev. I would rather not cheat. :-)
Oleg,
I am working on a sample app now. Unfortunately, I've run into another problem that I don't see in our commercial app. In my sample app, if I call CodeJock's MFC LoadSkin() to apply the skin on the MFC side when I try bring up a .NET winform through a COM interface the debugger reports the class as not registered. However, when I comment out the LoadSkin(), it makes the call to bring up the winform just fine.
Any hints?
|
|
Voltus
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, Sorry again I need to try it myself to help. I need some code to debug.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
voltus
Newbie Joined: 17 April 2008 Status: Offline Points: 7 |
Post Options
Thanks(0)
|
I sent you some sample code for the second problem. Hopefully we can get passed this so we can try to reproduce the initial problem. The initial problem is preventing us from purchasing the ActiveX SkinFramework stuff. I would really love to not use MFC for the GUI I am working on.
|
|
Voltus
|
|
voltus
Newbie Joined: 17 April 2008 Status: Offline Points: 7 |
Post Options
Thanks(0)
|
Oleg,
You mentioned that it worked on you 12.0 beta, but unfortunately, my management won't accept a non- release version. I need to get it working on the version that we can buy now which I believe is 11.2.2. I s there any way you can help me with that version. If I had a few months to wait, I would love to wait for the latest version. Unfortunately, that does not fit into our development schedule.
Thanks for your help.
|
|
Voltus
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
Yes, thank you for sample, we modified SkinFarmework, so with 12.0 release you will be able to skin both MFC and .NET parts using only MFC SkinFramework code.
Please wait 12.0 release, it will be soon.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
voltus
Newbie Joined: 17 April 2008 Status: Offline Points: 7 |
Post Options
Thanks(0)
|
Oleg, unless that version is coming out this week, I will be unable to use it. |
|
Voltus
|
|
voltus
Newbie Joined: 17 April 2008 Status: Offline Points: 7 |
Post Options
Thanks(0)
|
Oleg,
I brought down the 12.0 evaluation and it does look like my sample app is working. I then used the 12.0 version of the skin framework on our commercial application. The skinning went through to the .NET forms beautifully. Unfortunately, we still received the original problem where the string binding is invalid. It seems like something in our very large and complicated app is not meshing very well with your framework.
I debugged the problem for a while and finally started looking at what methods we were calling on your framework. We were pretty much just calling LoadSkin() in the InitInstance() of our app. I thought there must be something that can be called during ExitInstance() for cleanup of whatever the skin framework set up. After trying a couple of methods I finally tried XTPSkinManager()->RemoveAll() during the ExitInstance(). This cleared up the string binding problem and allowed us to exit.
Do you see any problem with this?
If not, I can present this to my management and most likely move forward with getting the latest version of your product.
Thanks very much for your help.
|
|
Voltus
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
Yes, its right. Also try in ExitInstance add
XTPSkinManager()->LoadSkin(NULL, NULL);
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
akur
Senior Member Joined: 16 May 2006 Status: Offline Points: 139 |
Post Options
Thanks(0)
|
We've got the same problem -> already using MFC skinning, but would like to skin WinForms dialogs, as well (still in the same process). |
|
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 |