[ADVPACK]: Sync with Wine 1.5.19.
[reactos.git] / reactos / dll / win32 / advpack / advpack_private.h
index 3f81bba..5d74897 100644 (file)
 #ifndef __ADVPACK_PRIVATE_H
 #define __ADVPACK_PRIVATE_H
 
-HRESULT do_ocx_reg(HMODULE hocx, BOOL do_reg);
-LPWSTR get_parameter(LPWSTR *params, WCHAR separator);
-void set_ldids(HINF hInf, LPCWSTR pszInstallSection, LPCWSTR pszWorkingDir);
+HRESULT do_ocx_reg(HMODULE hocx, BOOL do_reg, const WCHAR *flags, const WCHAR *param) DECLSPEC_HIDDEN;
+LPWSTR get_parameter(LPWSTR *params, WCHAR separator) DECLSPEC_HIDDEN;
+void set_ldids(HINF hInf, LPCWSTR pszInstallSection, LPCWSTR pszWorkingDir) DECLSPEC_HIDDEN;
 
-HRESULT launch_exe(LPCWSTR cmd, LPCWSTR dir, HANDLE *phEXE);
+HRESULT launch_exe(LPCWSTR cmd, LPCWSTR dir, HANDLE *phEXE) DECLSPEC_HIDDEN;
+
+static inline void *heap_alloc(size_t len)
+{
+    return HeapAlloc(GetProcessHeap(), 0, len);
+}
+
+static inline BOOL heap_free(void *mem)
+{
+    return HeapFree(GetProcessHeap(), 0, mem);
+}
+
+static inline char *heap_strdupWtoA(const WCHAR *str)
+{
+    char *ret = NULL;
+
+    if(str) {
+        size_t size = WideCharToMultiByte(CP_ACP, 0, str, -1, NULL, 0, NULL, NULL);
+        ret = heap_alloc(size);
+        if(ret)
+            WideCharToMultiByte(CP_ACP, 0, str, -1, ret, size, NULL, NULL);
+    }
+
+    return ret;
+}
 
 #endif /* __ADVPACK_PRIVATE_H */