wintrust: Implement CryptCATAdminResolveCatalogPath and CryptCATCatalogInfoFromContext.

This commit is contained in:
Hans Leidekker 2008-12-23 11:50:46 +01:00 committed by Alexandre Julliard
parent dffccbf1f2
commit 615d023bf1
2 changed files with 44 additions and 2 deletions

View File

@ -474,6 +474,29 @@ BOOL WINAPI CryptCATAdminRemoveCatalog(HCATADMIN hCatAdmin, LPCWSTR pwszCatalogF
return DeleteFileW(pwszCatalogFile);
}
/***********************************************************************
* CryptCATAdminResolveCatalogPath (WINTRUST.@)
*/
BOOL WINAPI CryptCATAdminResolveCatalogPath(HCATADMIN hcatadmin, WCHAR *catalog_file,
CATALOG_INFO *info, DWORD flags)
{
static const WCHAR slashW[] = {'\\',0};
struct catadmin *ca = hcatadmin;
TRACE("%p %s %p %x\n", hcatadmin, debugstr_w(catalog_file), info, flags);
if (!ca || ca->magic != CATADMIN_MAGIC || !info || info->cbStruct != sizeof(*info) || flags)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
strcpyW(info->wszCatalogFile, ca->path);
strcatW(info->wszCatalogFile, slashW);
strcatW(info->wszCatalogFile, catalog_file);
return TRUE;
}
/***********************************************************************
* CryptCATClose (WINTRUST.@)
*/
@ -682,6 +705,25 @@ out:
return inner;
}
/***********************************************************************
* CryptCATCatalogInfoFromContext (WINTRUST.@)
*/
BOOL WINAPI CryptCATCatalogInfoFromContext(HCATINFO hcatinfo, CATALOG_INFO *info, DWORD flags)
{
struct catinfo *ci = hcatinfo;
TRACE("%p, %p, %x\n", hcatinfo, info, flags);
if (!hcatinfo || hcatinfo == INVALID_HANDLE_VALUE || ci->magic != CATINFO_MAGIC ||
flags || !info || info->cbStruct != sizeof(*info))
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
strcpyW(info->wszCatalogFile, ci->file);
return TRUE;
}
/***********************************************************************
* CryptCATOpen (WINTRUST.@)
*/

View File

@ -8,7 +8,7 @@
@ stdcall CryptCATAdminReleaseCatalogContext(long long long)
@ stdcall CryptCATAdminReleaseContext(long long)
@ stdcall CryptCATAdminRemoveCatalog(ptr wstr long)
@ stub CryptCATAdminResolveCatalogPath
@ stdcall CryptCATAdminResolveCatalogPath(ptr wstr ptr long)
@ stub CryptCATCDFClose
@ stub CryptCATCDFEnumAttributes
@ stub CryptCATCDFEnumAttributesWithCDFTag
@ -17,7 +17,7 @@
@ stub CryptCATCDFEnumMembersByCDFTag
@ stub CryptCATCDFEnumMembersByCDFTagEx
@ stub CryptCATCDFOpen
@ stub CryptCATCatalogInfoFromContext
@ stdcall CryptCATCatalogInfoFromContext(ptr ptr long)
@ stdcall CryptCATClose(long)
@ stub CryptCATEnumerateAttr
@ stub CryptCATEnumerateCatAttr