If you would like to post a question or an answer, please log in.

If you do not have an account yet, please register here.

Customized feature dll that works in 32 bit does not work in 64 bit?

User: fritzdev
Since: 02/09/2012
Rule Sets: 0
User Posts: 3
Date: 02/09/2012 [05:01 PM]
We have a customized features DLL that has been working under 32 bit Windows XP with Definiens Developer 7. We have installed the same Definiens Developer 7 on Windows 7 64 bit and copied the same features DLL to the plugins folder, but when we try to load the rule-set we get a simple dialog box with the message "Could not load the process". What does this error message mean?

I have been able to debug things to the point where I see calls are made into our DLL to create the plugin and set parameters. There are also calls to get Short Name, etc. and then we get the error dialog. The last call I could trace was Info::GetName. Any help resolving this issue would be greatly appreciated.
User: Stanislav
Since: 06/30/2011
Rule Sets: 0
User Posts: 4
Date: 02/14/2012 [03:15 PM]
You need to recompile your dll with 64bit compiler. Unfortunately 64bit processes cannot load 32bit dlls.
User: fritzdev
Since: 02/09/2012
Rule Sets: 0
User Posts: 3
Date: 02/14/2012 [04:38 PM]
"Stanislav" wrote:

You need to recompile your dll with 64bit compiler. Unfortunately 64bit processes cannot load 32bit dlls.


Thanks, but I am running the 32 bit version of Definiens (over SysWOW64). I have been able to debug our DLL up to a point. There is a function call for "GetShortName" that has some local DString variables generated from a DValue::ToStr calls. When they go out of scope I get the following message:

Debug Assertion Failed! _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)

This is generated on the delete[] data call in the DString destructor. I've found some documentation that suggests this is due to double deletion, yet a DString I create does not have this problem.

Still not sure where to go from here.
User: Stanislav
Since: 06/30/2011
Rule Sets: 0
User Posts: 4
Date: 02/14/2012 [06:20 PM]
It looks like different versions of CRT library are used for our software and your dll. In this case, the memory for DString is allocated by one version of CRT and deallocated by another.

Which version of compiler do you use?

Do you use "manifest" for your dll? Could you try to disable it? In this case OS will use manifest from exe file and find correct version of CRT.
User: fritzdev
Since: 02/09/2012
Rule Sets: 0
User Posts: 3
Date: 02/16/2012 [11:04 PM]
"Stanislav" wrote:

It looks like different versions of CRT library are used for our software and your dll. In this case, the memory for DString is allocated by one version of CRT and deallocated by another.

Which version of compiler do you use?

Do you use "manifest" for your dll? Could you try to disable it? In this case OS will use manifest from exe file and find correct version of CRT.


Our original features DLL was compiled with VS2005 (release mode). I recompiled with VS2003 (release mode) and was able to get it working in both 32bit and 64bit windows. Using depends I can can see that our DLL and definiens DLLs are now both using the same version of the CRT. I can only assume we were getting lucky with the VS2005 compiled version under 32bit windows (ie sysWOW64 better detects memory corruption). Thanks

[This article was edited 1 times, at last 16.02.2012 at 23:07.]