Sync to Wine-20050830:
[reactos.git] / reactos / lib / rpcrt4 / cpsf.c
index 4e5c0cb..63ff851 100644 (file)
@@ -22,6 +22,8 @@
 #include <stdio.h>
 #include <string.h>
 
+#define COBJMACROS
+
 #include "windef.h"
 #include "winbase.h"
 #include "winerror.h"
@@ -114,7 +116,7 @@ static HRESULT WINAPI CStdPSFactory_CreateStub(LPPSFACTORYBUFFER iface,
                                   ProxyInfo->pStubVtblList[Index], iface, ppStub);
 }
 
-static IPSFactoryBufferVtbl CStdPSFactory_Vtbl =
+static const IPSFactoryBufferVtbl CStdPSFactory_Vtbl =
 {
   CStdPSFactory_QueryInterface,
   CStdPSFactory_AddRef,
@@ -181,11 +183,11 @@ HRESULT WINAPI NdrDllRegisterProxy(HMODULE hDll,
       if (RegCreateKeyExA(HKEY_CLASSES_ROOT, keyname, 0, NULL, 0,
                           KEY_WRITE, NULL, &key, NULL) == ERROR_SUCCESS) {
         if (name)
-          RegSetValueExA(key, NULL, 0, REG_SZ, name, strlen(name));
+          RegSetValueExA(key, NULL, 0, REG_SZ, (LPBYTE)name, strlen(name));
         if (RegCreateKeyExA(key, "ProxyStubClsid32", 0, NULL, 0,
                             KEY_WRITE, NULL, &subkey, NULL) == ERROR_SUCCESS) {
           snprintf(module, sizeof(module), "{%s}", clsid);
-          RegSetValueExA(subkey, NULL, 0, REG_SZ, module, strlen(module));
+          RegSetValueExA(subkey, NULL, 0, REG_SZ, (LPBYTE)module, strlen(module));
           RegCloseKey(subkey);
         }
         RegCloseKey(key);
@@ -203,7 +205,7 @@ HRESULT WINAPI NdrDllRegisterProxy(HMODULE hDll,
                         KEY_WRITE, NULL, &key, NULL) == ERROR_SUCCESS) {
       if (RegCreateKeyExA(key, "InProcServer32", 0, NULL, 0,
                           KEY_WRITE, NULL, &subkey, NULL) == ERROR_SUCCESS) {
-        RegSetValueExA(subkey, NULL, 0, REG_SZ, module, strlen(module));
+        RegSetValueExA(subkey, NULL, 0, REG_SZ, (LPBYTE)module, strlen(module));
         RegCloseKey(subkey);
       }
       RegCloseKey(key);