Is there a tool that generates P/Invoke signatures for arbitrary unmanaged DLL?

Google quickly found http://www.pinvoker.com (Wayback) (Compatiblity listed as VS2005, 2008, and 2010; it doesn’t seem to have been updated to work with newer versions) Microsoft’s C++/CLI compiler can also do this, if you use /clr:safe and #include the header file, it will generate p/invoke code which you can extract with e.g. ILSpy (free) or Red … Read more

Is char *envp[] as a third argument to main() portable

The function getenv is the only one specified by the C standard. The function putenv, and the extern environ are POSIX-specific. EDIT The main parameter envp is not specified by POSIX but is widely supported. An alternative method of accessing the environment list is to declare a third argument to the main() function: int main(int … Read more