View Single Post
Old 5th October 2011, 10:50   #16
Afrow UK
Afrow UK's Avatar
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
You are using a lot of CRT functions and for that reason you are still linking to it, even though you have disabled the manifest. As you have compiled with VC9 all machines will need .NET 3.5 or standalone MSCRT90 installed, which by no means will always be the case. The installer will crash.

There is no need to use functions such as _beginthreadex and memset and you must not use the new operator. These are all functions/features that use or depend on the CRT. There are Win32 API alternatives such as CreateThread and LocalAlloc/GlobalAlloc (and you do not need to zero the memory if you use the right *Alloc options). Finally your exports are wrong. You are missing extern "C" from your function definitions. Also, if you decorate functions with __declspec(dllexport), you do not need a .def file. If you get your plug-in built without CRT it will be ~4KB rather than 55KB.

Afrow UK is offline   Reply With Quote