As a way to check the code, I'm compiling openchange with g++

If you want to try this, it is only a "CC=g++ ./configure" command away.

There are a few problems (e.g. we don't consistently do the __BEGIN_DECLS and 
__END_DECLS) and some C/C++ problems (e.g. variable names called "private"). 
Nothing too hard to fix.

However the issue I need help with relates to the MAPI_RETVAL_IF() macro. We 
have a lot of API documentation that says something like:
    \return MAPI_E_SUCCESS on success, otherwise -1

   \note Developers should call GetLastError() to retrieve the last MAPI error
   code. Possible MAPI error codes are:
   - MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
   - MAPI_E_SESSION_LIMIT: No session has been opened on the provider

The function signature looks like:
_PUBLIC_ enum MAPISTATUS function()

The MAPI_RETVAL_IF macro returns -1 (or doesn't return)

Some of those things are wrong.

Do we really want users to check GetLastError()?

Should MAPI_RETVAL_IF() return a MAPISTATUS?

Brad
_______________________________________________
devel mailing list
[email protected]
http://mailman.openchange.org/listinfo/devel

Reply via email to