windows-shell-extension-20081017
authorJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 18 Oct 2008 05:12:25 +0000 (05:12 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 18 Oct 2008 05:12:25 +0000 (05:12 +0000)
LICENSE MIT

windows-afsreg-20081017 wraps strings for wide char usage.
use the wide char versions of win32 apis to match.

src/WINNT/client_exp/gui2fs.cpp
src/WINNT/client_exp/shell_ext.cpp
src/WINNT/client_exp/submounts_dlg.cpp

index 13950a1..40ada97 100644 (file)
@@ -1203,7 +1203,7 @@ static const char * NetbiosName(void)
     DWORD dummyLen;
     DWORD enabled = 0;
 
-    code = RegOpenKeyExA(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PARAM_SUBKEY,
+    code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PARAM_SUBKEY,
                          0, (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &parmKey);
     if (code == ERROR_SUCCESS) {
         dummyLen = sizeof(buffer);
index 164ba6c..bee75fa 100644 (file)
@@ -79,7 +79,7 @@ CShellExt::CShellExt()
     m_bIsOverlayEnabled=FALSE;
     if (FAILED(hr))
        m_pAlloc = NULL;
-    RegOpenKeyExA(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PARAM_SUBKEY,0, (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &NPKey);
+    RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PARAM_SUBKEY,0, (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &NPKey);
     LSPsize=sizeof(ShellOption);
     code=RegQueryValueEx(NPKey, _T("ShellOption"), NULL,
                          &LSPtype, (LPBYTE)&ShellOption, &LSPsize);
index 1ebdde5..d05bb89 100644 (file)
@@ -48,10 +48,10 @@ static CSubmountInfo *ReadSubmtInfo(const CString& strShareName)
        TCHAR pathName[1024];
 
     HKEY hkSubmounts;
-    RegCreateKeyExA( HKEY_LOCAL_MACHINE, 
-                    AFSREG_CLT_OPENAFS_SUBKEY "\\Submounts",
+    RegCreateKeyEx( HKEY_LOCAL_MACHINE, 
+                    AFSREG_CLT_OPENAFS_SUBKEY TEXT("\\Submounts"),
                     0, 
-                    "AFS", 
+                    TEXT("AFS"), 
                     REG_OPTION_NON_VOLATILE,
                     (IsWow64()?KEY_WOW64_64KEY:0)|KEY_READ,
                     NULL, 
@@ -169,10 +169,10 @@ BOOL CSubmountsDlg::FillSubmtList()
     DWORD dwIndex;
     DWORD dwSubmounts;
 
-    RegCreateKeyExA( HKEY_LOCAL_MACHINE, 
-                    AFSREG_CLT_OPENAFS_SUBKEY "\\Submounts",
+    RegCreateKeyEx( HKEY_LOCAL_MACHINE, 
+                    AFSREG_CLT_OPENAFS_SUBKEY TEXT("\\Submounts"),
                     0, 
-                    "AFS", 
+                    TEXT("AFS"), 
                     REG_OPTION_NON_VOLATILE,
                     (IsWow64()?KEY_WOW64_64KEY:0)|KEY_READ|KEY_WRITE|KEY_QUERY_VALUE,
                     NULL, 
@@ -251,10 +251,10 @@ static BOOL AddSubmt(CSubmountInfo *pInfo)
        HOURGLASS hourglass;
 
     HKEY hkSubmounts;
-    RegCreateKeyExA( HKEY_LOCAL_MACHINE, 
-                    AFSREG_CLT_OPENAFS_SUBKEY "\\Submounts",
+    RegCreateKeyEx( HKEY_LOCAL_MACHINE, 
+                    AFSREG_CLT_OPENAFS_SUBKEY TEXT("\\Submounts"),
                     0, 
-                    "AFS", 
+                    TEXT("AFS"), 
                     REG_OPTION_NON_VOLATILE,
                     (IsWow64()?KEY_WOW64_64KEY:0)|KEY_WRITE,
                     NULL, 
@@ -274,10 +274,10 @@ static BOOL DeleteSubmt(CSubmountInfo *pInfo)
        HOURGLASS hourglass;
 
     HKEY hkSubmounts;
-    RegCreateKeyExA( HKEY_LOCAL_MACHINE, 
-                    AFSREG_CLT_OPENAFS_SUBKEY "\\Submounts",
+    RegCreateKeyEx( HKEY_LOCAL_MACHINE, 
+                    AFSREG_CLT_OPENAFS_SUBKEY TEXT("\\Submounts"),
                     0, 
-                    "AFS", 
+                    TEXT("AFS"), 
                     REG_OPTION_NON_VOLATILE,
                     (IsWow64()?KEY_WOW64_64KEY:0)|KEY_WRITE,
                     NULL,