Abdul Khaliq
Abdul Khaliq

Reputation: 2453

How to make 64 bit dll compatible with 64-bit editions of Windows Server 2008, Windows 7, and Windows XP?

I have compiled a dll on Windows Server 2008 64 bit edition. It works fine on that version of Windows, but if I switch to Windows 7 or XP 64 bit edition the dll does not work. How can I make the dll compatible with all three versions of 64bit edition windows?

I am using Visual Studio 2010.

Upvotes: 2

Views: 1385

Answers (2)

Kirill V. Lyadvinsky
Kirill V. Lyadvinsky

Reputation: 99525

Check how _WIN32_WINNT and WINVER macros were defined in your DLL. To make your DLL compatible with Windows XP you should define them as 0x0501. That lets you find all dependency problems at compile time. More information about these macros you could find here.

Upvotes: 2

eplawless
eplawless

Reputation: 4323

You can use a program called Dependency Walker to see what dependencies your .dll file has, and eliminate the ones that are different between versions of Windows.

Upvotes: 3

Related Questions