advapi32: Add a rudimentary implementation of CredGetSessionTypes().

This commit is contained in:
Francois Gouget 2008-02-13 22:06:44 +01:00 committed by Alexandre Julliard
parent 8edfee18cc
commit ddab29b7d1
3 changed files with 22 additions and 1 deletions

View File

@ -107,7 +107,7 @@
@ stdcall CredEnumerateA(str long ptr ptr)
@ stdcall CredEnumerateW(wstr long ptr ptr)
@ stdcall CredFree(ptr)
# @ stub CredGetSessionTypes
@ stdcall CredGetSessionTypes(long ptr)
# @ stub CredGetTargetInfoA
# @ stub CredGetTargetInfoW
# @ stub CredIsMarshaledCredentialA

View File

@ -1670,3 +1670,23 @@ BOOL WINAPI CredWriteW(PCREDENTIALW Credential, DWORD Flags)
}
return TRUE;
}
/******************************************************************************
* CredGetSessionTypes [ADVAPI32.@]
*/
WINADVAPI BOOL WINAPI CredGetSessionTypes(DWORD persistCount, LPDWORD persists)
{
TRACE("(%u, %p)\n", persistCount, persists);
memset(persists, CRED_PERSIST_NONE, persistCount*sizeof(*persists));
if (CRED_TYPE_GENERIC < persistCount)
{
persists[CRED_TYPE_GENERIC] = CRED_PERSIST_ENTERPRISE;
if (CRED_TYPE_DOMAIN_PASSWORD < persistCount)
{
persists[CRED_TYPE_DOMAIN_PASSWORD] = CRED_PERSIST_ENTERPRISE;
}
}
return TRUE;
}

View File

@ -185,6 +185,7 @@ WINADVAPI BOOL WINAPI CredEnumerateA(LPCSTR,DWORD,DWORD *,PCREDENTIALA **);
WINADVAPI BOOL WINAPI CredEnumerateW(LPCWSTR,DWORD,DWORD *,PCREDENTIALW **);
#define CredEnumerate WINELIB_NAME_AW(CredEnumerate)
WINADVAPI VOID WINAPI CredFree(PVOID);
WINADVAPI BOOL WINAPI CredGetSessionTypes(DWORD,LPDWORD);
WINADVAPI BOOL WINAPI CredReadA(LPCSTR,DWORD,DWORD,PCREDENTIALA *);
WINADVAPI BOOL WINAPI CredReadW(LPCWSTR,DWORD,DWORD,PCREDENTIALW *);
#define CredRead WINELIB_NAME_AW(CredRead)