Fix crypt32 issues reported by winapi_check

Francois Gouget fgouget at free.fr
Fri Jun 17 13:45:11 CDT 2005


Changelog:

  * dlls/crypt32/crypt32.spec
    dlls/crypt32/encode.c
    include/wincrypt.h

    Francois Gouget <fgouget at free.fr>
    Fix the CryptEncodeObjectEx() prototype.
    Fixes winapi_check warnings.


-- 
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
                             $live{free} || die "";
-------------- next part --------------
Index: dlls/crypt32/crypt32.spec
===================================================================
RCS file: /var/cvs/wine/dlls/crypt32/crypt32.spec,v
retrieving revision 1.23
diff -u -p -r1.23 crypt32.spec
--- dlls/crypt32/crypt32.spec	14 Jun 2005 11:38:36 -0000	1.23
+++ dlls/crypt32/crypt32.spec	17 Jun 2005 00:02:51 -0000
@@ -90,7 +90,7 @@
 @ stub CryptDecryptAndVerifyMessageSignature
 @ stub CryptDecryptMessage
 @ stdcall CryptEncodeObject(long str ptr ptr ptr)
-@ stdcall CryptEncodeObjectEx(long str ptr long ptr ptr)
+@ stdcall CryptEncodeObjectEx(long str ptr long ptr ptr ptr)
 @ stub CryptEncryptMessage
 @ stub CryptEnumOIDFunction
 @ stub CryptEnumOIDInfo
Index: dlls/crypt32/encode.c
===================================================================
RCS file: /var/cvs/wine/dlls/crypt32/encode.c,v
retrieving revision 1.12
diff -u -p -r1.12 encode.c
--- dlls/crypt32/encode.c	17 Jun 2005 09:50:37 -0000	1.12
+++ dlls/crypt32/encode.c	17 Jun 2005 16:32:11 -0000
@@ -1211,7 +1211,7 @@ typedef BOOL (WINAPI *CryptEncodeObjectE
 
 BOOL WINAPI CryptEncodeObjectEx(DWORD dwCertEncodingType, LPCSTR lpszStructType,
  const void *pvStructInfo, DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara,
- BYTE *pbEncoded, DWORD *pcbEncoded)
+ void *pvEncoded, DWORD *pcbEncoded)
 {
     BOOL ret = FALSE;
     HMODULE lib = NULL;
@@ -1219,10 +1219,10 @@ BOOL WINAPI CryptEncodeObjectEx(DWORD dw
 
     TRACE("(0x%08lx, %s, %p, 0x%08lx, %p, %p, %p)\n",
      dwCertEncodingType, HIWORD(lpszStructType) ? debugstr_a(lpszStructType) :
-     "(integer value)", pvStructInfo, dwFlags, pEncodePara, pbEncoded,
+     "(integer value)", pvStructInfo, dwFlags, pEncodePara, pvEncoded,
      pcbEncoded);
 
-    if (!pbEncoded && !pcbEncoded)
+    if (!pvEncoded && !pcbEncoded)
     {
         SetLastError(ERROR_INVALID_PARAMETER);
         return FALSE;
@@ -1287,7 +1287,7 @@ BOOL WINAPI CryptEncodeObjectEx(DWORD dw
          lpszStructType, "CryptEncodeObjectEx", &lib);
     if (encodeFunc)
         ret = encodeFunc(dwCertEncodingType, lpszStructType, pvStructInfo,
-         dwFlags, pEncodePara, pbEncoded, pcbEncoded);
+         dwFlags, pEncodePara, pvEncoded, pcbEncoded);
     else
         SetLastError(ERROR_FILE_NOT_FOUND);
     if (lib)
Index: include/wincrypt.h
===================================================================
RCS file: /var/cvs/wine/include/wincrypt.h,v
retrieving revision 1.41
diff -u -p -r1.41 wincrypt.h
--- include/wincrypt.h	17 Jun 2005 09:50:17 -0000	1.41
+++ include/wincrypt.h	17 Jun 2005 16:32:45 -0000
@@ -1644,7 +1644,7 @@ BOOL WINAPI CryptEncodeObject(DWORD dwCe
  const void *pvStructInfo, BYTE *pbEncoded, DWORD *pcbEncoded);
 BOOL WINAPI CryptEncodeObjectEx(DWORD dwCertEncodingType, LPCSTR lpszStructType,
  const void *pvStructInfo, DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara,
- BYTE *pbEncoded, DWORD *pcbEncoded);
+ void *pvEncoded, DWORD *pcbEncoded);
 
 BOOL WINAPI CryptDecodeObject(DWORD dwCertEncodingType, LPCSTR lpszStructType,
  const BYTE *pbEncoded, DWORD cbEncoded, DWORD dwFlags, void *pvStructInfo,


More information about the wine-patches mailing list