Vincent, could you please share what problem the above is causing? I had to change the cast to ULONG_PTR * when compiling with mingw-w64, targeting 64-bit Windows and using the official Outlook 2010 MAPI headers from Microsoft; otherwise, the compiler reported an error.
Corrects wrong cast.
- (ULONG_PTR *) &nbConnection);
+ (ULONG *) &nbConnection);