[SHELL32] CDrivesFolder: Implement the eject and disconnect menu items. CORE-13841
[reactos.git] / dll / win32 / mapi32 / util.c
index 90cfa6e..913497f 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <stdarg.h>
-#include <stdio.h>
+#include "precomp.h"
 
-#define COBJMACROS
-#define NONAMELESSUNION
-#define NONAMELESSSTRUCT
-#include "windef.h"
-#include "winbase.h"
-#include "winreg.h"
-#include "winuser.h"
-#include "winerror.h"
-#include "winternl.h"
-#include "objbase.h"
-#include "shlwapi.h"
-#include "wine/debug.h"
-#include "wine/unicode.h"
-#include "mapival.h"
-#include "xcmc.h"
-#include "msi.h"
-#include "util.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(mapi);
+#include <stdio.h>
+#include <winternl.h>
+#include <xcmc.h>
+#include <msi.h>
 
 static const BYTE digitsToHex[] = {
   0,1,2,3,4,5,6,7,8,9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,10,11,12,13,14,15,
@@ -239,6 +223,15 @@ HRESULT WINAPI WrapProgress(PVOID unk1, PVOID unk2, PVOID unk3, PVOID unk4, PVOI
     return MAPI_E_NO_SUPPORT;
 }
 
+/*************************************************************************
+ * HrDispatchNotifications@4 (MAPI32.239)
+ */
+HRESULT WINAPI HrDispatchNotifications(ULONG flags)
+{
+    FIXME("(%08x)\n", flags);
+    return S_OK;
+}
+
 /*************************************************************************
  * HrThisThreadAdviseSink@8 (MAPI32.42)
  *
@@ -488,7 +481,7 @@ BOOL WINAPI FEqualNames(LPMAPINAMEID lpName1, LPMAPINAMEID lpName2)
     if (lpName1->ulKind == MNID_STRING)
         return !strcmpW(lpName1->Kind.lpwstrName, lpName2->Kind.lpwstrName);
 
-    return lpName1->Kind.lID == lpName2->Kind.lID ? TRUE : FALSE;
+    return lpName1->Kind.lID == lpName2->Kind.lID;
 }
 
 /**************************************************************************
@@ -935,6 +928,18 @@ HRESULT WINAPI HrQueryAllRows(LPMAPITABLE lpTable, LPSPropTagArray lpPropTags,
     return MAPI_E_CALL_FAILED;
 }
 
+/**************************************************************************
+ *  WrapCompressedRTFStream   (MAPI32.186)
+ */
+HRESULT WINAPI WrapCompressedRTFStream(LPSTREAM compressed, ULONG flags, LPSTREAM *uncompressed)
+{
+    if (mapiFunctions.WrapCompressedRTFStream)
+        return mapiFunctions.WrapCompressedRTFStream(compressed, flags, uncompressed);
+
+    FIXME("(%p, 0x%08x, %p): stub\n", compressed, flags, uncompressed);
+    return MAPI_E_NO_SUPPORT;
+}
+
 static HMODULE mapi_provider;
 static HMODULE mapi_ex_provider;
 
@@ -1075,6 +1080,7 @@ void load_mapi_providers(void)
         mapiFunctions.MAPISaveMail = (void*) GetProcAddress(mapi_provider, "MAPISaveMail");
         mapiFunctions.MAPISendDocuments = (void*) GetProcAddress(mapi_provider, "MAPISendDocuments");
         mapiFunctions.MAPISendMail = (void*) GetProcAddress(mapi_provider, "MAPISendMail");
+        mapiFunctions.MAPISendMailW = (void*) GetProcAddress(mapi_provider, "MAPISendMailW");
     }
 
     /* Extended MAPI functions */
@@ -1098,6 +1104,7 @@ void load_mapi_providers(void)
         mapiFunctions.MAPIOpenLocalFormContainer = (void *) GetProcAddress(mapi_ex_provider, "MAPIOpenLocalFormContainer");
         mapiFunctions.OpenStreamOnFile = (void*) GetProcAddress(mapi_ex_provider, "OpenStreamOnFile@24");
         mapiFunctions.ScInitMapiUtil = (void*) GetProcAddress(mapi_ex_provider, "ScInitMapiUtil@4");
+        mapiFunctions.WrapCompressedRTFStream = (void*) GetProcAddress(mapi_ex_provider, "WrapCompressedRTFStream@12");
     }
 
 cleanUp: