cryptui: Fix compilation on systems that don't support nameless unions.

Francois Gouget fgouget at free.fr
Sun Oct 26 17:39:18 CDT 2008


---
 dlls/cryptui/main.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/dlls/cryptui/main.c b/dlls/cryptui/main.c
index 482bd14..04ed743 100644
--- a/dlls/cryptui/main.c
+++ b/dlls/cryptui/main.c
@@ -20,6 +20,8 @@
 
 #include <stdarg.h>
 
+#define NONAMELESSUNION
+
 #include "windef.h"
 #include "winbase.h"
 #include "winnls.h"
@@ -122,11 +124,11 @@ BOOL WINAPI CryptUIWizImport(DWORD dwFlags, HWND hwndParent, LPCWSTR pwszWizardT
         FIXME("source type not implemented: %u\n", pImportSrc->dwSubjectChoice);
         return FALSE;
     }
-    file = CreateFileW(pImportSrc->pwszFileName, GENERIC_READ, FILE_SHARE_READ, NULL,
+    file = CreateFileW(pImportSrc->u.pwszFileName, GENERIC_READ, FILE_SHARE_READ, NULL,
                        OPEN_EXISTING, 0, NULL);
     if (file == INVALID_HANDLE_VALUE)
     {
-        WARN("can't open certificate file %s\n", debugstr_w(pImportSrc->pwszFileName));
+        WARN("can't open certificate file %s\n", debugstr_w(pImportSrc->u.pwszFileName));
         return FALSE;
     }
     if ((size = GetFileSize(file, NULL)))
@@ -136,7 +138,7 @@ BOOL WINAPI CryptUIWizImport(DWORD dwFlags, HWND hwndParent, LPCWSTR pwszWizardT
             DWORD read;
             if (!ReadFile(file, buffer, size, &read, NULL) || read != size)
             {
-                WARN("can't read certificate file %s\n", debugstr_w(pImportSrc->pwszFileName));
+                WARN("can't read certificate file %s\n", debugstr_w(pImportSrc->u.pwszFileName));
                 HeapFree(GetProcessHeap(), 0, buffer);
                 CloseHandle(file);
                 return FALSE;
@@ -145,7 +147,7 @@ BOOL WINAPI CryptUIWizImport(DWORD dwFlags, HWND hwndParent, LPCWSTR pwszWizardT
     }
     else
     {
-        WARN("empty file %s\n", debugstr_w(pImportSrc->pwszFileName));
+        WARN("empty file %s\n", debugstr_w(pImportSrc->u.pwszFileName));
         CloseHandle(file);
         return FALSE;
     }
-- 
1.5.6.5



More information about the wine-patches mailing list