Sign in to follow this  
Followers 0
obrienj

DLL built on Vista won't run on XP - sort of

5 posts in this topic

#1 ·  Posted (edited)

I have only a Vista machine with Visual Studio C++ Express to build a "C" DLL on. The target for the DLL is XP.

And it is a "C" DLL NOT a C++ DLL.

Actually I have two DLLs that I am "converting" at the moment, both compiled on Vista.

One of them, a derivative of the SQLite.DLL, with math and string functions, when copied to XP runs fine.

The other also compiles and runs on Vista, but gets a "-1" error on DLLOpen on XP which tells me nothing but that some error occurred.

BTW, both DLLs are invoked by the exact same AutoIt based ".exe" file which was built and runs on Vista and copied to XP

I have the Visual C++ 2008 Redistributable - x86 installed.

If I look at the failing DLL with PEViewer on XP, it shows all dependencies loaded.

Both use "cdecl" protocol and the DLLCalls in the AutoIt code indicate that.

For the life of me, I can't see the difference in the project properties files between the two DLLs other than the one that works is "Release" and the one that fails is "Debug".

I do know that the SQLite DLL is not s big user directly of the Windows API while the other DLL is.

Oh yes, the failing DLL was originally built on XP with C++ 2005 and also ran on XP. The reason for recompilation was to change a message text.

When I moved my development to Vista, the DLL project was converted by Visual Studio just like all my other "C" and "C++" other projects.

I have had no such problems with C#, Java, AutoIt or any other C++ or C programs including DLLs.

Anyone got any idea of the things I should look at?

Regards,

Jim

Edited by obrienj

Share this post


Link to post
Share on other sites



This is truly bizarre!

I changed the failing DLL from Debug to Release and it works on XP.

Then again, I've seen stranger things in 50 years working with computers.

Regards,

Jimk

Share this post


Link to post
Share on other sites

This is truly bizarre!

I changed the failing DLL from Debug to Release and it works on XP.

I find it strange also. I've been building SQLite extensions with VC 2008 recently and never had a problem running them, debug or release. I've now swtich to using gcc for various reasons, but it should work for you as well.

Are you definitely positive this can't be (or have been) a dumb path problem or anything fairly irritating at this level. Don't take it bad, it's just that it _does_ happen!


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites

Not strange at all. Release mode removes a lot of dependencies and the resulting binary is made so it is going to be as compatible as possible.

Installing VC Redist 2008 fixes most problems (or statically link your dll).


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

Installing VC Redist 2008 fixes most problems (or statically link your dll).

I see. I installed VC 2008 only fairly recently and it's likely the download I used already had the patch included.

That, or it's also possible that I wasn't using enough MS library functions for the fix to be required in my case.

Generally, SQLite extension don't need that much external functions.


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0