Click here to Skip to main content
15,792,380 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Simple, and somewhat naïve, questions:

1) Apparently one can generate 64 bit .exe from VB.NET in Visual Studio 2022; how about VS 2019?

2) Assuming one generates a 64 bit .exe for VB.NET, can it access 64 bit DLLs (generated in other languages)? 32 bit DLLs?

Might be a false memory, but I seem to remember a few years ago that VB.NET could not access 64 bit DLLs, only 32 bit DLLs.


What I have tried:

Nothing but a lot of Googling.
Updated 24-Jun-22 15:23pm

1 solution

This is not imposed by VB.NET or Visual Studio. WINDOWS does not allow mixing of architectures in the same process.

No, you cannot load a 64-bit .DLL in a process running 32-bit, and the other way around. The languages the .DLL's and main executable are written in do not matter.

VB.NET can load 64-bit .DLL's, so long as your executable in running as 64-bit. Go to your project Properties (My Project), Compile tab, look for "Target CPU". If it says "AnyCPU", your app will run as a 32-bit process on 32-bit Windows and as 64-bit on 64-bit Windows. You can change that option to force your app to run as 32-bit (x86), or 64-bit (x64).

The 32-bit app can run on 32- and 64-bit Windows, but a 64-bit app can only run on 64-bit Windows.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900