June 16, 2009

dllmain(...) + usage of delete operator = argh!


Since its beginning, the G2Ext Starter (CMD/GUI) had a problem with loading the g2ext.dll. I was always wondering why?

With some infos about errors-while-loading-dlls from NicoDE, I finally managed to fix the bug.

Never use the delete [object] operator in a dllmain function. Never! Or anything else what could make the dllmain fail.

Here is some good doc about best practice in DLLs (even if its from MS... its useful):
Best Practice in DLLs (@ microsoft.com)