Dllsample convert to C++.net ,error 126

 

i want to create a dll from c++.net 2005,so i convert the dllsample project to c++.net project used default setting.

i didnot change any code,then to bulid a new dll,the name is "ExpertSample.dll" too.

but when i use the new dll "ExpertSample.dll", it will get a error 126.

who can tell me how to change the setting,if i convert the dllsample project to c++.net project.

thanks you very much.

 

Try to write test program in C++ (not dotNet!). And try to use WinAPI functions LoadLibrary and GetProcAddress to call your dll.

You should provide "unmanaged code" in your dll to be called from client terminal

 

Check MSVCR71.dll && MSVCR80.dll in system path...

If not exist copy to \WinRootDir\System32

You can use "Depends utility" from Microsoft Platform SDK for ident req DLL.

OR

Project Properties -> C/C++ -> Code Generation -> Runtime Library

Debug /MDd -> /MTd

Release /MD -> /MT

In this mode the dll size is more, but does not demand Runtime library

Reason: