How do I name a native DLL, distributed in both 32-bit and 64-bit form?

I have a commercial product that is a DLL (native 32-bit code), and now it's time to build its 64-bit version. Therefore, when installing on 64-bit Windows, the 32-bit version goes to Windows \ SysWOW64, and the 64-bit version goes to Windows ... System32! (I bite my language here ...) Or DLLs can be installed next to the client application.

What should I call a 64-bit DLL?

Same name as 32-bit: two files that do the same thing have the same name, but are not completely interchangeable. Isn't this a recipe for confusion and support problems?

Different names (for example, product.dll and product64.dll): now client applications must know whether they are 32-bit or 64-bit in order to refer to my DLL, and there are languages ​​in which this is not known so far. NET is just one example. And now all statically compiled clients should conditionally declare import declarations: IF target = WIN64 THEN import Blah from "product64.dll" ELSE import Blah from "product.dll" ENDIF

The product contains a huge amount of C code, and a large piece of C ++ - porting it to C # is not an option.

Advice? Suggestions?

+3
source share
3 answers

Microsoft , DLL System32, 64- . Win7/64 System32\avicap32.dll - 64- DLL!

, 32- 64- . , , . .NET, "AnyCPU".

0

"", 32- 64-. DLL , 32- DLL 64- , 64- DLL 32- .

32- - 32, SysWow64, 32- .

, . , , .

+2

Why not emphasize the dll prefix ... for example product_32.dll and product_64.dll ? OR indicated this using the platform prefix - product_x86_32.dll and product_x86_64.dll ? At the very least, this will eliminate the confusion in the name of the DLL ... What do you think?

+1
source

Source: https://habr.com/ru/post/1735558/


All Articles