#include <winapifamily.h>
#ifndef __WINEFS_H__
#define __WINEFS_H__
#if (NTDDI_VERSION >= NTDDI_WIN2K)
#if _MSC_VER > 1000
#pragma once
#endif
#if _MSC_VER >= 1200
#pragma warning(push)
#pragma warning(disable:4820) // padding added after data member
#endif
#pragma warning(disable:
4820
)
#ifdef __cplusplus
extern
"C"
{
#endif
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#define WINEFS_SETUSERKEY_SET_CAPABILITIES 0x00000001
#if (NTDDI_VERSION >= NTDDI_WINXP)
#ifndef ALGIDDEF
#define ALGIDDEF
typedef unsigned int ALG_ID;
#endif
#endif
typedef
struct
{
;
#ifdef MIDL_PASS
[range(0,32768)]
#endif // MIDL_PASS
;
#ifdef MIDL_PASS
[size_is(cbData)]
#endif // MIDL_PASS
;
}
, *
;
typedef
struct
{
#ifdef MIDL_PASS
[range(0,100)]
#endif // MIDL_PASS
;
#ifdef MIDL_PASS
[size_is(cbData)]
#endif // MIDL_PASS
;
}
, *
;
#if (NTDDI_VERSION >= NTDDI_WINXP)
typedef
struct
{
#ifdef MIDL_PASS
[range(0,266240)]
#endif // MIDL_PASS
;
#ifdef MIDL_PASS
[size_is(cbData)]
#endif // MIDL_PASS
;
}
, *
;
#endif // #if (NTDDI_VERSION >= NTDDI_WINXP)
#if (NTDDI_VERSION >= NTDDI_VISTA)
typedef
struct
{
#ifdef MIDL_PASS
[range(0,8)]
#endif // MIDL_PASS
;
#ifdef MIDL_PASS
[range(0,2048)]
#endif // MIDL_PASS
;
#ifdef MIDL_PASS
[size_is(cbData+cbPadding)]
#endif // MIDL_PASS
;
}
, *
;
#endif // #if (NTDDI_VERSION >= NTDDI_VISTA)
#if (NTDDI_VERSION >= NTDDI_WINXP)
typedef
struct
{
;
;
;
;
}
, *
;
#endif // #if (NTDDI_VERSION >= NTDDI_WINXP)
#if (NTDDI_VERSION >= NTDDI_WIN7)
typedef
struct
{
;
}
, *
;
#endif // #if (NTDDI_VERSION >= NTDDI_WIN7)
#if (NTDDI_VERSION >= NTDDI_WINBLUE)
#define EFS_COMPATIBILITY_VERSION_NCRYPT_PROTECTOR 5
#endif // #if (NTDDI_VERSION >= NTDDI_WINBLUE)
#if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
#define EFS_COMPATIBILITY_VERSION_PFILE_PROTECTOR 6
#define EFS_IS_DESCRIPTOR_VERSION(__v) \
( (__v == EFS_COMPATIBILITY_VERSION_NCRYPT_PROTECTOR) || \
(__v == EFS_COMPATIBILITY_VERSION_PFILE_PROTECTOR) )
#define EFS_SUBVER_UNKNOWN 0
#define EFS_EFS_SUBVER_EFS_CERT 1
#define EFS_PFILE_SUBVER_RMS 2
#define EFS_PFILE_SUBVER_APPX 3
typedef
struct
{
;
;
}
, *
;
#define EFS_IS_APPX_VERSION(__v, __subV) \
( (__v == EFS_COMPATIBILITY_VERSION_PFILE_PROTECTOR) && \
(__subV == EFS_PFILE_SUBVER_APPX) )
#endif // #if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
#if (NTDDI_VERSION >= NTDDI_VISTA)
typedef
struct
_EFS_DECRYPTION_STATUS_INFO
{
;
;
;
}
EFS_DECRYPTION_STATUS_INFO
, *
PEFS_DECRYPTION_STATUS_INFO
;
typedef
struct
_EFS_ENCRYPTION_STATUS_INFO
{
;
;
}
EFS_ENCRYPTION_STATUS_INFO
, *
PEFS_ENCRYPTION_STATUS_INFO
;
#endif // #if (NTDDI_VERSION >= NTDDI_VISTA)
typedef
struct
{
;
*
;
;
}
, *
;
#define MAX_SID_SIZE 256
typedef
struct
_ENCRYPTION_CERTIFICATE_HASH
{
;
*
;
;
#ifdef MIDL_PASS
[string]
#endif // MIDL_PASS
;
}
ENCRYPTION_CERTIFICATE_HASH
, *
PENCRYPTION_CERTIFICATE_HASH
;
typedef
struct
_ENCRYPTION_CERTIFICATE_HASH_LIST
{
#ifdef MIDL_PASS
[range(0,500)]
#endif // MIDL_PASS
;
#ifdef MIDL_PASS
[size_is(nCert_Hash)]
#endif // MIDL_PASS
PENCRYPTION_CERTIFICATE_HASH
*
;
}
ENCRYPTION_CERTIFICATE_HASH_LIST
, *
PENCRYPTION_CERTIFICATE_HASH_LIST
;
typedef
struct
_ENCRYPTION_CERTIFICATE_LIST
{
#ifdef MIDL_PASS
[range(0,500)]
#endif // MIDL_PASS
;
#ifdef MIDL_PASS
[size_is(nUsers)]
#endif // MIDL_PASS
*
;
}
ENCRYPTION_CERTIFICATE_LIST
, *
PENCRYPTION_CERTIFICATE_LIST
;
#if (NTDDI_VERSION >= NTDDI_VISTA)
#define EFS_METADATA_ADD_USER 0x00000001
#define EFS_METADATA_REMOVE_USER 0x00000002
#define EFS_METADATA_REPLACE_USER 0x00000004
#define EFS_METADATA_GENERAL_OP 0x00000008
typedef
struct
{
;
PENCRYPTION_CERTIFICATE_HASH_LIST
;
;
;
}
, *
;
#endif // #if (NTDDI_VERSION >= NTDDI_VISTA)
#if (NTDDI_VERSION >= NTDDI_WIN8)
typedef
struct
{
;
*
;
#ifdef MIDL_PASS
[string]
#endif // MIDL_PASS
;
}
, *
;
typedef
struct
_ENCRYPTION_PROTECTOR_LIST
{
;
#ifdef MIDL_PASS
[size_is(nProtectors)]
#endif // MIDL_PASS
*
;
}
ENCRYPTION_PROTECTOR_LIST
, *
PENCRYPTION_PROTECTOR_LIST
;
#endif
QueryUsersOnEncryptedFile
(
_Outptr_ PENCRYPTION_CERTIFICATE_HASH_LIST *pUsers
PENCRYPTION_CERTIFICATE_HASH_LIST
*
);
QueryRecoveryAgentsOnEncryptedFile
(
_Outptr_ PENCRYPTION_CERTIFICATE_HASH_LIST *pRecoveryAgents
PENCRYPTION_CERTIFICATE_HASH_LIST
*
);
RemoveUsersFromEncryptedFile
(
_In_ PENCRYPTION_CERTIFICATE_HASH_LIST pHashes
PENCRYPTION_CERTIFICATE_HASH_LIST
);
(
_In_ PENCRYPTION_CERTIFICATE_LIST pEncryptionCertificates
PENCRYPTION_CERTIFICATE_LIST
);
#if (NTDDI_VERSION >= NTDDI_VISTA)
(
_In_opt_ PENCRYPTION_CERTIFICATE pEncryptionCertificate
);
#else
WINADVAPI
DWORD
WINAPI
SetUserFileEncryptionKey(
_In_ PENCRYPTION_CERTIFICATE pEncryptionCertificate
);
#endif
#if (NTDDI_VERSION >= NTDDI_VISTA)
SetUserFileEncryptionKeyEx
(
_In_opt_ PENCRYPTION_CERTIFICATE pEncryptionCertificate,
,
,
_Reserved_ LPVOID pvReserved
);
#endif // #if (NTDDI_VERSION >= NTDDI_VISTA)
FreeEncryptionCertificateHashList
(
_In_ PENCRYPTION_CERTIFICATE_HASH_LIST pUsers
PENCRYPTION_CERTIFICATE_HASH_LIST
);
(
);
#if (NTDDI_VERSION >= NTDDI_WS03)
DuplicateEncryptionInfoFile
(
_In_ LPCWSTR SrcFileName,
_In_ LPCWSTR DstFileName,
,
,
_In_opt_ CONST LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
#elif (NTDDI_VERSION >= NTDDI_WINXP)
WINADVAPI
DWORD
WINAPI
DuplicateEncryptionInfoFile(
_In_ LPCWSTR SrcFileName,
_In_ LPCWSTR DstFileName,
DWORD dwCreationDistribution,
DWORD dwAttributes,
_In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
#endif
#if (NTDDI_VERSION >= NTDDI_VISTA)
__declspec
(deprecated)
(
_Out_ PDWORD pcbMetadata,
_Outptr_result_bytebuffer_(*pcbMetadata) PBYTE *ppbMetadata
);
__declspec
(deprecated)
(
_In_opt_ PBYTE pbOldMetadata,
_In_ PBYTE pbNewMetadata,
_In_ PENCRYPTION_CERTIFICATE_HASH pOwnerHash,
PENCRYPTION_CERTIFICATE_HASH
,
,
_In_opt_ PENCRYPTION_CERTIFICATE_HASH_LIST pCertificatesAdded
PENCRYPTION_CERTIFICATE_HASH_LIST
);
__declspec
(deprecated)
(
);
#endif // #if (NTDDI_VERSION >= NTDDI_VISTA)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#ifdef __cplusplus
}
#endif
#if _MSC_VER >= 1200
#pragma warning(pop)
#endif
#endif // #if (NTDDI_VERSION >= NTDDI_WIN2K)
#endif // __WINEFS_H__