ole32: Create moniker enumerator with an initial reference count.
[wine/multimedia.git] / dlls / crypt32 / crypt32_private.h
blob25c41e4611b95327d8162f1d904f82d9537f54d0
1 /*
2 * Copyright 2005 Juan Lang
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.
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.
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
19 #ifndef __CRYPT32_PRIVATE_H__
20 #define __CRYPT32_PRIVATE_H__
22 /* The following aren't defined in wincrypt.h, as they're "reserved" */
23 #define CERT_CERT_PROP_ID 32
24 #define CERT_CRL_PROP_ID 33
25 #define CERT_CTL_PROP_ID 34
27 /* Returns a handle to the default crypto provider; loads it if necessary.
28 * Returns NULL on failure.
30 HCRYPTPROV CRYPT_GetDefaultProvider(void);
32 void crypt_oid_init(HINSTANCE hinst);
33 void crypt_oid_free(void);
35 /* Helper function for store reading functions and
36 * CertAddSerializedElementToStore. Returns a context of the appropriate type
37 * if it can, or NULL otherwise. Doesn't validate any of the properties in
38 * the serialized context (for example, bad hashes are retained.)
39 * *pdwContentType is set to the type of the returned context.
41 const void *CRYPT_ReadSerializedElement(const BYTE *pbElement,
42 DWORD cbElement, DWORD dwContextTypeFlags, DWORD *pdwContentType);
44 /**
45 * Context property list functions
47 struct _CONTEXT_PROPERTY_LIST;
48 typedef struct _CONTEXT_PROPERTY_LIST *PCONTEXT_PROPERTY_LIST;
50 PCONTEXT_PROPERTY_LIST ContextPropertyList_Create(void);
52 /* Searches for the property with ID id in the context. Returns TRUE if found,
53 * and copies the property's length and a pointer to its data to blob.
54 * Otherwise returns FALSE.
56 BOOL ContextPropertyList_FindProperty(PCONTEXT_PROPERTY_LIST list, DWORD id,
57 PCRYPT_DATA_BLOB blob);
59 BOOL ContextPropertyList_SetProperty(PCONTEXT_PROPERTY_LIST list, DWORD id,
60 const BYTE *pbData, size_t cbData);
62 void ContextPropertyList_RemoveProperty(PCONTEXT_PROPERTY_LIST list, DWORD id);
64 DWORD ContextPropertyList_EnumPropIDs(PCONTEXT_PROPERTY_LIST list, DWORD id);
66 void ContextPropertyList_Copy(PCONTEXT_PROPERTY_LIST to,
67 PCONTEXT_PROPERTY_LIST from);
69 void ContextPropertyList_Free(PCONTEXT_PROPERTY_LIST list);
71 #endif