When trying to compile SeaMonkey with Visual Studio 2012, the builds stops when trying to compile msgMapiImp.cpp because of those two errors: http://hg.mozilla.org/comm-central/annotate/724e23e39c73/mailnews/mapi/mapihook/src/msgMapiImp.cpp#l339 Returning an nserror in a function with a LONG return type and http://hg.mozilla.org/comm-central/annotate/724e23e39c73/mailnews/mapi/mapihook/src/msgMapiImp.cpp#l385 Returning an nserror in a function with a HRESULT return type (says the compiler)
Previous versions of VC don't support strongly typed enums so they silently cast nsresult to LONG/HRESULT/whatever. Anyway, we shouldn't be returning NS_ERROR_FAILURE, we should be using Microsoft error codes.
Something like MAPI_E_FAILURE ?
Created attachment 736909 [details] [diff] [review] Patch This patch fixes the build, but still need to check if everything works as expected. I'm not sure what the meaning of the "// get the singelton obj" comment is in that context (when returning because of an error).
Created attachment 736914 [details] [diff] [review] Patch This one is the correct patch, mixed up two patches there.
Comment on attachment 736914 [details] [diff] [review] Patch Looks good to me.