31# include <Security/SecKeychain.h>
32# include <Security/SecKeychainItem.h>
33# include <Security/SecKeychainSearch.h>
44#include "wine/unicode.h"
47#include "advapi32_misc.h"
55static const WCHAR wszCredentialManagerKey[] = {
'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
'W',
'i',
'n',
'e',
'\\',
56 'C',
'r',
'e',
'd',
'e',
'n',
't',
'i',
'a',
'l',
' ',
'M',
'a',
'n',
'a',
'g',
'e',
'r',0};
57static const WCHAR wszEncryptionKeyValue[] = {
'E',
'n',
'c',
'r',
'y',
'p',
't',
'i',
'o',
'n',
'K',
'e',
'y',0};
62static const WCHAR wszLastWrittenValue[] = {
'L',
'a',
's',
't',
'W',
'r',
'i',
't',
't',
'e',
'n',0};
64static const WCHAR wszTargetAliasValue[] = {
'T',
'a',
'r',
'g',
'e',
't',
'A',
'l',
'i',
'a',
's',0};
70 DWORD *credential_blob_size)
75 *credential_blob_size = 0;
87 credential_blob_size);
94 key.Buffer = (
unsigned char *)key_data;
96 data.Length =
data.MaximumLength = *credential_blob_size;
97 data.Buffer = credential_blob;
293static DWORD mac_read_credential_from_item(SecKeychainItemRef
item,
BOOL require_password,
302 SecKeychainAttributeInfo
info;
303 SecKeychainAttributeList *attr_list;
304 UInt32 info_tags[] = { kSecServiceItemAttr, kSecAccountItemAttr,
305 kSecCommentItemAttr, kSecCreationDateItemAttr };
306 info.
count =
sizeof(info_tags)/
sizeof(info_tags[0]);
307 info.tag = info_tags;
309 status = SecKeychainItemCopyAttributesAndData(
item, &
info,
NULL, &attr_list, &cred_blob_len, &cred_blob);
310 if (
status == errSecAuthFailed && !require_password)
318 WARN(
"SecKeychainItemCopyAttributesAndData returned status %d\n",
status);
322 for (
i = 0;
i < attr_list->count;
i++)
323 if (attr_list->attr[
i].tag == kSecAccountItemAttr && attr_list->attr[
i].data)
325 user_name_present =
TRUE;
328 if (!user_name_present)
330 WARN(
"no kSecAccountItemAttr for item\n");
331 SecKeychainItemFreeAttributesAndData(attr_list, cred_blob);
337 credential->
Flags = 0;
350 for (
i = 0;
i < attr_list->count;
i++)
352 switch (attr_list->attr[
i].tag)
354 case kSecServiceItemAttr:
355 TRACE(
"kSecServiceItemAttr: %.*s\n", (
int)attr_list->attr[
i].length,
356 (
char *)attr_list->attr[
i].data);
357 if (!attr_list->attr[
i].data)
continue;
372 attr_list->attr[
i].length,
NULL, 0);
376 case kSecAccountItemAttr:
379 TRACE(
"kSecAccountItemAttr: %.*s\n", (
int)attr_list->attr[
i].length,
380 (
char *)attr_list->attr[
i].data);
381 if (!attr_list->attr[
i].data)
continue;
383 attr_list->attr[
i].length,
NULL, 0);
390 case kSecCommentItemAttr:
391 TRACE(
"kSecCommentItemAttr: %.*s\n", (
int)attr_list->attr[
i].length,
392 (
char *)attr_list->attr[
i].data);
393 if (!attr_list->attr[
i].data)
continue;
408 attr_list->attr[
i].length,
NULL, 0);
412 case kSecCreationDateItemAttr:
413 TRACE(
"kSecCreationDateItemAttr: %.*s\n", (
int)attr_list->attr[
i].length,
414 (
char *)attr_list->attr[
i].data);
415 if (!attr_list->attr[
i].data)
continue;
422 strptime(attr_list->attr[
i].data,
"%Y%m%d%H%M%SZ", &
tm);
430 FIXME(
"unhandled attribute %u\n", (
unsigned)attr_list->attr[
i].tag);
470 SecKeychainItemFreeAttributesAndData(attr_list, cred_blob);
477 const BYTE *credential_blob,
DWORD credential_blob_size)
479 LPBYTE encrypted_credential_blob;
485 key.Buffer = (
unsigned char *)key_data;
487 encrypted_credential_blob =
heap_alloc(credential_blob_size);
490 memcpy(encrypted_credential_blob, credential_blob, credential_blob_size);
491 data.Length =
data.MaximumLength = credential_blob_size;
492 data.Buffer = encrypted_credential_blob;
510 sizeof(credential->
Flags));
513 sizeof(credential->
Type));
525 sizeof(LastWritten));
556 SecKeychainItemRef keychain_item;
558 UInt32 userlen, pwlen, serverlen;
559 SecKeychainAttribute attrs[1];
560 SecKeychainAttributeList attr_list;
562 if (credential->
Flags)
563 FIXME(
"Flags 0x%x not written\n", credential->
Flags);
565 FIXME(
"credential type of %d not supported\n", credential->
Type);
567 FIXME(
"persist value of %d not supported\n", credential->
Persist);
569 FIXME(
"custom attributes not supported\n");
576 servername =
heap_alloc(serverlen *
sizeof(*servername));
584 TRACE(
"adding server %s, username %s using Keychain\n", servername,
username);
588 ERR(
"SecKeychainAddGenericPassword returned %d\n",
status);
589 if (
status == errSecDuplicateItem)
594 ERR(
"SecKeychainFindGenericPassword returned %d\n",
status);
606 attr_list.attr = attrs;
607 attrs[0].tag = kSecCommentItemAttr;
609 if (attrs[0].
length) attrs[0].length--;
616 attr_list.attr =
NULL;
618 status = SecKeychainItemModifyAttributesAndData(keychain_item, &attr_list,
625 CFRelease(keychain_item);
689 static const WCHAR wszGenericPrefix[] = {
'G',
'e',
'n',
'e',
'r',
'i',
'c',
':',
' ',0};
690 static const WCHAR wszDomPasswdPrefix[] = {
'D',
'o',
'm',
'P',
'a',
's',
's',
'w',
'd',
':',
' ',0};
698 prefix = wszGenericPrefix;
699 len +=
sizeof(wszGenericPrefix)/
sizeof(wszGenericPrefix[0]);
703 prefix = wszDomPasswdPrefix;
704 len +=
sizeof(wszDomPasswdPrefix)/
sizeof(wszDomPasswdPrefix[0]);
714 if (*
p ==
'\\') *
p =
'_';
750 (
p && !
p[1] ?
p -
filter : -1), target_name,
816 target_name[
len] = 0;
822 (
p && !
p[1] ?
p -
filter : -1), target_name,
831 SecKeychainSearchRef
search;
832 SecKeychainItemRef
item;
834 Boolean saved_user_interaction_allowed;
837 SecKeychainGetUserInteractionAllowed(&saved_user_interaction_allowed);
838 SecKeychainSetUserInteractionAllowed(
false);
840 status = SecKeychainSearchCreateFromAttributes(
NULL, kSecGenericPasswordItemClass,
NULL, &
search);
843 while (SecKeychainSearchCopyNext(
search, &
item) == noErr)
845 SecKeychainAttributeInfo
info;
846 SecKeychainAttributeList *attr_list;
847 UInt32 info_tags[] = { kSecServiceItemAttr };
850 info.
count =
sizeof(info_tags)/
sizeof(info_tags[0]);
851 info.tag = info_tags;
856 WARN(
"SecKeychainItemCopyAttributesAndData returned status %d\n",
status);
866 if (attr_list->count != 1 || attr_list->attr[0].tag != kSecServiceItemAttr)
868 SecKeychainItemFreeAttributesAndData(attr_list,
NULL);
871 TRACE(
"service item: %.*s\n", (
int)attr_list->attr[0].length, (
char *)attr_list->attr[0].data);
872 match = mac_credential_matches_filter(attr_list->attr[0].data, attr_list->attr[0].length,
filter);
873 SecKeychainItemFreeAttributesAndData(attr_list,
NULL);
874 if (!
match)
continue;
889 ERR(
"SecKeychainSearchCreateFromAttributes returned status %d\n",
status);
890 SecKeychainSetUserInteractionAllowed(saved_user_interaction_allowed);
897 SecKeychainSearchRef
search;
898 status = SecKeychainSearchCreateFromAttributes(
NULL, kSecGenericPasswordItemClass,
NULL, &
search);
901 SecKeychainItemRef
item;
902 while (SecKeychainSearchCopyNext(
search, &
item) == noErr)
904 SecKeychainAttributeInfo
info;
905 SecKeychainAttributeList *attr_list;
906 UInt32 info_tags[] = { kSecServiceItemAttr };
909 info.
count =
sizeof(info_tags)/
sizeof(info_tags[0]);
910 info.tag = info_tags;
915 WARN(
"SecKeychainItemCopyAttributesAndData returned status %d\n",
status);
918 if (attr_list->count != 1 || attr_list->attr[0].tag != kSecServiceItemAttr)
935 SecKeychainItemFreeAttributesAndData(attr_list,
NULL);
936 SecKeychainItemDelete(
item);
980 CredentialA->
Type = CredentialW->
Type;
987 needed += string_len;
997 needed += string_len;
1014 CredentialA->CredentialBlob =
NULL;
1023 needed += string_len;
1032 needed += string_len;
1070 CredentialW->
Type = CredentialA->
Type;
1076 needed +=
sizeof(
WCHAR) * string_len;
1086 needed +=
sizeof(
WCHAR) * string_len;
1112 needed +=
sizeof(
WCHAR) * string_len;
1121 needed +=
sizeof(
WCHAR) * string_len;
1205 WARN(
"couldn't open/create manager key, error %d\n",
ret);
1295 DWORD target_name_len;
1311 WARN(
"couldn't open/create manager key, error %d\n",
ret);
1324 ret =
RegQueryInfoKeyW(hkeyMgr,
NULL,
NULL,
NULL,
NULL, &target_name_len,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL);
1368 target_name_len, key_data,
1373 ret = mac_enumerate_credentials(
Filter, *Credentials,
1485 SecKeychainSearchRef
search;
1486 status = SecKeychainSearchCreateFromAttributes(
NULL, kSecGenericPasswordItemClass,
NULL, &
search);
1489 SecKeychainItemRef
item;
1490 while (SecKeychainSearchCopyNext(
search, &
item) == noErr)
1492 SecKeychainAttributeInfo
info;
1493 SecKeychainAttributeList *attr_list;
1494 UInt32 info_tags[] = { kSecServiceItemAttr };
1497 info.
count =
sizeof(info_tags)/
sizeof(info_tags[0]);
1498 info.tag = info_tags;
1501 len =
sizeof(**Credential);
1504 WARN(
"SecKeychainItemCopyAttributesAndData returned status %d\n",
status);
1507 if (attr_list->count != 1 || attr_list->attr[0].tag != kSecServiceItemAttr)
1524 SecKeychainItemFreeAttributesAndData(attr_list,
NULL);
1531 len =
sizeof(**Credential);
1532 ret = mac_read_credential_from_item(
item,
TRUE, *Credential,
1533 (
char *)(*Credential + 1), &
len);
1556 WARN(
"couldn't open/create manager key, error %d\n",
ret);
1579 len =
sizeof(**Credential);
1586 len =
sizeof(**Credential);
1588 (
char *)(*Credential + 1), &
len);
1618 TRACE(
"(%p, 0x%x, %p, %p)\n", TargetInformation,
Flags,
Size, Credentials);
1622 *Credentials =
NULL;
1624 if (!TargetInformation)
1630 len =
sizeof(*TargetInformationW);
1647 if (!TargetInformationW)
1653 end = (
WCHAR *)((
char *)TargetInformationW +
len);
1711 TargetInformationW->
Flags = TargetInformation->
Flags;
1736 buf = (
char *)&(*Credentials)[*
Size];
1757 FIXME(
"(%p, 0x%x, %p, %p) stub\n", TargetInformation,
Flags,
Size, Credentials);
1761 *Credentials =
NULL;
1762 if (!TargetInformation)
1834 FIXME(
"unhandled type %d\n", Credential->
Type);
1839 TRACE(
"Credential->Flags = 0x%08x\n", Credential->
Flags);
1840 TRACE(
"Credential->Type = %u\n", Credential->
Type);
1843 TRACE(
"Credential->Persist = %u\n", Credential->
Persist);
1877 WARN(
"couldn't open/create manager key, error %d\n",
ret);
1897 TRACE(
"credentials for target name %s not found\n",
1922 TRACE(
"(%u, %p)\n", persistCount, persists);
1963 static const char enc[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789#-";
1968 cred[
n++] = enc[
bin[0] & 0x3f];
1969 x = (
bin[0] & 0xc0) >> 6;
1975 cred[
n++] = enc[((
bin[1] & 0xf) << 2) |
x];
1976 x = (
bin[1] & 0xf0) >> 4;
1982 cred[
n++] = enc[((
bin[2] & 0x3) << 4) |
x];
1983 cred[
n++] = enc[(
bin[2] & 0xfc) >> 2];
2013 size = (
sizeof(
cert->rgbHashOfCert) + 2) * 4 / 3;
2037 FIXME(
"BinaryBlobCredential not implemented\n");
2069 if (
c >=
'A' &&
c <=
'Z')
return c -
'A';
2070 if (
c >=
'a' &&
c <=
'z')
return c -
'a' + 26;
2071 if (
c >=
'0' &&
c <=
'9')
return c -
'0' + 52;
2072 if (
c ==
'#')
return 62;
2073 if (
c ==
'-')
return 63;
2080 char c0, c1, c2, c3;
2090 buf[
i + 0] = (c1 << 6) | c0;
2091 buf[
i + 1] = (c2 << 4) | (c1 >> 2);
2092 buf[
i + 2] = (c3 << 2) | (c2 >> 4);
2103 buf[
i + 0] = (c1 << 6) | c0;
2104 buf[
i + 1] = (c2 << 4) | (c1 >> 2);
2111 buf[
i + 0] = (c1 << 6) | c0;
2125 unsigned int len, buflen;
2129 if (!cred || cred[0] !=
'@' || cred[1] !=
'@' ||
2151 cert->cbSize =
sizeof(*cert);
2166 buflen =
sizeof(*target) +
size +
sizeof(
WCHAR);
2179 FIXME(
"BinaryBlobCredential not implemented\n");
2182 WARN(
"unhandled type %u\n", *
type);
2219 FIXME(
"BinaryBlobCredential not checked\n");
2222 TRACE(
"unknown type: %d\n", (
name[2] -
'A'));
ACPI_SIZE strlen(const char *String)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static const WCHAR nameW[]
void user(int argc, const char *argv[])
#define RegCloseKey(hKey)
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegDeleteKeyW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey)
LONG WINAPI RegQueryInfoKeyW(HKEY hKey, LPWSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
LONG WINAPI RegEnumKeyW(HKEY hKey, DWORD dwIndex, LPWSTR lpName, DWORD cbName)
static DWORD registry_write_credential(HKEY hkey, const CREDENTIALW *credential, const BYTE key_data[KEY_SIZE], BOOL preserve_blob)
static const WCHAR wszUserNameValue[]
static DWORD get_cred_mgr_encryption_key(HKEY hkeyMgr, BYTE key_data[KEY_SIZE])
static const WCHAR wszTargetAliasValue[]
BOOL WINAPI CredReadW(LPCWSTR TargetName, DWORD Type, DWORD Flags, PCREDENTIALW *Credential)
static const WCHAR wszFlagsValue[]
static DWORD registry_enumerate_credentials(HKEY hkeyMgr, LPCWSTR filter, LPWSTR target_name, DWORD target_name_len, const BYTE key_data[KEY_SIZE], PCREDENTIALW *credentials, char **buffer, DWORD *len, DWORD *count)
static const WCHAR wszPasswordValue[]
BOOL WINAPI CredReadDomainCredentialsA(PCREDENTIAL_TARGET_INFORMATIONA TargetInformation, DWORD Flags, DWORD *Size, PCREDENTIALA **Credentials)
static char char_decode(WCHAR c)
BOOL WINAPI CredReadA(LPCSTR TargetName, DWORD Type, DWORD Flags, PCREDENTIALA *Credential)
static DWORD open_cred_mgr_key(HKEY *hkey, BOOL open_for_write)
BOOL WINAPI CredDeleteW(LPCWSTR TargetName, DWORD Type, DWORD Flags)
static BOOL registry_credential_matches_filter(HKEY hkeyCred, LPCWSTR filter)
static DWORD read_credential_blob(HKEY hkey, const BYTE key_data[KEY_SIZE], LPBYTE credential_blob, DWORD *credential_blob_size)
BOOL WINAPI CredUnmarshalCredentialW(LPCWSTR cred, PCRED_MARSHAL_TYPE type, PVOID *out)
BOOL WINAPI CredIsMarshaledCredentialA(LPCSTR name)
static UINT cred_encode(const char *bin, unsigned int len, WCHAR *cred)
static DWORD registry_read_credential(HKEY hkey, PCREDENTIALW credential, const BYTE key_data[KEY_SIZE], char *buffer, DWORD *len)
BOOL WINAPI CredWriteA(PCREDENTIALA Credential, DWORD Flags)
BOOL WINAPI CredMarshalCredentialW(CRED_MARSHAL_TYPE type, PVOID cred, LPWSTR *out)
static INT convert_PCREDENTIALW_to_PCREDENTIALA(const CREDENTIALW *CredentialW, PCREDENTIALA CredentialA, DWORD len)
static const WCHAR wszTypeValue[]
BOOL WINAPI CredIsMarshaledCredentialW(LPCWSTR name)
BOOL WINAPI CredUnmarshalCredentialA(LPCSTR cred, PCRED_MARSHAL_TYPE type, PVOID *out)
VOID WINAPI CredFree(PVOID Buffer)
static const WCHAR wszLastWrittenValue[]
static DWORD write_credential_blob(HKEY hkey, LPCWSTR target_name, DWORD type, const BYTE key_data[KEY_SIZE], const BYTE *credential_blob, DWORD credential_blob_size)
BOOL WINAPI CredEnumerateW(LPCWSTR Filter, DWORD Flags, DWORD *Count, PCREDENTIALW **Credentials)
static const WCHAR wszPersistValue[]
static LPWSTR get_key_name_for_target(LPCWSTR target_name, DWORD type)
static BOOL cred_decode(const WCHAR *cred, unsigned int len, char *buf)
BOOL WINAPI CredWriteW(PCREDENTIALW Credential, DWORD Flags)
BOOL WINAPI CredReadDomainCredentialsW(PCREDENTIAL_TARGET_INFORMATIONW TargetInformation, DWORD Flags, DWORD *Size, PCREDENTIALW **Credentials)
WINADVAPI BOOL WINAPI CredGetSessionTypes(DWORD persistCount, LPDWORD persists)
static INT convert_PCREDENTIALA_to_PCREDENTIALW(const CREDENTIALA *CredentialA, PCREDENTIALW CredentialW, INT len)
BOOL WINAPI CredMarshalCredentialA(CRED_MARSHAL_TYPE type, PVOID cred, LPSTR *out)
BOOL WINAPI CredEnumerateA(LPCSTR Filter, DWORD Flags, DWORD *Count, PCREDENTIALA **Credentials)
static const WCHAR wszCredentialManagerKey[]
static const WCHAR wszEncryptionKeyValue[]
static const WCHAR wszCommentValue[]
BOOL WINAPI CredDeleteA(LPCSTR TargetName, DWORD Type, DWORD Flags)
#define ERROR_INVALID_PARAMETER
#define ERROR_NO_MORE_ITEMS
#define WideCharToMultiByte
#define MultiByteToWideChar
#define ERROR_ACCESS_DENIED
VOID WINAPI GetSystemTimeAsFileTime(OUT PFILETIME lpFileTime)
LCID WINAPI GetThreadLocale(void)
INT WINAPI CompareStringW(LCID lcid, DWORD flags, LPCWSTR str1, INT len1, LPCWSTR str2, INT len2)
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei GLenum type
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum GLuint GLenum GLsizei const GLchar * buf
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
GLuint GLsizei GLsizei * length
GLuint GLenum GLenum GLenum GLenum outW
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define memcpy(s1, s2, n)
#define ERROR_FILE_NOT_FOUND
static struct _PeImage bin
static short search(int val, const short *table, int size)
NTSYSAPI ULONG NTAPI RtlUniform(_In_ PULONG Seed)
NTSYSAPI VOID NTAPI RtlSecondsSince1970ToTime(_In_ ULONG SecondsSince1970, _Out_ PLARGE_INTEGER Time)
#define REG_OPTION_NON_VOLATILE
#define REG_OPTION_VOLATILE
_CRTIMP time_t __cdecl mktime(struct tm *_Tm)
PCREDENTIAL_ATTRIBUTEA Attributes
PCREDENTIAL_ATTRIBUTEW Attributes
NTSTATUS WINAPI SystemFunction032(struct ustring *data, const struct ustring *key)
struct _LARGE_INTEGER::@2299 u
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
struct _CREDENTIALA CREDENTIALA
#define CRED_PERSIST_SESSION
enum _CRED_MARSHAL_TYPE CRED_MARSHAL_TYPE
#define CRED_PERSIST_ENTERPRISE
#define CRED_PRESERVE_CREDENTIAL_BLOB
enum _CRED_MARSHAL_TYPE * PCRED_MARSHAL_TYPE
struct _CREDENTIALW * PCREDENTIALW
struct _CREDENTIALW CREDENTIALW
#define CRED_PERSIST_LOCAL_MACHINE
struct _CREDENTIALA * PCREDENTIALA
#define CRED_TYPE_DOMAIN_PASSWORD
@ UsernameTargetCredential
#define CRED_TYPE_GENERIC
#define CRED_PERSIST_NONE
#define ERROR_BAD_USERNAME
#define ERROR_GEN_FAILURE
#define ERROR_REGISTRY_CORRUPT
#define ERROR_NO_SUCH_LOGON_SESSION
#define ERROR_INVALID_FLAGS
#define HKEY_CURRENT_USER
_Must_inspect_result_ _In_ ULONG Flags