Added a few more Unicode digits from Unicode version 4.1.
[wine] / dlls / wintrust / wintrust_main.c
1 /*
2  * Copyright 2001 Rein Klazes
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19 #include "config.h"
20
21 #include <stdarg.h>
22
23 #include "windef.h"
24 #include "winbase.h"
25 #include "winerror.h"
26 #include "guiddef.h"
27 #include "wintrust.h"
28 #include "mscat.h"
29
30 #include "wine/debug.h"
31
32 WINE_DEFAULT_DEBUG_CHANNEL(wintrust);
33
34 /***********************************************************************
35  *              CryptCATAdminAcquireContext (WINTRUST.@)
36  */
37 BOOL WINAPI CryptCATAdminAcquireContext(HCATADMIN* catAdmin,
38                                         const GUID *sysSystem, DWORD dwFlags )
39 {
40     FIXME("%p %s %lx\n", catAdmin, debugstr_guid(sysSystem), dwFlags);
41     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
42     return FALSE;
43 }
44
45 /***********************************************************************
46  *             CryptCATAdminCalcHashFromFileHandle (WINTRUST.@)
47  */
48 BOOL WINAPI CryptCATAdminCalcHashFromFileHandle(HANDLE hFile, DWORD* pcbHash,
49                                                 BYTE* pbHash, DWORD dwFlags )
50 {
51     FIXME("%p %p %p %lx\n", hFile, pcbHash, pbHash, dwFlags);
52     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
53     return FALSE;
54 }
55
56 /***********************************************************************
57  *              CryptCATAdminReleaseContext (WINTRUST.@)
58  */
59 BOOL WINAPI CryptCATAdminReleaseContext(HCATADMIN hCatAdmin, DWORD dwFlags )
60 {
61     FIXME("%p %lx\n", hCatAdmin, dwFlags);
62     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
63     return FALSE;
64 }
65
66 /***********************************************************************
67  *              WinVerifyTrust (WINTRUST.@)
68  */
69 LONG WINAPI WinVerifyTrust( HWND hwnd, GUID *ActionID,  WINTRUST_DATA* ActionData )
70 {
71     static const GUID WINTRUST_ACTION_GENERIC_VERIFY_V2 = { 0xaac56b, 0xcd44, 0x11d0,
72                                                           { 0x8c,0xc2,0x00,0xc0,0x4f,0xc2,0x95,0xee }};
73
74     FIXME("%p %s %p\n", hwnd, debugstr_guid(ActionID), ActionData);
75
76     /* Trust providers can be found at:
77      * HKLM\SOFTWARE\Microsoft\Cryptography\Providers\Trust\CertCheck\
78      *
79      * Process Explorer expects a correct implementation, so we 
80      * return TRUST_E_PROVIDER_UNKNOWN.
81      *
82      * Girotel needs ERROR_SUCCESS.
83      *
84      * For now return TRUST_E_PROVIDER_UNKNOWN only when 
85      * ActionID = WINTRUST_ACTION_GENERIC_VERIFY_V2.
86      *
87      */
88
89     if (IsEqualCLSID(ActionID, &WINTRUST_ACTION_GENERIC_VERIFY_V2))
90         return TRUST_E_PROVIDER_UNKNOWN;
91
92     return ERROR_SUCCESS;
93 }
94
95 /***********************************************************************
96  *              WintrustAddActionID (WINTRUST.@)
97  */
98 BOOL WINAPI WintrustAddActionID( GUID* pgActionID, DWORD fdwFlags,
99                                  CRYPT_REGISTER_ACTIONID* psProvInfo)
100 {
101     FIXME("%p %lx %p\n", pgActionID, fdwFlags, psProvInfo);
102     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
103     return FALSE;
104 }
105
106 /***********************************************************************
107  *              WintrustGetRegPolicyFlags (WINTRUST.@)
108  */
109 void WINAPI WintrustGetRegPolicyFlags( DWORD* pdwPolicyFlags )
110 {
111     FIXME("%p\n", pdwPolicyFlags);
112     *pdwPolicyFlags = 0;
113 }
114
115 /***********************************************************************
116  *              WintrustSetRegPolicyFlags (WINTRUST.@)
117  */
118 BOOL WINAPI WintrustSetRegPolicyFlags( DWORD dwPolicyFlags)
119 {
120     FIXME("stub: %lx\n", dwPolicyFlags);
121     return TRUE;
122 }
123
124 /***********************************************************************
125   *             DllRegisterServer (WINTRUST.@)
126   */
127 HRESULT WINAPI DllRegisterServer(void)
128 {
129      FIXME("stub\n");
130      return S_OK;
131 }
132
133 /***********************************************************************
134   *             DllUnregisterServer (WINTRUST.@)
135   */
136 HRESULT WINAPI DllUnregisterServer(void)
137 {
138      FIXME("stub\n");
139      return S_OK;
140 }