I created a .dll using Visual C++ Express 8.0. For testing purposes, it couldn't be simpler:
extern "C" __declspec(dlle xport) void __stdcall NVPM_Init();
__declspec(dlle xport) void __stdcall NVPM_Init() {
return;
}
In the VB program if I try to add the reference to this .dll it says "file could not be added. Please make sure the file is accessible and that it is a valid assembly or COM component".
The VB program uses a third party .DLL I downloaded, the popular Zedgraph, which works fine. When I use CFF Explorer to view ZedGraph is says "Portable Executable 32 .NET Assembly". When I look at my custom .dll it says only "Portable Executable 32", in other words, missing the ".NET Assembly" suffix. I assume this is the source of my problem.
How do I tell Visual C++ to make my .DLL a '.NET Assembly'? I have tried it as both a Win32 Console App and a Win32 Project but doesn't seem to matter. The /NOASSEMBLY switch does not exist in the command line.
extern "C" __declspec(dlle xport) void __stdcall NVPM_Init();
__declspec(dlle xport) void __stdcall NVPM_Init() {
return;
}
In the VB program if I try to add the reference to this .dll it says "file could not be added. Please make sure the file is accessible and that it is a valid assembly or COM component".
The VB program uses a third party .DLL I downloaded, the popular Zedgraph, which works fine. When I use CFF Explorer to view ZedGraph is says "Portable Executable 32 .NET Assembly". When I look at my custom .dll it says only "Portable Executable 32", in other words, missing the ".NET Assembly" suffix. I assume this is the source of my problem.
How do I tell Visual C++ to make my .DLL a '.NET Assembly'? I have tried it as both a Win32 Console App and a Win32 Project but doesn't seem to matter. The /NOASSEMBLY switch does not exist in the command line.
Comment