Headers diff for advapi32.dll between 6.0.6002.18005-Windows 6.0 and 6.1.7601.23418-Windows 7.0 versions



 aclapi.h (6.0.6002.18005-Windows 6.0)   aclapi.h (6.1.7601.23418-Windows 7.0) 
skipping to change at line 40 skipping to change at line 40
// Tree operation invokes Progress function to provide progress and error // Tree operation invokes Progress function to provide progress and error
// information to the caller during the potentially long execution // information to the caller during the potentially long execution
// of the tree operation. Tree operation provides the name of the object // of the tree operation. Tree operation provides the name of the object
// last processed and the error status of the operation on that object. // last processed and the error status of the operation on that object.
// Tree operation also passes the current InvokeSetting value. // Tree operation also passes the current InvokeSetting value.
// Caller may change the InvokeSetting value, for example, from "Always" // Caller may change the InvokeSetting value, for example, from "Always"
// to "Only On Error." // to "Only On Error."
// //
typedef VOID (*FN_PROGRESS) ( typedef VOID (*FN_PROGRESS) (
IN LPWSTR pObjectName, // name of object just processed __in LPWSTR pObjectName, // name of object just proce
IN DWORD Status, // status of operation on object ssed
IN OUT PPROG_INVOKE_SETTING pInvokeSetting, // Never, always, __in DWORD Status, // status of operation on ob
IN PVOID Args, // Caller specific data ject
IN BOOL SecuritySet // Whether security was set __inout PPROG_INVOKE_SETTING pInvokeSetting, // Never, always,
__in PVOID Args, // Caller specific data
__in BOOL SecuritySet // Whether security was set
); );
WINADVAPI WINADVAPI
DWORD DWORD
WINAPI WINAPI
SetEntriesInAclA( SetEntriesInAclA(
__in ULONG cCountOfExplicitEntries, __in ULONG cCountOfExplicitEntries,
__in_ecount_opt(cCountOfExplicitEntries) PEXPLICIT_ACCESS_A pListOfExplici tEntries, __in_ecount_opt(cCountOfExplicitEntries) PEXPLICIT_ACCESS_A pListOfExplici tEntries,
__in_opt PACL OldAcl, __in_opt PACL OldAcl,
__out PACL * NewAcl __out PACL * NewAcl
skipping to change at line 143 skipping to change at line 143
#ifdef UNICODE #ifdef UNICODE
#define GetAuditedPermissionsFromAcl GetAuditedPermissionsFromAclW #define GetAuditedPermissionsFromAcl GetAuditedPermissionsFromAclW
#else #else
#define GetAuditedPermissionsFromAcl GetAuditedPermissionsFromAclA #define GetAuditedPermissionsFromAcl GetAuditedPermissionsFromAclA
#endif // !UNICODE #endif // !UNICODE
WINADVAPI WINADVAPI
DWORD DWORD
WINAPI WINAPI
GetNamedSecurityInfoA( GetNamedSecurityInfoA(
__in LPSTR pObjectName, __in LPCSTR pObjectName,
__in SE_OBJECT_TYPE ObjectType, __in SE_OBJECT_TYPE ObjectType,
__in SECURITY_INFORMATION SecurityInfo, __in SECURITY_INFORMATION SecurityInfo,
__out_opt PSID * ppsidOwner, __out_opt const PSID * ppsidOwner,
__out_opt PSID * ppsidGroup, __out_opt const PSID * ppsidGroup,
__out_opt PACL * ppDacl, __out_opt const PACL * ppDacl,
__out_opt PACL * ppSacl, __out_opt const PACL * ppSacl,
__out_opt PSECURITY_DESCRIPTOR * ppSecurityDescriptor __out PSECURITY_DESCRIPTOR * ppSecurityDescriptor
); );
WINADVAPI WINADVAPI
DWORD DWORD
WINAPI WINAPI
GetNamedSecurityInfoW( GetNamedSecurityInfoW(
__in LPWSTR pObjectName, __in LPCWSTR pObjectName,
__in SE_OBJECT_TYPE ObjectType, __in SE_OBJECT_TYPE ObjectType,
__in SECURITY_INFORMATION SecurityInfo, __in SECURITY_INFORMATION SecurityInfo,
__out_opt PSID * ppsidOwner, __out_opt const PSID * ppsidOwner,
__out_opt PSID * ppsidGroup, __out_opt const PSID * ppsidGroup,
__out_opt PACL * ppDacl, __out_opt const PACL * ppDacl,
__out_opt PACL * ppSacl, __out_opt const PACL * ppSacl,
__out_opt PSECURITY_DESCRIPTOR * ppSecurityDescriptor __out PSECURITY_DESCRIPTOR * ppSecurityDescriptor
); );
#ifdef UNICODE #ifdef UNICODE
#define GetNamedSecurityInfo GetNamedSecurityInfoW #define GetNamedSecurityInfo GetNamedSecurityInfoW
#else #else
#define GetNamedSecurityInfo GetNamedSecurityInfoA #define GetNamedSecurityInfo GetNamedSecurityInfoA
#endif // !UNICODE #endif // !UNICODE
WINADVAPI WINADVAPI
DWORD DWORD
WINAPI WINAPI
skipping to change at line 311 skipping to change at line 311
__in_opt FN_PROGRESS fnProgress, __in_opt FN_PROGRESS fnProgress,
__in PROG_INVOKE_SETTING ProgressInvokeSetting, __in PROG_INVOKE_SETTING ProgressInvokeSetting,
__in_opt PVOID Args __in_opt PVOID Args
); );
#ifdef UNICODE #ifdef UNICODE
#define TreeResetNamedSecurityInfo TreeResetNamedSecurityInfoW #define TreeResetNamedSecurityInfo TreeResetNamedSecurityInfoW
#else #else
#define TreeResetNamedSecurityInfo TreeResetNamedSecurityInfoA #define TreeResetNamedSecurityInfo TreeResetNamedSecurityInfoA
#endif // !UNICODE #endif // !UNICODE
#if (NTDDI_VERSION >= NTDDI_VISTA)
WINADVAPI WINADVAPI
DWORD DWORD
WINAPI WINAPI
TreeSetNamedSecurityInfoA( TreeSetNamedSecurityInfoA(
__in LPSTR pObjectName, __in LPSTR pObjectName,
__in SE_OBJECT_TYPE ObjectType, __in SE_OBJECT_TYPE ObjectType,
__in SECURITY_INFORMATION SecurityInfo, __in SECURITY_INFORMATION SecurityInfo,
__in_opt PSID pOwner, __in_opt PSID pOwner,
__in_opt PSID pGroup, __in_opt PSID pGroup,
__in_opt PACL pDacl, __in_opt PACL pDacl,
skipping to change at line 349 skipping to change at line 350
__in_opt FN_PROGRESS fnProgress, __in_opt FN_PROGRESS fnProgress,
__in PROG_INVOKE_SETTING ProgressInvokeSetting, __in PROG_INVOKE_SETTING ProgressInvokeSetting,
__in_opt PVOID Args __in_opt PVOID Args
); );
#ifdef UNICODE #ifdef UNICODE
#define TreeSetNamedSecurityInfo TreeSetNamedSecurityInfoW #define TreeSetNamedSecurityInfo TreeSetNamedSecurityInfoW
#else #else
#define TreeSetNamedSecurityInfo TreeSetNamedSecurityInfoA #define TreeSetNamedSecurityInfo TreeSetNamedSecurityInfoA
#endif // !UNICODE #endif // !UNICODE
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// The following API are provided for trusted servers to use to // The following API are provided for trusted servers to use to
// implement access control on their own objects. // implement access control on their own objects.
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
WINADVAPI WINADVAPI
DWORD DWORD
WINAPI WINAPI
BuildSecurityDescriptorA( BuildSecurityDescriptorA(
__in_opt PTRUSTEE_A pOwner, __in_opt PTRUSTEE_A pOwner,
 End of changes. 7 change blocks. 
17 lines changed or deleted 22 lines changed or added


 evntcons.h (6.0.6002.18005-Windows 6.0)   evntcons.h (6.1.7601.23418-Windows 7.0) 
skipping to change at line 46 skipping to change at line 46
#pragma warning(push) #pragma warning(push)
#endif #endif
#pragma warning(disable:4201) // nonstandard extension used : nameless struct/un ion #pragma warning(disable:4201) // nonstandard extension used : nameless struct/un ion
#pragma warning(disable:4214) // nonstandard extension used : bit field types ot her then int #pragma warning(disable:4214) // nonstandard extension used : bit field types ot her then int
#endif #endif
#define EVENT_HEADER_EXT_TYPE_RELATED_ACTIVITYID 0x0001 #define EVENT_HEADER_EXT_TYPE_RELATED_ACTIVITYID 0x0001
#define EVENT_HEADER_EXT_TYPE_SID 0x0002 #define EVENT_HEADER_EXT_TYPE_SID 0x0002
#define EVENT_HEADER_EXT_TYPE_TS_ID 0x0003 #define EVENT_HEADER_EXT_TYPE_TS_ID 0x0003
#define EVENT_HEADER_EXT_TYPE_INSTANCE_INFO 0x0004 #define EVENT_HEADER_EXT_TYPE_INSTANCE_INFO 0x0004
#define EVENT_HEADER_EXT_TYPE_STACK_TRACE32 0x0005
#define EVENT_HEADER_EXT_TYPE_STACK_TRACE64 0x0006
#define EVENT_HEADER_EXT_TYPE_MAX 0x0007
typedef struct _EVENT_HEADER_EXTENDED_DATA_ITEM { typedef struct _EVENT_HEADER_EXTENDED_DATA_ITEM {
USHORT Reserved1; // Reserved for internal use USHORT Reserved1; // Reserved for internal use
USHORT ExtType; // Extended info type USHORT ExtType; // Extended info type
struct { struct {
USHORT Linkage : 1; // Indicates additional extended USHORT Linkage : 1; // Indicates additional extended
// data item // data item
USHORT Reserved2 : 15; USHORT Reserved2 : 15;
}; };
skipping to change at line 79 skipping to change at line 82
} EVENT_EXTENDED_ITEM_INSTANCE, *PEVENT_EXTENDED_ITEM_INSTANCE; } EVENT_EXTENDED_ITEM_INSTANCE, *PEVENT_EXTENDED_ITEM_INSTANCE;
typedef struct _EVENT_EXTENDED_ITEM_RELATED_ACTIVITYID { typedef struct _EVENT_EXTENDED_ITEM_RELATED_ACTIVITYID {
GUID RelatedActivityId; GUID RelatedActivityId;
} EVENT_EXTENDED_ITEM_RELATED_ACTIVITYID, *PEVENT_EXTENDED_ITEM_RELATED_ACTIVITY ID; } EVENT_EXTENDED_ITEM_RELATED_ACTIVITYID, *PEVENT_EXTENDED_ITEM_RELATED_ACTIVITY ID;
typedef struct _EVENT_EXTENDED_ITEM_TS_ID { typedef struct _EVENT_EXTENDED_ITEM_TS_ID {
ULONG SessionId; ULONG SessionId;
} EVENT_EXTENDED_ITEM_TS_ID, *PEVENT_EXTENDED_ITEM_TS_ID; } EVENT_EXTENDED_ITEM_TS_ID, *PEVENT_EXTENDED_ITEM_TS_ID;
typedef struct _EVENT_EXTENDED_ITEM_STACK_TRACE32 {
ULONG64 MatchId;
ULONG Address[ANYSIZE_ARRAY];
} EVENT_EXTENDED_ITEM_STACK_TRACE32, *PEVENT_EXTENDED_ITEM_STACK_TRACE32;
typedef struct _EVENT_EXTENDED_ITEM_STACK_TRACE64 {
ULONG64 MatchId;
ULONG64 Address[ANYSIZE_ARRAY];
} EVENT_EXTENDED_ITEM_STACK_TRACE64, *PEVENT_EXTENDED_ITEM_STACK_TRACE64;
#define EVENT_HEADER_PROPERTY_XML 0x0001 #define EVENT_HEADER_PROPERTY_XML 0x0001
#define EVENT_HEADER_PROPERTY_FORWARDED_XML 0x0002 #define EVENT_HEADER_PROPERTY_FORWARDED_XML 0x0002
#define EVENT_HEADER_PROPERTY_LEGACY_EVENTLOG 0x0004 #define EVENT_HEADER_PROPERTY_LEGACY_EVENTLOG 0x0004
#define EVENT_HEADER_FLAG_EXTENDED_INFO 0x0001 #define EVENT_HEADER_FLAG_EXTENDED_INFO 0x0001
#define EVENT_HEADER_FLAG_PRIVATE_SESSION 0x0002 #define EVENT_HEADER_FLAG_PRIVATE_SESSION 0x0002
#define EVENT_HEADER_FLAG_STRING_ONLY 0x0004 #define EVENT_HEADER_FLAG_STRING_ONLY 0x0004
#define EVENT_HEADER_FLAG_TRACE_MESSAGE 0x0008 #define EVENT_HEADER_FLAG_TRACE_MESSAGE 0x0008
#define EVENT_HEADER_FLAG_NO_CPUTIME 0x0010 #define EVENT_HEADER_FLAG_NO_CPUTIME 0x0010
#define EVENT_HEADER_FLAG_32_BIT_HEADER 0x0020 #define EVENT_HEADER_FLAG_32_BIT_HEADER 0x0020
skipping to change at line 107 skipping to change at line 120
USHORT EventProperty; // User given event property USHORT EventProperty; // User given event property
ULONG ThreadId; // Thread Id ULONG ThreadId; // Thread Id
ULONG ProcessId; // Process Id ULONG ProcessId; // Process Id
LARGE_INTEGER TimeStamp; // Event Timestamp LARGE_INTEGER TimeStamp; // Event Timestamp
GUID ProviderId; // Provider Id GUID ProviderId; // Provider Id
EVENT_DESCRIPTOR EventDescriptor; // Event Descriptor EVENT_DESCRIPTOR EventDescriptor; // Event Descriptor
union { union {
struct { struct {
ULONG KernelTime; // Kernel Mode CPU ticks ULONG KernelTime; // Kernel Mode CPU ticks
ULONG UserTime; // User mode CPU ticks ULONG UserTime; // User mode CPU ticks
}; } DUMMYSTRUCTNAME;
ULONG64 ProcessorTime; // Processor Clock ULONG64 ProcessorTime; // Processor Clock
// for private session events // for private session events
}; } DUMMYUNIONNAME;
GUID ActivityId; // Activity Id GUID ActivityId; // Activity Id
} EVENT_HEADER, *PEVENT_HEADER; } EVENT_HEADER, *PEVENT_HEADER;
typedef struct _EVENT_RECORD { typedef struct _EVENT_RECORD {
EVENT_HEADER EventHeader; // Event header EVENT_HEADER EventHeader; // Event header
ETW_BUFFER_CONTEXT BufferContext; // Buffer context ETW_BUFFER_CONTEXT BufferContext; // Buffer context
USHORT ExtendedDataCount; // Number of extended USHORT ExtendedDataCount; // Number of extended
// data items // data items
USHORT UserDataLength; // User data length USHORT UserDataLength; // User data length
PEVENT_HEADER_EXTENDED_DATA_ITEM // Pointer to an array of PEVENT_HEADER_EXTENDED_DATA_ITEM // Pointer to an array of
ExtendedData; // extended data items ExtendedData; // extended data items
PVOID UserData; // Pointer to user data PVOID UserData; // Pointer to user data
PVOID UserContext; // Context from OpenTrace PVOID UserContext; // Context from OpenTrace
} EVENT_RECORD, *PEVENT_RECORD; } EVENT_RECORD, *PEVENT_RECORD;
#define EVENT_ENABLE_PROPERTY_SID 0x00000001 #define EVENT_ENABLE_PROPERTY_SID 0x00000001
#define EVENT_ENABLE_PROPERTY_TS_ID 0x00000002 #define EVENT_ENABLE_PROPERTY_TS_ID 0x00000002
#define EVENT_ENABLE_PROPERTY_STACK_TRACE 0x00000004
// //
// Consumer API // Consumer API
// //
#define PROCESS_TRACE_MODE_REAL_TIME 0x00000100 #define PROCESS_TRACE_MODE_REAL_TIME 0x00000100
#define PROCESS_TRACE_MODE_RAW_TIMESTAMP 0x00001000 #define PROCESS_TRACE_MODE_RAW_TIMESTAMP 0x00001000
#define PROCESS_TRACE_MODE_EVENT_RECORD 0x10000000 #define PROCESS_TRACE_MODE_EVENT_RECORD 0x10000000
// //
// Event Security APIs // Event Security APIs
// //
typedef enum { typedef enum {
EventSecuritySetDACL, EventSecuritySetDACL,
skipping to change at line 154 skipping to change at line 169
EventSecuritySetSACL, EventSecuritySetSACL,
EventSecurityAddDACL, EventSecurityAddDACL,
EventSecurityAddSACL, EventSecurityAddSACL,
EventSecurityMax EventSecurityMax
} EVENTSECURITYOPERATION; } EVENTSECURITYOPERATION;
#if (WINVER >= _WIN32_WINNT_LONGHORN) #if (WINVER >= _WIN32_WINNT_LONGHORN)
ULONG ULONG
EVNTAPI EVNTAPI
EventAccessControl( EventAccessControl(
IN LPGUID Guid, IN LPGUID Guid,
IN ULONG Operation, IN ULONG Operation,
IN PSID Sid, IN PSID Sid,
IN ULONG Rights, IN ULONG Rights,
IN BOOLEAN AllowOrDeny IN BOOLEAN AllowOrDeny
); );
#endif #endif
#if (WINVER >= _WIN32_WINNT_LONGHORN) #if (WINVER >= _WIN32_WINNT_LONGHORN)
ULONG ULONG
EVNTAPI EVNTAPI
EventAccessQuery( EventAccessQuery(
IN LPGUID Guid, __in LPGUID Guid,
IN OUT PSECURITY_DESCRIPTOR Buffer, __out_bcount_opt(*BufferSize) PSECURITY_DESCRIPTOR Buffer,
IN OUT PULONG BufferSize __inout PULONG BufferSize
); );
#endif #endif
#if (WINVER >= _WIN32_WINNT_LONGHORN) #if (WINVER >= _WIN32_WINNT_LONGHORN)
ULONG ULONG
EVNTAPI EVNTAPI
EventAccessRemove( EventAccessRemove(
IN LPGUID Guid IN LPGUID Guid
); );
#endif #endif
#if defined (_MSC_VER) #if defined (_MSC_VER)
#if _MSC_VER >= 1200 #if _MSC_VER >= 1200
#pragma warning(pop) // restore 4201,4214 #pragma warning(pop) // restore 4201,4214
#else #else
#pragma warning(default:4201) // nonstandard extension used : nameless struct/un ion #pragma warning(default:4201) // nonstandard extension used : nameless struct/un ion
#pragma warning(default:4214) // nonstandard extension used : bit field types ot her then int #pragma warning(default:4214) // nonstandard extension used : bit field types ot her then int
#endif #endif
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 10 change blocks. 
12 lines changed or deleted 27 lines changed or added


 evntprov.h (6.0.6002.18005-Windows 6.0)   evntprov.h (6.1.7601.23418-Windows 7.0) 
skipping to change at line 51 skipping to change at line 51
#define EVENT_ACTIVITY_CTRL_SET_ID (2) #define EVENT_ACTIVITY_CTRL_SET_ID (2)
#define EVENT_ACTIVITY_CTRL_CREATE_ID (3) #define EVENT_ACTIVITY_CTRL_CREATE_ID (3)
#define EVENT_ACTIVITY_CTRL_GET_SET_ID (4) #define EVENT_ACTIVITY_CTRL_GET_SET_ID (4)
#define EVENT_ACTIVITY_CTRL_CREATE_SET_ID (5) #define EVENT_ACTIVITY_CTRL_CREATE_SET_ID (5)
typedef ULONGLONG REGHANDLE, *PREGHANDLE; typedef ULONGLONG REGHANDLE, *PREGHANDLE;
#define MAX_EVENT_DATA_DESCRIPTORS (128) #define MAX_EVENT_DATA_DESCRIPTORS (128)
#define MAX_EVENT_FILTER_DATA_SIZE (1024) #define MAX_EVENT_FILTER_DATA_SIZE (1024)
#define EVENT_FILTER_TYPE_SCHEMATIZED (0x80000000)
// //
// EVENT_DATA_DESCRIPTOR is used to pass in user data items // EVENT_DATA_DESCRIPTOR is used to pass in user data items
// in events. // in events.
// //
typedef struct _EVENT_DATA_DESCRIPTOR { typedef struct _EVENT_DATA_DESCRIPTOR {
ULONGLONG Ptr; // Pointer to data ULONGLONG Ptr; // Pointer to data
ULONG Size; // Size of data in bytes ULONG Size; // Size of data in bytes
ULONG Reserved; ULONG Reserved;
skipping to change at line 92 skipping to change at line 94
// data item to a user callback function. // data item to a user callback function.
// //
typedef struct _EVENT_FILTER_DESCRIPTOR { typedef struct _EVENT_FILTER_DESCRIPTOR {
ULONGLONG Ptr; ULONGLONG Ptr;
ULONG Size; ULONG Size;
ULONG Type; ULONG Type;
} EVENT_FILTER_DESCRIPTOR, *PEVENT_FILTER_DESCRIPTOR; } EVENT_FILTER_DESCRIPTOR, *PEVENT_FILTER_DESCRIPTOR;
typedef struct _EVENT_FILTER_HEADER {
USHORT Id;
UCHAR Version;
UCHAR Reserved[5];
ULONGLONG InstanceId;
ULONG Size;
ULONG NextOffset;
} EVENT_FILTER_HEADER, *PEVENT_FILTER_HEADER;
#ifndef _ETW_KM_ #ifndef _ETW_KM_
// //
// Optional callback function that users provide // Optional callback function that users provide
// //
typedef typedef
VOID VOID
(NTAPI *PENABLECALLBACK) ( (NTAPI *PENABLECALLBACK) (
__in LPCGUID SourceId, __in LPCGUID SourceId,
__in ULONG IsEnabled, __in ULONG IsEnabled,
__in UCHAR Level, __in UCHAR Level,
__in ULONGLONG MatchAnyKeyword, __in ULONGLONG MatchAnyKeyword,
__in ULONGLONG MatchAllKeyword, __in ULONGLONG MatchAllKeyword,
__in_opt PEVENT_FILTER_DESCRIPTOR FilterData, __in_opt PEVENT_FILTER_DESCRIPTOR FilterData,
__in_opt PVOID CallbackContext __inout_opt PVOID CallbackContext
); );
// //
// Registration APIs // Registration APIs
// //
#if (WINVER >= _WIN32_WINNT_LONGHORN) #if (WINVER >= _WIN32_WINNT_VISTA)
ULONG ULONG
EVNTAPI EVNTAPI
EventRegister( EventRegister(
__in LPCGUID ProviderId, __in LPCGUID ProviderId,
__in_opt PENABLECALLBACK EnableCallback, __in_opt PENABLECALLBACK EnableCallback,
__in_opt PVOID CallbackContext, __in_opt PVOID CallbackContext,
__out PREGHANDLE RegHandle __out PREGHANDLE RegHandle
); );
#endif #endif
#if (WINVER >= _WIN32_WINNT_LONGHORN) #if (WINVER >= _WIN32_WINNT_VISTA)
ULONG ULONG
EVNTAPI EVNTAPI
EventUnregister( EventUnregister(
__in REGHANDLE RegHandle __in REGHANDLE RegHandle
); );
#endif #endif
// //
// Control (Is Enabled) APIs // Control (Is Enabled) APIs
// //
#if (WINVER >= _WIN32_WINNT_LONGHORN) #if (WINVER >= _WIN32_WINNT_VISTA)
BOOLEAN BOOLEAN
EVNTAPI EVNTAPI
EventEnabled( EventEnabled(
__in REGHANDLE RegHandle, __in REGHANDLE RegHandle,
__in PCEVENT_DESCRIPTOR EventDescriptor __in PCEVENT_DESCRIPTOR EventDescriptor
); );
#endif #endif
#if (WINVER >= _WIN32_WINNT_LONGHORN) #if (WINVER >= _WIN32_WINNT_VISTA)
BOOLEAN BOOLEAN
EVNTAPI EVNTAPI
EventProviderEnabled( EventProviderEnabled(
__in REGHANDLE RegHandle, __in REGHANDLE RegHandle,
__in UCHAR Level, __in UCHAR Level,
__in ULONGLONG Keyword __in ULONGLONG Keyword
); );
#endif #endif
// //
// Writing (Publishing/Logging) APIs // Writing (Publishing/Logging) APIs
// //
#if (WINVER >= _WIN32_WINNT_LONGHORN) #if (WINVER >= _WIN32_WINNT_VISTA)
ULONG ULONG
EVNTAPI EVNTAPI
EventWrite( EventWrite(
__in REGHANDLE RegHandle, __in REGHANDLE RegHandle,
__in PCEVENT_DESCRIPTOR EventDescriptor, __in PCEVENT_DESCRIPTOR EventDescriptor,
__in ULONG UserDataCount, __in ULONG UserDataCount,
__in_ecount_opt(UserDataCount) PEVENT_DATA_DESCRIPTOR UserData __in_ecount_opt(UserDataCount) PEVENT_DATA_DESCRIPTOR UserData
); );
#endif #endif
#if (WINVER >= _WIN32_WINNT_LONGHORN) #if (WINVER >= _WIN32_WINNT_VISTA)
ULONG ULONG
EVNTAPI EVNTAPI
EventWriteTransfer( EventWriteTransfer(
__in REGHANDLE RegHandle, __in REGHANDLE RegHandle,
__in PCEVENT_DESCRIPTOR EventDescriptor, __in PCEVENT_DESCRIPTOR EventDescriptor,
__in_opt LPCGUID ActivityId, __in_opt LPCGUID ActivityId,
__in LPCGUID RelatedActivityId, __in_opt LPCGUID RelatedActivityId,
__in ULONG UserDataCount, __in ULONG UserDataCount,
__in_ecount_opt(UserDataCount) PEVENT_DATA_DESCRIPTOR UserData __in_ecount_opt(UserDataCount) PEVENT_DATA_DESCRIPTOR UserData
); );
#endif #endif
#if (WINVER >= _WIN32_WINNT_LONGHORN) #if (WINVER >= _WIN32_WINNT_WIN7)
ULONG
EVNTAPI
EventWriteEx(
__in REGHANDLE RegHandle,
__in PCEVENT_DESCRIPTOR EventDescriptor,
__in ULONG64 Filter,
__in ULONG Flags,
__in_opt LPCGUID ActivityId,
__in_opt LPCGUID RelatedActivityId,
__in ULONG UserDataCount,
__in_ecount_opt(UserDataCount) PEVENT_DATA_DESCRIPTOR UserData
);
#endif
#if (WINVER >= _WIN32_WINNT_VISTA)
ULONG ULONG
EVNTAPI EVNTAPI
EventWriteString( EventWriteString(
__in REGHANDLE RegHandle, __in REGHANDLE RegHandle,
__in UCHAR Level, __in UCHAR Level,
__in ULONGLONG Keyword, __in ULONGLONG Keyword,
__in PCWSTR String __in PCWSTR String
); );
#endif #endif
// //
// ActivityId Control APIs // ActivityId Control APIs
// //
#if (WINVER >= _WIN32_WINNT_LONGHORN) #if (WINVER >= _WIN32_WINNT_VISTA)
ULONG ULONG
EVNTAPI EVNTAPI
EventActivityIdControl( EventActivityIdControl(
__in ULONG ControlCode, __in ULONG ControlCode,
__inout LPGUID ActivityId __inout LPGUID ActivityId
); );
#endif #endif
#endif // _ETW_KM_ #endif // _ETW_KM_
// //
// Macros to create Event and Event Data Descriptors // Macros to create Event and Event Data Descriptors
// //
FORCEINLINE FORCEINLINE
VOID VOID
EventDataDescCreate( EventDataDescCreate(
__out PEVENT_DATA_DESCRIPTOR EventDataDescriptor, __out PEVENT_DATA_DESCRIPTOR EventDataDescriptor,
__in const VOID* DataPtr, __in const VOID* DataPtr,
__in ULONG DataSize __in ULONG DataSize
) )
{ {
EventDataDescriptor->Ptr = (ULONGLONG) DataPtr; EventDataDescriptor->Ptr = (ULONGLONG)(ULONG_PTR)DataPtr;
EventDataDescriptor->Size = DataSize; EventDataDescriptor->Size = DataSize;
EventDataDescriptor->Reserved = 0; EventDataDescriptor->Reserved = 0;
return;
} }
FORCEINLINE FORCEINLINE
VOID VOID
EventDescCreate( EventDescCreate(
__out PEVENT_DESCRIPTOR EventDescriptor, __out PEVENT_DESCRIPTOR EventDescriptor,
__in USHORT Id, __in USHORT Id,
__in UCHAR Version, __in UCHAR Version,
__in UCHAR Channel, __in UCHAR Channel,
__in UCHAR Level, __in UCHAR Level,
__in USHORT Task, __in USHORT Task,
__in UCHAR Opcode, __in UCHAR Opcode,
__in ULONGLONG Keyword __in ULONGLONG Keyword
) )
{ {
EventDescriptor->Id = Id; EventDescriptor->Id = Id;
EventDescriptor->Version = Version; EventDescriptor->Version = Version;
EventDescriptor->Channel = Channel; EventDescriptor->Channel = Channel;
EventDescriptor->Level = Level; EventDescriptor->Level = Level;
EventDescriptor->Task = Task; EventDescriptor->Task = Task;
EventDescriptor->Opcode = Opcode; EventDescriptor->Opcode = Opcode;
EventDescriptor->Keyword = Keyword; EventDescriptor->Keyword = Keyword;
return;
} }
FORCEINLINE FORCEINLINE
VOID VOID
EventDescZero( EventDescZero(
__out PEVENT_DESCRIPTOR EventDescriptor __out PEVENT_DESCRIPTOR EventDescriptor
) )
{ {
memset(EventDescriptor, 0, sizeof(EVENT_DESCRIPTOR)); memset(EventDescriptor, 0, sizeof(EVENT_DESCRIPTOR));
return;
} }
// //
// Macros to extract info from an Event Descriptor // Macros to extract info from an Event Descriptor
// //
FORCEINLINE FORCEINLINE
USHORT USHORT
EventDescGetId( EventDescGetId(
__in PCEVENT_DESCRIPTOR EventDescriptor __in PCEVENT_DESCRIPTOR EventDescriptor
skipping to change at line 331 skipping to change at line 362
return (EventDescriptor->Keyword); return (EventDescriptor->Keyword);
} }
// //
// Macros to set info into an Event Descriptor // Macros to set info into an Event Descriptor
// //
FORCEINLINE FORCEINLINE
PEVENT_DESCRIPTOR PEVENT_DESCRIPTOR
EventDescSetId( EventDescSetId(
__in PEVENT_DESCRIPTOR EventDescriptor, __in PEVENT_DESCRIPTOR EventDescriptor,
__in USHORT Id __in USHORT Id
) )
{ {
EventDescriptor->Id = Id; EventDescriptor->Id = Id;
return (EventDescriptor); return (EventDescriptor);
} }
FORCEINLINE FORCEINLINE
PEVENT_DESCRIPTOR PEVENT_DESCRIPTOR
EventDescSetVersion( EventDescSetVersion(
__in PEVENT_DESCRIPTOR EventDescriptor, __in PEVENT_DESCRIPTOR EventDescriptor,
__in UCHAR Version __in UCHAR Version
) )
{ {
EventDescriptor->Version = Version; EventDescriptor->Version = Version;
return (EventDescriptor); return (EventDescriptor);
} }
FORCEINLINE FORCEINLINE
PEVENT_DESCRIPTOR PEVENT_DESCRIPTOR
EventDescSetTask( EventDescSetTask(
__in PEVENT_DESCRIPTOR EventDescriptor, __in PEVENT_DESCRIPTOR EventDescriptor,
__in USHORT Task __in USHORT Task
) )
{ {
EventDescriptor->Task = Task; EventDescriptor->Task = Task;
return (EventDescriptor); return (EventDescriptor);
} }
FORCEINLINE FORCEINLINE
PEVENT_DESCRIPTOR PEVENT_DESCRIPTOR
EventDescSetOpcode( EventDescSetOpcode(
__in PEVENT_DESCRIPTOR EventDescriptor, __in PEVENT_DESCRIPTOR EventDescriptor,
__in UCHAR Opcode __in UCHAR Opcode
) )
{ {
EventDescriptor->Opcode = Opcode; EventDescriptor->Opcode = Opcode;
return (EventDescriptor); return (EventDescriptor);
} }
FORCEINLINE FORCEINLINE
PEVENT_DESCRIPTOR PEVENT_DESCRIPTOR
EventDescSetLevel( EventDescSetLevel(
__in PEVENT_DESCRIPTOR EventDescriptor, __in PEVENT_DESCRIPTOR EventDescriptor,
__in UCHAR Level __in UCHAR Level
) )
{ {
EventDescriptor->Level = Level; EventDescriptor->Level = Level;
return (EventDescriptor); return (EventDescriptor);
} }
FORCEINLINE FORCEINLINE
PEVENT_DESCRIPTOR PEVENT_DESCRIPTOR
EventDescSetChannel( EventDescSetChannel(
__in PEVENT_DESCRIPTOR EventDescriptor, __in PEVENT_DESCRIPTOR EventDescriptor,
__in UCHAR Channel __in UCHAR Channel
) )
{ {
EventDescriptor->Channel = Channel; EventDescriptor->Channel = Channel;
return (EventDescriptor); return (EventDescriptor);
} }
FORCEINLINE FORCEINLINE
PEVENT_DESCRIPTOR PEVENT_DESCRIPTOR
EventDescSetKeyword( EventDescSetKeyword(
__in PEVENT_DESCRIPTOR EventDescriptor, __in PEVENT_DESCRIPTOR EventDescriptor,
__in ULONGLONG Keyword __in ULONGLONG Keyword
) )
{ {
EventDescriptor->Keyword = Keyword; EventDescriptor->Keyword = Keyword;
return (EventDescriptor); return (EventDescriptor);
} }
FORCEINLINE FORCEINLINE
PEVENT_DESCRIPTOR PEVENT_DESCRIPTOR
EventDescOrKeyword( EventDescOrKeyword(
__in PEVENT_DESCRIPTOR EventDescriptor, __in PEVENT_DESCRIPTOR EventDescriptor,
__in ULONGLONG Keyword __in ULONGLONG Keyword
) )
{ {
EventDescriptor->Keyword |= Keyword; EventDescriptor->Keyword |= Keyword;
return (EventDescriptor); return (EventDescriptor);
} }
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 28 change blocks. 
46 lines changed or deleted 77 lines changed or added


 evntrace.h (6.0.6002.18005-Windows 6.0)   evntrace.h (6.1.7601.23418-Windows 7.0) 
skipping to change at line 90 skipping to change at line 90
#define GLOBAL_LOGGER_NAMEW L"GlobalLogger" #define GLOBAL_LOGGER_NAMEW L"GlobalLogger"
#define EVENT_LOGGER_NAMEW L"EventLog" #define EVENT_LOGGER_NAMEW L"EventLog"
#define DIAG_LOGGER_NAMEW L"DiagLog" #define DIAG_LOGGER_NAMEW L"DiagLog"
#define KERNEL_LOGGER_NAMEA "NT Kernel Logger" #define KERNEL_LOGGER_NAMEA "NT Kernel Logger"
#define GLOBAL_LOGGER_NAMEA "GlobalLogger" #define GLOBAL_LOGGER_NAMEA "GlobalLogger"
#define EVENT_LOGGER_NAMEA "EventLog" #define EVENT_LOGGER_NAMEA "EventLog"
#define DIAG_LOGGER_NAMEA "DiagLog" #define DIAG_LOGGER_NAMEA "DiagLog"
#define MAX_MOF_FIELDS 16 // Limit of USE_MOF_PTR fields #define MAX_MOF_FIELDS 16 // Limit of USE_MOF_PTR fields
#ifndef _TRACEHANDLE_DEFINED
#define _TRACEHANDLE_DEFINED
typedef ULONG64 TRACEHANDLE, *PTRACEHANDLE; typedef ULONG64 TRACEHANDLE, *PTRACEHANDLE;
#endif
//types for event data going to System Event Logger //types for event data going to System Event Logger
#define SYSTEM_EVENT_TYPE 1 #define SYSTEM_EVENT_TYPE 1
// //
// predefined generic event types (0x00 to 0x09 reserved). // predefined generic event types (0x00 to 0x09 reserved).
// //
#define EVENT_TRACE_TYPE_INFO 0x00 // Info or point event #define EVENT_TRACE_TYPE_INFO 0x00 // Info or point event
#define EVENT_TRACE_TYPE_START 0x01 // Start event #define EVENT_TRACE_TYPE_START 0x01 // Start event
skipping to change at line 215 skipping to change at line 219
#define EVENT_TRACE_TYPE_REGENUMERATEVALUEKEY 0x12 // NtEnumerateValue Key #define EVENT_TRACE_TYPE_REGENUMERATEVALUEKEY 0x12 // NtEnumerateValue Key
#define EVENT_TRACE_TYPE_REGQUERYMULTIPLEVALUE 0x13 // NtQueryMultipleV alueKey #define EVENT_TRACE_TYPE_REGQUERYMULTIPLEVALUE 0x13 // NtQueryMultipleV alueKey
#define EVENT_TRACE_TYPE_REGSETINFORMATION 0x14 // NtSetInformation Key #define EVENT_TRACE_TYPE_REGSETINFORMATION 0x14 // NtSetInformation Key
#define EVENT_TRACE_TYPE_REGFLUSH 0x15 // NtFlushKey #define EVENT_TRACE_TYPE_REGFLUSH 0x15 // NtFlushKey
#define EVENT_TRACE_TYPE_REGKCBCREATE 0x16 // KcbCreate #define EVENT_TRACE_TYPE_REGKCBCREATE 0x16 // KcbCreate
#define EVENT_TRACE_TYPE_REGKCBDELETE 0x17 // KcbDelete #define EVENT_TRACE_TYPE_REGKCBDELETE 0x17 // KcbDelete
#define EVENT_TRACE_TYPE_REGKCBRUNDOWNBEGIN 0x18 // KcbRundownBegin #define EVENT_TRACE_TYPE_REGKCBRUNDOWNBEGIN 0x18 // KcbRundownBegin
#define EVENT_TRACE_TYPE_REGKCBRUNDOWNEND 0x19 // KcbRundownEnd #define EVENT_TRACE_TYPE_REGKCBRUNDOWNEND 0x19 // KcbRundownEnd
#define EVENT_TRACE_TYPE_REGVIRTUALIZE 0x1A // VirtualizeKey #define EVENT_TRACE_TYPE_REGVIRTUALIZE 0x1A // VirtualizeKey
#define EVENT_TRACE_TYPE_REGCLOSE 0x1B // NtClose (KeyObje ct) #define EVENT_TRACE_TYPE_REGCLOSE 0x1B // NtClose (KeyObje ct)
#define EVENT_TRACE_TYPE_REGSETSECURITY 0x1C // SetSecurityDescr
iptor (KeyObject)
#define EVENT_TRACE_TYPE_REGQUERYSECURITY 0x1D // QuerySecurityDes
criptor (KeyObject)
#define EVENT_TRACE_TYPE_REGCOMMIT 0x1E // CmKtmNotificatio
n (TRANSACTION_NOTIFY_COMMIT)
#define EVENT_TRACE_TYPE_REGPREPARE 0x1F // CmKtmNotificatio
n (TRANSACTION_NOTIFY_PREPARE)
#define EVENT_TRACE_TYPE_REGROLLBACK 0x20 // CmKtmNotificatio
n (TRANSACTION_NOTIFY_ROLLBACK)
#define EVENT_TRACE_TYPE_REGMOUNTHIVE 0x21 // NtLoadKey variat
ions + system hives
// //
// Event types for system configuration records // Event types for system configuration records
// //
#define EVENT_TRACE_TYPE_CONFIG_CPU 0x0A // CPU Configuration #define EVENT_TRACE_TYPE_CONFIG_CPU 0x0A // CPU Configuration
#define EVENT_TRACE_TYPE_CONFIG_PHYSICALDISK 0x0B // Physical Disk Config uration #define EVENT_TRACE_TYPE_CONFIG_PHYSICALDISK 0x0B // Physical Disk Config uration
#define EVENT_TRACE_TYPE_CONFIG_LOGICALDISK 0x0C // Logical Disk Configu ration #define EVENT_TRACE_TYPE_CONFIG_LOGICALDISK 0x0C // Logical Disk Configu ration
#define EVENT_TRACE_TYPE_CONFIG_NIC 0x0D // NIC Configuration #define EVENT_TRACE_TYPE_CONFIG_NIC 0x0D // NIC Configuration
#define EVENT_TRACE_TYPE_CONFIG_VIDEO 0x0E // Video Adapter Config uration #define EVENT_TRACE_TYPE_CONFIG_VIDEO 0x0E // Video Adapter Config uration
#define EVENT_TRACE_TYPE_CONFIG_SERVICES 0x0F // Active Services #define EVENT_TRACE_TYPE_CONFIG_SERVICES 0x0F // Active Services
#define EVENT_TRACE_TYPE_CONFIG_POWER 0x10 // ACPI Configuration #define EVENT_TRACE_TYPE_CONFIG_POWER 0x10 // ACPI Configuration
#define EVENT_TRACE_TYPE_CONFIG_NETINFO 0x11 // Networking Configura tion #define EVENT_TRACE_TYPE_CONFIG_NETINFO 0x11 // Networking Configura tion
#define EVENT_TRACE_TYPE_CONFIG_IRQ 0x15 // IRQ assigned to devi ces #define EVENT_TRACE_TYPE_CONFIG_IRQ 0x15 // IRQ assigned to devi ces
#define EVENT_TRACE_TYPE_CONFIG_PNP 0x16 // PnP device info #define EVENT_TRACE_TYPE_CONFIG_PNP 0x16 // PnP device info
#define EVENT_TRACE_TYPE_CONFIG_IDECHANNEL 0x17 // Primary/Secondary ID E channel Configuration #define EVENT_TRACE_TYPE_CONFIG_IDECHANNEL 0x17 // Primary/Secondary ID E channel Configuration
#define EVENT_TRACE_TYPE_CONFIG_PLATFORM 0x19 // Platform Configurati on
// //
// Enable flags for Kernel Events // Enable flags for Kernel Events
// //
#define EVENT_TRACE_FLAG_PROCESS 0x00000001 // process start & end #define EVENT_TRACE_FLAG_PROCESS 0x00000001 // process start & end
#define EVENT_TRACE_FLAG_THREAD 0x00000002 // thread start & end #define EVENT_TRACE_FLAG_THREAD 0x00000002 // thread start & end
#define EVENT_TRACE_FLAG_IMAGE_LOAD 0x00000004 // image load #define EVENT_TRACE_FLAG_IMAGE_LOAD 0x00000004 // image load
#define EVENT_TRACE_FLAG_DISK_IO 0x00000100 // physical disk IO #define EVENT_TRACE_FLAG_DISK_IO 0x00000100 // physical disk IO
#define EVENT_TRACE_FLAG_DISK_FILE_IO 0x00000200 // requires disk IO #define EVENT_TRACE_FLAG_DISK_FILE_IO 0x00000200 // requires disk IO
skipping to change at line 270 skipping to change at line 281
#define EVENT_TRACE_FLAG_ALPC 0x00100000 // ALPC traces #define EVENT_TRACE_FLAG_ALPC 0x00100000 // ALPC traces
#define EVENT_TRACE_FLAG_SPLIT_IO 0x00200000 // split io traces (Volu meManager) #define EVENT_TRACE_FLAG_SPLIT_IO 0x00200000 // split io traces (Volu meManager)
#define EVENT_TRACE_FLAG_DRIVER 0x00800000 // driver delays #define EVENT_TRACE_FLAG_DRIVER 0x00800000 // driver delays
#define EVENT_TRACE_FLAG_PROFILE 0x01000000 // sample based profilin g #define EVENT_TRACE_FLAG_PROFILE 0x01000000 // sample based profilin g
#define EVENT_TRACE_FLAG_FILE_IO 0x02000000 // file IO #define EVENT_TRACE_FLAG_FILE_IO 0x02000000 // file IO
#define EVENT_TRACE_FLAG_FILE_IO_INIT 0x04000000 // file IO initiation #define EVENT_TRACE_FLAG_FILE_IO_INIT 0x04000000 // file IO initiation
// //
// Enable flags for Kernel Events on Win7 and above
//
#define EVENT_TRACE_FLAG_DISPATCHER 0x00000800 // scheduler (ReadyThrea
d)
#define EVENT_TRACE_FLAG_VIRTUAL_ALLOC 0x00004000 // VM operations
//
// Pre-defined Enable flags for everybody else // Pre-defined Enable flags for everybody else
// //
#define EVENT_TRACE_FLAG_EXTENSION 0x80000000 // Indicates more flags #define EVENT_TRACE_FLAG_EXTENSION 0x80000000 // Indicates more flags
#define EVENT_TRACE_FLAG_FORWARD_WMI 0x40000000 // Can forward to WMI #define EVENT_TRACE_FLAG_FORWARD_WMI 0x40000000 // Can forward to WMI
#define EVENT_TRACE_FLAG_ENABLE_RESERVE 0x20000000 // Reserved #define EVENT_TRACE_FLAG_ENABLE_RESERVE 0x20000000 // Reserved
// //
// Logger Mode flags // Logger Mode flags
// //
#define EVENT_TRACE_FILE_MODE_NONE 0x00000000 // Logfile is off #define EVENT_TRACE_FILE_MODE_NONE 0x00000000 // Logfile is off
skipping to change at line 313 skipping to change at line 330
// //
// Logger Mode flags on Vista and above // Logger Mode flags on Vista and above
// //
#define EVENT_TRACE_NONSTOPPABLE_MODE 0x00000040 // Session cannot be sto pped (Autologger only) #define EVENT_TRACE_NONSTOPPABLE_MODE 0x00000040 // Session cannot be sto pped (Autologger only)
#define EVENT_TRACE_SECURE_MODE 0x00000080 // Secure session #define EVENT_TRACE_SECURE_MODE 0x00000080 // Secure session
#define EVENT_TRACE_USE_KBYTES_FOR_SIZE 0x00002000 // Use KBytes as file si ze unit #define EVENT_TRACE_USE_KBYTES_FOR_SIZE 0x00002000 // Use KBytes as file si ze unit
#define EVENT_TRACE_PRIVATE_IN_PROC 0x00020000 // In process private lo gger #define EVENT_TRACE_PRIVATE_IN_PROC 0x00020000 // In process private lo gger
#define EVENT_TRACE_MODE_RESERVED 0x00100000 // Reserved bit, used to signal Heap/Critsec tracing #define EVENT_TRACE_MODE_RESERVED 0x00100000 // Reserved bit, used to signal Heap/Critsec tracing
// //
// Logger Mode flags on Win7 and above
//
#define EVENT_TRACE_NO_PER_PROCESSOR_BUFFERING 0x10000000 // Use this for l
ow frequency sessions.
//
// ControlTrace Codes // ControlTrace Codes
// //
#define EVENT_TRACE_CONTROL_QUERY 0 #define EVENT_TRACE_CONTROL_QUERY 0
#define EVENT_TRACE_CONTROL_STOP 1 #define EVENT_TRACE_CONTROL_STOP 1
#define EVENT_TRACE_CONTROL_UPDATE 2 #define EVENT_TRACE_CONTROL_UPDATE 2
// //
// Flush ControlTrace Codes for XP and above // Flush ControlTrace Codes for XP and above
// //
#define EVENT_TRACE_CONTROL_FLUSH 3 // Flushes all the buffers #define EVENT_TRACE_CONTROL_FLUSH 3 // Flushes all the buffers
skipping to change at line 352 skipping to change at line 374
#define TRACE_MESSAGE_FLAG_MASK 0xFFFF // Only the lower 16 bits of fla gs are placed in the message #define TRACE_MESSAGE_FLAG_MASK 0xFFFF // Only the lower 16 bits of fla gs are placed in the message
// those above 16 bits are reser ved for local processing // those above 16 bits are reser ved for local processing
#define TRACE_MESSAGE_MAXIMUM_SIZE 8*1024 // the maximum size allowed for a single trace message #define TRACE_MESSAGE_MAXIMUM_SIZE 8*1024 // the maximum size allowed for a single trace message
// longer messages will return E RROR_BUFFER_OVERFLOW // longer messages will return E RROR_BUFFER_OVERFLOW
// //
// Flags to indicate to consumer which fields // Flags to indicate to consumer which fields
// in the EVENT_TRACE_HEADER are valid // in the EVENT_TRACE_HEADER are valid
// //
#define EVENT_TRACE_USE_PROCTIME 0x0001 // ProcessorTime field is valid #define EVENT_TRACE_USE_PROCTIME 0x0001 // ProcessorTime field is va
#define EVENT_TRACE_USE_NOCPUTIME 0x0002 // No Kernel/User/Processor Times lid
#define EVENT_TRACE_USE_NOCPUTIME 0x0002 // No Kernel/User/Processor
Times
// //
// TRACE_HEADER_FLAG values are used in the Flags field of EVENT_TRACE_HEADER // TRACE_HEADER_FLAG values are used in the Flags field of EVENT_TRACE_HEADER
// structure while calling into TraceEvent API // structure while calling into TraceEvent API
// //
#define TRACE_HEADER_FLAG_USE_TIMESTAMP 0x00000200 #define TRACE_HEADER_FLAG_USE_TIMESTAMP 0x00000200
#define TRACE_HEADER_FLAG_TRACED_GUID 0x00020000 // denotes a trace #define TRACE_HEADER_FLAG_TRACED_GUID 0x00020000 // denotes a trace
#define TRACE_HEADER_FLAG_LOG_WNODE 0x00040000 // request to log Wnode #define TRACE_HEADER_FLAG_LOG_WNODE 0x00040000 // request to log Wnode
#define TRACE_HEADER_FLAG_USE_GUID_PTR 0x00080000 // Guid is actually a poi nter #define TRACE_HEADER_FLAG_USE_GUID_PTR 0x00080000 // Guid is actually a poi nter
#define TRACE_HEADER_FLAG_USE_MOF_PTR 0x00100000 // MOF data are dereferen ced #define TRACE_HEADER_FLAG_USE_MOF_PTR 0x00100000 // MOF data are dereferen ced
#if _MSC_VER >= 1200 #if _MSC_VER >= 1200
#pragma warning(push) #pragma warning(push)
#endif #endif
#pragma warning (disable:4201) #pragma warning (disable:4201) /* nonstandard extension used : nameless struct/u nion */
// //
// Trace header for all legacy events. // Trace header for all legacy events.
// //
typedef struct _EVENT_TRACE_HEADER { // overlays WNODE_HEADER typedef struct _EVENT_TRACE_HEADER { // overlays WNODE_HEADER
USHORT Size; // Size of entire record USHORT Size; // Size of entire record
union { union {
USHORT FieldTypeFlags; // Indicates valid fields USHORT FieldTypeFlags; // Indicates valid fields
struct { struct {
UCHAR HeaderType; // Header type - internal use only UCHAR HeaderType; // Header type - internal use only
UCHAR MarkerFlags; // Marker - internal use only UCHAR MarkerFlags; // Marker - internal use only
}; } DUMMYSTRUCTNAME;
}; } DUMMYUNIONNAME;
union { union {
ULONG Version; ULONG Version;
struct { struct {
UCHAR Type; // event type UCHAR Type; // event type
UCHAR Level; // trace instrumentation level UCHAR Level; // trace instrumentation level
USHORT Version; // version of trace record USHORT Version; // version of trace record
} Class; } Class;
}; } DUMMYUNIONNAME2;
ULONG ThreadId; // Thread Id ULONG ThreadId; // Thread Id
ULONG ProcessId; // Process Id ULONG ProcessId; // Process Id
LARGE_INTEGER TimeStamp; // time when event happens LARGE_INTEGER TimeStamp; // time when event happens
union { union {
GUID Guid; // Guid that identifies event GUID Guid; // Guid that identifies event
ULONGLONG GuidPtr; // use with WNODE_FLAG_USE_GUID_PTR ULONGLONG GuidPtr; // use with WNODE_FLAG_USE_GUID_PTR
}; } DUMMYUNIONNAME3;
union { union {
struct { struct {
ULONG KernelTime; // Kernel Mode CPU ticks ULONG KernelTime; // Kernel Mode CPU ticks
ULONG UserTime; // User mode CPU ticks ULONG UserTime; // User mode CPU ticks
}; } DUMMYSTRUCTNAME;
ULONG64 ProcessorTime; // Processor Clock ULONG64 ProcessorTime; // Processor Clock
struct { struct {
ULONG ClientContext; // Reserved ULONG ClientContext; // Reserved
ULONG Flags; // Event Flags ULONG Flags; // Event Flags
}; } DUMMYSTRUCTNAME2;
}; } DUMMYUNIONNAME4;
} EVENT_TRACE_HEADER, *PEVENT_TRACE_HEADER; } EVENT_TRACE_HEADER, *PEVENT_TRACE_HEADER;
// //
// This header is used to trace and track transaction co-relations // This header is used to trace and track transaction co-relations
// //
typedef struct _EVENT_INSTANCE_HEADER { typedef struct _EVENT_INSTANCE_HEADER {
USHORT Size; USHORT Size;
union { union {
USHORT FieldTypeFlags; // Indicates valid fields USHORT FieldTypeFlags; // Indicates valid fields
struct { struct {
UCHAR HeaderType; // Header type - internal use only UCHAR HeaderType; // Header type - internal use only
UCHAR MarkerFlags; // Marker - internal use only UCHAR MarkerFlags; // Marker - internal use only
}; } DUMMYSTRUCTNAME;
}; } DUMMYUNIONNAME;
union { union {
ULONG Version; ULONG Version;
struct { struct {
UCHAR Type; UCHAR Type;
UCHAR Level; UCHAR Level;
USHORT Version; USHORT Version;
} Class; } Class;
}; } DUMMYUNIONNAME2;
ULONG ThreadId; ULONG ThreadId;
ULONG ProcessId; ULONG ProcessId;
LARGE_INTEGER TimeStamp; LARGE_INTEGER TimeStamp;
ULONGLONG RegHandle; ULONGLONG RegHandle;
ULONG InstanceId; ULONG InstanceId;
ULONG ParentInstanceId; ULONG ParentInstanceId;
union { union {
struct { struct {
ULONG KernelTime; // Kernel Mode CPU ticks ULONG KernelTime; // Kernel Mode CPU ticks
ULONG UserTime; // User mode CPU ticks ULONG UserTime; // User mode CPU ticks
}; } DUMMYSTRUCTNAME;
ULONG64 ProcessorTime; // Processor Clock ULONG64 ProcessorTime; // Processor Clock
struct { struct {
ULONG EventId; // Event ID ULONG EventId; // Event ID
ULONG Flags; // Trace header Flags ULONG Flags; // Trace header Flags
}; } DUMMYSTRUCTNAME2;
}; } DUMMYUNIONNAME3;
ULONGLONG ParentRegHandle; ULONGLONG ParentRegHandle;
} EVENT_INSTANCE_HEADER, *PEVENT_INSTANCE_HEADER; } EVENT_INSTANCE_HEADER, *PEVENT_INSTANCE_HEADER;
#if _MSC_VER >= 1200 #if _MSC_VER >= 1200
#pragma warning(pop) #pragma warning(pop)
#endif #endif
// //
// Following are structures and macros for use with USE_MOF_PTR // Following are structures and macros for use with USE_MOF_PTR
// //
skipping to change at line 500 skipping to change at line 522
#define ETW_REDUCED_ANSISTRING_TYPE_VALUE 113 #define ETW_REDUCED_ANSISTRING_TYPE_VALUE 113
#define ETW_REDUCED_STRING_TYPE_VALUE 114 #define ETW_REDUCED_STRING_TYPE_VALUE 114
#define ETW_SID_TYPE_VALUE 115 #define ETW_SID_TYPE_VALUE 115
#define ETW_VARIANT_TYPE_VALUE 116 #define ETW_VARIANT_TYPE_VALUE 116
#define ETW_PTVECTOR_TYPE_VALUE 117 #define ETW_PTVECTOR_TYPE_VALUE 117
#define ETW_WMITIME_TYPE_VALUE 118 #define ETW_WMITIME_TYPE_VALUE 118
#define ETW_DATETIME_TYPE_VALUE 119 #define ETW_DATETIME_TYPE_VALUE 119
#define ETW_REFRENCE_TYPE_VALUE 120 #define ETW_REFRENCE_TYPE_VALUE 120
#define DEFINE_TRACE_MOF_FIELD(MOF, ptr, length, type) \ #define DEFINE_TRACE_MOF_FIELD(MOF, ptr, length, type) \
(MOF)->DataPtr = (ULONG64) ptr; \ (MOF)->DataPtr = (ULONG64)(ULONG_PTR) ptr; \
(MOF)->Length = (ULONG) length; \ (MOF)->Length = (ULONG) length; \
(MOF)->DataType = (ULONG) type; (MOF)->DataType = (ULONG) type;
typedef struct _MOF_FIELD { typedef struct _MOF_FIELD {
ULONG64 DataPtr; // Pointer to the field. Up to 64-bits only ULONG64 DataPtr; // Pointer to the field. Up to 64-bits only
ULONG Length; // Length of the MOF field ULONG Length; // Length of the MOF field
ULONG DataType; // Type of data ULONG DataType; // Type of data
} MOF_FIELD, *PMOF_FIELD; } MOF_FIELD, *PMOF_FIELD;
#if !(defined(_NTDDK_) || defined(_NTIFS_)) || defined(_WMIKM_) #if !(defined(_NTDDK_) || defined(_NTIFS_)) || defined(_WMIKM_)
#if _MSC_VER >= 1200 #if _MSC_VER >= 1200
#pragma warning(push) #pragma warning(push)
#endif #endif
#pragma warning (disable:4201) #pragma warning (disable:4201) /* nonstandard extension used : nameless struct/u nion */
// //
// This is the header for every logfile. The memory for LoggerName // This is the header for every logfile. The memory for LoggerName
// and LogFileName must be contiguous adjacent to this structure // and LogFileName must be contiguous adjacent to this structure
// Allows both user-mode and kernel-mode to understand the header // Allows both user-mode and kernel-mode to understand the header.
//
// TRACE_LOGFILE_HEADER32 and TRACE_LOGFILE_HEADER64 structures
// are also provided to simplify cross platform decoding of the
// header event.
// //
typedef struct _TRACE_LOGFILE_HEADER { typedef struct _TRACE_LOGFILE_HEADER {
ULONG BufferSize; // Logger buffer size in Kbytes ULONG BufferSize; // Logger buffer size in Kbytes
union { union {
ULONG Version; // Logger version ULONG Version; // Logger version
struct { struct {
UCHAR MajorVersion; UCHAR MajorVersion;
UCHAR MinorVersion; UCHAR MinorVersion;
UCHAR SubVersion; UCHAR SubVersion;
UCHAR SubMinorVersion; UCHAR SubMinorVersion;
} VersionDetail; } VersionDetail;
skipping to change at line 532 skipping to change at line 559
typedef struct _TRACE_LOGFILE_HEADER { typedef struct _TRACE_LOGFILE_HEADER {
ULONG BufferSize; // Logger buffer size in Kbytes ULONG BufferSize; // Logger buffer size in Kbytes
union { union {
ULONG Version; // Logger version ULONG Version; // Logger version
struct { struct {
UCHAR MajorVersion; UCHAR MajorVersion;
UCHAR MinorVersion; UCHAR MinorVersion;
UCHAR SubVersion; UCHAR SubVersion;
UCHAR SubMinorVersion; UCHAR SubMinorVersion;
} VersionDetail; } VersionDetail;
}; } DUMMYUNIONNAME;
ULONG ProviderVersion; // defaults to NT version ULONG ProviderVersion; // defaults to NT version
ULONG NumberOfProcessors; // Number of Processors ULONG NumberOfProcessors; // Number of Processors
LARGE_INTEGER EndTime; // Time when logger stops LARGE_INTEGER EndTime; // Time when logger stops
ULONG TimerResolution; // assumes timer is constant!!! ULONG TimerResolution; // assumes timer is constant!!!
ULONG MaximumFileSize; // Maximum in Mbytes ULONG MaximumFileSize; // Maximum in Mbytes
ULONG LogFileMode; // specify logfile mode ULONG LogFileMode; // specify logfile mode
ULONG BuffersWritten; // used to file start of Circular File ULONG BuffersWritten; // used to file start of Circular File
union { union {
GUID LogInstanceGuid; // For RealTime Buffer Delivery GUID LogInstanceGuid; // For RealTime Buffer Delivery
struct { struct {
ULONG StartBuffers; // Count of buffers written at start. ULONG StartBuffers; // Count of buffers written at start.
ULONG PointerSize; // Size of pointer type in bits ULONG PointerSize; // Size of pointer type in bits
ULONG EventsLost; // Events losts during log session ULONG EventsLost; // Events losts during log session
ULONG CpuSpeedInMHz; // Cpu Speed in MHz ULONG CpuSpeedInMHz; // Cpu Speed in MHz
}; } DUMMYSTRUCTNAME;
}; } DUMMYUNIONNAME2;
#if defined(_WMIKM_) #if defined(_WMIKM_)
PWCHAR LoggerName; PWCHAR LoggerName;
PWCHAR LogFileName; PWCHAR LogFileName;
RTL_TIME_ZONE_INFORMATION TimeZone; RTL_TIME_ZONE_INFORMATION TimeZone;
#else #else
LPWSTR LoggerName; LPWSTR LoggerName;
LPWSTR LogFileName; LPWSTR LogFileName;
TIME_ZONE_INFORMATION TimeZone; TIME_ZONE_INFORMATION TimeZone;
#endif #endif
LARGE_INTEGER BootTime; LARGE_INTEGER BootTime;
LARGE_INTEGER PerfFreq; // Reserved LARGE_INTEGER PerfFreq; // Reserved
LARGE_INTEGER StartTime; // Reserved LARGE_INTEGER StartTime; // Reserved
ULONG ReservedFlags; // Reserved ULONG ReservedFlags; // ClockType
ULONG BuffersLost; ULONG BuffersLost;
} TRACE_LOGFILE_HEADER, *PTRACE_LOGFILE_HEADER; } TRACE_LOGFILE_HEADER, *PTRACE_LOGFILE_HEADER;
typedef struct _TRACE_LOGFILE_HEADER32 {
ULONG BufferSize; // Logger buffer size in Kbytes
union {
ULONG Version; // Logger version
struct {
UCHAR MajorVersion;
UCHAR MinorVersion;
UCHAR SubVersion;
UCHAR SubMinorVersion;
} VersionDetail;
};
ULONG ProviderVersion; // defaults to NT version
ULONG NumberOfProcessors; // Number of Processors
LARGE_INTEGER EndTime; // Time when logger stops
ULONG TimerResolution; // assumes timer is constant!!!
ULONG MaximumFileSize; // Maximum in Mbytes
ULONG LogFileMode; // specify logfile mode
ULONG BuffersWritten; // used to file start of Circular File
union {
GUID LogInstanceGuid; // For RealTime Buffer Delivery
struct {
ULONG StartBuffers; // Count of buffers written at start.
ULONG PointerSize; // Size of pointer type in bits
ULONG EventsLost; // Events losts during log session
ULONG CpuSpeedInMHz; // Cpu Speed in MHz
};
};
#if defined(_WMIKM_)
ULONG32 LoggerName;
ULONG32 LogFileName;
RTL_TIME_ZONE_INFORMATION TimeZone;
#else
ULONG32 LoggerName;
ULONG32 LogFileName;
TIME_ZONE_INFORMATION TimeZone;
#endif
LARGE_INTEGER BootTime;
LARGE_INTEGER PerfFreq; // Reserved
LARGE_INTEGER StartTime; // Reserved
ULONG ReservedFlags; // ClockType
ULONG BuffersLost;
} TRACE_LOGFILE_HEADER32, *PTRACE_LOGFILE_HEADER32;
typedef struct _TRACE_LOGFILE_HEADER64 {
ULONG BufferSize; // Logger buffer size in Kbytes
union {
ULONG Version; // Logger version
struct {
UCHAR MajorVersion;
UCHAR MinorVersion;
UCHAR SubVersion;
UCHAR SubMinorVersion;
} VersionDetail;
};
ULONG ProviderVersion; // defaults to NT version
ULONG NumberOfProcessors; // Number of Processors
LARGE_INTEGER EndTime; // Time when logger stops
ULONG TimerResolution; // assumes timer is constant!!!
ULONG MaximumFileSize; // Maximum in Mbytes
ULONG LogFileMode; // specify logfile mode
ULONG BuffersWritten; // used to file start of Circular File
union {
GUID LogInstanceGuid; // For RealTime Buffer Delivery
struct {
ULONG StartBuffers; // Count of buffers written at start.
ULONG PointerSize; // Size of pointer type in bits
ULONG EventsLost; // Events losts during log session
ULONG CpuSpeedInMHz; // Cpu Speed in MHz
};
};
#if defined(_WMIKM_)
ULONG64 LoggerName;
ULONG64 LogFileName;
RTL_TIME_ZONE_INFORMATION TimeZone;
#else
ULONG64 LoggerName;
ULONG64 LogFileName;
TIME_ZONE_INFORMATION TimeZone;
#endif
LARGE_INTEGER BootTime;
LARGE_INTEGER PerfFreq; // Reserved
LARGE_INTEGER StartTime; // Reserved
ULONG ReservedFlags; // ClockType
ULONG BuffersLost;
} TRACE_LOGFILE_HEADER64, *PTRACE_LOGFILE_HEADER64;
#if _MSC_VER >= 1200 #if _MSC_VER >= 1200
#pragma warning(pop) #pragma warning(pop)
#endif #endif
#endif // !_NTDDK_ || _WMIKM_ #endif // !_NTDDK_ || _WMIKM_
// //
// Instance Information to track parent child relationship of Instances. // Instance Information to track parent child relationship of Instances.
// //
typedef struct EVENT_INSTANCE_INFO { typedef struct EVENT_INSTANCE_INFO {
skipping to change at line 600 skipping to change at line 713
WNODE_HEADER Wnode; WNODE_HEADER Wnode;
// //
// data provided by caller // data provided by caller
ULONG BufferSize; // buffer size for logging (kbytes) ULONG BufferSize; // buffer size for logging (kbytes)
ULONG MinimumBuffers; // minimum to preallocate ULONG MinimumBuffers; // minimum to preallocate
ULONG MaximumBuffers; // maximum buffers allowed ULONG MaximumBuffers; // maximum buffers allowed
ULONG MaximumFileSize; // maximum logfile size (in MBytes) ULONG MaximumFileSize; // maximum logfile size (in MBytes)
ULONG LogFileMode; // sequential, circular ULONG LogFileMode; // sequential, circular
ULONG FlushTimer; // buffer flush timer, in seconds ULONG FlushTimer; // buffer flush timer, in seconds
ULONG EnableFlags; // trace enable flags ULONG EnableFlags; // trace enable flags
LONG AgeLimit; // age decay time, in minutes LONG AgeLimit; // unused
// data returned to caller // data returned to caller
ULONG NumberOfBuffers; // no of buffers in use ULONG NumberOfBuffers; // no of buffers in use
ULONG FreeBuffers; // no of buffers free ULONG FreeBuffers; // no of buffers free
ULONG EventsLost; // event records lost ULONG EventsLost; // event records lost
ULONG BuffersWritten; // no of buffers written to file ULONG BuffersWritten; // no of buffers written to file
ULONG LogBuffersLost; // no of logfile write failures ULONG LogBuffersLost; // no of logfile write failures
ULONG RealTimeBuffersLost; // no of rt delivery failures ULONG RealTimeBuffersLost; // no of rt delivery failures
HANDLE LoggerThreadId; // thread id of Logger HANDLE LoggerThreadId; // thread id of Logger
ULONG LogFileNameOffset; // Offset to LogFileName ULONG LogFileNameOffset; // Offset to LogFileName
ULONG LoggerNameOffset; // Offset to LoggerName ULONG LoggerNameOffset; // Offset to LoggerName
} EVENT_TRACE_PROPERTIES, *PEVENT_TRACE_PROPERTIES; } EVENT_TRACE_PROPERTIES, *PEVENT_TRACE_PROPERTIES;
// NOTE:
// If AgeLimit is 0, default is used
// If AgeLimit is < 0, buffer aging is turned off
// //
// Data Provider structures // Data Provider structures
// //
// Used by RegisterTraceGuids() // Used by RegisterTraceGuids()
// //
typedef struct _TRACE_GUID_REGISTRATION { typedef struct _TRACE_GUID_REGISTRATION {
LPCGUID Guid; // Guid of data block being registered or updated. LPCGUID Guid; // Guid of data block being registered or updated.
HANDLE RegHandle; // Guid Registration Handle is returned. HANDLE RegHandle; // Guid Registration Handle is returned.
} TRACE_GUID_REGISTRATION, *PTRACE_GUID_REGISTRATION; } TRACE_GUID_REGISTRATION, *PTRACE_GUID_REGISTRATION;
skipping to change at line 640 skipping to change at line 749
// //
#endif // !_NTDDK_ || _WMIKM_ #endif // !_NTDDK_ || _WMIKM_
typedef struct _TRACE_GUID_PROPERTIES { typedef struct _TRACE_GUID_PROPERTIES {
GUID Guid; GUID Guid;
ULONG GuidType; ULONG GuidType;
ULONG LoggerId; ULONG LoggerId;
ULONG EnableLevel; ULONG EnableLevel;
ULONG EnableFlags; ULONG EnableFlags;
BOOLEAN IsEnable; BOOLEAN IsEnable;
} TRACE_GUID_PROPERTIES, *PTRACE_GUID_PROPERTIES; } TRACE_GUID_PROPERTIES, *PTRACE_GUID_PROPERTIES;
typedef struct _ETW_BUFFER_CONTEXT { typedef struct _ETW_BUFFER_CONTEXT {
UCHAR ProcessorNumber; UCHAR ProcessorNumber;
UCHAR Alignment; UCHAR Alignment;
USHORT LoggerId; USHORT LoggerId;
} ETW_BUFFER_CONTEXT, *PETW_BUFFER_CONTEXT; } ETW_BUFFER_CONTEXT, *PETW_BUFFER_CONTEXT;
// //
// Provider Information Flags used on Vista and above // Provider Information Flags used on Vista and above.
// //
#define TRACE_PROVIDER_FLAG_LEGACY (0x00000001) #define TRACE_PROVIDER_FLAG_LEGACY (0x00000001)
#define TRACE_PROVIDER_FLAG_PRE_ENABLE (0x00000002) #define TRACE_PROVIDER_FLAG_PRE_ENABLE (0x00000002)
// //
// Enable Information for Provider Instance // Enable Information for Provider Instance
// Used on Vista and above // Used on Vista and above
// //
typedef struct _TRACE_ENABLE_INFO { typedef struct _TRACE_ENABLE_INFO {
ULONG IsEnabled; ULONG IsEnabled;
UCHAR Level; UCHAR Level;
skipping to change at line 703 skipping to change at line 812
// //
// An EVENT_TRACE consists of a fixed header (EVENT_TRACE_HEADER) and // An EVENT_TRACE consists of a fixed header (EVENT_TRACE_HEADER) and
// optionally a variable portion pointed to by MofData. The datablock // optionally a variable portion pointed to by MofData. The datablock
// layout of the variable portion is unknown to the Logger and must // layout of the variable portion is unknown to the Logger and must
// be obtained from WBEM CIMOM database. // be obtained from WBEM CIMOM database.
// //
#if _MSC_VER >= 1200 #if _MSC_VER >= 1200
#pragma warning(push) #pragma warning(push)
#endif #endif
#pragma warning (disable:4201) #pragma warning (disable:4201) /* nonstandard extension used : nameless struct/u nion */
typedef struct _EVENT_TRACE { typedef struct _EVENT_TRACE {
EVENT_TRACE_HEADER Header; // Event trace header EVENT_TRACE_HEADER Header; // Event trace header
ULONG InstanceId; // Instance Id of this event ULONG InstanceId; // Instance Id of this event
ULONG ParentInstanceId; // Parent Instance Id. ULONG ParentInstanceId; // Parent Instance Id.
GUID ParentGuid; // Parent Guid; GUID ParentGuid; // Parent Guid;
PVOID MofData; // Pointer to Variable Data PVOID MofData; // Pointer to Variable Data
ULONG MofLength; // Variable Datablock Length ULONG MofLength; // Variable Datablock Length
union { union {
ULONG ClientContext; ULONG ClientContext;
ETW_BUFFER_CONTEXT BufferContext; ETW_BUFFER_CONTEXT BufferContext;
}; } DUMMYUNIONNAME;
} EVENT_TRACE, *PEVENT_TRACE; } EVENT_TRACE, *PEVENT_TRACE;
#if _MSC_VER >= 1200 #if _MSC_VER >= 1200
#pragma warning(pop) #pragma warning(pop)
#endif #endif
#define EVENT_CONTROL_CODE_DISABLE_PROVIDER 0
#define EVENT_CONTROL_CODE_ENABLE_PROVIDER 1
#define EVENT_CONTROL_CODE_CAPTURE_STATE 2
#if !defined(_WMIKM_) && !defined(_NTDDK_) && !defined(_NTIFS_) #if !defined(_WMIKM_) && !defined(_NTDDK_) && !defined(_NTIFS_)
typedef struct _EVENT_RECORD typedef struct _EVENT_RECORD
EVENT_RECORD, *PEVENT_RECORD; EVENT_RECORD, *PEVENT_RECORD;
typedef struct _EVENT_TRACE_LOGFILEW typedef struct _EVENT_TRACE_LOGFILEW
EVENT_TRACE_LOGFILEW, *PEVENT_TRACE_LOGFILEW; EVENT_TRACE_LOGFILEW, *PEVENT_TRACE_LOGFILEW;
typedef struct _EVENT_TRACE_LOGFILEA typedef struct _EVENT_TRACE_LOGFILEA
EVENT_TRACE_LOGFILEA, *PEVENT_TRACE_LOGFILEA; EVENT_TRACE_LOGFILEA, *PEVENT_TRACE_LOGFILEA;
skipping to change at line 751 skipping to change at line 864
// //
// Prototype for service request callback. Data providers register with WMI // Prototype for service request callback. Data providers register with WMI
// by passing a service request callback function that is called for all // by passing a service request callback function that is called for all
// wmi requests. // wmi requests.
typedef ULONG ( typedef ULONG (
#ifndef MIDL_PASS #ifndef MIDL_PASS
WINAPI WINAPI
#endif #endif
*WMIDPREQUEST)( *WMIDPREQUEST)(
IN WMIDPREQUESTCODE RequestCode, __in WMIDPREQUESTCODE RequestCode,
IN PVOID RequestContext, __in PVOID RequestContext,
IN OUT ULONG *BufferSize, __inout ULONG *BufferSize,
IN OUT PVOID Buffer __inout PVOID Buffer
); );
#if _MSC_VER >= 1200 #if _MSC_VER >= 1200
#pragma warning(push) #pragma warning(push)
#endif #endif
#pragma warning (disable:4201) #pragma warning (disable:4201) /* nonstandard extension used : nameless struct/u nion */
struct _EVENT_TRACE_LOGFILEW { struct _EVENT_TRACE_LOGFILEW {
LPWSTR LogFileName; // Logfile Name LPWSTR LogFileName; // Logfile Name
LPWSTR LoggerName; // LoggerName LPWSTR LoggerName; // LoggerName
LONGLONG CurrentTime; // timestamp of last event LONGLONG CurrentTime; // timestamp of last event
ULONG BuffersRead; // buffers read to date ULONG BuffersRead; // buffers read to date
union { union {
// Mode of the logfile // Mode of the logfile
ULONG LogFileMode; ULONG LogFileMode;
// Processing flags used on Vista and above // Processing flags used on Vista and above
ULONG ProcessTraceMode; ULONG ProcessTraceMode;
}; } DUMMYUNIONNAME;
EVENT_TRACE CurrentEvent; // Current Event from this stream. EVENT_TRACE CurrentEvent; // Current Event from this stream.
TRACE_LOGFILE_HEADER LogfileHeader; // logfile header structure TRACE_LOGFILE_HEADER LogfileHeader; // logfile header structure
PEVENT_TRACE_BUFFER_CALLBACKW // callback before each buffer PEVENT_TRACE_BUFFER_CALLBACKW // callback before each buffer
BufferCallback; // is read BufferCallback; // is read
// //
// following variables are filled for BufferCallback. // following variables are filled for BufferCallback.
// //
ULONG BufferSize; ULONG BufferSize;
ULONG Filled; ULONG Filled;
ULONG EventsLost; ULONG EventsLost;
// //
// following needs to be propaged to each buffer // following needs to be propaged to each buffer
// //
union { union {
// Callback with EVENT_TRACE // Callback with EVENT_TRACE
PEVENT_CALLBACK EventCallback; PEVENT_CALLBACK EventCallback;
// Callback with EVENT_RECORD on Vista and above // Callback with EVENT_RECORD on Vista and above
PEVENT_RECORD_CALLBACK EventRecordCallback; PEVENT_RECORD_CALLBACK EventRecordCallback;
}; } DUMMYUNIONNAME2;
ULONG IsKernelTrace; // TRUE for kernel logfile ULONG IsKernelTrace; // TRUE for kernel logfile
PVOID Context; // reserved for internal use PVOID Context; // reserved for internal use
}; };
struct _EVENT_TRACE_LOGFILEA { struct _EVENT_TRACE_LOGFILEA {
LPSTR LogFileName; // Logfile Name LPSTR LogFileName; // Logfile Name
LPSTR LoggerName; // LoggerName LPSTR LoggerName; // LoggerName
LONGLONG CurrentTime; // timestamp of last event LONGLONG CurrentTime; // timestamp of last event
ULONG BuffersRead; // buffers read to date ULONG BuffersRead; // buffers read to date
union { union {
ULONG LogFileMode; // Mode of the logfile ULONG LogFileMode; // Mode of the logfile
ULONG ProcessTraceMode; // Processing flags ULONG ProcessTraceMode; // Processing flags
}; } DUMMYUNIONNAME;
EVENT_TRACE CurrentEvent; // Current Event from this stream EVENT_TRACE CurrentEvent; // Current Event from this stream
TRACE_LOGFILE_HEADER LogfileHeader; // logfile header structure TRACE_LOGFILE_HEADER LogfileHeader; // logfile header structure
PEVENT_TRACE_BUFFER_CALLBACKA // callback before each buffer PEVENT_TRACE_BUFFER_CALLBACKA // callback before each buffer
BufferCallback; // is read BufferCallback; // is read
// //
// following variables are filled for BufferCallback. // following variables are filled for BufferCallback.
// //
ULONG BufferSize; ULONG BufferSize;
ULONG Filled; ULONG Filled;
ULONG EventsLost; ULONG EventsLost;
// //
// following needs to be propaged to each buffer // following needs to be propaged to each buffer
// //
union { union {
PEVENT_CALLBACK EventCallback; // callback for every event PEVENT_CALLBACK EventCallback; // callback for every event
PEVENT_RECORD_CALLBACK EventRecordCallback; PEVENT_RECORD_CALLBACK EventRecordCallback;
}; } DUMMYUNIONNAME2;
ULONG IsKernelTrace; // TRUE for kernel logfile ULONG IsKernelTrace; // TRUE for kernel logfile
PVOID Context; // reserved for internal use PVOID Context; // reserved for internal use
}; };
#if _MSC_VER >= 1200 #if _MSC_VER >= 1200
#pragma warning(pop) #pragma warning(pop)
#endif #endif
// //
skipping to change at line 872 skipping to change at line 985
// //
// Logger control APIs // Logger control APIs
// //
// //
// Use the routine below to start an event trace session // Use the routine below to start an event trace session
// //
// ULONG // ULONG
// StartTrace( // StartTrace(
// OUT PTRACEHANDLE TraceHandle, // __out PTRACEHANDLE TraceHandle,
// IN LPTSTR InstanceName, // __in LPTSTR InstanceName,
// IN OUT PEVENT_TRACE_PROPERTIES Properties // __inout PEVENT_TRACE_PROPERTIES Properties
// ); // );
EXTERN_C EXTERN_C
ULONG ULONG
WMIAPI WMIAPI
StartTraceW( StartTraceW(
__out PTRACEHANDLE TraceHandle, __out PTRACEHANDLE TraceHandle,
__in LPCWSTR InstanceName, __in LPCWSTR InstanceName,
__inout PEVENT_TRACE_PROPERTIES Properties __inout PEVENT_TRACE_PROPERTIES Properties
); );
skipping to change at line 902 skipping to change at line 1015
__inout PEVENT_TRACE_PROPERTIES Properties __inout PEVENT_TRACE_PROPERTIES Properties
); );
// //
// Use the routine below to stop an event trace session // Use the routine below to stop an event trace session
// //
// //
// ULONG // ULONG
// StopTrace( // StopTrace(
// IN TRACEHANDLE TraceHandle, // __in TRACEHANDLE TraceHandle,
// IN LPTSTR InstanceName, // __in_opt LPTSTR InstanceName,
// IN OUT PEVENT_TRACE_PROPERTIES Properties // __inout PEVENT_TRACE_PROPERTIES Properties
// ); // );
EXTERN_C EXTERN_C
ULONG ULONG
WMIAPI WMIAPI
StopTraceW( StopTraceW(
__in TRACEHANDLE TraceHandle, __in TRACEHANDLE TraceHandle,
__in_opt LPCWSTR InstanceName, __in_opt LPCWSTR InstanceName,
__inout PEVENT_TRACE_PROPERTIES Properties __inout PEVENT_TRACE_PROPERTIES Properties
); );
skipping to change at line 931 skipping to change at line 1044
__in_opt LPCSTR InstanceName, __in_opt LPCSTR InstanceName,
__inout PEVENT_TRACE_PROPERTIES Properties __inout PEVENT_TRACE_PROPERTIES Properties
); );
// //
// Use the routine below to query the properties of an event trace session // Use the routine below to query the properties of an event trace session
// //
// ULONG // ULONG
// QueryTrace( // QueryTrace(
// IN TRACEHANDLE TraceHandle, // __in TRACEHANDLE TraceHandle,
// IN LPTSTR InstanceName, // __in_opt LPTSTR InstanceName,
// IN OUT PEVENT_TRACE_PROPERTIES Properties // __inout PEVENT_TRACE_PROPERTIES Properties
// ); // );
EXTERN_C EXTERN_C
ULONG ULONG
WMIAPI WMIAPI
QueryTraceW( QueryTraceW(
__in TRACEHANDLE TraceHandle, __in TRACEHANDLE TraceHandle,
__in_opt LPCWSTR InstanceName, __in_opt LPCWSTR InstanceName,
__inout PEVENT_TRACE_PROPERTIES Properties __inout PEVENT_TRACE_PROPERTIES Properties
); );
skipping to change at line 960 skipping to change at line 1073
__in_opt LPCSTR InstanceName, __in_opt LPCSTR InstanceName,
__inout PEVENT_TRACE_PROPERTIES Properties __inout PEVENT_TRACE_PROPERTIES Properties
); );
// //
// Use the routine below to update certain properties of an event trace session // Use the routine below to update certain properties of an event trace session
// //
// ULONG // ULONG
// UpdateTrace( // UpdateTrace(
// IN (PTRACEHANDLE TraceHandle, // __in PTRACEHANDLE TraceHandle,
// IN LPTSTR InstanceName, // __in_opt LPTSTR InstanceName,
// IN OUT PEVENT_TRACE_PROPERTIES Properties // __inout PEVENT_TRACE_PROPERTIES Properties
// ); // );
EXTERN_C EXTERN_C
ULONG ULONG
WMIAPI WMIAPI
UpdateTraceW( UpdateTraceW(
__in TRACEHANDLE TraceHandle, __in TRACEHANDLE TraceHandle,
__in_opt LPCWSTR InstanceName, __in_opt LPCWSTR InstanceName,
__inout PEVENT_TRACE_PROPERTIES Properties __inout PEVENT_TRACE_PROPERTIES Properties
); );
skipping to change at line 990 skipping to change at line 1103
__inout PEVENT_TRACE_PROPERTIES Properties __inout PEVENT_TRACE_PROPERTIES Properties
); );
// //
// Use the routine below to request that all active buffers an event trace // Use the routine below to request that all active buffers an event trace
// session be "flushed", or written out. // session be "flushed", or written out.
// //
// ULONG // ULONG
// FlushTrace( // FlushTrace(
// IN TRACEHANDLE TraceHandle, // __in TRACEHANDLE TraceHandle,
// IN LPTSTR InstanceName, // __in_opt LPTSTR InstanceName,
// IN OUT PEVENT_TRACE_PROPERTIES Properties // __inout PEVENT_TRACE_PROPERTIES Properties
// ); // );
#if (WINVER >= _WIN32_WINNT_WINXP) #if (WINVER >= _WIN32_WINNT_WINXP)
EXTERN_C EXTERN_C
ULONG ULONG
WMIAPI WMIAPI
FlushTraceW( FlushTraceW(
__in TRACEHANDLE TraceHandle, __in TRACEHANDLE TraceHandle,
__in_opt LPCWSTR InstanceName, __in_opt LPCWSTR InstanceName,
__inout PEVENT_TRACE_PROPERTIES Properties __inout PEVENT_TRACE_PROPERTIES Properties
skipping to change at line 1043 skipping to change at line 1156
ControlTraceA( ControlTraceA(
__in TRACEHANDLE TraceHandle, __in TRACEHANDLE TraceHandle,
__in_opt LPCSTR InstanceName, __in_opt LPCSTR InstanceName,
__inout PEVENT_TRACE_PROPERTIES Properties, __inout PEVENT_TRACE_PROPERTIES Properties,
__in ULONG ControlCode __in ULONG ControlCode
); );
// //
// ULONG // ULONG
// QueryAllTraces( // QueryAllTraces(
// OUT PEVENT_TRACE_PROPERTIES *PropertyArray, // __out_ecount(PropertyArrayCount) PEVENT_TRACE_PROPERTIES *PropertyArray,
// IN ULONG PropertyArrayCount, // __in ULONG PropertyArrayCount,
// OUT PULONG LoggerCount // __out PULONG LoggerCount
// ); // );
// //
EXTERN_C EXTERN_C
ULONG ULONG
WMIAPI WMIAPI
QueryAllTracesW( QueryAllTracesW(
__out_ecount(PropertyArrayCount) PEVENT_TRACE_PROPERTIES *PropertyArray, __out_ecount(PropertyArrayCount) PEVENT_TRACE_PROPERTIES *PropertyArray,
__in ULONG PropertyArrayCount, __in ULONG PropertyArrayCount,
__out PULONG LoggerCount __out PULONG LoggerCount
skipping to change at line 1085 skipping to change at line 1198
__in ULONG Enable, __in ULONG Enable,
__in ULONG EnableFlag, __in ULONG EnableFlag,
__in ULONG EnableLevel, __in ULONG EnableLevel,
__in LPCGUID ControlGuid, __in LPCGUID ControlGuid,
__in TRACEHANDLE TraceHandle __in TRACEHANDLE TraceHandle
); );
typedef struct _EVENT_FILTER_DESCRIPTOR typedef struct _EVENT_FILTER_DESCRIPTOR
EVENT_FILTER_DESCRIPTOR, *PEVENT_FILTER_DESCRIPTOR; EVENT_FILTER_DESCRIPTOR, *PEVENT_FILTER_DESCRIPTOR;
#if (WINVER >= _WIN32_WINNT_LONGHORN) #if (WINVER >= _WIN32_WINNT_VISTA)
EXTERN_C EXTERN_C
ULONG ULONG
WMIAPI WMIAPI
EnableTraceEx( EnableTraceEx(
__in LPCGUID ProviderId, __in LPCGUID ProviderId,
__in_opt LPCGUID SourceId, __in_opt LPCGUID SourceId,
__in TRACEHANDLE TraceHandle, __in TRACEHANDLE TraceHandle,
__in ULONG IsEnabled, __in ULONG IsEnabled,
__in UCHAR Level, __in UCHAR Level,
__in ULONGLONG MatchAnyKeyword, __in ULONGLONG MatchAnyKeyword,
__in ULONGLONG MatchAllKeyword, __in ULONGLONG MatchAllKeyword,
__in ULONG EnableProperty, __in ULONG EnableProperty,
__in_opt PEVENT_FILTER_DESCRIPTOR EnableFilterDesc __in_opt PEVENT_FILTER_DESCRIPTOR EnableFilterDesc
); );
#endif #endif
#define ENABLE_TRACE_PARAMETERS_VERSION 1
typedef struct _ENABLE_TRACE_PARAMETERS {
ULONG Version;
ULONG EnableProperty;
ULONG ControlFlags;
GUID SourceId;
PEVENT_FILTER_DESCRIPTOR EnableFilterDesc;
} ENABLE_TRACE_PARAMETERS, *PENABLE_TRACE_PARAMETERS;
#if (WINVER >= _WIN32_WINNT_WIN7)
EXTERN_C
ULONG
WMIAPI
EnableTraceEx2(
__in TRACEHANDLE TraceHandle,
__in LPCGUID ProviderId,
__in ULONG ControlCode,
__in UCHAR Level,
__in ULONGLONG MatchAnyKeyword,
__in ULONGLONG MatchAllKeyword,
__in ULONG Timeout,
__in_opt PENABLE_TRACE_PARAMETERS EnableParameters
);
#endif
typedef enum _TRACE_QUERY_INFO_CLASS { typedef enum _TRACE_QUERY_INFO_CLASS {
TraceGuidQueryList, TraceGuidQueryList,
TraceGuidQueryInfo, TraceGuidQueryInfo,
TraceGuidQueryProcess TraceGuidQueryProcess,
} TRACE_QUERY_INFO_CLASS; TraceStackTracingInfo, // Win7
MaxTraceSetInfoClass
} TRACE_QUERY_INFO_CLASS, TRACE_INFO_CLASS;
#if (WINVER >= _WIN32_WINNT_LONGHORN) #if (WINVER >= _WIN32_WINNT_VISTA)
EXTERN_C EXTERN_C
ULONG ULONG
WMIAPI WMIAPI
EnumerateTraceGuidsEx( EnumerateTraceGuidsEx(
__in TRACE_QUERY_INFO_CLASS TraceQueryInfoClass, __in TRACE_QUERY_INFO_CLASS TraceQueryInfoClass,
__in_bcount_opt(InBufferSize) PVOID InBuffer, __in_bcount_opt(InBufferSize) PVOID InBuffer,
__in ULONG InBufferSize, __in ULONG InBufferSize,
__out_bcount_opt(OutBufferSize) PVOID OutBuffer, __out_bcount_opt(OutBufferSize) PVOID OutBuffer,
__in ULONG OutBufferSize, __in ULONG OutBufferSize,
__out PULONG ReturnLength __out PULONG ReturnLength
); );
#endif #endif
typedef struct _CLASSIC_EVENT_ID {
GUID EventGuid;
UCHAR Type;
UCHAR Reserved[7];
} CLASSIC_EVENT_ID, *PCLASSIC_EVENT_ID;
#if (WINVER >= _WIN32_WINNT_WIN7)
EXTERN_C
ULONG
WMIAPI
TraceSetInformation(
__in TRACEHANDLE SessionHandle,
__in TRACE_INFO_CLASS InformationClass,
__in_bcount(InformationLength) PVOID TraceInformation,
__in ULONG InformationLength
);
#endif
// //
// Data Provider APIs // Data Provider APIs
// //
EXTERN_C EXTERN_C
ULONG ULONG
WMIAPI WMIAPI
CreateTraceInstanceId( CreateTraceInstanceId(
__in HANDLE RegHandle, __in HANDLE RegHandle,
__inout PEVENT_INSTANCE_INFO pInstInfo __inout PEVENT_INSTANCE_INFO InstInfo
); );
// //
// Use the routine below to generate and record an event trace // Use the routine below to generate and record an event trace
// //
EXTERN_C EXTERN_C
ULONG ULONG
WMIAPI WMIAPI
TraceEvent( TraceEvent(
__in TRACEHANDLE TraceHandle, __in TRACEHANDLE TraceHandle,
__inout PEVENT_TRACE_HEADER EventTrace __in PEVENT_TRACE_HEADER EventTrace
); );
EXTERN_C EXTERN_C
ULONG ULONG
WMIAPI WMIAPI
TraceEventInstance( TraceEventInstance(
__in TRACEHANDLE TraceHandle, __in TRACEHANDLE TraceHandle,
__in PEVENT_INSTANCE_HEADER EventTrace, __in PEVENT_INSTANCE_HEADER EventTrace,
__in PEVENT_INSTANCE_INFO pInstInfo, __in PEVENT_INSTANCE_INFO InstInfo,
__in_opt PEVENT_INSTANCE_INFO pParentInstInfo __in_opt PEVENT_INSTANCE_INFO ParentInstInfo
); );
// //
// Use the routine below to register a guid for tracing // Use the routine below to register a guid for tracing.
// //
// //
// ULONG // ULONG
// RegisterTraceGuids( // RegisterTraceGuids(
// IN WMIDPREQUEST RequestAddress, // __in WMIDPREQUEST RequestAddress,
// IN PVOID RequestContext, // __in_opt PVOID RequestContext,
// IN LPCGUID ControlGuid, // __in LPCGUID ControlGuid,
// IN ULONG GuidCount, // __in ULONG GuidCount,
// IN PTRACE_GUID_REGISTRATION TraceGuidReg, // __in_ecount_opt(GuidCount) PTRACE_GUID_REGISTRATION TraceGuidReg,
// IN LPCTSTR MofImagePath, // __in_opt LPCTSTR MofImagePath,
// IN LPCTSTR MofResourceName, // __in_opt LPCTSTR MofResourceName,
// OUT PTRACEHANDLE RegistrationHandle // __out PTRACEHANDLE RegistrationHandle
// ); // );
// //
EXTERN_C EXTERN_C
ULONG ULONG
WMIAPI WMIAPI
RegisterTraceGuidsW( RegisterTraceGuidsW(
__in WMIDPREQUEST RequestAddress, __in WMIDPREQUEST RequestAddress,
__in_opt PVOID RequestContext, __in_opt PVOID RequestContext,
__in LPCGUID ControlGuid, __in LPCGUID ControlGuid,
__in ULONG GuidCount, __in ULONG GuidCount,
__in_ecount_opt(GuidCount) PTRACE_GUID_REGISTRATION TraceGuidReg, __in_ecount_opt(GuidCount) PTRACE_GUID_REGISTRATION TraceGuidReg,
__in_opt LPCWSTR MofImagePath, __in_opt LPCWSTR MofImagePath,
__in_opt LPCWSTR MofResourceName, __in_opt LPCWSTR MofResourceName,
__out PTRACEHANDLE RegistrationHandle __out PTRACEHANDLE RegistrationHandle
); );
EXTERN_C EXTERN_C
ULONG ULONG
WMIAPI WMIAPI
RegisterTraceGuidsA( RegisterTraceGuidsA(
__in WMIDPREQUEST RequestAddress, __in WMIDPREQUEST RequestAddress,
__in_opt PVOID RequestContext, __in_opt PVOID RequestContext,
__in LPCGUID ControlGuid, __in LPCGUID ControlGuid,
__in ULONG GuidCount, __in ULONG GuidCount,
__in_ecount_opt(GuidCount) PTRACE_GUID_REGISTRATION TraceGuidReg, __in_ecount_opt(GuidCount) PTRACE_GUID_REGISTRATION TraceGuidReg,
__in_opt LPCSTR MofImagePath, __in_opt LPCSTR MofImagePath,
__in_opt LPCSTR MofResourceName, __in_opt LPCSTR MofResourceName,
__out PTRACEHANDLE RegistrationHandle __out PTRACEHANDLE RegistrationHandle
); );
#if (WINVER >= _WIN32_WINNT_WINXP) #if (WINVER >= _WIN32_WINNT_WINXP)
EXTERN_C EXTERN_C
ULONG ULONG
WMIAPI WMIAPI
EnumerateTraceGuids( EnumerateTraceGuids(
__inout_ecount(PropertyArrayCount) PTRACE_GUID_PROPERTIES *GuidPropertiesArr ay, __inout_ecount(PropertyArrayCount) PTRACE_GUID_PROPERTIES *GuidPropertiesArr ay,
__in ULONG PropertyArrayCount, __in ULONG PropertyArrayCount,
skipping to change at line 1248 skipping to change at line 1407
__in TRACEHANDLE TraceHandle __in TRACEHANDLE TraceHandle
); );
// //
// Data Consumer APIs and structures start here // Data Consumer APIs and structures start here
// //
// //
// TRACEHANDLE // TRACEHANDLE
// OpenTrace( // OpenTrace(
// IN OUT PEVENT_TRACE_LOGFILE Logfile // __inout PEVENT_TRACE_LOGFILE Logfile
// ); // );
// //
EXTERN_C EXTERN_C
TRACEHANDLE TRACEHANDLE
WMIAPI WMIAPI
OpenTraceA( OpenTraceA(
__inout PEVENT_TRACE_LOGFILEA Logfile __inout PEVENT_TRACE_LOGFILEA Logfile
); );
skipping to change at line 1305 skipping to change at line 1464
__in LPCGUID pGuid __in LPCGUID pGuid
); );
// //
// The routines for tracing Messages follow // The routines for tracing Messages follow
// //
EXTERN_C EXTERN_C
ULONG ULONG
__cdecl __cdecl
TraceMessage( TraceMessage(
__in TRACEHANDLE LoggerHandle, __in TRACEHANDLE LoggerHandle,
__in ULONG MessageFlags, __in ULONG MessageFlags,
__in LPGUID MessageGuid, __in LPCGUID MessageGuid,
__in USHORT MessageNumber, __in USHORT MessageNumber,
... ...
); );
EXTERN_C EXTERN_C
ULONG ULONG
TraceMessageVa( TraceMessageVa(
__in TRACEHANDLE LoggerHandle, __in TRACEHANDLE LoggerHandle,
__in ULONG MessageFlags, __in ULONG MessageFlags,
__in LPGUID MessageGuid, __in LPCGUID MessageGuid,
__in USHORT MessageNumber, __in USHORT MessageNumber,
__in va_list MessageArgList __in va_list MessageArgList
); );
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
#endif #endif
#define INVALID_PROCESSTRACE_HANDLE ((TRACEHANDLE)INVALID_HANDLE_VALUE)
// //
// //
// Define the encoding independent routines // Define the encoding independent routines
// //
#if defined(UNICODE) || defined(_UNICODE) #if defined(UNICODE) || defined(_UNICODE)
#define RegisterTraceGuids RegisterTraceGuidsW #define RegisterTraceGuids RegisterTraceGuidsW
#define StartTrace StartTraceW #define StartTrace StartTraceW
#define ControlTrace ControlTraceW #define ControlTrace ControlTraceW
#if defined(__TRACE_W2K_COMPATIBLE) #if defined(__TRACE_W2K_COMPATIBLE)
 End of changes. 64 change blocks. 
103 lines changed or deleted 274 lines changed or added


 lmserver.h (6.0.6002.18005-Windows 6.0)   lmserver.h (6.1.7601.23418-Windows 7.0) 
skipping to change at line 93 skipping to change at line 93
IN LPBYTE buf, IN LPBYTE buf,
__out_opt OUT LPDWORD ParmError OPTIONAL __out_opt OUT LPDWORD ParmError OPTIONAL
); );
// //
// Temporary hack function. // Temporary hack function.
// //
NET_API_STATUS NET_API_STATUS
NetServerSetInfoCommandLine ( NetServerSetInfoCommandLine (
IN WORD argc, __in WORD argc,
IN LMSTR argv[] __in_ecount(argc) LMSTR argv[]
); );
NET_API_STATUS NET_API_FUNCTION NET_API_STATUS NET_API_FUNCTION
NetServerDiskEnum ( NetServerDiskEnum (
__in_opt IN LMSTR servername OPTIONAL, __in_opt IN LMSTR servername OPTIONAL,
IN DWORD level, IN DWORD level,
__out OUT LPBYTE *bufptr, __out OUT LPBYTE *bufptr,
IN DWORD prefmaxlen, IN DWORD prefmaxlen,
__out OUT LPDWORD entriesread, __out OUT LPDWORD entriesread,
__out OUT LPDWORD totalentries, __out OUT LPDWORD totalentries,
skipping to change at line 137 skipping to change at line 137
NET_API_STATUS NET_API_FUNCTION NET_API_STATUS NET_API_FUNCTION
NetServerTransportAddEx ( NetServerTransportAddEx (
__in_opt IN LMSTR servername OPTIONAL, __in_opt IN LMSTR servername OPTIONAL,
IN DWORD level, IN DWORD level,
__in IN LPBYTE bufptr __in IN LPBYTE bufptr
); );
NET_API_STATUS NET_API_FUNCTION NET_API_STATUS NET_API_FUNCTION
NetServerTransportDel ( NetServerTransportDel (
__in_opt IN LMSTR servername, __in_opt LMSTR servername,
IN DWORD level, __in DWORD level,
__in_bcount(sizeof(SERVER_TRANSPORT_INFO_0)) IN LPBYTE bufptr __in_xcount(level == 0 ? sizeof(SERVER_TRANSPORT_INFO_0) : sizeof(SERVER_TRA
NSPORT_INFO_1)) LPBYTE bufptr
); );
NET_API_STATUS NET_API_FUNCTION NET_API_STATUS NET_API_FUNCTION
NetServerTransportEnum ( NetServerTransportEnum (
__in_opt IN LMSTR servername, __in_opt IN LMSTR servername,
IN DWORD level, IN DWORD level,
__out OUT LPBYTE *bufptr, __out OUT LPBYTE *bufptr,
IN DWORD prefmaxlen, IN DWORD prefmaxlen,
__out OUT LPDWORD entriesread, __out OUT LPDWORD entriesread,
__out OUT LPDWORD totalentries, __out OUT LPDWORD totalentries,
skipping to change at line 201 skipping to change at line 201
LMSTR sv102_comment; LMSTR sv102_comment;
DWORD sv102_users; DWORD sv102_users;
LONG sv102_disc; LONG sv102_disc;
BOOL sv102_hidden; BOOL sv102_hidden;
DWORD sv102_announce; DWORD sv102_announce;
DWORD sv102_anndelta; DWORD sv102_anndelta;
DWORD sv102_licenses; DWORD sv102_licenses;
LMSTR sv102_userpath; LMSTR sv102_userpath;
} SERVER_INFO_102, *PSERVER_INFO_102, *LPSERVER_INFO_102; } SERVER_INFO_102, *PSERVER_INFO_102, *LPSERVER_INFO_102;
typedef struct _SERVER_INFO_103 {
DWORD sv103_platform_id;
LMSTR sv103_name;
DWORD sv103_version_major;
DWORD sv103_version_minor;
DWORD sv103_type;
LMSTR sv103_comment;
DWORD sv103_users;
LONG sv103_disc;
BOOL sv103_hidden;
DWORD sv103_announce;
DWORD sv103_anndelta;
DWORD sv103_licenses;
LMSTR sv103_userpath;
DWORD sv103_capabilities;
} SERVER_INFO_103, *PSERVER_INFO_103, *LPSERVER_INFO_103;
typedef struct _SERVER_INFO_402 { typedef struct _SERVER_INFO_402 {
DWORD sv402_ulist_mtime; DWORD sv402_ulist_mtime;
DWORD sv402_glist_mtime; DWORD sv402_glist_mtime;
DWORD sv402_alist_mtime; DWORD sv402_alist_mtime;
LMSTR sv402_alerts; LMSTR sv402_alerts;
DWORD sv402_security; DWORD sv402_security;
DWORD sv402_numadmin; DWORD sv402_numadmin;
DWORD sv402_lanmask; DWORD sv402_lanmask;
LMSTR sv402_guestacct; LMSTR sv402_guestacct;
DWORD sv402_chdevs; DWORD sv402_chdevs;
skipping to change at line 440 skipping to change at line 457
BOOL sv598_requiresecuritysignature; BOOL sv598_requiresecuritysignature;
DWORD sv598_minclientbuffersize; DWORD sv598_minclientbuffersize;
GUID sv598_serverguid; GUID sv598_serverguid;
DWORD sv598_ConnectionNoSessionsTimeout; DWORD sv598_ConnectionNoSessionsTimeout;
DWORD sv598_IdleThreadTimeOut; DWORD sv598_IdleThreadTimeOut;
BOOL sv598_enableW9xsecuritysignature; BOOL sv598_enableW9xsecuritysignature;
BOOL sv598_enforcekerberosreauthentication; BOOL sv598_enforcekerberosreauthentication;
BOOL sv598_disabledos; BOOL sv598_disabledos;
DWORD sv598_lowdiskspaceminimum; DWORD sv598_lowdiskspaceminimum;
BOOL sv598_disablestrictnamechecking; BOOL sv598_disablestrictnamechecking;
BOOL sv598_enableauthenticateusersharing;
} SERVER_INFO_598, *PSERVER_INFO_598, *LPSERVER_INFO_598; } SERVER_INFO_598, *PSERVER_INFO_598, *LPSERVER_INFO_598;
typedef struct _SERVER_INFO_1005 { typedef struct _SERVER_INFO_1005 {
LMSTR sv1005_comment; LMSTR sv1005_comment;
} SERVER_INFO_1005, *PSERVER_INFO_1005, *LPSERVER_INFO_1005; } SERVER_INFO_1005, *PSERVER_INFO_1005, *LPSERVER_INFO_1005;
typedef struct _SERVER_INFO_1107 { typedef struct _SERVER_INFO_1107 {
DWORD sv1107_users; DWORD sv1107_users;
} SERVER_INFO_1107, *PSERVER_INFO_1107, *LPSERVER_INFO_1107; } SERVER_INFO_1107, *PSERVER_INFO_1107, *LPSERVER_INFO_1107;
skipping to change at line 1129 skipping to change at line 1147
#define SV_ENABLESECURITYSIGNATURE_PARMNUM 593 #define SV_ENABLESECURITYSIGNATURE_PARMNUM 593
#define SV_REQUIRESECURITYSIGNATURE_PARMNUM 594 #define SV_REQUIRESECURITYSIGNATURE_PARMNUM 594
#define SV_MINCLIENTBUFFERSIZE_PARMNUM 595 #define SV_MINCLIENTBUFFERSIZE_PARMNUM 595
#define SV_CONNECTIONNOSESSIONSTIMEOUT_PARMNUM 596 #define SV_CONNECTIONNOSESSIONSTIMEOUT_PARMNUM 596
#define SV_IDLETHREADTIMEOUT_PARMNUM 597 #define SV_IDLETHREADTIMEOUT_PARMNUM 597
#define SV_ENABLEW9XSECURITYSIGNATURE_PARMNUM 598 #define SV_ENABLEW9XSECURITYSIGNATURE_PARMNUM 598
#define SV_ENFORCEKERBEROSREAUTHENTICATION_PARMNUM 599 #define SV_ENFORCEKERBEROSREAUTHENTICATION_PARMNUM 599
#define SV_DISABLEDOS_PARMNUM 600 #define SV_DISABLEDOS_PARMNUM 600
#define SV_LOWDISKSPACEMINIMUM_PARMNUM 601 #define SV_LOWDISKSPACEMINIMUM_PARMNUM 601
#define SV_DISABLESTRICTNAMECHECKING_PARMNUM 602 #define SV_DISABLESTRICTNAMECHECKING_PARMNUM 602
#define SV_ENABLEAUTHENTICATEUSERSHARING_PARMNUM 603
// //
// Single-field infolevels for NetServerSetInfo. // Single-field infolevels for NetServerSetInfo.
// //
#define SV_COMMENT_INFOLEVEL \ #define SV_COMMENT_INFOLEVEL \
(PARMNUM_BASE_INFOLEVEL + SV_COMMENT_PARMNUM) (PARMNUM_BASE_INFOLEVEL + SV_COMMENT_PARMNUM)
#define SV_USERS_INFOLEVEL \ #define SV_USERS_INFOLEVEL \
(PARMNUM_BASE_INFOLEVEL + SV_USERS_PARMNUM) (PARMNUM_BASE_INFOLEVEL + SV_USERS_PARMNUM)
#define SV_DISC_INFOLEVEL \ #define SV_DISC_INFOLEVEL \
skipping to change at line 1322 skipping to change at line 1341
#define SV_ENABLEW9XSECURITYSIGNATURE_INFOLEVEL \ #define SV_ENABLEW9XSECURITYSIGNATURE_INFOLEVEL \
(PARMNUM_BASE_INFOLEVEL + SV_ENABLEW9XSECURITYSIGNATURE_PARMNUM) (PARMNUM_BASE_INFOLEVEL + SV_ENABLEW9XSECURITYSIGNATURE_PARMNUM)
#define SV_ENFORCEKERBEROSREAUTHENTICATION_INFOLEVEL \ #define SV_ENFORCEKERBEROSREAUTHENTICATION_INFOLEVEL \
(PARMNUM_BASE_INFOLEVEL + SV_ENFORCEKERBEROSREAUTHENTICATION_PARMNUM ) (PARMNUM_BASE_INFOLEVEL + SV_ENFORCEKERBEROSREAUTHENTICATION_PARMNUM )
#define SV_DISABLEDOS_INFOLEVEL \ #define SV_DISABLEDOS_INFOLEVEL \
(PARMNUM_BASE_INFOLEVEL + SV_DISABLEDOS_PARMNUM) (PARMNUM_BASE_INFOLEVEL + SV_DISABLEDOS_PARMNUM)
#define SV_LOWDISKSPACEMINIMUM_INFOLEVEL \ #define SV_LOWDISKSPACEMINIMUM_INFOLEVEL \
(PARMNUM_BASE_INFOLEVEL + SV_LOWDISKSPACEMINIMUM_PARMNUM) (PARMNUM_BASE_INFOLEVEL + SV_LOWDISKSPACEMINIMUM_PARMNUM)
#define SV_DISABLESTRICTNAMECHECKING_INFOLEVEL \ #define SV_DISABLESTRICTNAMECHECKING_INFOLEVEL \
(PARMNUM_BASE_INFOLEVEL + SV_DISABLESTRICTNAMECHECKING_PARMNUM) (PARMNUM_BASE_INFOLEVEL + SV_DISABLESTRICTNAMECHECKING_PARMNUM)
#define SV_ENABLEAUTHENTICATEUSERSHARING_INFOLEVEL \
(PARMNUM_BASE_INFOLEVEL + SV_ENABLEAUTHENTICATEUSERSHARING_PARMNUM)
#define SVI1_NUM_ELEMENTS 5 #define SVI1_NUM_ELEMENTS 5
#define SVI2_NUM_ELEMENTS 40 #define SVI2_NUM_ELEMENTS 40
#define SVI3_NUM_ELEMENTS 44 #define SVI3_NUM_ELEMENTS 44
// //
// Maxmimum length for command string to NetServerAdminCommand. // Maxmimum length for command string to NetServerAdminCommand.
// //
#define SV_MAX_CMD_LEN PATHLEN #define SV_MAX_CMD_LEN PATHLEN
skipping to change at line 1360 skipping to change at line 1381
#define SV_USERS_PER_LICENSE 5 #define SV_USERS_PER_LICENSE 5
// //
// Equate for use with svti2_flags in NetServerTransportAddEx. // Equate for use with svti2_flags in NetServerTransportAddEx.
// //
#define SVTI2_REMAP_PIPE_NAMES 0x2 #define SVTI2_REMAP_PIPE_NAMES 0x2
#define SVTI2_SCOPED_NAME 0x4 #define SVTI2_SCOPED_NAME 0x4
#define SVTI2_VALID_FLAGS (SVTI2_REMAP_PIPE_NAMES|SVTI2_SCOPED_NAME) #define SVTI2_VALID_FLAGS (SVTI2_REMAP_PIPE_NAMES|SVTI2_SCOPED_NAME)
//
// Server capability information
//
#define SRV_SUPPORT_HASH_GENERATION 0x0001
#define SRV_HASH_GENERATION_ACTIVE 0x0002
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif // _LMSERVER_ #endif // _LMSERVER_
 End of changes. 7 change blocks. 
5 lines changed or deleted 34 lines changed or added


 ntsecapi.h (6.0.6002.18005-Windows 6.0)   ntsecapi.h (6.1.7601.23418-Windows 7.0) 
skipping to change at line 631 skipping to change at line 631
DEFINE_GUID( DEFINE_GUID(
Audit_AccountLogon_Others, Audit_AccountLogon_Others,
0x0cce9241, 0x0cce9241,
0x69ae, 0x11d9, 0xbe, 0xd3, 0x50, 0x50, 0x54, 0x50, 0x30, 0x30 0x69ae, 0x11d9, 0xbe, 0xd3, 0x50, 0x50, 0x54, 0x50, 0x30, 0x30
); );
#ifdef INITGUID #ifdef INITGUID
#define Audit_AccountLogon_Others_defined #define Audit_AccountLogon_Others_defined
#endif #endif
#endif #endif
/* 0cce9242-69ae-11d9-bed3-505054503030 */
#if !defined(INITGUID) || !defined(Audit_AccountLogon_KerbCredentialValidation_d
efined)
DEFINE_GUID(
Audit_AccountLogon_KerbCredentialValidation,
0x0cce9242,
0x69ae, 0x11d9, 0xbe, 0xd3, 0x50, 0x50, 0x54, 0x50, 0x30, 0x30
);
#ifdef INITGUID
#define Audit_AccountLogon_KerbCredentialValidation_defined
#endif
#endif
/* 0cce9243-69ae-11d9-bed3-505054503030 */
#if !defined(INITGUID) || !defined(Audit_Logon_NPS_defined)
DEFINE_GUID(
Audit_Logon_NPS,
0x0cce9243,
0x69ae, 0x11d9, 0xbe, 0xd3, 0x50, 0x50, 0x54, 0x50, 0x30, 0x30
);
#ifdef INITGUID
#define Audit_Logon_NPS_defined
#endif
#endif
/* 0cce9244-69ae-11d9-bed3-505054503030 */
#if !defined(INITGUID) || !defined(Audit_ObjectAccess_DetailedFileShare_defined)
DEFINE_GUID(
Audit_ObjectAccess_DetailedFileShare,
0x0cce9244,
0x69ae, 0x11d9, 0xbe, 0xd3, 0x50, 0x50, 0x54, 0x50, 0x30, 0x30
);
#ifdef INITGUID
#define Audit_ObjectAccess_DetailedFileShare_defined
#endif
#endif
#endif // DEFINE_GUID #endif // DEFINE_GUID
// //
// All categories are named as <Audit_CategoryName> // All categories are named as <Audit_CategoryName>
// //
#ifdef DEFINE_GUID #ifdef DEFINE_GUID
/* 69979848-797a-11d9-bed3-505054503030 */ /* 69979848-797a-11d9-bed3-505054503030 */
#if !defined(INITGUID) || !defined(Audit_System_defined) #if !defined(INITGUID) || !defined(Audit_System_defined)
skipping to change at line 760 skipping to change at line 796
#define _NTSECAPI_ #define _NTSECAPI_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#ifndef _NTDEF_ #ifndef _NTDEF_
typedef LONG NTSTATUS, *PNTSTATUS; typedef LONG NTSTATUS, *PNTSTATUS;
#endif #endif
#include <lsalookup.h>
#ifndef _NTLSA_IFS_ #ifndef _NTLSA_IFS_
// begin_ntifs // begin_ntifs
// //
// Security operation mode of the system is held in a control // Security operation mode of the system is held in a control
// longword. // longword.
// //
typedef ULONG LSA_OPERATIONAL_MODE, *PLSA_OPERATIONAL_MODE; typedef ULONG LSA_OPERATIONAL_MODE, *PLSA_OPERATIONAL_MODE;
skipping to change at line 1181 skipping to change at line 1218
// pointer to SOCKADDR_IN/SOCKADDR_IN6 // pointer to SOCKADDR_IN/SOCKADDR_IN6
// structure // structure
// //
// Results in: // Results in:
// //
// param 1: IP address string // param 1: IP address string
// param 2: Port number string // param 2: Port number string
// //
// //
// Everything below this exists only in Longhorn and greater // Everything below this exists only in Windows Server 2008 and greater
// //
SeAdtParmTypeSD, // Produces 1 parameters SeAdtParmTypeSD, // Produces 1 parameters
// //
// Received value: // Received value:
// //
// pointer to SECURITY_DESCRIPTOR // pointer to SECURITY_DESCRIPTOR
// structure // structure
// //
// Results in: // Results in:
skipping to change at line 1227 skipping to change at line 1264
// param 3: Logon ID (Luid) string // param 3: Logon ID (Luid) string
SeAdtParmTypeUlongNoConv, // Produces 1 parameter. SeAdtParmTypeUlongNoConv, // Produces 1 parameter.
// Received Value: // Received Value:
// Ulong // Ulong
// //
//Results in: //Results in:
// Not converted to string // Not converted to string
// //
SeAdtParmTypeSockAddrNoPort // Produces 1 parameter SeAdtParmTypeSockAddrNoPort, // Produces 1 parameter
// //
// Received value: // Received value:
// //
// pointer to SOCKADDR_IN/SOCKADDR_IN6 // pointer to SOCKADDR_IN/SOCKADDR_IN6
// structure // structure
// //
// Results in: // Results in:
// //
// param 1: IPv4/IPv6 address string // param 1: IPv4/IPv6 address string
// //
//
// Everything below this exists only in Windows Server 2008 and greater
//
SeAdtParmTypeAccessReason // Produces 1 parameters
//
// Received value:
//
// pointer to SECURITY_DESCRIPTOR
// structure followed by the reason code.
// The reason code could be the index
// of the ACE in the SD or privilege ID or
// other reason codes.
//
// Results in:
//
// String representation of the access reaso
n.
//
} SE_ADT_PARAMETER_TYPE, *PSE_ADT_PARAMETER_TYPE; } SE_ADT_PARAMETER_TYPE, *PSE_ADT_PARAMETER_TYPE;
#ifndef GUID_DEFINED #ifndef GUID_DEFINED
#include <guiddef.h> #include <guiddef.h>
#endif /* GUID_DEFINED */ #endif /* GUID_DEFINED */
typedef struct _SE_ADT_OBJECT_TYPE { typedef struct _SE_ADT_OBJECT_TYPE {
GUID ObjectType; GUID ObjectType;
USHORT Flags; USHORT Flags;
skipping to change at line 1262 skipping to change at line 1317
typedef struct _SE_ADT_PARAMETER_ARRAY_ENTRY { typedef struct _SE_ADT_PARAMETER_ARRAY_ENTRY {
SE_ADT_PARAMETER_TYPE Type; SE_ADT_PARAMETER_TYPE Type;
ULONG Length; ULONG Length;
ULONG_PTR Data[2]; ULONG_PTR Data[2];
PVOID Address; PVOID Address;
} SE_ADT_PARAMETER_ARRAY_ENTRY, *PSE_ADT_PARAMETER_ARRAY_ENTRY; } SE_ADT_PARAMETER_ARRAY_ENTRY, *PSE_ADT_PARAMETER_ARRAY_ENTRY;
typedef struct _SE_ADT_ACCESS_REASON{
ACCESS_MASK AccessMask;
ULONG AccessReasons[32];
ULONG ObjectTypeIndex;
ULONG AccessGranted;
PSECURITY_DESCRIPTOR SecurityDescriptor; // multple SDs may be stored her
e in self-relative way.
} SE_ADT_ACCESS_REASON, *PSE_ADT_ACCESS_REASON;
// //
// Structure that will be passed between the Reference Monitor and LSA // Structure that will be passed between the Reference Monitor and LSA
// to transmit auditing information. // to transmit auditing information.
// //
#define SE_MAX_AUDIT_PARAMETERS 32 #define SE_MAX_AUDIT_PARAMETERS 32
#define SE_MAX_GENERIC_AUDIT_PARAMETERS 28 #define SE_MAX_GENERIC_AUDIT_PARAMETERS 28
typedef struct _SE_ADT_PARAMETER_ARRAY { typedef struct _SE_ADT_PARAMETER_ARRAY {
skipping to change at line 1290 skipping to change at line 1353
} SE_ADT_PARAMETER_ARRAY, *PSE_ADT_PARAMETER_ARRAY; } SE_ADT_PARAMETER_ARRAY, *PSE_ADT_PARAMETER_ARRAY;
#define SE_ADT_PARAMETERS_SELF_RELATIVE 0x00000001 #define SE_ADT_PARAMETERS_SELF_RELATIVE 0x00000001
#define SE_ADT_PARAMETERS_SEND_TO_LSA 0x00000002 #define SE_ADT_PARAMETERS_SEND_TO_LSA 0x00000002
#define SE_ADT_PARAMETER_EXTENSIBLE_AUDIT 0x00000004 #define SE_ADT_PARAMETER_EXTENSIBLE_AUDIT 0x00000004
#define SE_ADT_PARAMETER_GENERIC_AUDIT 0x00000008 #define SE_ADT_PARAMETER_GENERIC_AUDIT 0x00000008
#define SE_ADT_PARAMETER_WRITE_SYNCHRONOUS 0x00000010 #define SE_ADT_PARAMETER_WRITE_SYNCHRONOUS 0x00000010
// //
// This macro only existed in longhorn and after // This macro only existed in Windows Server 2008 and after
// //
#define LSAP_SE_ADT_PARAMETER_ARRAY_TRUE_SIZE(AuditParameters) \ #define LSAP_SE_ADT_PARAMETER_ARRAY_TRUE_SIZE(AuditParameters) \
( sizeof(SE_ADT_PARAMETER_ARRAY) - \ ( sizeof(SE_ADT_PARAMETER_ARRAY) - \
sizeof(SE_ADT_PARAMETER_ARRAY_ENTRY) * \ sizeof(SE_ADT_PARAMETER_ARRAY_ENTRY) * \
(SE_MAX_AUDIT_PARAMETERS - AuditParameters->ParameterCount) ) (SE_MAX_AUDIT_PARAMETERS - AuditParameters->ParameterCount) )
#endif // _NTLSA_AUDIT_ #endif // _NTLSA_AUDIT_
// end_ntifs // end_ntifs
skipping to change at line 1355 skipping to change at line 1418
#define POLICY_AUDIT_EVENT_NONE (0x00000004L) #define POLICY_AUDIT_EVENT_NONE (0x00000004L)
// Mask of valid event auditing options // Mask of valid event auditing options
#define POLICY_AUDIT_EVENT_MASK \ #define POLICY_AUDIT_EVENT_MASK \
(POLICY_AUDIT_EVENT_SUCCESS | \ (POLICY_AUDIT_EVENT_SUCCESS | \
POLICY_AUDIT_EVENT_FAILURE | \ POLICY_AUDIT_EVENT_FAILURE | \
POLICY_AUDIT_EVENT_UNCHANGED | \ POLICY_AUDIT_EVENT_UNCHANGED | \
POLICY_AUDIT_EVENT_NONE) POLICY_AUDIT_EVENT_NONE)
#ifdef _NTDEF_ #ifndef _NTDEF_
// begin_ntifs
typedef UNICODE_STRING LSA_UNICODE_STRING, *PLSA_UNICODE_STRING;
typedef STRING LSA_STRING, *PLSA_STRING;
typedef OBJECT_ATTRIBUTES LSA_OBJECT_ATTRIBUTES, *PLSA_OBJECT_ATTRIBUTES;
// end_ntifs
#else // _NTDEF_
#ifndef IN #ifndef IN
#define IN #define IN
#endif #endif
#ifndef OUT #ifndef OUT
#define OUT #define OUT
#endif #endif
#ifndef OPTIONAL #ifndef OPTIONAL
#define OPTIONAL #define OPTIONAL
#endif #endif
#endif // _NTDEF_
typedef struct _LSA_UNICODE_STRING {
USHORT Length;
USHORT MaximumLength;
#ifdef MIDL_PASS
[size_is(MaximumLength/2), length_is(Length/2)]
#endif // MIDL_PASS
PWSTR Buffer;
} LSA_UNICODE_STRING, *PLSA_UNICODE_STRING;
typedef struct _LSA_STRING {
USHORT Length;
USHORT MaximumLength;
PCHAR Buffer;
} LSA_STRING, *PLSA_STRING;
typedef struct _LSA_OBJECT_ATTRIBUTES {
ULONG Length;
HANDLE RootDirectory;
PLSA_UNICODE_STRING ObjectName;
ULONG Attributes;
PVOID SecurityDescriptor; // Points to type SECURITY_DESCRIPTOR
PVOID SecurityQualityOfService; // Points to type SECURITY_QUALITY_OF_SERVI
CE
} LSA_OBJECT_ATTRIBUTES, *PLSA_OBJECT_ATTRIBUTES;
#endif // _NTDEF_
// //
// Macro for determining whether an API succeeded. // Macro for determining whether an API succeeded.
// //
#define LSA_SUCCESS(Error) ((LONG)(Error) >= 0) #define LSA_SUCCESS(Error) ((LONG)(Error) >= 0)
#ifndef _NTLSA_IFS_ #ifndef _NTLSA_IFS_
// begin_ntifs // begin_ntifs
__drv_sameIRQL
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS NTSTATUS
NTAPI NTAPI
LsaRegisterLogonProcess ( LsaRegisterLogonProcess (
__in PLSA_STRING LogonProcessName, __in PLSA_STRING LogonProcessName,
__out PHANDLE LsaHandle, __out PHANDLE LsaHandle,
__out PLSA_OPERATIONAL_MODE SecurityMode __out PLSA_OPERATIONAL_MODE SecurityMode
); );
// //
// The function below did not exist in NTIFS before windows XP // The function below did not exist in NTIFS before windows XP
// However, the function has always been there, so it is okay to use // However, the function has always been there, so it is okay to use
// even on w2k // even on w2k
// //
__drv_sameIRQL
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS NTSTATUS
NTAPI NTAPI
LsaLogonUser ( LsaLogonUser (
__in HANDLE LsaHandle, __in HANDLE LsaHandle,
__in PLSA_STRING OriginName, __in PLSA_STRING OriginName,
__in SECURITY_LOGON_TYPE LogonType, __in SECURITY_LOGON_TYPE LogonType,
__in ULONG AuthenticationPackage, __in ULONG AuthenticationPackage,
__in_bcount(AuthenticationInformationLength) PVOID AuthenticationInformation , __in_bcount(AuthenticationInformationLength) PVOID AuthenticationInformation ,
__in ULONG AuthenticationInformationLength, __in ULONG AuthenticationInformationLength,
__in_opt PTOKEN_GROUPS LocalGroups, __in_opt PTOKEN_GROUPS LocalGroups,
skipping to change at line 1445 skipping to change at line 1479
__out PVOID *ProfileBuffer, __out PVOID *ProfileBuffer,
__out PULONG ProfileBufferLength, __out PULONG ProfileBufferLength,
__out PLUID LogonId, __out PLUID LogonId,
__out PHANDLE Token, __out PHANDLE Token,
__out PQUOTA_LIMITS Quotas, __out PQUOTA_LIMITS Quotas,
__out PNTSTATUS SubStatus __out PNTSTATUS SubStatus
); );
// end_ntifs // end_ntifs
__drv_sameIRQL
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS NTSTATUS
NTAPI NTAPI
LsaLookupAuthenticationPackage ( LsaLookupAuthenticationPackage (
__in HANDLE LsaHandle, __in HANDLE LsaHandle,
__in PLSA_STRING PackageName, __in PLSA_STRING PackageName,
__out PULONG AuthenticationPackage __out PULONG AuthenticationPackage
); );
// begin_ntifs // begin_ntifs
__drv_sameIRQL
NTSTATUS NTSTATUS
NTAPI NTAPI
LsaFreeReturnBuffer ( LsaFreeReturnBuffer (
__in PVOID Buffer __in PVOID Buffer
); );
// end_ntifs // end_ntifs
__drv_sameIRQL
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS NTSTATUS
NTAPI NTAPI
LsaCallAuthenticationPackage ( LsaCallAuthenticationPackage (
__in HANDLE LsaHandle, __in HANDLE LsaHandle,
__in ULONG AuthenticationPackage, __in ULONG AuthenticationPackage,
__in_bcount(SubmitBufferLength) PVOID ProtocolSubmitBuffer, __in_bcount(SubmitBufferLength) PVOID ProtocolSubmitBuffer,
__in ULONG SubmitBufferLength, __in ULONG SubmitBufferLength,
__out_opt PVOID *ProtocolReturnBuffer, __out_opt PVOID *ProtocolReturnBuffer,
__out_opt PULONG ReturnBufferLength, __out_opt PULONG ReturnBufferLength,
__out_opt PNTSTATUS ProtocolStatus __out_opt PNTSTATUS ProtocolStatus
); );
__drv_sameIRQL
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS NTSTATUS
NTAPI NTAPI
LsaDeregisterLogonProcess ( LsaDeregisterLogonProcess (
__in HANDLE LsaHandle __in HANDLE LsaHandle
); );
__drv_sameIRQL
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS NTSTATUS
NTAPI NTAPI
LsaConnectUntrusted ( LsaConnectUntrusted (
__out PHANDLE LsaHandle __out PHANDLE LsaHandle
); );
#endif // _NTLSA_IFS_ #endif // _NTLSA_IFS_
//////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////
// // // //
// Local Security Policy Administration API datatypes and defines // // Local Security Policy Administration API datatypes and defines //
skipping to change at line 1545 skipping to change at line 1588
POLICY_SET_DEFAULT_QUOTA_LIMITS |\ POLICY_SET_DEFAULT_QUOTA_LIMITS |\
POLICY_SET_AUDIT_REQUIREMENTS |\ POLICY_SET_AUDIT_REQUIREMENTS |\
POLICY_AUDIT_LOG_ADMIN |\ POLICY_AUDIT_LOG_ADMIN |\
POLICY_SERVER_ADMIN) POLICY_SERVER_ADMIN)
#define POLICY_EXECUTE (STANDARD_RIGHTS_EXECUTE |\ #define POLICY_EXECUTE (STANDARD_RIGHTS_EXECUTE |\
POLICY_VIEW_LOCAL_INFORMATION |\ POLICY_VIEW_LOCAL_INFORMATION |\
POLICY_LOOKUP_NAMES) POLICY_LOOKUP_NAMES)
// //
// Policy object specific data types. // Legacy policy object specific data types.
//
//
// The following data type is used to identify a domain
//
typedef struct _LSA_TRUST_INFORMATION {
LSA_UNICODE_STRING Name;
PSID Sid;
} LSA_TRUST_INFORMATION, *PLSA_TRUST_INFORMATION;
// where members have the following usage:
//
// Name - The name of the domain.
//
// Sid - A pointer to the Sid of the Domain
//
//
// The following data type is used in name and SID lookup services to
// describe the domains referenced in the lookup operation.
//
typedef struct _LSA_REFERENCED_DOMAIN_LIST {
ULONG Entries;
PLSA_TRUST_INFORMATION Domains;
} LSA_REFERENCED_DOMAIN_LIST, *PLSA_REFERENCED_DOMAIN_LIST;
// where members have the following usage:
//
// Entries - Is a count of the number of domains described in the
// Domains array.
//
// Domains - Is a pointer to an array of Entries LSA_TRUST_INFORMATION data
// structures.
//
// //
// The following data type is used in name to SID lookup services to describe // The following data type is used in name to SID lookup services to describe
// the domains referenced in the lookup operation. // the domains referenced in the lookup operation.
// //
typedef struct _LSA_TRANSLATED_SID { typedef struct _LSA_TRANSLATED_SID {
SID_NAME_USE Use; SID_NAME_USE Use;
ULONG RelativeId; ULONG RelativeId;
LONG DomainIndex; LONG DomainIndex;
skipping to change at line 1618 skipping to change at line 1620
// DomainIndex field. // DomainIndex field.
// //
// DomainIndex - Is the index of an entry in a related // DomainIndex - Is the index of an entry in a related
// LSA_REFERENCED_DOMAIN_LIST data structure describing the // LSA_REFERENCED_DOMAIN_LIST data structure describing the
// domain in which the account was found. // domain in which the account was found.
// //
// If there is no corresponding reference domain for an entry, then // If there is no corresponding reference domain for an entry, then
// this field will contain a negative value. // this field will contain a negative value.
// //
#if (_WIN32_WINNT >= 0x0501)
typedef struct _LSA_TRANSLATED_SID2 {
SID_NAME_USE Use;
PSID Sid;
LONG DomainIndex;
ULONG Flags;
} LSA_TRANSLATED_SID2, *PLSA_TRANSLATED_SID2;
// where members have the following usage:
//
// Use - identifies the use of the SID. If this value is SidUnknown or
// SidInvalid, then the remainder of the record is not set and
// should be ignored.
//
// Sid - Contains the complete Sid of the tranlated SID
//
// DomainIndex - Is the index of an entry in a related
// LSA_REFERENCED_DOMAIN_LIST data structure describing the
// domain in which the account was found.
//
// If there is no corresponding reference domain for an entry, then
// this field will contain a negative value.
//
#endif
//
// The following data type is used in SID to name lookup services to
// describe the domains referenced in the lookup operation.
//
typedef struct _LSA_TRANSLATED_NAME {
SID_NAME_USE Use;
LSA_UNICODE_STRING Name;
LONG DomainIndex;
} LSA_TRANSLATED_NAME, *PLSA_TRANSLATED_NAME;
// where the members have the following usage:
//
// Use - Identifies the use of the name. If this value is SidUnknown
// or SidInvalid, then the remainder of the record is not set and
// should be ignored. If this value is SidWellKnownGroup then the
// Name field is invalid, but the DomainIndex field is not.
//
// Name - Contains the isolated name of the translated SID.
//
// DomainIndex - Is the index of an entry in a related
// LSA_REFERENCED_DOMAIN_LIST data structure describing the domain
// in which the account was found.
//
// If there is no corresponding reference domain for an entry, then
// this field will contain a negative value.
//
// //
// The following data type is used to represent the role of the LSA // The following data type is used to represent the role of the LSA
// server (primary or backup). // server (primary or backup).
// //
typedef enum _POLICY_LSA_SERVER_ROLE { typedef enum _POLICY_LSA_SERVER_ROLE {
PolicyServerRoleBackup = 2, PolicyServerRoleBackup = 2,
PolicyServerRolePrimary PolicyServerRolePrimary
skipping to change at line 1885 skipping to change at line 1830
#define PER_USER_AUDIT_FAILURE_EXCLUDE (0x08) #define PER_USER_AUDIT_FAILURE_EXCLUDE (0x08)
#define PER_USER_AUDIT_NONE (0x10) #define PER_USER_AUDIT_NONE (0x10)
#define VALID_PER_USER_AUDIT_POLICY_FLAG (PER_USER_AUDIT_SUCCESS_INCLUDE | \ #define VALID_PER_USER_AUDIT_POLICY_FLAG (PER_USER_AUDIT_SUCCESS_INCLUDE | \
PER_USER_AUDIT_SUCCESS_EXCLUDE | \ PER_USER_AUDIT_SUCCESS_EXCLUDE | \
PER_USER_AUDIT_FAILURE_INCLUDE | \ PER_USER_AUDIT_FAILURE_INCLUDE | \
PER_USER_AUDIT_FAILURE_EXCLUDE | \ PER_USER_AUDIT_FAILURE_EXCLUDE | \
PER_USER_AUDIT_NONE) PER_USER_AUDIT_NONE)
// //
// The following structure corresponds to the PolicyAccountDomainInformation
// information class.
//
typedef struct _POLICY_ACCOUNT_DOMAIN_INFO {
LSA_UNICODE_STRING DomainName;
PSID DomainSid;
} POLICY_ACCOUNT_DOMAIN_INFO, *PPOLICY_ACCOUNT_DOMAIN_INFO;
// where the members have the following usage:
//
// DomainName - Is the name of the domain
//
// DomainSid - Is the Sid of the domain
//
//
// The following structure corresponds to the PolicyPrimaryDomainInformation // The following structure corresponds to the PolicyPrimaryDomainInformation
// information class. // information class.
// //
typedef struct _POLICY_PRIMARY_DOMAIN_INFO { typedef struct _POLICY_PRIMARY_DOMAIN_INFO {
LSA_UNICODE_STRING Name; LSA_UNICODE_STRING Name;
PSID Sid; PSID Sid;
} POLICY_PRIMARY_DOMAIN_INFO, *PPOLICY_PRIMARY_DOMAIN_INFO; } POLICY_PRIMARY_DOMAIN_INFO, *PPOLICY_PRIMARY_DOMAIN_INFO;
// where the members have the following usage: // where the members have the following usage:
// //
// Name - Is the name of the domain // Name - Is the name of the domain
// //
// Sid - Is the Sid of the domain // Sid - Is the Sid of the domain
// //
// //
// The following structure corresponds to the PolicyDnsDomainInformation
// information class
//
typedef struct _POLICY_DNS_DOMAIN_INFO
{
LSA_UNICODE_STRING Name;
LSA_UNICODE_STRING DnsDomainName;
LSA_UNICODE_STRING DnsForestName;
GUID DomainGuid;
PSID Sid;
} POLICY_DNS_DOMAIN_INFO, *PPOLICY_DNS_DOMAIN_INFO;
// where the members have the following usage:
//
// Name - Is the name of the Domain
//
// DnsDomainName - Is the DNS name of the domain
//
// DnsForestName - Is the DNS forest name of the domain
//
// DomainGuid - Is the GUID of the domain
//
// Sid - Is the Sid of the domain
//
// The following structure corresponds to the PolicyPdAccountInformation // The following structure corresponds to the PolicyPdAccountInformation
// information class. This structure may be used in Query operations // information class. This structure may be used in Query operations
// only. // only.
// //
typedef struct _POLICY_PD_ACCOUNT_INFO { typedef struct _POLICY_PD_ACCOUNT_INFO {
LSA_UNICODE_STRING Name; LSA_UNICODE_STRING Name;
} POLICY_PD_ACCOUNT_INFO, *PPOLICY_PD_ACCOUNT_INFO; } POLICY_PD_ACCOUNT_INFO, *PPOLICY_PD_ACCOUNT_INFO;
skipping to change at line 2165 skipping to change at line 2064
// //
typedef enum _POLICY_NOTIFICATION_INFORMATION_CLASS { typedef enum _POLICY_NOTIFICATION_INFORMATION_CLASS {
PolicyNotifyAuditEventsInformation = 1, PolicyNotifyAuditEventsInformation = 1,
PolicyNotifyAccountDomainInformation, PolicyNotifyAccountDomainInformation,
PolicyNotifyServerRoleInformation, PolicyNotifyServerRoleInformation,
PolicyNotifyDnsDomainInformation, PolicyNotifyDnsDomainInformation,
PolicyNotifyDomainEfsInformation, PolicyNotifyDomainEfsInformation,
PolicyNotifyDomainKerberosTicketInformation, PolicyNotifyDomainKerberosTicketInformation,
PolicyNotifyMachineAccountPasswordInformation PolicyNotifyMachineAccountPasswordInformation,
PolicyNotifyGlobalSaclInformation,
PolicyNotifyMax // must always be the last entry
} POLICY_NOTIFICATION_INFORMATION_CLASS, *PPOLICY_NOTIFICATION_INFORMATION_CLASS ; } POLICY_NOTIFICATION_INFORMATION_CLASS, *PPOLICY_NOTIFICATION_INFORMATION_CLASS ;
// //
// LSA RPC Context Handle (Opaque form). Note that a Context Handle is // LSA RPC Context Handle (Opaque form). Note that a Context Handle is
// always a pointer type unlike regular handles. // always a pointer type unlike regular handles.
// //
typedef PVOID LSA_HANDLE, *PLSA_HANDLE; typedef PVOID LSA_HANDLE, *PLSA_HANDLE;
skipping to change at line 3058 skipping to change at line 2959
#define SAM_PASSWORD_CHANGE_NOTIFY_ROUTINE "PasswordChangeNotify" #define SAM_PASSWORD_CHANGE_NOTIFY_ROUTINE "PasswordChangeNotify"
typedef BOOLEAN (*PSAM_INIT_NOTIFICATION_ROUTINE) ( typedef BOOLEAN (*PSAM_INIT_NOTIFICATION_ROUTINE) (
); );
#define SAM_INIT_NOTIFICATION_ROUTINE "InitializeChangeNotify" #define SAM_INIT_NOTIFICATION_ROUTINE "InitializeChangeNotify"
#define SAM_PASSWORD_FILTER_ROUTINE "PasswordFilter" #define SAM_PASSWORD_FILTER_ROUTINE "PasswordFilter"
typedef BOOLEAN (*PSAM_PASSWORD_FILTER_ROUTINE) ( typedef BOOLEAN (*PSAM_PASSWORD_FILTER_ROUTINE) (
IN PUNICODE_STRING AccountName, __in PUNICODE_STRING AccountName,
IN PUNICODE_STRING FullName, __in PUNICODE_STRING FullName,
IN PUNICODE_STRING Password, __in PUNICODE_STRING Password,
IN BOOLEAN SetOperation __in BOOLEAN SetOperation
); );
#endif // _PASSWORD_NOTIFICATION_DEFINED #endif // _PASSWORD_NOTIFICATION_DEFINED
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// // // //
// Name of the MSV1_0 authentication package // // Name of the MSV1_0 authentication package //
// // // //
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
skipping to change at line 3112 skipping to change at line 3013
// //
// MSV1.0 LsaLogonUser() submission message types. // MSV1.0 LsaLogonUser() submission message types.
// //
typedef enum _MSV1_0_LOGON_SUBMIT_TYPE { typedef enum _MSV1_0_LOGON_SUBMIT_TYPE {
MsV1_0InteractiveLogon = 2, MsV1_0InteractiveLogon = 2,
MsV1_0Lm20Logon, MsV1_0Lm20Logon,
MsV1_0NetworkLogon, MsV1_0NetworkLogon,
MsV1_0SubAuthLogon, MsV1_0SubAuthLogon,
MsV1_0WorkstationUnlockLogon = 7, MsV1_0WorkstationUnlockLogon = 7,
// defined in Longhorn and up // defined in Windows Server 2008 and up
MsV1_0S4ULogon = 12, MsV1_0S4ULogon = 12,
MsV1_0VirtualLogon = 82
} MSV1_0_LOGON_SUBMIT_TYPE, *PMSV1_0_LOGON_SUBMIT_TYPE; } MSV1_0_LOGON_SUBMIT_TYPE, *PMSV1_0_LOGON_SUBMIT_TYPE;
// //
// MSV1.0 LsaLogonUser() profile buffer types. // MSV1.0 LsaLogonUser() profile buffer types.
// //
typedef enum _MSV1_0_PROFILE_BUFFER_TYPE { typedef enum _MSV1_0_PROFILE_BUFFER_TYPE {
MsV1_0InteractiveProfile = 2, MsV1_0InteractiveProfile = 2,
MsV1_0Lm20LogonProfile, MsV1_0Lm20LogonProfile,
MsV1_0SmartCardProfile MsV1_0SmartCardProfile
skipping to change at line 3268 skipping to change at line 3170
// Start // Start
// Doesnt exist in Windows XP but does exist in Windows 2000 Security Rollup and up // Doesnt exist in Windows XP but does exist in Windows 2000 Security Rollup and up
#define MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY 0x00008000 #define MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY 0x00008000
#endif #endif
#define MSV1_0_SUBAUTHENTICATION_DLL_EX 0x00100000 #define MSV1_0_SUBAUTHENTICATION_DLL_EX 0x00100000
// Defined in Windows Server 2003 SP1 and above // Defined in Windows Server 2003 SP1 and above
#define MSV1_0_ALLOW_MSVCHAPV2 0x00010000 #define MSV1_0_ALLOW_MSVCHAPV2 0x00010000
#if (_WIN32_WINNT >= 0x0600) #if (_WIN32_WINNT >= 0x0600)
//Defined in Longhorn and up //Defined in Windows Server 2008 and up
#define MSV1_0_S4U2SELF 0x00020000 // no password is needed #define MSV1_0_S4U2SELF 0x00020000 // no password is needed
#define MSV1_0_CHECK_LOGONHOURS_FOR_S4U 0x00040000 // check logon hours for S4U logon #define MSV1_0_CHECK_LOGONHOURS_FOR_S4U 0x00040000 // check logon hours for S4U logon
#endif #endif
// //
// The high order byte is a value indicating the SubAuthentication DLL. // The high order byte is a value indicating the SubAuthentication DLL.
// Zero indicates no SubAuthentication DLL. // Zero indicates no SubAuthentication DLL.
// //
#define MSV1_0_SUBAUTHENTICATION_DLL 0xFF000000 #define MSV1_0_SUBAUTHENTICATION_DLL 0xFF000000
skipping to change at line 3321 skipping to change at line 3223
STRING AuthenticationInfo2; STRING AuthenticationInfo2;
ULONG ParameterControl; ULONG ParameterControl;
ULONG SubAuthPackageId; ULONG SubAuthPackageId;
} MSV1_0_SUBAUTH_LOGON, * PMSV1_0_SUBAUTH_LOGON; } MSV1_0_SUBAUTH_LOGON, * PMSV1_0_SUBAUTH_LOGON;
#if (_WIN32_WINNT >= 0x0600) #if (_WIN32_WINNT >= 0x0600)
// //
// s4u2self logon // s4u2self logon
// //
// Defined in Longhorn and above // Defined in Windows Server 2008 and above
// //
// request to enforce logon hours policy // request to enforce logon hours policy
// //
#define MSV1_0_S4U_LOGON_FLAG_CHECK_LOGONHOURS 0x2 #define MSV1_0_S4U_LOGON_FLAG_CHECK_LOGONHOURS 0x2
typedef struct _MSV1_0_S4U_LOGON { typedef struct _MSV1_0_S4U_LOGON {
MSV1_0_LOGON_SUBMIT_TYPE MessageType; MSV1_0_LOGON_SUBMIT_TYPE MessageType;
ULONG Flags; ULONG Flags;
skipping to change at line 3352 skipping to change at line 3254
#define LOGON_GUEST 0x01 #define LOGON_GUEST 0x01
#define LOGON_NOENCRYPTION 0x02 #define LOGON_NOENCRYPTION 0x02
#define LOGON_CACHED_ACCOUNT 0x04 #define LOGON_CACHED_ACCOUNT 0x04
#define LOGON_USED_LM_PASSWORD 0x08 #define LOGON_USED_LM_PASSWORD 0x08
#define LOGON_EXTRA_SIDS 0x20 #define LOGON_EXTRA_SIDS 0x20
#define LOGON_SUBAUTH_SESSION_KEY 0x40 #define LOGON_SUBAUTH_SESSION_KEY 0x40
#define LOGON_SERVER_TRUST_ACCOUNT 0x80 #define LOGON_SERVER_TRUST_ACCOUNT 0x80
#define LOGON_NTLMV2_ENABLED 0x100 // says DC understands NTLMv2 #define LOGON_NTLMV2_ENABLED 0x100 // says DC understands NTLMv2
#define LOGON_RESOURCE_GROUPS 0x200 #define LOGON_RESOURCE_GROUPS 0x200
#define LOGON_PROFILE_PATH_RETURNED 0x400 #define LOGON_PROFILE_PATH_RETURNED 0x400
// Defined in Longhorn and above // Defined in Windows Server 2008 and above
#define LOGON_NT_V2 0x800 // NT response was used for validati on #define LOGON_NT_V2 0x800 // NT response was used for validati on
#define LOGON_LM_V2 0x1000 // LM response was used for validati on #define LOGON_LM_V2 0x1000 // LM response was used for validati on
#define LOGON_NTLM_V2 0x2000 // LM response was used to authentic ate but NT response was used to derive the session key #define LOGON_NTLM_V2 0x2000 // LM response was used to authentic ate but NT response was used to derive the session key
#if (_WIN32_WINNT >= 0x0600) #if (_WIN32_WINNT >= 0x0600)
#define LOGON_OPTIMIZED 0x4000 // this is an optimized logon #define LOGON_OPTIMIZED 0x4000 // this is an optimized logon
#define LOGON_WINLOGON 0x8000 // the logon session was created for winlogon #define LOGON_WINLOGON 0x8000 // the logon session was created for winlogon
#define LOGON_PKINIT 0x10000 // Kerberos PKINIT extension was use d to authenticate the user #define LOGON_PKINIT 0x10000 // Kerberos PKINIT extension was use d to authenticate the user
#define LOGON_NO_OPTIMIZED 0x20000 // optimized logon has been disabled for this account #define LOGON_NO_OPTIMIZED 0x20000 // optimized logon has been disabled for this account
skipping to change at line 3471 skipping to change at line 3373
MsvAvDnsComputerName, // server's computer name -- DNS MsvAvDnsComputerName, // server's computer name -- DNS
MsvAvDnsDomainName, // server's domain name -- DNS MsvAvDnsDomainName, // server's domain name -- DNS
#if (_WIN32_WINNT >= 0x0501) #if (_WIN32_WINNT >= 0x0501)
MsvAvDnsTreeName, // server's tree name -- DNS MsvAvDnsTreeName, // server's tree name -- DNS
MsvAvFlags, // server's extended flags -- DWORD mask MsvAvFlags, // server's extended flags -- DWORD mask
#if (_WIN32_WINNT >= 0x0600) #if (_WIN32_WINNT >= 0x0600)
MsvAvTimestamp, // contains the server's local time in FILETIME, MsvAvTimestamp, // contains the server's local time in FILETIME,
// (64 bit 100 ns ticks since 1602 // (64 bit 100 ns ticks since 1602
// (UTC)) in little endian byte order // (UTC)) in little endian byte order
MsvAvRestrictions, // token restrictions MsvAvRestrictions, // token restrictions
MsvAvTargetName,
MsvAvChannelBindings,
#endif #endif
#endif #endif
} MSV1_0_AVID; } MSV1_0_AVID;
typedef struct _MSV1_0_AV_PAIR { typedef struct _MSV1_0_AV_PAIR {
USHORT AvId; USHORT AvId;
USHORT AvLen; USHORT AvLen;
// Data is treated as byte array following structure // Data is treated as byte array following structure
} MSV1_0_AV_PAIR, *PMSV1_0_AV_PAIR; } MSV1_0_AV_PAIR, *PMSV1_0_AV_PAIR;
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
skipping to change at line 3509 skipping to change at line 3413
MsV1_0GenericPassthrough, // Both submission and response MsV1_0GenericPassthrough, // Both submission and response
MsV1_0CacheLogon, // Submission only, no response MsV1_0CacheLogon, // Submission only, no response
MsV1_0SubAuth, // Both submission and response MsV1_0SubAuth, // Both submission and response
MsV1_0DeriveCredential, // Both submission and response MsV1_0DeriveCredential, // Both submission and response
MsV1_0CacheLookup, // Both submission and response MsV1_0CacheLookup, // Both submission and response
#if (_WIN32_WINNT >= 0x0501) #if (_WIN32_WINNT >= 0x0501)
MsV1_0SetProcessOption, // Submission only, no response MsV1_0SetProcessOption, // Submission only, no response
#endif #endif
#if (_WIN32_WINNT >= 0x0600) #if (_WIN32_WINNT >= 0x0600)
MsV1_0ConfigLocalAliases, MsV1_0ConfigLocalAliases,
MsV1_0ClearCachedCredentials,
#endif #endif
} MSV1_0_PROTOCOL_MESSAGE_TYPE, *PMSV1_0_PROTOCOL_MESSAGE_TYPE; } MSV1_0_PROTOCOL_MESSAGE_TYPE, *PMSV1_0_PROTOCOL_MESSAGE_TYPE;
typedef struct _MSV1_0_CHANGEPASSWORD_REQUEST { typedef struct _MSV1_0_CHANGEPASSWORD_REQUEST {
MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType; MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
UNICODE_STRING DomainName; UNICODE_STRING DomainName;
UNICODE_STRING AccountName; UNICODE_STRING AccountName;
UNICODE_STRING OldPassword; UNICODE_STRING OldPassword;
UNICODE_STRING NewPassword; UNICODE_STRING NewPassword;
BOOLEAN Impersonating; BOOLEAN Impersonating;
skipping to change at line 3917 skipping to change at line 3822
KERB_CERTIFICATE_LOGON Logon; KERB_CERTIFICATE_LOGON Logon;
LUID LogonId; LUID LogonId;
} KERB_CERTIFICATE_UNLOCK_LOGON, *PKERB_CERTIFICATE_UNLOCK_LOGON; } KERB_CERTIFICATE_UNLOCK_LOGON, *PKERB_CERTIFICATE_UNLOCK_LOGON;
// //
// let the KDC detect account mapping conflicts for the same certificate. // let the KDC detect account mapping conflicts for the same certificate.
// //
#define KERB_CERTIFICATE_S4U_LOGON_FLAG_CHECK_DUPLICATES 0x1 #define KERB_CERTIFICATE_S4U_LOGON_FLAG_CHECK_DUPLICATES 0x1
#define KERB_CERTIFICATE_S4U_LOGON_FLAG_CHECK_LOGONHOURS 0x2 #define KERB_CERTIFICATE_S4U_LOGON_FLAG_CHECK_LOGONHOURS 0x2
#define KERB_CERTIFICATE_S4U_LOGON_FLAG_FAIL_IF_NT_AUTH_POLICY_REQUIRED 0x4
typedef struct _KERB_CERTIFICATE_S4U_LOGON { typedef struct _KERB_CERTIFICATE_S4U_LOGON {
KERB_LOGON_SUBMIT_TYPE MessageType; KERB_LOGON_SUBMIT_TYPE MessageType;
ULONG Flags; ULONG Flags;
UNICODE_STRING UserPrincipalName; UNICODE_STRING UserPrincipalName;
// OPTIONAL, certificate mapping hints: username or username@domain // OPTIONAL, certificate mapping hints: username or username@domain
UNICODE_STRING DomainName; // used to locate the forest UNICODE_STRING DomainName; // used to locate the forest
// OPTIONAL, certificate mapping hints: if missing, using the local machine's domain // OPTIONAL, certificate mapping hints: if missing, using the local machine's domain
ULONG CertificateLength; // for the client certificate ULONG CertificateLength; // for the client certificate
PUCHAR Certificate; // for the client certificate, BER encoded PUCHAR Certificate; // for the client certificate, BER encoded
skipping to change at line 4070 skipping to change at line 3976
#endif #endif
#if (_WIN32_WINNT >= 0x0502) #if (_WIN32_WINNT >= 0x0502)
KerbRefreshSmartcardCredentialsMessage, KerbRefreshSmartcardCredentialsMessage,
KerbAddExtraCredentialsMessage, KerbAddExtraCredentialsMessage,
KerbQuerySupplementalCredentialsMessage, KerbQuerySupplementalCredentialsMessage,
#endif #endif
#if (_WIN32_WINNT >= 0x0600) #if (_WIN32_WINNT >= 0x0600)
KerbTransferCredentialsMessage, KerbTransferCredentialsMessage,
KerbQueryTicketCacheEx2Message, KerbQueryTicketCacheEx2Message,
KerbSubmitTicketMessage, KerbSubmitTicketMessage,
KerbAddExtraCredentialsExMessage,
#endif #endif
} KERB_PROTOCOL_MESSAGE_TYPE, *PKERB_PROTOCOL_MESSAGE_TYPE; } KERB_PROTOCOL_MESSAGE_TYPE, *PKERB_PROTOCOL_MESSAGE_TYPE;
// //
// Used both for retrieving tickets and for querying ticket cache // Used both for retrieving tickets and for querying ticket cache
// //
typedef struct _KERB_QUERY_TKT_CACHE_REQUEST { typedef struct _KERB_QUERY_TKT_CACHE_REQUEST {
KERB_PROTOCOL_MESSAGE_TYPE MessageType; KERB_PROTOCOL_MESSAGE_TYPE MessageType;
LUID LogonId; LUID LogonId;
skipping to change at line 4176 skipping to change at line 4083
#define KERB_RETRIEVE_TICKET_USE_CACHE_ONLY 0x2 #define KERB_RETRIEVE_TICKET_USE_CACHE_ONLY 0x2
#define KERB_RETRIEVE_TICKET_USE_CREDHANDLE 0x4 #define KERB_RETRIEVE_TICKET_USE_CREDHANDLE 0x4
#if (_WIN32_WINNT >= 0x0501) #if (_WIN32_WINNT >= 0x0501)
#define KERB_RETRIEVE_TICKET_AS_KERB_CRED 0x8 #define KERB_RETRIEVE_TICKET_AS_KERB_CRED 0x8
#define KERB_RETRIEVE_TICKET_WITH_SEC_CRED 0x10 #define KERB_RETRIEVE_TICKET_WITH_SEC_CRED 0x10
#endif #endif
#if (_WIN32_WINNT >= 0x0600) #if (_WIN32_WINNT >= 0x0600)
#define KERB_RETRIEVE_TICKET_CACHE_TICKET 0x20 #define KERB_RETRIEVE_TICKET_CACHE_TICKET 0x20
#endif #endif
#if (_WIN32_WINNT >= 0x0601)
#define KERB_RETRIEVE_TICKET_MAX_LIFETIME 0x40
#endif
#if (_WIN32_WINNT >= 0x0501) #if (_WIN32_WINNT >= 0x0501)
// Encryption Type options // Encryption Type options
#define KERB_ETYPE_DEFAULT 0x0 // don't specify etype in tkt req. #define KERB_ETYPE_DEFAULT 0x0 // don't specify etype in tkt req.
typedef struct _KERB_AUTH_DATA { typedef struct _KERB_AUTH_DATA {
ULONG Type; ULONG Type;
ULONG Length; ULONG Length;
PUCHAR Data; PUCHAR Data;
} KERB_AUTH_DATA, *PKERB_AUTH_DATA; } KERB_AUTH_DATA, *PKERB_AUTH_DATA;
skipping to change at line 4414 skipping to change at line 4325
UNICODE_STRING Password; UNICODE_STRING Password;
LUID LogonId; // optional LUID LogonId; // optional
ULONG Flags; ULONG Flags;
} KERB_ADD_CREDENTIALS_REQUEST, *PKERB_ADD_CREDENTIALS_REQUEST; } KERB_ADD_CREDENTIALS_REQUEST, *PKERB_ADD_CREDENTIALS_REQUEST;
#define KERB_REQUEST_ADD_CREDENTIAL 1 #define KERB_REQUEST_ADD_CREDENTIAL 1
#define KERB_REQUEST_REPLACE_CREDENTIAL 2 #define KERB_REQUEST_REPLACE_CREDENTIAL 2
#define KERB_REQUEST_REMOVE_CREDENTIAL 4 #define KERB_REQUEST_REMOVE_CREDENTIAL 4
#endif #endif
#if (_WIN32_WINNT >= 0x0600)
typedef struct _KERB_ADD_CREDENTIALS_REQUEST_EX {
KERB_ADD_CREDENTIALS_REQUEST Credentials;
//
// new for Ex
//
ULONG PrincipalNameCount;
UNICODE_STRING PrincipalNames[ANYSIZE_ARRAY];
} KERB_ADD_CREDENTIALS_REQUEST_EX, *PKERB_ADD_CREDENTIALS_REQUEST_EX;
#endif
// //
// Request structure for transferring credentials between 2 luids. // Request structure for transferring credentials between 2 luids.
// Requires TCB. // Requires TCB.
// //
typedef struct _KERB_TRANSFER_CRED_REQUEST { typedef struct _KERB_TRANSFER_CRED_REQUEST {
KERB_PROTOCOL_MESSAGE_TYPE MessageType; KERB_PROTOCOL_MESSAGE_TYPE MessageType;
LUID OriginLogonId; LUID OriginLogonId;
LUID DestinationLogonId; LUID DestinationLogonId;
ULONG Flags; ULONG Flags;
} KERB_TRANSFER_CRED_REQUEST, *PKERB_TRANSFER_CRED_REQUEST; } KERB_TRANSFER_CRED_REQUEST, *PKERB_TRANSFER_CRED_REQUEST;
#define KERB_TRANSFER_CRED_WITH_TICKETS 0x1 #define KERB_TRANSFER_CRED_WITH_TICKETS 0x1
typedef struct _POLICY_AUDIT_SID_ARRAY { typedef struct _POLICY_AUDIT_SID_ARRAY {
ULONG UsersCount; ULONG UsersCount;
#ifdef MIDL_PASS #ifdef MIDL_PASS
[size_is(UsersCount)] PAUDIT_SID_RPC* UserSidArray; [size_is(UsersCount)] PAUDIT_SID_RPC* UserSidArray;
#else #else
PSID* UserSidArray; PSID* UserSidArray;
#endif #endif
} POLICY_AUDIT_SID_ARRAY, *PPOLICY_AUDIT_SID_ARRAY; } POLICY_AUDIT_SID_ARRAY, *PPOLICY_AUDIT_SID_ARRAY;
typedef struct _AUDIT_POLICY_INFORMATION { typedef struct _AUDIT_POLICY_INFORMATION {
GUID AuditSubCategoryGuid; GUID AuditSubCategoryGuid;
ULONG AuditingInformation; ULONG AuditingInformation;
skipping to change at line 4482 skipping to change at line 4406
#define AUDIT_GENERIC_WRITE (STANDARD_RIGHTS_WRITE |\ #define AUDIT_GENERIC_WRITE (STANDARD_RIGHTS_WRITE |\
AUDIT_SET_USER_POLICY |\ AUDIT_SET_USER_POLICY |\
AUDIT_SET_MISC_POLICY |\ AUDIT_SET_MISC_POLICY |\
AUDIT_SET_SYSTEM_POLICY) AUDIT_SET_SYSTEM_POLICY)
#define AUDIT_GENERIC_EXECUTE (STANDARD_RIGHTS_EXECUTE) #define AUDIT_GENERIC_EXECUTE (STANDARD_RIGHTS_EXECUTE)
BOOLEAN BOOLEAN
NTAPI NTAPI
AuditSetSystemPolicy( AuditSetSystemPolicy(
__in_ecount(PolicyCount) PCAUDIT_POLICY_INFORMATION pAuditPolicy, __in_ecount(dwPolicyCount) PCAUDIT_POLICY_INFORMATION pAuditPolicy,
__in ULONG PolicyCount __in ULONG dwPolicyCount
); );
BOOLEAN BOOLEAN
NTAPI NTAPI
AuditSetPerUserPolicy( AuditSetPerUserPolicy(
__in const PSID pSid, __in const PSID pSid,
__in_ecount(PolicyCount) PCAUDIT_POLICY_INFORMATION pAuditPolicy, __in_ecount(dwPolicyCount) PCAUDIT_POLICY_INFORMATION pAuditPolicy,
__in ULONG PolicyCount __in ULONG dwPolicyCount
); );
__checkReturn
BOOLEAN BOOLEAN
NTAPI NTAPI
AuditQuerySystemPolicy( AuditQuerySystemPolicy(
__in_ecount(PolicyCount) const GUID* pSubCategoryGuids, __in_ecount(dwPolicyCount) const GUID* pSubCategoryGuids,
__in ULONG PolicyCount, __in ULONG dwPolicyCount,
__deref_out_ecount(PolicyCount) PAUDIT_POLICY_INFORMATION* ppAuditPolicy __deref_out_ecount(dwPolicyCount)
__drv_when(return != 0, __drv_allocatesMem(Mem)) PAUDIT_POLICY_INFORMATION*
ppAuditPolicy
); );
__checkReturn
BOOLEAN BOOLEAN
NTAPI NTAPI
AuditQueryPerUserPolicy( AuditQueryPerUserPolicy(
__in const PSID pSid, __in const PSID pSid,
__in_ecount(PolicyCount) const GUID* pSubCategoryGuids, __in_ecount(dwPolicyCount) const GUID* pSubCategoryGuids,
__in ULONG PolicyCount, __in ULONG dwPolicyCount,
__deref_out_ecount(PolicyCount) PAUDIT_POLICY_INFORMATION* ppAuditPolicy __deref_out_ecount(dwPolicyCount)
__drv_when(return != 0, __drv_allocatesMem(Mem)) PAUDIT_POLICY_INFORMATION*
ppAuditPolicy
); );
__checkReturn
BOOLEAN BOOLEAN
NTAPI NTAPI
AuditEnumeratePerUserPolicy( AuditEnumeratePerUserPolicy(
__out PPOLICY_AUDIT_SID_ARRAY* ppAuditSidArray __out __drv_when(return != 0, __drv_allocatesMem(Mem)) PPOLICY_AUDIT_SID_ARR AY* ppAuditSidArray
); );
__checkReturn
BOOLEAN BOOLEAN
NTAPI NTAPI
AuditComputeEffectivePolicyBySid( AuditComputeEffectivePolicyBySid(
__in const PSID pSid, __in const PSID pSid,
__in_ecount(PolicyCount) const GUID* pSubCategoryGuids, __in_ecount(dwPolicyCount) const GUID* pSubCategoryGuids,
__in ULONG PolicyCount, __in ULONG dwPolicyCount,
__deref_out_ecount(PolicyCount) PAUDIT_POLICY_INFORMATION* ppAuditPolicy __deref_out_ecount(dwPolicyCount)
__drv_when(return != 0, __drv_allocatesMem(Mem)) PAUDIT_POLICY_INFORMATION*
ppAuditPolicy
); );
__checkReturn
BOOLEAN BOOLEAN
NTAPI NTAPI
AuditComputeEffectivePolicyByToken( AuditComputeEffectivePolicyByToken(
__in HANDLE hTokenHandle, __in HANDLE hTokenHandle,
__in_ecount(PolicyCount) const GUID* pSubCategoryGuids, __in_ecount(dwPolicyCount) const GUID* pSubCategoryGuids,
__in ULONG PolicyCount, __in ULONG dwPolicyCount,
__deref_out_ecount(PolicyCount) PAUDIT_POLICY_INFORMATION* ppAuditPolicy __deref_out_ecount(dwPolicyCount)
__drv_when(return != 0, __drv_allocatesMem(Mem)) PAUDIT_POLICY_INFORMATION*
ppAuditPolicy
); );
__checkReturn
BOOLEAN BOOLEAN
NTAPI NTAPI
AuditEnumerateCategories( AuditEnumerateCategories(
__deref_out_ecount(*pCountReturned) GUID** ppAuditCategoriesArray, __deref_out_ecount(*pdwCountReturned)
__out PULONG pCountReturned __drv_when(return != 0, __drv_allocatesMem(Mem)) GUID** ppAuditCategoriesArr
ay,
__out PULONG pdwCountReturned
); );
__checkReturn
BOOLEAN BOOLEAN
NTAPI NTAPI
AuditEnumerateSubCategories( AuditEnumerateSubCategories(
__in_opt const GUID* pAuditCategoryGuid, __in_opt const GUID* pAuditCategoryGuid,
__in BOOLEAN bRetrieveAllSubCategories, __in BOOLEAN bRetrieveAllSubCategories,
__deref_out_ecount(*pCountReturned) GUID** ppAuditSubCategoriesArray, __deref_out_ecount(*pdwCountReturned)
__out PULONG pCountReturned __drv_when(return != 0, __drv_allocatesMem(Mem)) GUID** ppAuditSubCategories
Array,
__out PULONG pdwCountReturned
); );
__checkReturn
BOOLEAN BOOLEAN
NTAPI NTAPI
AuditLookupCategoryNameW( AuditLookupCategoryNameW(
__in const GUID* pAuditCategoryGuid, __in const GUID* pAuditCategoryGuid,
__deref_out PWSTR* ppszCategoryName __deref_out __drv_when(return != 0, __drv_allocatesMem(Mem)) PWSTR* ppszCate goryName
); );
__checkReturn
BOOLEAN BOOLEAN
NTAPI NTAPI
AuditLookupCategoryNameA( AuditLookupCategoryNameA(
__in const GUID* pAuditCategoryGuid, __in const GUID* pAuditCategoryGuid,
__deref_out PSTR* ppszCategoryName __deref_out __drv_when(return != 0, __drv_allocatesMem(Mem)) PSTR* ppszCateg oryName
); );
#ifdef UNICODE #ifdef UNICODE
#define AuditLookupCategoryName AuditLookupCategoryNameW #define AuditLookupCategoryName AuditLookupCategoryNameW
#else #else
#define AuditLookupCategoryName AuditLookupCategoryNameA #define AuditLookupCategoryName AuditLookupCategoryNameA
#endif #endif
__checkReturn
BOOLEAN BOOLEAN
NTAPI NTAPI
AuditLookupSubCategoryNameW( AuditLookupSubCategoryNameW(
__in const GUID* pAuditSubCategoryGuid, __in const GUID* pAuditSubCategoryGuid,
__deref_out PWSTR* ppszSubCategoryName __deref_out __drv_when(return != 0, __drv_allocatesMem(Mem)) PWSTR* ppszSubC ategoryName
); );
__checkReturn
BOOLEAN BOOLEAN
NTAPI NTAPI
AuditLookupSubCategoryNameA( AuditLookupSubCategoryNameA(
__in const GUID* pAuditSubCategoryGuid, __in const GUID* pAuditSubCategoryGuid,
__deref_out PSTR* ppszSubCategoryName __deref_out __drv_when(return != 0, __drv_allocatesMem(Mem)) PSTR* ppszSubCa tegoryName
); );
#ifdef UNICODE #ifdef UNICODE
#define AuditLookupSubCategoryName AuditLookupSubCategoryNameW #define AuditLookupSubCategoryName AuditLookupSubCategoryNameW
#else #else
#define AuditLookupSubCategoryName AuditLookupSubCategoryNameA #define AuditLookupSubCategoryName AuditLookupSubCategoryNameA
#endif #endif
BOOLEAN BOOLEAN
NTAPI NTAPI
skipping to change at line 4612 skipping to change at line 4553
__out GUID* pAuditCategoryGuid __out GUID* pAuditCategoryGuid
); );
BOOLEAN BOOLEAN
NTAPI NTAPI
AuditSetSecurity( AuditSetSecurity(
__in SECURITY_INFORMATION SecurityInformation, __in SECURITY_INFORMATION SecurityInformation,
__in PSECURITY_DESCRIPTOR pSecurityDescriptor __in PSECURITY_DESCRIPTOR pSecurityDescriptor
); );
__checkReturn
BOOLEAN BOOLEAN
NTAPI NTAPI
AuditQuerySecurity( AuditQuerySecurity(
__in SECURITY_INFORMATION SecurityInformation, __in SECURITY_INFORMATION SecurityInformation,
__deref_out PSECURITY_DESCRIPTOR *ppSecurityDescriptor __deref_out __drv_when(return != 0, __drv_allocatesMem(Mem)) PSECURITY_DESCR
IPTOR *ppSecurityDescriptor
);
BOOLEAN
NTAPI
AuditSetGlobalSaclW(
__in PCWSTR ObjectTypeName,
__in_opt PACL Acl
);
BOOLEAN
NTAPI
AuditSetGlobalSaclA(
__in PCSTR ObjectTypeName,
__in_opt PACL Acl
);
#ifdef UNICODE
#define AuditSetGlobalSacl AuditSetGlobalSaclW
#else
#define AuditSetGlobalSacl AuditSetGlobalSaclA
#endif
__checkReturn
BOOLEAN
NTAPI
AuditQueryGlobalSaclW(
__in PCWSTR ObjectTypeName,
__out __drv_when(return != 0, __drv_allocatesMem(Mem)) PACL *Acl
);
__checkReturn
BOOLEAN
NTAPI
AuditQueryGlobalSaclA(
__in PCSTR ObjectTypeName,
__out __drv_when(return != 0, __drv_allocatesMem(Mem)) PACL *Acl
); );
#ifdef UNICODE
#define AuditQueryGlobalSacl AuditQueryGlobalSaclW
#else
#define AuditQueryGlobalSacl AuditQueryGlobalSaclA
#endif
VOID VOID
NTAPI NTAPI
AuditFree( AuditFree(
__in PVOID Buffer __in __drv_freesMem(Mem) __post __notvalid PVOID Buffer
); );
#if (_WIN32_WINNT >= 0x0601)
//
// Pku2u package name
//
#define PKU2U_PACKAGE_NAME_A "pku2u"
#define PKU2U_PACKAGE_NAME L"pku2u"
#define PKU2U_PACKAGE_NAME_W PKU2U_PACKAGE_NAME
#endif // _WIN32_WINNT
#if (_WIN32_WINNT >= 0x0601)
// the following structure contains the ASN.1 encoded X.509 certificate
typedef struct _PKU2U_CERT_BLOB {
ULONG CertOffset; // each element is a byte
USHORT CertLength; //
} PKU2U_CERT_BLOB, *PPKU2U_CERT_BLOB;
#define PKU2U_CREDUI_CONTEXT_VERSION 0x4154414454524543i64 // "CERTDATA"
typedef struct _PKU2U_CREDUI_CONTEXT {
ULONG64 Version;
USHORT cbHeaderLength;
ULONG cbStructureLength;
USHORT CertArrayCount; // followed by an array of PKU2U_CERT_BLOB
ULONG CertArrayOffset; // offset to the array
} PKU2U_CREDUI_CONTEXT, *PPKU2U_CREDUI_CONTEXT;
/////////////////////////////////////////////////////////////////////////
//
// LsaLogonUser parameters
//
/////////////////////////////////////////////////////////////////////////
typedef enum _PKU2U_LOGON_SUBMIT_TYPE {
Pku2uCertificateS4ULogon = 14,
} PKU2U_LOGON_SUBMIT_TYPE, *PPKU2U_LOGON_SUBMIT_TYPE;
typedef struct _PKU2U_CERTIFICATE_S4U_LOGON {
PKU2U_LOGON_SUBMIT_TYPE MessageType;
ULONG Flags;
UNICODE_STRING UserPrincipalName;
__reserved UNICODE_STRING DomainName;
ULONG CertificateLength; // for the client certificate
__field_bcount(CertificateLength) PUCHAR Certificate; // for the client cert
ificate, BER encoded
} PKU2U_CERTIFICATE_S4U_LOGON, *PPKU2U_CERTIFICATE_S4U_LOGON;
#endif // _WIN32_WINNT
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _NTSECAPI_ */ #endif /* _NTSECAPI_ */
 End of changes. 63 change blocks. 
221 lines changed or deleted 266 lines changed or added


 perflib.h (6.0.6002.18005-Windows 6.0)   perflib.h (6.1.7601.23418-Windows 7.0) 
skipping to change at line 167 skipping to change at line 167
typedef struct _PROVIDER_CONTEXT { typedef struct _PROVIDER_CONTEXT {
DWORD ContextSize; // should be sizeof(PERF_PROVIDER_CONTEXT) DWORD ContextSize; // should be sizeof(PERF_PROVIDER_CONTEXT)
DWORD Reserved; DWORD Reserved;
PERFLIBREQUEST ControlCallback; PERFLIBREQUEST ControlCallback;
PERF_MEM_ALLOC MemAllocRoutine; PERF_MEM_ALLOC MemAllocRoutine;
PERF_MEM_FREE MemFreeRoutine; PERF_MEM_FREE MemFreeRoutine;
LPVOID pMemContext; LPVOID pMemContext;
} PERF_PROVIDER_CONTEXT, * PPERF_PROVIDER_CONTEXT; } PERF_PROVIDER_CONTEXT, * PPERF_PROVIDER_CONTEXT;
ULONG __stdcall ULONG WINAPI
PerfStartProviderEx( PerfStartProviderEx(
__in LPGUID ProviderGuid, __in LPGUID ProviderGuid,
__in_opt PPERF_PROVIDER_CONTEXT ProviderContext, __in_opt PPERF_PROVIDER_CONTEXT ProviderContext,
__out HANDLE * phProvider __out PHANDLE Provider
); );
ULONG __stdcall ULONG WINAPI
PerfStartProvider(
__in LPGUID ProviderGuid,
__in_opt PERFLIBREQUEST ControlCallback,
__out PHANDLE Provider
);
ULONG WINAPI
PerfStopProvider( PerfStopProvider(
__in HANDLE hProvider __in HANDLE ProviderHandle
); );
__success(return == ERROR_SUCCESS) ULONG WINAPI
ULONG __stdcall
PerfSetCounterSetInfo( PerfSetCounterSetInfo(
__in HANDLE hProvider, __in HANDLE ProviderHandle,
__inout_bcount(dwTemplateSize) PPERF_COUNTERSET_INFO pTemplate, __inout_bcount(TemplateSize) PPERF_COUNTERSET_INFO Template,
__in ULONG dwTemplateSize __in ULONG TemplateSize
); );
PPERF_COUNTERSET_INSTANCE __stdcall PPERF_COUNTERSET_INSTANCE WINAPI
PerfCreateInstance( PerfCreateInstance(
__in HANDLE hProvider, __in HANDLE ProviderHandle,
__in LPCGUID CounterSetGuid, __in LPCGUID CounterSetGuid,
__in LPCWSTR szInstanceName, __in PCWSTR Name,
__in ULONG dwInstance __in ULONG Id
); );
ULONG __stdcall ULONG WINAPI
PerfDeleteInstance( PerfDeleteInstance(
__in HANDLE hProvider, __in HANDLE Provider,
__in PPERF_COUNTERSET_INSTANCE InstanceBlock __in PPERF_COUNTERSET_INSTANCE InstanceBlock
); );
PPERF_COUNTERSET_INSTANCE __stdcall PPERF_COUNTERSET_INSTANCE WINAPI
PerfQueryInstance( PerfQueryInstance(
__in HANDLE hProvider, __in HANDLE ProviderHandle,
__in LPCGUID CounterSetGuid, __in LPCGUID CounterSetGuid,
__in LPCWSTR szInstance, __in PCWSTR Name,
__in ULONG dwInstance __in ULONG Id
); );
ULONG __stdcall ULONG WINAPI
PerfSetCounterRefValue(
__in HANDLE Provider,
__inout PPERF_COUNTERSET_INSTANCE Instance,
__in ULONG CounterId,
__in PVOID Address
);
ULONG WINAPI
PerfSetULongCounterValue( PerfSetULongCounterValue(
__in HANDLE hProvider, __in HANDLE Provider,
__in PPERF_COUNTERSET_INSTANCE pInstance, __inout PPERF_COUNTERSET_INSTANCE Instance,
__in ULONG CounterId, __in ULONG CounterId,
__in ULONG lValue __in ULONG Value
); );
ULONG __stdcall ULONG WINAPI
PerfSetULongLongCounterValue( PerfSetULongLongCounterValue(
__in HANDLE hProvider, __in HANDLE Provider,
__in PPERF_COUNTERSET_INSTANCE pInstance, __inout PPERF_COUNTERSET_INSTANCE Instance,
__in ULONG CounterId, __in ULONG CounterId,
__in ULONGLONG llValue __in ULONGLONG Value
); );
ULONG __stdcall ULONG WINAPI
PerfIncrementULongCounterValue( PerfIncrementULongCounterValue(
__in HANDLE hProvider, __in HANDLE Provider,
__in PPERF_COUNTERSET_INSTANCE pInstance, __inout PPERF_COUNTERSET_INSTANCE Instance,
__in ULONG CounterId, __in ULONG CounterId,
__in ULONG lValue __in ULONG Value
); );
ULONG __stdcall ULONG WINAPI
PerfIncrementULongLongCounterValue( PerfIncrementULongLongCounterValue(
__in HANDLE hProvider, __in HANDLE Provider,
__in PPERF_COUNTERSET_INSTANCE pInstance, __inout PPERF_COUNTERSET_INSTANCE Instance,
__in ULONG CounterId, __in ULONG CounterId,
__in ULONGLONG llValue __in ULONGLONG Value
); );
ULONG __stdcall ULONG WINAPI
PerfDecrementULongCounterValue( PerfDecrementULongCounterValue(
__in HANDLE hProvider, __in HANDLE Provider,
__in PPERF_COUNTERSET_INSTANCE pInstance, __inout PPERF_COUNTERSET_INSTANCE Instance,
__in ULONG CounterId, __in ULONG CounterId,
__in ULONG lValue __in ULONG Value
); );
ULONG __stdcall ULONG WINAPI
PerfDecrementULongLongCounterValue( PerfDecrementULongLongCounterValue(
__in HANDLE hProvider, __in HANDLE Provider,
__in PPERF_COUNTERSET_INSTANCE pInstance, __inout PPERF_COUNTERSET_INSTANCE Instance,
__in ULONG CounterId, __in ULONG CounterId,
__in ULONGLONG llValue __in ULONGLONG Value
); );
ULONG __stdcall
PerfSetCounterRefValue(
__in HANDLE hProvider,
__in PPERF_COUNTERSET_INSTANCE pInstance,
__in ULONG CounterId,
__in LPVOID lpAddr
);
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
#endif #endif
#endif /* _PERFLIB_H_ */ #endif /* _PERFLIB_H_ */
 End of changes. 28 change blocks. 
70 lines changed or deleted 76 lines changed or added


 sddl.h (6.0.6002.18005-Windows 6.0)   sddl.h (6.1.7601.23418-Windows 7.0) 
skipping to change at line 58 skipping to change at line 58
// //
#define SDDL_ACCESS_ALLOWED TEXT("A") // Access allowed #define SDDL_ACCESS_ALLOWED TEXT("A") // Access allowed
#define SDDL_ACCESS_DENIED TEXT("D") // Access denied #define SDDL_ACCESS_DENIED TEXT("D") // Access denied
#define SDDL_OBJECT_ACCESS_ALLOWED TEXT("OA") // Object access allowed #define SDDL_OBJECT_ACCESS_ALLOWED TEXT("OA") // Object access allowed
#define SDDL_OBJECT_ACCESS_DENIED TEXT("OD") // Object access denied #define SDDL_OBJECT_ACCESS_DENIED TEXT("OD") // Object access denied
#define SDDL_AUDIT TEXT("AU") // Audit #define SDDL_AUDIT TEXT("AU") // Audit
#define SDDL_ALARM TEXT("AL") // Alarm #define SDDL_ALARM TEXT("AL") // Alarm
#define SDDL_OBJECT_AUDIT TEXT("OU") // Object audit #define SDDL_OBJECT_AUDIT TEXT("OU") // Object audit
#define SDDL_OBJECT_ALARM TEXT("OL") // Object alarm #define SDDL_OBJECT_ALARM TEXT("OL") // Object alarm
#define SDDL_MANDATORY_LABEL TEXT("ML") // Integrity label #define SDDL_MANDATORY_LABEL TEXT("ML") // Integrity label
#define SDDL_CALLBACK_ACCESS_ALLOWED TEXT("XA") // callback Ac
cess allowed
#define SDDL_CALLBACK_ACCESS_DENIED TEXT("XD") // callback Ac
cess denied
// //
// SDDL Ace flags // SDDL Ace flags
// //
#define SDDL_CONTAINER_INHERIT TEXT("CI") // Container inherit #define SDDL_CONTAINER_INHERIT TEXT("CI") // Container inherit
#define SDDL_OBJECT_INHERIT TEXT("OI") // Object inherit #define SDDL_OBJECT_INHERIT TEXT("OI") // Object inherit
#define SDDL_NO_PROPAGATE TEXT("NP") // Inherit no propagate #define SDDL_NO_PROPAGATE TEXT("NP") // Inherit no propagate
#define SDDL_INHERIT_ONLY TEXT("IO") // Inherit only #define SDDL_INHERIT_ONLY TEXT("IO") // Inherit only
#define SDDL_INHERITED TEXT("ID") // Inherited #define SDDL_INHERITED TEXT("ID") // Inherited
#define SDDL_AUDIT_SUCCESS TEXT("SA") // Audit success #define SDDL_AUDIT_SUCCESS TEXT("SA") // Audit success
skipping to change at line 158 skipping to change at line 160
#define SDDL_LOCAL_SERVICE TEXT("LS") // Local service acc ount (for services) #define SDDL_LOCAL_SERVICE TEXT("LS") // Local service acc ount (for services)
#define SDDL_NETWORK_SERVICE TEXT("NS") // Network service a ccount (for services) #define SDDL_NETWORK_SERVICE TEXT("NS") // Network service a ccount (for services)
#define SDDL_REMOTE_DESKTOP TEXT("RD") // Remote desktop us ers (for terminal server) #define SDDL_REMOTE_DESKTOP TEXT("RD") // Remote desktop us ers (for terminal server)
#define SDDL_NETWORK_CONFIGURATION_OPS TEXT("NO") // Network configura tion operators ( to manage configuration of networking features) #define SDDL_NETWORK_CONFIGURATION_OPS TEXT("NO") // Network configura tion operators ( to manage configuration of networking features)
#define SDDL_PERFMON_USERS TEXT("MU") // Performance Monit or Users #define SDDL_PERFMON_USERS TEXT("MU") // Performance Monit or Users
#define SDDL_PERFLOG_USERS TEXT("LU") // Performance Log U sers #define SDDL_PERFLOG_USERS TEXT("LU") // Performance Log U sers
#define SDDL_IIS_USERS TEXT("IS") // Anonymous Interne t Users #define SDDL_IIS_USERS TEXT("IS") // Anonymous Interne t Users
#define SDDL_CRYPTO_OPERATORS TEXT("CY") // Crypto Operators #define SDDL_CRYPTO_OPERATORS TEXT("CY") // Crypto Operators
#define SDDL_OWNER_RIGHTS TEXT("OW") // Owner Rights SID #define SDDL_OWNER_RIGHTS TEXT("OW") // Owner Rights SID
#define SDDL_EVENT_LOG_READERS TEXT("ER") // Event log readers #define SDDL_EVENT_LOG_READERS TEXT("ER") // Event log readers
#define SDDL_ENTERPRISE_RO_DCs TEXT("RO") // Enterprise Read-o
nly domain controllers
#define SDDL_CERTSVC_DCOM_ACCESS TEXT("CD") // Users who can con
nect to certification authorities using DCOM
// //
// Integrity Labels // Integrity Labels
// //
#define SDDL_ML_LOW TEXT("LW") // Low mandatory lev el #define SDDL_ML_LOW TEXT("LW") // Low mandatory lev el
#define SDDL_ML_MEDIUM TEXT("ME") // Medium mandatory level #define SDDL_ML_MEDIUM TEXT("ME") // Medium mandatory level
#define SDDL_ML_MEDIUM_PLUS TEXT("MP") // Medium Plus manda tory level
#define SDDL_ML_HIGH TEXT("HI") // High mandatory le vel #define SDDL_ML_HIGH TEXT("HI") // High mandatory le vel
#define SDDL_ML_SYSTEM TEXT("SI") // System mandatory level #define SDDL_ML_SYSTEM TEXT("SI") // System mandatory level
// //
// SDDL Seperators - character version // SDDL Seperators - character version
// //
#define SDDL_SEPERATORC TEXT(';') #define SDDL_SEPERATORC TEXT(';')
#define SDDL_DELIMINATORC TEXT(':') #define SDDL_DELIMINATORC TEXT(':')
#define SDDL_ACE_BEGINC TEXT('(') #define SDDL_ACE_BEGINC TEXT('(')
#define SDDL_ACE_ENDC TEXT(')') #define SDDL_ACE_ENDC TEXT(')')
#define SDDL_SPACEC TEXT(' ')
#define SDDL_ACE_COND_BEGINC TEXT('(')
#define SDDL_ACE_COND_ENDC TEXT(')')
#define SDDL_ACE_COND_STRING_BEGINC TEXT('"')
#define SDDL_ACE_COND_STRING_ENDC TEXT('"')
#define SDDL_ACE_COND_COMPOSITEVALUE_BEGINC TEXT('{')
#define SDDL_ACE_COND_COMPOSITEVALUE_ENDC TEXT('}')
#define SDDL_ACE_COND_COMPOSITEVALUE_SEPERATORC TEXT(',')
#define SDDL_ACE_COND_BLOB_PREFIXC TEXT('#')
#define SDDL_ACE_COND_SID_BEGINC TEXT('(')
#define SDDL_ACE_COND_SID_ENDC TEXT(')')
// //
// SDDL Seperators - string version // SDDL Seperators - string version
// //
#define SDDL_SEPERATOR TEXT(";") #define SDDL_SEPERATOR TEXT(";")
#define SDDL_DELIMINATOR TEXT(":") #define SDDL_DELIMINATOR TEXT(":")
#define SDDL_ACE_BEGIN TEXT("(") #define SDDL_ACE_BEGIN TEXT("(")
#define SDDL_ACE_END TEXT(")") #define SDDL_ACE_END TEXT(")")
#define SDDL_ACE_COND_BEGIN TEXT("(")
#define SDDL_ACE_COND_END TEXT(")")
#define SDDL_SPACE TEXT(" ")
#define SDDL_ACE_COND_BLOB_PREFIX TEXT("#")
#define SDDL_ACE_COND_SID_PREFIX TEXT("SID")
#if !defined(_NTDDK_) #if !defined(_NTDDK_)
#if(_WIN32_WINNT >= 0x0500) #if(_WIN32_WINNT >= 0x0500)
BOOL BOOL
WINAPI WINAPI
ConvertSidToStringSidA( ConvertSidToStringSidA(
IN PSID Sid, __in PSID Sid,
__out_ecount(1) LPSTR *StringSid __deref_out LPSTR *StringSid
); );
BOOL BOOL
WINAPI WINAPI
ConvertSidToStringSidW( ConvertSidToStringSidW(
IN PSID Sid, __in PSID Sid,
__out_ecount(1) LPWSTR *StringSid __deref_out LPWSTR *StringSid
); );
#ifdef UNICODE #ifdef UNICODE
#define ConvertSidToStringSid ConvertSidToStringSidW #define ConvertSidToStringSid ConvertSidToStringSidW
#else #else
#define ConvertSidToStringSid ConvertSidToStringSidA #define ConvertSidToStringSid ConvertSidToStringSidA
#endif // !UNICODE #endif // !UNICODE
BOOL BOOL
WINAPI WINAPI
ConvertStringSidToSidA( ConvertStringSidToSidA(
IN LPCSTR StringSid, __in LPCSTR StringSid,
OUT PSID *Sid __deref_out PSID *Sid
); );
BOOL BOOL
WINAPI WINAPI
ConvertStringSidToSidW( ConvertStringSidToSidW(
IN LPCWSTR StringSid, __in LPCWSTR StringSid,
OUT PSID *Sid __deref_out PSID *Sid
); );
#ifdef UNICODE #ifdef UNICODE
#define ConvertStringSidToSid ConvertStringSidToSidW #define ConvertStringSidToSid ConvertStringSidToSidW
#else #else
#define ConvertStringSidToSid ConvertStringSidToSidA #define ConvertStringSidToSid ConvertStringSidToSidA
#endif // !UNICODE #endif // !UNICODE
BOOL BOOL
WINAPI WINAPI
ConvertStringSecurityDescriptorToSecurityDescriptorA( ConvertStringSecurityDescriptorToSecurityDescriptorA(
IN LPCSTR StringSecurityDescriptor, __in LPCSTR StringSecurityDescriptor,
IN DWORD StringSDRevision, __in DWORD StringSDRevision,
OUT PSECURITY_DESCRIPTOR *SecurityDescriptor, __deref_out PSECURITY_DESCRIPTOR *SecurityDescriptor,
OUT PULONG SecurityDescriptorSize OPTIONAL __out_opt PULONG SecurityDescriptorSize
); );
BOOL BOOL
WINAPI WINAPI
ConvertStringSecurityDescriptorToSecurityDescriptorW( ConvertStringSecurityDescriptorToSecurityDescriptorW(
IN LPCWSTR StringSecurityDescriptor, __in LPCWSTR StringSecurityDescriptor,
IN DWORD StringSDRevision, __in DWORD StringSDRevision,
OUT PSECURITY_DESCRIPTOR *SecurityDescriptor, __deref_out PSECURITY_DESCRIPTOR *SecurityDescriptor,
OUT PULONG SecurityDescriptorSize OPTIONAL __out_opt PULONG SecurityDescriptorSize
); );
#ifdef UNICODE #ifdef UNICODE
#define ConvertStringSecurityDescriptorToSecurityDescriptor ConvertStringSecuri tyDescriptorToSecurityDescriptorW #define ConvertStringSecurityDescriptorToSecurityDescriptor ConvertStringSecuri tyDescriptorToSecurityDescriptorW
#else #else
#define ConvertStringSecurityDescriptorToSecurityDescriptor ConvertStringSecuri tyDescriptorToSecurityDescriptorA #define ConvertStringSecurityDescriptorToSecurityDescriptor ConvertStringSecuri tyDescriptorToSecurityDescriptorA
#endif // !UNICODE #endif // !UNICODE
BOOL BOOL
WINAPI WINAPI
ConvertSecurityDescriptorToStringSecurityDescriptorA( ConvertSecurityDescriptorToStringSecurityDescriptorA(
IN PSECURITY_DESCRIPTOR SecurityDescriptor, __in PSECURITY_DESCRIPTOR SecurityDescriptor,
IN DWORD RequestedStringSDRevision, __in DWORD RequestedStringSDRevision,
IN SECURITY_INFORMATION SecurityInformation, __in SECURITY_INFORMATION SecurityInformation,
__out_ecount(1) LPSTR *StringSecurityDescriptor, __deref_out LPSTR *StringSecurityDescriptor,
OUT PULONG StringSecurityDescriptorLen OPTIONAL __out_opt PULONG StringSecurityDescriptorLen
); );
BOOL BOOL
WINAPI WINAPI
ConvertSecurityDescriptorToStringSecurityDescriptorW( ConvertSecurityDescriptorToStringSecurityDescriptorW(
IN PSECURITY_DESCRIPTOR SecurityDescriptor, __in PSECURITY_DESCRIPTOR SecurityDescriptor,
IN DWORD RequestedStringSDRevision, __in DWORD RequestedStringSDRevision,
IN SECURITY_INFORMATION SecurityInformation, __in SECURITY_INFORMATION SecurityInformation,
__out_ecount(1) LPWSTR *StringSecurityDescriptor, __deref_out LPWSTR *StringSecurityDescriptor,
OUT PULONG StringSecurityDescriptorLen OPTIONAL __out_opt PULONG StringSecurityDescriptorLen
); );
#ifdef UNICODE #ifdef UNICODE
#define ConvertSecurityDescriptorToStringSecurityDescriptor ConvertSecurityDesc riptorToStringSecurityDescriptorW #define ConvertSecurityDescriptorToStringSecurityDescriptor ConvertSecurityDesc riptorToStringSecurityDescriptorW
#else #else
#define ConvertSecurityDescriptorToStringSecurityDescriptor ConvertSecurityDesc riptorToStringSecurityDescriptorA #define ConvertSecurityDescriptorToStringSecurityDescriptor ConvertSecurityDesc riptorToStringSecurityDescriptorA
#endif // !UNICODE #endif // !UNICODE
#endif /* _WIN32_WINNT >= 0x0500 */ #endif /* _WIN32_WINNT >= 0x0500 */
#endif /* !defined(_NTDDK_) */ #endif /* !defined(_NTDDK_) */
 End of changes. 13 change blocks. 
27 lines changed or deleted 51 lines changed or added


 wct.h (6.0.6002.18005-Windows 6.0)   wct.h (6.1.7601.23418-Windows 7.0) 
skipping to change at line 39 skipping to change at line 39
WctCriticalSectionType = 1, WctCriticalSectionType = 1,
WctSendMessageType, WctSendMessageType,
WctMutexType, WctMutexType,
WctAlpcType, WctAlpcType,
WctComType, WctComType,
WctThreadWaitType, WctThreadWaitType,
WctProcessWaitType, WctProcessWaitType,
WctThreadType, WctThreadType,
WctComActivationType, WctComActivationType,
WctUnknownType, WctUnknownType,
WctSocketIoType,
WctSmbIoType,
WctMaxType WctMaxType
} WCT_OBJECT_TYPE; } WCT_OBJECT_TYPE;
typedef enum _WCT_OBJECT_STATUS typedef enum _WCT_OBJECT_STATUS
{ {
WctStatusNoAccess = 1, // ACCESS_DENIED for this object WctStatusNoAccess = 1, // ACCESS_DENIED for this object
WctStatusRunning, // Thread status WctStatusRunning, // Thread status
WctStatusBlocked, // Thread status WctStatusBlocked, // Thread status
WctStatusPidOnly, // Thread status WctStatusPidOnly, // Thread status
WctStatusPidOnlyRpcss, // Thread status WctStatusPidOnlyRpcss, // Thread status
skipping to change at line 115 skipping to change at line 117
WINADVAPI WINADVAPI
VOID WINAPI VOID WINAPI
CloseThreadWaitChainSession ( CloseThreadWaitChainSession (
__in HWCT WctHandle __in HWCT WctHandle
); );
#define WCT_OUT_OF_PROC_FLAG 0x1 #define WCT_OUT_OF_PROC_FLAG 0x1
#define WCT_OUT_OF_PROC_COM_FLAG 0x2 #define WCT_OUT_OF_PROC_COM_FLAG 0x2
#define WCT_OUT_OF_PROC_CS_FLAG 0x4 #define WCT_OUT_OF_PROC_CS_FLAG 0x4
#define WCT_NETWORK_IO_FLAG 0x8
#define WCTP_GETINFO_ALL_FLAGS (WCT_OUT_OF_PROC_FLAG|WCT_OUT_OF_PROC_COM_FLAG|WC T_OUT_OF_PROC_CS_FLAG) #define WCTP_GETINFO_ALL_FLAGS (WCT_OUT_OF_PROC_FLAG|WCT_OUT_OF_PROC_COM_FLAG|WC T_OUT_OF_PROC_CS_FLAG)
__checkReturn __checkReturn
WINADVAPI WINADVAPI
BOOL WINAPI BOOL WINAPI
GetThreadWaitChain ( GetThreadWaitChain (
__in HWCT WctHandle, __in HWCT WctHandle,
__in_opt DWORD_PTR Context, __in_opt DWORD_PTR Context,
__in DWORD Flags, __in DWORD Flags,
__in DWORD ThreadId, __in DWORD ThreadId,
 End of changes. 2 change blocks. 
0 lines changed or deleted 3 lines changed or added


 winbase.h (6.0.6002.18005-Windows 6.0)   winbase.h (6.1.7601.23418-Windows 7.0) 
skipping to change at line 164 skipping to change at line 164
#define COPY_FILE_RESTARTABLE 0x00000002 #define COPY_FILE_RESTARTABLE 0x00000002
#define COPY_FILE_OPEN_SOURCE_FOR_WRITE 0x00000004 #define COPY_FILE_OPEN_SOURCE_FOR_WRITE 0x00000004
#define COPY_FILE_ALLOW_DECRYPTED_DESTINATION 0x00000008 #define COPY_FILE_ALLOW_DECRYPTED_DESTINATION 0x00000008
// //
// Gap for private copyfile flags // Gap for private copyfile flags
// //
#if (_WIN32_WINNT >= 0x0600) #if (_WIN32_WINNT >= 0x0600)
#define COPY_FILE_COPY_SYMLINK 0x00000800 #define COPY_FILE_COPY_SYMLINK 0x00000800
#define COPY_FILE_NO_BUFFERING 0x00001000
#endif #endif
#endif /* _WIN32_WINNT >= 0x0400 */ #endif /* _WIN32_WINNT >= 0x0400 */
#if (_WIN32_WINNT >= 0x0500) #if (_WIN32_WINNT >= 0x0500)
// //
// Define ReplaceFile option flags // Define ReplaceFile option flags
// //
#define REPLACEFILE_WRITE_THROUGH 0x00000001 #define REPLACEFILE_WRITE_THROUGH 0x00000001
#define REPLACEFILE_IGNORE_MERGE_ERRORS 0x00000002 #define REPLACEFILE_IGNORE_MERGE_ERRORS 0x00000002
#if (_WIN32_WINNT >= 0x0600)
#define REPLACEFILE_IGNORE_ACL_ERRORS 0x00000004
#endif
#endif // #if (_WIN32_WINNT >= 0x0500) #endif // #if (_WIN32_WINNT >= 0x0500)
// //
// Define the NamedPipe definitions // Define the NamedPipe definitions
// //
// //
// Define the dwOpenMode values for CreateNamedPipe // Define the dwOpenMode values for CreateNamedPipe
// //
skipping to change at line 242 skipping to change at line 247
// File structures // File structures
// //
typedef struct _OVERLAPPED { typedef struct _OVERLAPPED {
ULONG_PTR Internal; ULONG_PTR Internal;
ULONG_PTR InternalHigh; ULONG_PTR InternalHigh;
union { union {
struct { struct {
DWORD Offset; DWORD Offset;
DWORD OffsetHigh; DWORD OffsetHigh;
}; } DUMMYSTRUCTNAME;
PVOID Pointer; PVOID Pointer;
}; } DUMMYUNIONNAME;
HANDLE hEvent; HANDLE hEvent;
} OVERLAPPED, *LPOVERLAPPED; } OVERLAPPED, *LPOVERLAPPED;
typedef struct _OVERLAPPED_ENTRY { typedef struct _OVERLAPPED_ENTRY {
ULONG_PTR lpCompletionKey; ULONG_PTR lpCompletionKey;
LPOVERLAPPED lpOverlapped; LPOVERLAPPED lpOverlapped;
ULONG_PTR Internal; ULONG_PTR Internal;
DWORD dwNumberOfBytesTransferred; DWORD dwNumberOfBytesTransferred;
} OVERLAPPED_ENTRY, *LPOVERLAPPED_ENTRY; } OVERLAPPED_ENTRY, *LPOVERLAPPED_ENTRY;
skipping to change at line 344 skipping to change at line 348
#define INIT_ONCE_ASYNC RTL_RUN_ONCE_ASYNC #define INIT_ONCE_ASYNC RTL_RUN_ONCE_ASYNC
#define INIT_ONCE_INIT_FAILED RTL_RUN_ONCE_INIT_FAILED #define INIT_ONCE_INIT_FAILED RTL_RUN_ONCE_INIT_FAILED
// //
// The context stored in the run once structure must leave the following number // The context stored in the run once structure must leave the following number
// of low order bits unused. // of low order bits unused.
// //
#define INIT_ONCE_CTX_RESERVED_BITS RTL_RUN_ONCE_CTX_RESERVED_BITS #define INIT_ONCE_CTX_RESERVED_BITS RTL_RUN_ONCE_CTX_RESERVED_BITS
//
// FailFast Exception Flags
//
#define FAIL_FAST_GENERATE_EXCEPTION_ADDRESS 0x1
#define FAIL_FAST_NO_HARD_ERROR_DLG 0x2
typedef typedef
BOOL BOOL
(WINAPI *PINIT_ONCE_FN) ( (WINAPI *PINIT_ONCE_FN) (
__inout PINIT_ONCE InitOnce, __inout PINIT_ONCE InitOnce,
__inout_opt PVOID Parameter, __inout_opt PVOID Parameter,
__deref_opt_out_opt PVOID *Context __deref_opt_out_opt PVOID *Context
); );
WINBASEAPI WINBASEAPI
VOID VOID
skipping to change at line 433 skipping to change at line 444
__inout PSRWLOCK SRWLock __inout PSRWLOCK SRWLock
); );
WINBASEAPI WINBASEAPI
VOID VOID
WINAPI WINAPI
AcquireSRWLockShared ( AcquireSRWLockShared (
__inout PSRWLOCK SRWLock __inout PSRWLOCK SRWLock
); );
WINBASEAPI
BOOLEAN
WINAPI
TryAcquireSRWLockExclusive (
__inout PSRWLOCK SRWLock
);
WINBASEAPI
BOOLEAN
WINAPI
TryAcquireSRWLockShared (
__inout PSRWLOCK SRWLock
);
// //
// Define condition variable // Define condition variable
// //
typedef RTL_CONDITION_VARIABLE CONDITION_VARIABLE, *PCONDITION_VARIABLE; typedef RTL_CONDITION_VARIABLE CONDITION_VARIABLE, *PCONDITION_VARIABLE;
WINBASEAPI WINBASEAPI
VOID VOID
WINAPI WINAPI
InitializeConditionVariable ( InitializeConditionVariable (
skipping to change at line 744 skipping to change at line 769
DWORD dwProviderSize; /* size of the provider-specific data field */ DWORD dwProviderSize; /* size of the provider-specific data field */
WCHAR wcProviderData[1]; /* provider-specific data */ WCHAR wcProviderData[1]; /* provider-specific data */
} COMMCONFIG,*LPCOMMCONFIG; } COMMCONFIG,*LPCOMMCONFIG;
typedef struct _SYSTEM_INFO { typedef struct _SYSTEM_INFO {
union { union {
DWORD dwOemId; // Obsolete field...do not use DWORD dwOemId; // Obsolete field...do not use
struct { struct {
WORD wProcessorArchitecture; WORD wProcessorArchitecture;
WORD wReserved; WORD wReserved;
}; } DUMMYSTRUCTNAME;
}; } DUMMYUNIONNAME;
DWORD dwPageSize; DWORD dwPageSize;
LPVOID lpMinimumApplicationAddress; LPVOID lpMinimumApplicationAddress;
LPVOID lpMaximumApplicationAddress; LPVOID lpMaximumApplicationAddress;
DWORD_PTR dwActiveProcessorMask; DWORD_PTR dwActiveProcessorMask;
DWORD dwNumberOfProcessors; DWORD dwNumberOfProcessors;
DWORD dwProcessorType; DWORD dwProcessorType;
DWORD dwAllocationGranularity; DWORD dwAllocationGranularity;
WORD wProcessorLevel; WORD wProcessorLevel;
WORD wProcessorRevision; WORD wProcessorRevision;
} SYSTEM_INFO, *LPSYSTEM_INFO; } SYSTEM_INFO, *LPSYSTEM_INFO;
skipping to change at line 831 skipping to change at line 856
/* Flags returned by LocalFlags (in addition to LMEM_DISCARDABLE) */ /* Flags returned by LocalFlags (in addition to LMEM_DISCARDABLE) */
#define LMEM_DISCARDED 0x4000 #define LMEM_DISCARDED 0x4000
#define LMEM_LOCKCOUNT 0x00FF #define LMEM_LOCKCOUNT 0x00FF
// //
// NUMA values // NUMA values
// //
#define NUMA_NO_PREFERRED_NODE ((DWORD) -1) #define NUMA_NO_PREFERRED_NODE ((DWORD) -1)
// //
// dwCreationFlag values // Process dwCreationFlag values
// //
#define DEBUG_PROCESS 0x00000001 #define DEBUG_PROCESS 0x00000001
#define DEBUG_ONLY_THIS_PROCESS 0x00000002 #define DEBUG_ONLY_THIS_PROCESS 0x00000002
#define CREATE_SUSPENDED 0x00000004 #define CREATE_SUSPENDED 0x00000004
#define DETACHED_PROCESS 0x00000008 #define DETACHED_PROCESS 0x00000008
#define CREATE_NEW_CONSOLE 0x00000010 #define CREATE_NEW_CONSOLE 0x00000010
#define NORMAL_PRIORITY_CLASS 0x00000020 #define NORMAL_PRIORITY_CLASS 0x00000020
#define IDLE_PRIORITY_CLASS 0x00000040 #define IDLE_PRIORITY_CLASS 0x00000040
#define HIGH_PRIORITY_CLASS 0x00000080 #define HIGH_PRIORITY_CLASS 0x00000080
#define REALTIME_PRIORITY_CLASS 0x00000100
#define REALTIME_PRIORITY_CLASS 0x00000100
#define CREATE_NEW_PROCESS_GROUP 0x00000200 #define CREATE_NEW_PROCESS_GROUP 0x00000200
#define CREATE_UNICODE_ENVIRONMENT 0x00000400 #define CREATE_UNICODE_ENVIRONMENT 0x00000400
#define CREATE_SEPARATE_WOW_VDM 0x00000800 #define CREATE_SEPARATE_WOW_VDM 0x00000800
#define CREATE_SHARED_WOW_VDM 0x00001000 #define CREATE_SHARED_WOW_VDM 0x00001000
#define CREATE_FORCEDOS 0x00002000 #define CREATE_FORCEDOS 0x00002000
#define BELOW_NORMAL_PRIORITY_CLASS 0x00004000 #define BELOW_NORMAL_PRIORITY_CLASS 0x00004000
#define ABOVE_NORMAL_PRIORITY_CLASS 0x00008000 #define ABOVE_NORMAL_PRIORITY_CLASS 0x00008000
#define STACK_SIZE_PARAM_IS_A_RESERVATION 0x00010000 #define INHERIT_PARENT_AFFINITY 0x00010000
#define INHERIT_CALLER_PRIORITY 0x00020000 #define INHERIT_CALLER_PRIORITY 0x00020000 // Deprecated
#define CREATE_PROTECTED_PROCESS 0x00040000 #define CREATE_PROTECTED_PROCESS 0x00040000
#define EXTENDED_STARTUPINFO_PRESENT 0x00080000 #define EXTENDED_STARTUPINFO_PRESENT 0x00080000
#define PROCESS_MODE_BACKGROUND_BEGIN 0x00100000 #define PROCESS_MODE_BACKGROUND_BEGIN 0x00100000
#define PROCESS_MODE_BACKGROUND_END 0x00200000 #define PROCESS_MODE_BACKGROUND_END 0x00200000
#define CREATE_BREAKAWAY_FROM_JOB 0x01000000 #define CREATE_BREAKAWAY_FROM_JOB 0x01000000
#define CREATE_PRESERVE_CODE_AUTHZ_LEVEL 0x02000000 #define CREATE_PRESERVE_CODE_AUTHZ_LEVEL 0x02000000
#define CREATE_DEFAULT_ERROR_MODE 0x04000000 #define CREATE_DEFAULT_ERROR_MODE 0x04000000
#define CREATE_NO_WINDOW 0x08000000 #define CREATE_NO_WINDOW 0x08000000
#define PROFILE_USER 0x10000000 #define PROFILE_USER 0x10000000
#define PROFILE_KERNEL 0x20000000 #define PROFILE_KERNEL 0x20000000
#define PROFILE_SERVER 0x40000000 #define PROFILE_SERVER 0x40000000
#define CREATE_IGNORE_SYSTEM_DEFAULT 0x80000000 #define CREATE_IGNORE_SYSTEM_DEFAULT 0x80000000
//
// Thread dwCreationFlag values
//
//#define CREATE_SUSPENDED 0x00000004
#define STACK_SIZE_PARAM_IS_A_RESERVATION 0x00010000 // Threads only
//
// Priority flags
//
#define THREAD_PRIORITY_LOWEST THREAD_BASE_PRIORITY_MIN #define THREAD_PRIORITY_LOWEST THREAD_BASE_PRIORITY_MIN
#define THREAD_PRIORITY_BELOW_NORMAL (THREAD_PRIORITY_LOWEST+1) #define THREAD_PRIORITY_BELOW_NORMAL (THREAD_PRIORITY_LOWEST+1)
#define THREAD_PRIORITY_NORMAL 0 #define THREAD_PRIORITY_NORMAL 0
#define THREAD_PRIORITY_HIGHEST THREAD_BASE_PRIORITY_MAX #define THREAD_PRIORITY_HIGHEST THREAD_BASE_PRIORITY_MAX
#define THREAD_PRIORITY_ABOVE_NORMAL (THREAD_PRIORITY_HIGHEST-1) #define THREAD_PRIORITY_ABOVE_NORMAL (THREAD_PRIORITY_HIGHEST-1)
#define THREAD_PRIORITY_ERROR_RETURN (MAXLONG) #define THREAD_PRIORITY_ERROR_RETURN (MAXLONG)
#define THREAD_PRIORITY_TIME_CRITICAL THREAD_BASE_PRIORITY_LOWRT #define THREAD_PRIORITY_TIME_CRITICAL THREAD_BASE_PRIORITY_LOWRT
#define THREAD_PRIORITY_IDLE THREAD_BASE_PRIORITY_IDLE #define THREAD_PRIORITY_IDLE THREAD_BASE_PRIORITY_IDLE
skipping to change at line 2548 skipping to change at line 2576
__clrcall __clrcall
#else #else
WINAPI WINAPI
#endif #endif
#else #else
CALLBACK CALLBACK
#endif #endif
WinMain ( WinMain (
__in HINSTANCE hInstance, __in HINSTANCE hInstance,
__in_opt HINSTANCE hPrevInstance, __in_opt HINSTANCE hPrevInstance,
__in_opt LPSTR lpCmdLine, __in LPSTR lpCmdLine,
__in int nShowCmd __in int nShowCmd
); );
int int
#if defined(_M_CEE_PURE) #if defined(_M_CEE_PURE)
__clrcall __clrcall
#else #else
WINAPI WINAPI
#endif #endif
wWinMain( wWinMain(
__in HINSTANCE hInstance, __in HINSTANCE hInstance,
__in_opt HINSTANCE hPrevInstance, __in_opt HINSTANCE hPrevInstance,
__in_opt LPWSTR lpCmdLine, __in LPWSTR lpCmdLine,
__in int nShowCmd __in int nShowCmd
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
FreeLibrary ( FreeLibrary (
__in HMODULE hLibModule __in HMODULE hLibModule
); );
skipping to change at line 2730 skipping to change at line 2758
} MEMORYSTATUSEX, *LPMEMORYSTATUSEX; } MEMORYSTATUSEX, *LPMEMORYSTATUSEX;
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GlobalMemoryStatusEx( GlobalMemoryStatusEx(
__out LPMEMORYSTATUSEX lpBuffer __out LPMEMORYSTATUSEX lpBuffer
); );
WINBASEAPI WINBASEAPI
__out_bcount_opt( "(uFlags&LMEM_FIXED) ? uBytes : 0" ) __out_bcount_opt( (uFlags&LMEM_FIXED) ? uBytes : 0 )
HLOCAL HLOCAL
WINAPI WINAPI
LocalAlloc( LocalAlloc(
__in UINT uFlags, __in UINT uFlags,
__in SIZE_T uBytes __in SIZE_T uBytes
); );
WINBASEAPI WINBASEAPI
__out_opt __out_opt
HLOCAL HLOCAL
skipping to change at line 2851 skipping to change at line 2879
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
QueryIdleProcessorCycleTime ( QueryIdleProcessorCycleTime (
__inout PULONG BufferLength, __inout PULONG BufferLength,
__out_bcount_opt(*BufferLength) PULONG64 ProcessorIdleCycleTime __out_bcount_opt(*BufferLength) PULONG64 ProcessorIdleCycleTime
); );
#endif #endif
#if (_WIN32_WINNT >= 0x0601)
WINBASEAPI
BOOL
WINAPI
QueryIdleProcessorCycleTimeEx (
__in USHORT Group,
__inout PULONG BufferLength,
__out_bcount_opt(*BufferLength) PULONG64 ProcessorIdleCycleTime
);
WINBASEAPI
BOOL
WINAPI
QueryUnbiasedInterruptTime (
__out PULONGLONG UnbiasedTime
);
WINBASEAPI
BOOL
WINAPI
GetProcessorSystemCycleTime (
__in USHORT Group,
__out_bcount_part_opt(*ReturnedLength, *ReturnedLength) PSYSTEM_PROCESSOR_CY
CLE_TIME_INFORMATION Buffer,
__inout PDWORD ReturnedLength
);
#endif // (_WIN32_WINNT >= 0x0601)
WINBASEAPI WINBASEAPI
__bcount_opt(dwSize) __bcount_opt(dwSize)
LPVOID LPVOID
WINAPI WINAPI
VirtualAlloc( VirtualAlloc(
__in_opt LPVOID lpAddress, __in_opt LPVOID lpAddress,
__in SIZE_T dwSize, __in SIZE_T dwSize,
__in DWORD flAllocationType, __in DWORD flAllocationType,
__in DWORD flProtect __in DWORD flProtect
); );
__drv_when(((dwFreeType&(MEM_RELEASE|MEM_DECOMMIT)))==(MEM_RELEASE|MEM_DECOMMIT)
,
__drv_reportError("Passing both MEM_RELEASE and MEM_DECOMMIT to VirtualFree
is not allowed. This results in the failure of this call"))
__drv_when(dwFreeType==0,
__drv_reportError("Passing zero as the dwFreeType parameter to VirtualFree i
s not allowed. This results in the failure of this call"))
__drv_when(((dwFreeType&MEM_RELEASE))!=0 && dwSize!=0,
__drv_reportError("Passing MEM_RELEASE and a non-zero dwSize parameter to Vi
rtualFree is not allowed. This results in the failure of this call"))
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
VirtualFree( VirtualFree(
__in LPVOID lpAddress, __in LPVOID lpAddress,
__in SIZE_T dwSize, __in SIZE_T dwSize,
__in DWORD dwFreeType __in DWORD dwFreeType
); );
WINBASEAPI WINBASEAPI
skipping to change at line 2968 skipping to change at line 3033
GetSystemFirmwareTable( GetSystemFirmwareTable(
__in DWORD FirmwareTableProviderSignature, __in DWORD FirmwareTableProviderSignature,
__in DWORD FirmwareTableID, __in DWORD FirmwareTableID,
__out_bcount_part_opt(BufferSize, return) PVOID pFirmwareTableBuffer, __out_bcount_part_opt(BufferSize, return) PVOID pFirmwareTableBuffer,
__in DWORD BufferSize __in DWORD BufferSize
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetPhysicallyInstalledSystemMemory(
__out PULONGLONG TotalMemoryInKilobytes
);
__drv_when(((dwFreeType&(MEM_RELEASE|MEM_DECOMMIT)))==(MEM_RELEASE|MEM_DECOMMIT)
,
__drv_reportError("Passing both MEM_RELEASE and MEM_DECOMMIT to VirtualFree
is not allowed. This results in the failure of this call"))
__drv_when(dwFreeType==0,
__drv_reportError("Passing zero as the dwFreeType parameter to VirtualFree i
s not allowed. This results in the failure of this call"))
__drv_when(((dwFreeType&MEM_RELEASE))!=0 && dwSize!=0,
__drv_reportError("Passing MEM_RELEASE and a non-zero dwSize parameter to Vi
rtualFree is not allowed. This results in the failure of this call"))
__drv_when(((dwFreeType&MEM_DECOMMIT))!=0,
__drv_reportError("Calling VirtualFreeEx without the MEM_RELEASE flag frees
memory but not address descriptors (VADs); results in address space leaks"))
WINBASEAPI
BOOL
WINAPI
VirtualFreeEx( VirtualFreeEx(
__in HANDLE hProcess, __in HANDLE hProcess,
__in LPVOID lpAddress, __in LPVOID lpAddress,
__in SIZE_T dwSize, __in SIZE_T dwSize,
__in DWORD dwFreeType __in DWORD dwFreeType
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
skipping to change at line 3040 skipping to change at line 3123
__deref LPVOID lpMem, __deref LPVOID lpMem,
__in SIZE_T dwBytes __in SIZE_T dwBytes
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
HeapFree( HeapFree(
__inout HANDLE hHeap, __inout HANDLE hHeap,
__in DWORD dwFlags, __in DWORD dwFlags,
__deref LPVOID lpMem __drv_freesMem(Mem) __post __notvalid __deref LPVOID lpMem
); );
WINBASEAPI WINBASEAPI
SIZE_T SIZE_T
WINAPI WINAPI
HeapSize( HeapSize(
__in HANDLE hHeap, __in HANDLE hHeap,
__in DWORD dwFlags, __in DWORD dwFlags,
__in LPCVOID lpMem __in LPCVOID lpMem
); );
skipping to change at line 3100 skipping to change at line 3183
struct { struct {
HANDLE hMem; HANDLE hMem;
DWORD dwReserved[ 3 ]; DWORD dwReserved[ 3 ];
} Block; } Block;
struct { struct {
DWORD dwCommittedSize; DWORD dwCommittedSize;
DWORD dwUnCommittedSize; DWORD dwUnCommittedSize;
LPVOID lpFirstBlock; LPVOID lpFirstBlock;
LPVOID lpLastBlock; LPVOID lpLastBlock;
} Region; } Region;
}; } DUMMYUNIONNAME;
} PROCESS_HEAP_ENTRY, *LPPROCESS_HEAP_ENTRY, *PPROCESS_HEAP_ENTRY; } PROCESS_HEAP_ENTRY, *LPPROCESS_HEAP_ENTRY, *PPROCESS_HEAP_ENTRY;
#define PROCESS_HEAP_REGION 0x0001 #define PROCESS_HEAP_REGION 0x0001
#define PROCESS_HEAP_UNCOMMITTED_RANGE 0x0002 #define PROCESS_HEAP_UNCOMMITTED_RANGE 0x0002
#define PROCESS_HEAP_ENTRY_BUSY 0x0004 #define PROCESS_HEAP_ENTRY_BUSY 0x0004
#define PROCESS_HEAP_ENTRY_MOVEABLE 0x0010 #define PROCESS_HEAP_ENTRY_MOVEABLE 0x0010
#define PROCESS_HEAP_ENTRY_DDESHARE 0x0020 #define PROCESS_HEAP_ENTRY_DDESHARE 0x0020
WINBASEAPI WINBASEAPI
BOOL BOOL
skipping to change at line 3193 skipping to change at line 3276
#define GetBinaryType GetBinaryTypeW #define GetBinaryType GetBinaryTypeW
#else #else
#define GetBinaryType GetBinaryTypeA #define GetBinaryType GetBinaryTypeA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetShortPathNameA( GetShortPathNameA(
__in LPCSTR lpszLongPath, __in LPCSTR lpszLongPath,
__out_ecount_part(cchBuffer, return + 1) LPSTR lpszShortPath, __out_ecount_part_opt(cchBuffer, return + 1) LPSTR lpszShortPath,
__in DWORD cchBuffer __in DWORD cchBuffer
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetShortPathNameW( GetShortPathNameW(
__in LPCWSTR lpszLongPath, __in LPCWSTR lpszLongPath,
__out_ecount_part(cchBuffer, return + 1) LPWSTR lpszShortPath, __out_ecount_part_opt(cchBuffer, return + 1) LPWSTR lpszShortPath,
__in DWORD cchBuffer __in DWORD cchBuffer
); );
#ifdef UNICODE #ifdef UNICODE
#define GetShortPathName GetShortPathNameW #define GetShortPathName GetShortPathNameW
#else #else
#define GetShortPathName GetShortPathNameA #define GetShortPathName GetShortPathNameA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetLongPathNameA( GetLongPathNameA(
__in LPCSTR lpszShortPath, __in LPCSTR lpszShortPath,
__out_ecount_part(cchBuffer, return + 1) LPSTR lpszLongPath, __out_ecount_part_opt(cchBuffer, return + 1) LPSTR lpszLongPath,
__in DWORD cchBuffer __in DWORD cchBuffer
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetLongPathNameW( GetLongPathNameW(
__in LPCWSTR lpszShortPath, __in LPCWSTR lpszShortPath,
__out_ecount_part(cchBuffer, return + 1) LPWSTR lpszLongPath, __out_ecount_part_opt(cchBuffer, return + 1) LPWSTR lpszLongPath,
__in DWORD cchBuffer __in DWORD cchBuffer
); );
#ifdef UNICODE #ifdef UNICODE
#define GetLongPathName GetLongPathNameW #define GetLongPathName GetLongPathNameW
#else #else
#define GetLongPathName GetLongPathNameA #define GetLongPathName GetLongPathNameA
#endif // !UNICODE #endif // !UNICODE
#if _WIN32_WINNT >= 0x0600 #if _WIN32_WINNT >= 0x0600
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetLongPathNameTransactedA( GetLongPathNameTransactedA(
__in LPCSTR lpszShortPath, __in LPCSTR lpszShortPath,
__out_ecount_part(cchBuffer, return + 1) LPSTR lpszLongPath, __out_ecount_part_opt(cchBuffer, return + 1) LPSTR lpszLongPath,
__in DWORD cchBuffer, __in DWORD cchBuffer,
__in HANDLE hTransaction __in HANDLE hTransaction
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetLongPathNameTransactedW( GetLongPathNameTransactedW(
__in LPCWSTR lpszShortPath, __in LPCWSTR lpszShortPath,
__out_ecount_part(cchBuffer, return + 1) LPWSTR lpszLongPath, __out_ecount_part_opt(cchBuffer, return + 1) LPWSTR lpszLongPath,
__in DWORD cchBuffer, __in DWORD cchBuffer,
__in HANDLE hTransaction __in HANDLE hTransaction
); );
#ifdef UNICODE #ifdef UNICODE
#define GetLongPathNameTransacted GetLongPathNameTransactedW #define GetLongPathNameTransacted GetLongPathNameTransactedW
#else #else
#define GetLongPathNameTransacted GetLongPathNameTransactedA #define GetLongPathNameTransacted GetLongPathNameTransactedA
#endif // !UNICODE #endif // !UNICODE
#endif // _WIN32_WINNT >= 0x0600 #endif // _WIN32_WINNT >= 0x0600
skipping to change at line 3277 skipping to change at line 3360
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetProcessAffinityMask( SetProcessAffinityMask(
__in HANDLE hProcess, __in HANDLE hProcess,
__in DWORD_PTR dwProcessAffinityMask __in DWORD_PTR dwProcessAffinityMask
); );
#if _WIN32_WINNT >= 0x0601
BOOL
WINAPI
GetProcessGroupAffinity(
__in HANDLE hProcess,
__inout PUSHORT GroupCount,
__out_ecount(*GroupCount) PUSHORT GroupArray
);
#endif // _WIN32_WINNT >= 0x0601
#if _WIN32_WINNT >= 0x0501 #if _WIN32_WINNT >= 0x0501
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetProcessHandleCount( GetProcessHandleCount(
__in HANDLE hProcess, __in HANDLE hProcess,
__out PDWORD pdwHandleCount __out PDWORD pdwHandleCount
); );
skipping to change at line 3346 skipping to change at line 3441
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetProcessWorkingSetSizeEx( SetProcessWorkingSetSizeEx(
__in HANDLE hProcess, __in HANDLE hProcess,
__in SIZE_T dwMinimumWorkingSetSize, __in SIZE_T dwMinimumWorkingSetSize,
__in SIZE_T dwMaximumWorkingSetSize, __in SIZE_T dwMaximumWorkingSetSize,
__in DWORD Flags __in DWORD Flags
); );
#if (_WIN32_WINNT >= 0x0600)
#define PROCESS_AFFINITY_ENABLE_AUTO_UPDATE 0x00000001UL
WINBASEAPI
BOOL
WINAPI
SetProcessAffinityUpdateMode(
__in HANDLE hProcess,
__in DWORD dwFlags
);
WINBASEAPI
BOOL
WINAPI
QueryProcessAffinityUpdateMode(
__in HANDLE hProcess,
__out_opt LPDWORD lpdwFlags
);
#endif // _WIN32_WINNT >= 0x0600
WINBASEAPI WINBASEAPI
HANDLE HANDLE
WINAPI WINAPI
OpenProcess( OpenProcess(
__in DWORD dwDesiredAccess, __in DWORD dwDesiredAccess,
__in BOOL bInheritHandle, __in BOOL bInheritHandle,
__in DWORD dwProcessId __in DWORD dwProcessId
); );
WINBASEAPI WINBASEAPI
skipping to change at line 3471 skipping to change at line 3588
WINBASEAPI WINBASEAPI
VOID VOID
WINAPI WINAPI
RaiseException( RaiseException(
__in DWORD dwExceptionCode, __in DWORD dwExceptionCode,
__in DWORD dwExceptionFlags, __in DWORD dwExceptionFlags,
__in DWORD nNumberOfArguments, __in DWORD nNumberOfArguments,
__in_ecount_opt(nNumberOfArguments) CONST ULONG_PTR *lpArguments __in_ecount_opt(nNumberOfArguments) CONST ULONG_PTR *lpArguments
); );
WINBASEAPI
VOID
WINAPI
RaiseFailFastException(
__in_opt PEXCEPTION_RECORD pExceptionRecord,
__in PCONTEXT pContextRecord,
__in DWORD dwFlags
);
__callback __callback
WINBASEAPI WINBASEAPI
LONG LONG
WINAPI WINAPI
UnhandledExceptionFilter( UnhandledExceptionFilter(
__in struct _EXCEPTION_POINTERS *ExceptionInfo __in struct _EXCEPTION_POINTERS *ExceptionInfo
); );
typedef LONG (WINAPI *PTOP_LEVEL_EXCEPTION_FILTER)( typedef LONG (WINAPI *PTOP_LEVEL_EXCEPTION_FILTER)(
__in struct _EXCEPTION_POINTERS *ExceptionInfo __in struct _EXCEPTION_POINTERS *ExceptionInfo
); );
typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER; typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER;
WINBASEAPI WINBASEAPI
LPTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER
WINAPI WINAPI
SetUnhandledExceptionFilter( SetUnhandledExceptionFilter(
__in LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter __in_opt LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter
); );
#if(_WIN32_WINNT >= 0x0400) #if(_WIN32_WINNT >= 0x0400)
// //
// Fiber creation flags // Fiber creation flags
// //
#define FIBER_FLAG_FLOAT_SWITCH 0x1 // context switch floating point #define FIBER_FLAG_FLOAT_SWITCH 0x1 // context switch floating point
skipping to change at line 3581 skipping to change at line 3707
__in LPVOID lpFiber __in LPVOID lpFiber
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SwitchToThread( SwitchToThread(
VOID VOID
); );
//
// UMS begin
//
#if (_WIN32_WINNT >= 0x0601) && !defined(MIDL_PASS)
#define UMS_VERSION RTL_UMS_VERSION
typedef void *PUMS_CONTEXT;
typedef void *PUMS_COMPLETION_LIST;
typedef enum _RTL_UMS_THREAD_INFO_CLASS UMS_THREAD_INFO_CLASS, *PUMS_THREAD_INFO
_CLASS;
typedef enum _RTL_UMS_SCHEDULER_REASON UMS_SCHEDULER_REASON;
typedef PRTL_UMS_SCHEDULER_ENTRY_POINT PUMS_SCHEDULER_ENTRY_POINT;
typedef struct _UMS_SCHEDULER_STARTUP_INFO {
//
// UMS Version the application was built to. Should be set to UMS_VERSION
//
ULONG UmsVersion;
//
// Completion List to associate the new User Scheduler to.
//
PUMS_COMPLETION_LIST CompletionList;
//
// A pointer to the application-defined function that represents the startin
g
// address of the Sheduler.
//
PUMS_SCHEDULER_ENTRY_POINT SchedulerProc;
//
// pointer to a variable to be passed to the scheduler uppon first activatio
n.
//
PVOID SchedulerParam;
} UMS_SCHEDULER_STARTUP_INFO, *PUMS_SCHEDULER_STARTUP_INFO;
__checkReturn
WINBASEAPI
BOOL
WINAPI
CreateUmsCompletionList(
__deref_out PUMS_COMPLETION_LIST* UmsCompletionList
);
WINBASEAPI
BOOL
WINAPI
DequeueUmsCompletionListItems(
__in PUMS_COMPLETION_LIST UmsCompletionList,
__in DWORD WaitTimeOut,
__out PUMS_CONTEXT* UmsThreadList
);
WINBASEAPI
BOOL
WINAPI
GetUmsCompletionListEvent(
__in PUMS_COMPLETION_LIST UmsCompletionList,
__inout PHANDLE UmsCompletionEvent
);
WINBASEAPI
BOOL
WINAPI
ExecuteUmsThread(
__inout PUMS_CONTEXT UmsThread
);
WINBASEAPI
BOOL
WINAPI
UmsThreadYield(
__in PVOID SchedulerParam
);
WINBASEAPI
BOOL
WINAPI
DeleteUmsCompletionList(
__in PUMS_COMPLETION_LIST UmsCompletionList
);
WINBASEAPI
PUMS_CONTEXT
WINAPI
GetCurrentUmsThread(
VOID
);
WINBASEAPI
PUMS_CONTEXT
WINAPI
GetNextUmsListItem(
__inout PUMS_CONTEXT UmsContext
);
WINBASEAPI
BOOL
WINAPI
QueryUmsThreadInformation(
__in PUMS_CONTEXT UmsThread,
__in UMS_THREAD_INFO_CLASS UmsThreadInfoClass,
__out_bcount_part(UmsThreadInformationLength, *ReturnLength) PVOID UmsThread
Information,
__in ULONG UmsThreadInformationLength,
__out_opt PULONG ReturnLength
);
WINBASEAPI
BOOL
WINAPI
SetUmsThreadInformation(
__in PUMS_CONTEXT UmsThread,
__in UMS_THREAD_INFO_CLASS UmsThreadInfoClass,
__in PVOID UmsThreadInformation,
__in ULONG UmsThreadInformationLength
);
WINBASEAPI
BOOL
WINAPI
DeleteUmsThreadContext(
__in PUMS_CONTEXT UmsThread
);
WINBASEAPI
BOOL
WINAPI
CreateUmsThreadContext(
__deref_out PUMS_CONTEXT *lpUmsThread
);
WINBASEAPI
BOOL
WINAPI
EnterUmsSchedulingMode(
__in PUMS_SCHEDULER_STARTUP_INFO SchedulerStartupInfo
);
#endif // (_WIN32_WINNT >= 0x0601) && !defined(MIDL_PASS)
//
// UMS end
//
#endif /* _WIN32_WINNT >= 0x0400 */ #endif /* _WIN32_WINNT >= 0x0400 */
typedef struct _PROC_THREAD_ATTRIBUTE_LIST *PPROC_THREAD_ATTRIBUTE_LIST, *LPPROC
_THREAD_ATTRIBUTE_LIST;
WINBASEAPI WINBASEAPI
__out_opt __out_opt
HANDLE HANDLE
WINAPI WINAPI
CreateThread( CreateThread(
__in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes, __in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes,
__in SIZE_T dwStackSize, __in SIZE_T dwStackSize,
__in LPTHREAD_START_ROUTINE lpStartAddress, __in LPTHREAD_START_ROUTINE lpStartAddress,
__in_opt LPVOID lpParameter, __in_opt __deref __drv_aliasesMem LPVOID lpParameter,
__in DWORD dwCreationFlags, __in DWORD dwCreationFlags,
__out_opt LPDWORD lpThreadId __out_opt LPDWORD lpThreadId
); );
WINBASEAPI WINBASEAPI
__out_opt __out_opt
HANDLE HANDLE
WINAPI WINAPI
CreateRemoteThread( CreateRemoteThread(
__in HANDLE hProcess, __in HANDLE hProcess,
__in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes, __in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes,
__in SIZE_T dwStackSize, __in SIZE_T dwStackSize,
__in LPTHREAD_START_ROUTINE lpStartAddress, __in LPTHREAD_START_ROUTINE lpStartAddress,
__in_opt LPVOID lpParameter, __in_opt LPVOID lpParameter,
__in DWORD dwCreationFlags, __in DWORD dwCreationFlags,
__out_opt LPDWORD lpThreadId __out_opt LPDWORD lpThreadId
); );
WINBASEAPI WINBASEAPI
__out_opt
HANDLE
WINAPI
CreateRemoteThreadEx(
__in HANDLE hProcess,
__in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes,
__in SIZE_T dwStackSize,
__in LPTHREAD_START_ROUTINE lpStartAddress,
__in_opt LPVOID lpParameter,
__in DWORD dwCreationFlags,
__in_opt LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList,
__out_opt LPDWORD lpThreadId
);
WINBASEAPI
__out __out
HANDLE HANDLE
WINAPI WINAPI
GetCurrentThread( GetCurrentThread(
VOID VOID
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
skipping to change at line 3664 skipping to change at line 3958
__in HANDLE Process __in HANDLE Process
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetCurrentProcessorNumber( GetCurrentProcessorNumber(
VOID VOID
); );
#if (_WIN32_WINNT >= 0x0601)
WINBASEAPI
VOID
WINAPI
GetCurrentProcessorNumberEx(
__out PPROCESSOR_NUMBER ProcNumber
);
#endif
#if (_WIN32_WINNT >= 0x0601)
WINBASEAPI
BOOL
WINAPI
GetThreadGroupAffinity(
__in HANDLE hThread,
__out PGROUP_AFFINITY GroupAffinity
);
#endif // _WIN32_WINNT >= 0x0601
WINBASEAPI WINBASEAPI
DWORD_PTR DWORD_PTR
WINAPI WINAPI
SetThreadAffinityMask( SetThreadAffinityMask(
__in HANDLE hThread, __in HANDLE hThread,
__in DWORD_PTR dwThreadAffinityMask __in DWORD_PTR dwThreadAffinityMask
); );
#if (_WIN32_WINNT >= 0x0601)
WINBASEAPI
BOOL
WINAPI
SetThreadGroupAffinity(
__in HANDLE hThread,
__in CONST GROUP_AFFINITY *GroupAffinity,
__out_opt PGROUP_AFFINITY PreviousGroupAffinity
);
WINBASEAPI
BOOL
WINAPI
SetThreadIdealProcessorEx (
__in HANDLE hThread,
__in PPROCESSOR_NUMBER lpIdealProcessor,
__out_opt PPROCESSOR_NUMBER lpPreviousIdealProcessor
);
WINBASEAPI
BOOL
WINAPI
GetThreadIdealProcessorEx (
__in HANDLE hThread,
__out PPROCESSOR_NUMBER lpIdealProcessor
);
#endif // _WIN32_WINNT >= 0x0601
#if(_WIN32_WINNT >= 0x0400) #if(_WIN32_WINNT >= 0x0400)
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
SetThreadIdealProcessor( SetThreadIdealProcessor(
__in HANDLE hThread, __in HANDLE hThread,
__in DWORD dwIdealProcessor __in DWORD dwIdealProcessor
); );
#endif /* _WIN32_WINNT >= 0x0400 */ #endif /* _WIN32_WINNT >= 0x0400 */
#if (_WIN32_WINNT >= 0x0600)
#define PROCESS_DEP_ENABLE 0x00000001
#define PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION 0x00000002
WINBASEAPI
BOOL
WINAPI
SetProcessDEPPolicy(
__in DWORD dwFlags
);
WINBASEAPI
BOOL
WINAPI
GetProcessDEPPolicy(
__in HANDLE hProcess,
__out LPDWORD lpFlags,
__out PBOOL lpPermanent
);
#endif // _WIN32_WINNT >= 0x0600
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetProcessPriorityBoost( SetProcessPriorityBoost(
__in HANDLE hProcess, __in HANDLE hProcess,
__in BOOL bDisablePriorityBoost __in BOOL bDisablePriorityBoost
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
skipping to change at line 3793 skipping to change at line 4158
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
TerminateThread( TerminateThread(
__in HANDLE hThread, __in HANDLE hThread,
__in DWORD dwExitCode __in DWORD dwExitCode
); );
WINBASEAPI WINBASEAPI
__success(return != 0)
BOOL BOOL
WINAPI WINAPI
GetExitCodeThread( GetExitCodeThread(
__in HANDLE hThread, __in HANDLE hThread,
__out LPDWORD lpExitCode __out LPDWORD lpExitCode
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
skipping to change at line 3816 skipping to change at line 4182
__out LPLDT_ENTRY lpSelectorEntry __out LPLDT_ENTRY lpSelectorEntry
); );
WINBASEAPI WINBASEAPI
EXECUTION_STATE EXECUTION_STATE
WINAPI WINAPI
SetThreadExecutionState( SetThreadExecutionState(
__in EXECUTION_STATE esFlags __in EXECUTION_STATE esFlags
); );
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
typedef struct _REASON_CONTEXT {
ULONG Version;
DWORD Flags;
union {
struct {
HMODULE LocalizedReasonModule;
ULONG LocalizedReasonId;
ULONG ReasonStringCount;
LPWSTR *ReasonStrings;
} Detailed;
LPWSTR SimpleReasonString;
} Reason;
} REASON_CONTEXT, *PREASON_CONTEXT;
//
// Power Request APIs
//
typedef REASON_CONTEXT POWER_REQUEST_CONTEXT, *PPOWER_REQUEST_CONTEXT, *LPPOWER_
REQUEST_CONTEXT;
WINBASEAPI
HANDLE
WINAPI
PowerCreateRequest (
__in PREASON_CONTEXT Context
);
WINBASEAPI
BOOL
WINAPI
PowerSetRequest (
__in HANDLE PowerRequest,
__in POWER_REQUEST_TYPE RequestType
);
WINBASEAPI
BOOL
WINAPI
PowerClearRequest (
__in HANDLE PowerRequest,
__in POWER_REQUEST_TYPE RequestType
);
#endif // (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
#ifdef _M_CEE_PURE #ifdef _M_CEE_PURE
#define GetLastError System::Runtime::InteropServices::Marshal::GetLastWin32Erro r #define GetLastError System::Runtime::InteropServices::Marshal::GetLastWin32Erro r
#else #else
WINBASEAPI WINBASEAPI
__checkReturn __checkReturn
DWORD DWORD
WINAPI WINAPI
GetLastError( GetLastError(
VOID VOID
); );
skipping to change at line 3970 skipping to change at line 4385
VOID VOID
); );
WINBASEAPI WINBASEAPI
UINT UINT
WINAPI WINAPI
SetErrorMode( SetErrorMode(
__in UINT uMode __in UINT uMode
); );
//
// Thread error mode support
//
WINBASEAPI
DWORD
WINAPI
GetThreadErrorMode(
VOID
);
WINBASEAPI
BOOL
WINAPI
SetThreadErrorMode(
__in DWORD dwNewMode,
__in_opt LPDWORD lpOldMode
);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ReadProcessMemory( ReadProcessMemory(
__in HANDLE hProcess, __in HANDLE hProcess,
__in LPCVOID lpBaseAddress, __in LPCVOID lpBaseAddress,
__out_bcount_part(nSize, *lpNumberOfBytesRead) LPVOID lpBuffer, __out_bcount_part(nSize, *lpNumberOfBytesRead) LPVOID lpBuffer,
__in SIZE_T nSize, __in SIZE_T nSize,
__out_opt SIZE_T * lpNumberOfBytesRead __out_opt SIZE_T * lpNumberOfBytesRead
); );
skipping to change at line 4017 skipping to change at line 4451
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
Wow64GetThreadContext( Wow64GetThreadContext(
__in HANDLE hThread, __in HANDLE hThread,
__inout PWOW64_CONTEXT lpContext __inout PWOW64_CONTEXT lpContext
); );
#if(_WIN32_WINNT >= 0x0601)
WINBASEAPI
BOOL
WINAPI
Wow64GetThreadSelectorEntry(
__in HANDLE hThread,
__in DWORD dwSelector,
__out PWOW64_LDT_ENTRY lpSelectorEntry
);
#endif /* _WIN32_WINNT >= 0x0601 */
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
Wow64SetThreadContext( Wow64SetThreadContext(
__in HANDLE hThread, __in HANDLE hThread,
__in CONST WOW64_CONTEXT *lpContext __in CONST WOW64_CONTEXT *lpContext
); );
#endif #endif
skipping to change at line 4050 skipping to change at line 4497
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
ResumeThread( ResumeThread(
__in HANDLE hThread __in HANDLE hThread
); );
#if(_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400) #if(_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400)
typedef
VOID
(APIENTRY *PAPCFUNC)(
__in ULONG_PTR dwParam
);
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
QueueUserAPC( QueueUserAPC(
__in PAPCFUNC pfnAPC, __in PAPCFUNC pfnAPC,
__in HANDLE hThread, __in HANDLE hThread,
__in ULONG_PTR dwData __in ULONG_PTR dwData
); );
#endif /* _WIN32_WINNT >= 0x0400 || _WIN32_WINDOWS > 0x0400 */ #endif /* _WIN32_WINNT >= 0x0400 || _WIN32_WINDOWS > 0x0400 */
skipping to change at line 4140 skipping to change at line 4581
__in BOOL KillOnExit __in BOOL KillOnExit
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
DebugBreakProcess ( DebugBreakProcess (
__in HANDLE Process __in HANDLE Process
); );
#if (_WIN32_WINNT < _WIN32_WINNT_LONGHORN)
__drv_inTry
#endif
WINBASEAPI WINBASEAPI
VOID VOID
WINAPI WINAPI
InitializeCriticalSection( InitializeCriticalSection(
__out LPCRITICAL_SECTION lpCriticalSection __out LPCRITICAL_SECTION lpCriticalSection
); );
WINBASEAPI WINBASEAPI
VOID VOID
WINAPI WINAPI
skipping to change at line 4649 skipping to change at line 5093
#define HINSTANCE_ERROR 32 #define HINSTANCE_ERROR 32
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
LoadModule( LoadModule(
__in LPCSTR lpModuleName, __in LPCSTR lpModuleName,
__in LPVOID lpParameterBlock __in LPVOID lpParameterBlock
); );
__drv_preferredFunction("CreateProcess","Deprecated. See MSDN for details")
WINBASEAPI WINBASEAPI
UINT UINT
WINAPI WINAPI
WinExec( WinExec(
__in LPCSTR lpCmdLine, __in LPCSTR lpCmdLine,
__in UINT uCmdShow __in UINT uCmdShow
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
skipping to change at line 4957 skipping to change at line 5402
__in CONST SYSTEMTIME *lpSystemTime __in CONST SYSTEMTIME *lpSystemTime
); );
WINBASEAPI WINBASEAPI
VOID VOID
WINAPI WINAPI
GetSystemInfo( GetSystemInfo(
__out LPSYSTEM_INFO lpSystemInfo __out LPSYSTEM_INFO lpSystemInfo
); );
typedef enum _DEP_SYSTEM_POLICY_TYPE {
DEPPolicyAlwaysOff = 0,
DEPPolicyAlwaysOn,
DEPPolicyOptIn,
DEPPolicyOptOut,
DEPTotalPolicyCount
} DEP_SYSTEM_POLICY_TYPE;
WINBASEAPI
DEP_SYSTEM_POLICY_TYPE
WINAPI
GetSystemDEPPolicy(
VOID
);
#if _WIN32_WINNT >= 0x0502 #if _WIN32_WINNT >= 0x0502
#define FILE_CACHE_FLAGS_DEFINED
#define FILE_CACHE_MAX_HARD_ENABLE 0x00000001
#define FILE_CACHE_MAX_HARD_DISABLE 0x00000002
#define FILE_CACHE_MIN_HARD_ENABLE 0x00000004
#define FILE_CACHE_MIN_HARD_DISABLE 0x00000008
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetSystemFileCacheSize ( SetSystemFileCacheSize (
__in SIZE_T MinimumFileCacheSize, __in SIZE_T MinimumFileCacheSize,
__in SIZE_T MaximumFileCacheSize, __in SIZE_T MaximumFileCacheSize,
__in DWORD Flags __in DWORD Flags
); );
WINBASEAPI WINBASEAPI
skipping to change at line 5055 skipping to change at line 5522
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
TzSpecificLocalTimeToSystemTime( TzSpecificLocalTimeToSystemTime(
__in_opt CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation, __in_opt CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation,
__in CONST SYSTEMTIME *lpLocalTime, __in CONST SYSTEMTIME *lpLocalTime,
__out LPSYSTEMTIME lpUniversalTime __out LPSYSTEMTIME lpUniversalTime
); );
BOOL
WINAPI
GetTimeZoneInformationForYear(
__in USHORT wYear,
__in_opt PDYNAMIC_TIME_ZONE_INFORMATION pdtzi,
__out LPTIME_ZONE_INFORMATION ptzi
);
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetTimeZoneInformation( GetTimeZoneInformation(
__out LPTIME_ZONE_INFORMATION lpTimeZoneInformation __out LPTIME_ZONE_INFORMATION lpTimeZoneInformation
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
skipping to change at line 5145 skipping to change at line 5620
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
DosDateTimeToFileTime( DosDateTimeToFileTime(
__in WORD wFatDate, __in WORD wFatDate,
__in WORD wFatTime, __in WORD wFatTime,
__out LPFILETIME lpFileTime __out LPFILETIME lpFileTime
); );
__drv_preferredFunction("GetTickCount64", "GetTickCount overflows roughly every 49 days. Code that does not take that into account can loop indefinitely. GetT ickCount64 operates on 64 bit values and does not have that problem")
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetTickCount( GetTickCount(
VOID VOID
); );
#if (_WIN32_WINNT >= 0x0600)
WINBASEAPI WINBASEAPI
ULONGLONG ULONGLONG
WINAPI WINAPI
GetTickCount64( GetTickCount64(
VOID VOID
); );
#endif
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetSystemTimeAdjustment( SetSystemTimeAdjustment(
__in DWORD dwTimeAdjustment, __in DWORD dwTimeAdjustment,
__in BOOL bTimeAdjustmentDisabled __in BOOL bTimeAdjustmentDisabled
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
skipping to change at line 5622 skipping to change at line 6102
#if defined(DEPRECATE_SUPPORTED) #if defined(DEPRECATE_SUPPORTED)
#pragma warning(push) #pragma warning(push)
#pragma warning(disable:4995) #pragma warning(disable:4995)
#endif #endif
WINBASEAPI WINBASEAPI
__out __out
LPSTR LPSTR
WINAPI WINAPI
lstrcpyA( lstrcpyA(
__out LPSTR lpString1, __out_z LPSTR lpString1, // deprecated: annotation is as good as it gets
__in LPCSTR lpString2 __in LPCSTR lpString2
); );
WINBASEAPI WINBASEAPI
__out __out
LPWSTR LPWSTR
WINAPI WINAPI
lstrcpyW( lstrcpyW(
__out LPWSTR lpString1, __out_z LPWSTR lpString1, // deprecated: annotation is as good as it gets
__in LPCWSTR lpString2 __in LPCWSTR lpString2
); );
#ifdef UNICODE #ifdef UNICODE
#define lstrcpy lstrcpyW #define lstrcpy lstrcpyW
#else #else
#define lstrcpy lstrcpyA #define lstrcpy lstrcpyA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
__out __out
skipping to change at line 6015 skipping to change at line 6495
#define STARTF_USECOUNTCHARS 0x00000008 #define STARTF_USECOUNTCHARS 0x00000008
#define STARTF_USEFILLATTRIBUTE 0x00000010 #define STARTF_USEFILLATTRIBUTE 0x00000010
#define STARTF_RUNFULLSCREEN 0x00000020 // ignored for non-x86 platforms #define STARTF_RUNFULLSCREEN 0x00000020 // ignored for non-x86 platforms
#define STARTF_FORCEONFEEDBACK 0x00000040 #define STARTF_FORCEONFEEDBACK 0x00000040
#define STARTF_FORCEOFFFEEDBACK 0x00000080 #define STARTF_FORCEOFFFEEDBACK 0x00000080
#define STARTF_USESTDHANDLES 0x00000100 #define STARTF_USESTDHANDLES 0x00000100
#if(WINVER >= 0x0400) #if(WINVER >= 0x0400)
#define STARTF_USEHOTKEY 0x00000200 #define STARTF_USEHOTKEY 0x00000200
#define STARTF_TITLEISLINKNAME 0x00000800
#define STARTF_TITLEISAPPID 0x00001000
#define STARTF_PREVENTPINNING 0x00002000
#endif /* WINVER >= 0x0400 */ #endif /* WINVER >= 0x0400 */
typedef struct _STARTUPINFOA { typedef struct _STARTUPINFOA {
DWORD cb; DWORD cb;
LPSTR lpReserved; LPSTR lpReserved;
LPSTR lpDesktop; LPSTR lpDesktop;
LPSTR lpTitle; LPSTR lpTitle;
DWORD dwX; DWORD dwX;
DWORD dwY; DWORD dwY;
DWORD dwXSize; DWORD dwXSize;
skipping to change at line 6065 skipping to change at line 6548
HANDLE hStdError; HANDLE hStdError;
} STARTUPINFOW, *LPSTARTUPINFOW; } STARTUPINFOW, *LPSTARTUPINFOW;
#ifdef UNICODE #ifdef UNICODE
typedef STARTUPINFOW STARTUPINFO; typedef STARTUPINFOW STARTUPINFO;
typedef LPSTARTUPINFOW LPSTARTUPINFO; typedef LPSTARTUPINFOW LPSTARTUPINFO;
#else #else
typedef STARTUPINFOA STARTUPINFO; typedef STARTUPINFOA STARTUPINFO;
typedef LPSTARTUPINFOA LPSTARTUPINFO; typedef LPSTARTUPINFOA LPSTARTUPINFO;
#endif // UNICODE #endif // UNICODE
#if (_WIN32_WINNT >= 0x0600)
typedef struct _STARTUPINFOEXA { typedef struct _STARTUPINFOEXA {
STARTUPINFOA StartupInfo; STARTUPINFOA StartupInfo;
struct _PROC_THREAD_ATTRIBUTE_LIST *lpAttributeList; LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList;
} STARTUPINFOEXA, *LPSTARTUPINFOEXA; } STARTUPINFOEXA, *LPSTARTUPINFOEXA;
typedef struct _STARTUPINFOEXW { typedef struct _STARTUPINFOEXW {
STARTUPINFOW StartupInfo; STARTUPINFOW StartupInfo;
struct _PROC_THREAD_ATTRIBUTE_LIST *lpAttributeList; LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList;
} STARTUPINFOEXW, *LPSTARTUPINFOEXW; } STARTUPINFOEXW, *LPSTARTUPINFOEXW;
#ifdef UNICODE #ifdef UNICODE
typedef STARTUPINFOEXW STARTUPINFOEX; typedef STARTUPINFOEXW STARTUPINFOEX;
typedef LPSTARTUPINFOEXW LPSTARTUPINFOEX; typedef LPSTARTUPINFOEXW LPSTARTUPINFOEX;
#else #else
typedef STARTUPINFOEXA STARTUPINFOEX; typedef STARTUPINFOEXA STARTUPINFOEX;
typedef LPSTARTUPINFOEXA LPSTARTUPINFOEX; typedef LPSTARTUPINFOEXA LPSTARTUPINFOEX;
#endif // UNICODE #endif // UNICODE
#endif // (_WIN32_WINNT >= 0x0600)
#define SHUTDOWN_NORETRY 0x00000001 #define SHUTDOWN_NORETRY 0x00000001
typedef struct _WIN32_FIND_DATAA { typedef struct _WIN32_FIND_DATAA {
DWORD dwFileAttributes; DWORD dwFileAttributes;
FILETIME ftCreationTime; FILETIME ftCreationTime;
FILETIME ftLastAccessTime; FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime; FILETIME ftLastWriteTime;
DWORD nFileSizeHigh; DWORD nFileSizeHigh;
DWORD nFileSizeLow; DWORD nFileSizeLow;
DWORD dwReserved0; DWORD dwReserved0;
skipping to change at line 6345 skipping to change at line 6832
__in DWORD dwDesiredAccess, __in DWORD dwDesiredAccess,
__in BOOL bInheritHandle, __in BOOL bInheritHandle,
__in LPCWSTR lpTimerName __in LPCWSTR lpTimerName
); );
#ifdef UNICODE #ifdef UNICODE
#define OpenWaitableTimer OpenWaitableTimerW #define OpenWaitableTimer OpenWaitableTimerW
#else #else
#define OpenWaitableTimer OpenWaitableTimerA #define OpenWaitableTimer OpenWaitableTimerA
#endif // !UNICODE #endif // !UNICODE
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
BOOL
WINAPI
SetWaitableTimerEx(
__in HANDLE hTimer,
__in const LARGE_INTEGER *lpDueTime,
__in LONG lPeriod,
__in_opt PTIMERAPCROUTINE pfnCompletionRoutine,
__in_opt LPVOID lpArgToCompletionRoutine,
__in_opt PREASON_CONTEXT WakeContext,
__in ULONG TolerableDelay
);
#endif // (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetWaitableTimer( SetWaitableTimer(
__in HANDLE hTimer, __in HANDLE hTimer,
__in const LARGE_INTEGER *lpDueTime, __in const LARGE_INTEGER *lpDueTime,
__in LONG lPeriod, __in LONG lPeriod,
__in_opt PTIMERAPCROUTINE pfnCompletionRoutine, __in_opt PTIMERAPCROUTINE pfnCompletionRoutine,
__in_opt LPVOID lpArgToCompletionRoutine, __in_opt LPVOID lpArgToCompletionRoutine,
__in BOOL fResume __in BOOL fResume
skipping to change at line 6670 skipping to change at line 7173
#else #else
#define LoadLibraryEx LoadLibraryExA #define LoadLibraryEx LoadLibraryExA
#endif // !UNICODE #endif // !UNICODE
#define DONT_RESOLVE_DLL_REFERENCES 0x00000001 #define DONT_RESOLVE_DLL_REFERENCES 0x00000001
#define LOAD_LIBRARY_AS_DATAFILE 0x00000002 #define LOAD_LIBRARY_AS_DATAFILE 0x00000002
#define LOAD_WITH_ALTERED_SEARCH_PATH 0x00000008 #define LOAD_WITH_ALTERED_SEARCH_PATH 0x00000008
#define LOAD_IGNORE_CODE_AUTHZ_LEVEL 0x00000010 #define LOAD_IGNORE_CODE_AUTHZ_LEVEL 0x00000010
#define LOAD_LIBRARY_AS_IMAGE_RESOURCE 0x00000020 #define LOAD_LIBRARY_AS_IMAGE_RESOURCE 0x00000020
#define LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE 0x00000040 #define LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE 0x00000040
#define LOAD_LIBRARY_REQUIRE_SIGNED_TARGET 0x00000080
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetModuleFileNameA( GetModuleFileNameA(
__in_opt HMODULE hModule, __in_opt HMODULE hModule,
__out_ecount_part(nSize, return + 1) LPCH lpFilename, __out_ecount_part(nSize, return + 1) LPSTR lpFilename,
__in DWORD nSize __in DWORD nSize
); );
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetModuleFileNameW( GetModuleFileNameW(
__in_opt HMODULE hModule, __in_opt HMODULE hModule,
__out_ecount_part(nSize, return + 1) LPWCH lpFilename, __out_ecount_part(nSize, return + 1) LPWSTR lpFilename,
__in DWORD nSize __in DWORD nSize
); );
#ifdef UNICODE #ifdef UNICODE
#define GetModuleFileName GetModuleFileNameW #define GetModuleFileName GetModuleFileNameW
#else #else
#define GetModuleFileName GetModuleFileNameA #define GetModuleFileName GetModuleFileNameA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
__out_opt __out_opt
skipping to change at line 6819 skipping to change at line 7323
__inout PDWORD lpdwSize __inout PDWORD lpdwSize
); );
#ifdef UNICODE #ifdef UNICODE
#define QueryFullProcessImageName QueryFullProcessImageNameW #define QueryFullProcessImageName QueryFullProcessImageNameW
#else #else
#define QueryFullProcessImageName QueryFullProcessImageNameA #define QueryFullProcessImageName QueryFullProcessImageNameA
#endif // !UNICODE #endif // !UNICODE
#endif #endif
#if (_WIN32_WINNT >= 0x0600)
// //
// Extended process and thread attribute support // Extended process and thread attribute support
// //
#define PROC_THREAD_ATTRIBUTE_NUMBER 0x0000FFFF #define PROC_THREAD_ATTRIBUTE_NUMBER 0x0000FFFF
#define PROC_THREAD_ATTRIBUTE_THREAD 0x00010000 // Attribute may be used wit h thread creation #define PROC_THREAD_ATTRIBUTE_THREAD 0x00010000 // Attribute may be used wit h thread creation
#define PROC_THREAD_ATTRIBUTE_INPUT 0x00020000 // Attribute is input only #define PROC_THREAD_ATTRIBUTE_INPUT 0x00020000 // Attribute is input only
#define PROC_THREAD_ATTRIBUTE_ADDITIVE 0x00040000 // Attribute may be "accumul ated," e.g. bitmasks, counters, etc. #define PROC_THREAD_ATTRIBUTE_ADDITIVE 0x00040000 // Attribute may be "accumul ated," e.g. bitmasks, counters, etc.
typedef enum _PROC_THREAD_ATTRIBUTE_NUM { typedef enum _PROC_THREAD_ATTRIBUTE_NUM {
ProcThreadAttributeParentProcess = 0, ProcThreadAttributeParentProcess = 0,
ProcThreadAttributeExtendedFlags, ProcThreadAttributeExtendedFlags,
ProcThreadAttributeHandleList, ProcThreadAttributeHandleList,
ProcThreadAttributeGroupAffinity,
ProcThreadAttributePreferredNode,
ProcThreadAttributeIdealProcessor,
ProcThreadAttributeUmsThread,
ProcThreadAttributeMitigationPolicy,
ProcThreadAttributeMax ProcThreadAttributeMax
} PROC_THREAD_ATTRIBUTE_NUM; } PROC_THREAD_ATTRIBUTE_NUM;
#define ProcThreadAttributeValue(Number, Thread, Input, Additive) \ #define ProcThreadAttributeValue(Number, Thread, Input, Additive) \
(((Number) & PROC_THREAD_ATTRIBUTE_NUMBER) | \ (((Number) & PROC_THREAD_ATTRIBUTE_NUMBER) | \
((Thread != FALSE) ? PROC_THREAD_ATTRIBUTE_THREAD : 0) | \ ((Thread != FALSE) ? PROC_THREAD_ATTRIBUTE_THREAD : 0) | \
((Input != FALSE) ? PROC_THREAD_ATTRIBUTE_INPUT : 0) | \ ((Input != FALSE) ? PROC_THREAD_ATTRIBUTE_INPUT : 0) | \
((Additive != FALSE) ? PROC_THREAD_ATTRIBUTE_ADDITIVE : 0)) ((Additive != FALSE) ? PROC_THREAD_ATTRIBUTE_ADDITIVE : 0))
#define PROC_THREAD_ATTRIBUTE_PARENT_PROCESS \ #define PROC_THREAD_ATTRIBUTE_PARENT_PROCESS \
ProcThreadAttributeValue (ProcThreadAttributeParentProcess, FALSE, TRUE, FAL SE) ProcThreadAttributeValue (ProcThreadAttributeParentProcess, FALSE, TRUE, FAL SE)
#define PROC_THREAD_ATTRIBUTE_EXTENDED_FLAGS \ #define PROC_THREAD_ATTRIBUTE_EXTENDED_FLAGS \
ProcThreadAttributeValue (ProcThreadAttributeExtendedFlags, FALSE, TRUE, TRU E) ProcThreadAttributeValue (ProcThreadAttributeExtendedFlags, FALSE, TRUE, TRU E)
#define PROC_THREAD_ATTRIBUTE_HANDLE_LIST \ #define PROC_THREAD_ATTRIBUTE_HANDLE_LIST \
ProcThreadAttributeValue (ProcThreadAttributeHandleList, FALSE, TRUE, FALSE) ProcThreadAttributeValue (ProcThreadAttributeHandleList, FALSE, TRUE, FALSE)
#define PROC_THREAD_ATTRIBUTE_GROUP_AFFINITY \
ProcThreadAttributeValue (ProcThreadAttributeGroupAffinity, TRUE, TRUE, FALS
E)
#define PROC_THREAD_ATTRIBUTE_PREFERRED_NODE \
ProcThreadAttributeValue (ProcThreadAttributePreferredNode, FALSE, TRUE, FAL
SE)
#define PROC_THREAD_ATTRIBUTE_IDEAL_PROCESSOR \
ProcThreadAttributeValue (ProcThreadAttributeIdealProcessor, TRUE, TRUE, FAL
SE)
#define PROC_THREAD_ATTRIBUTE_UMS_THREAD \
ProcThreadAttributeValue (ProcThreadAttributeUmsThread, TRUE, TRUE, FALSE)
#define PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY \
ProcThreadAttributeValue (ProcThreadAttributeMitigationPolicy, FALSE, TRUE,
FALSE)
typedef struct _PROC_THREAD_ATTRIBUTE_LIST *PPROC_THREAD_ATTRIBUTE_LIST, *LPPROC #define PROCESS_CREATION_MITIGATION_POLICY_DEP_ENABLE 0x01
_THREAD_ATTRIBUTE_LIST; #define PROCESS_CREATION_MITIGATION_POLICY_DEP_ATL_THUNK_ENABLE 0x02
#define PROCESS_CREATION_MITIGATION_POLICY_SEHOP_ENABLE 0x04
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
InitializeProcThreadAttributeList( InitializeProcThreadAttributeList(
__out_xcount_opt(*lpSize) LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList, __out_xcount_opt(*lpSize) LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList,
__in DWORD dwAttributeCount, __in DWORD dwAttributeCount,
__in __reserved DWORD dwFlags, __reserved DWORD dwFlags,
__inout PSIZE_T lpSize __inout PSIZE_T lpSize
); );
WINBASEAPI WINBASEAPI
VOID VOID
WINAPI WINAPI
DeleteProcThreadAttributeList( DeleteProcThreadAttributeList(
__inout LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList __inout LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList
); );
skipping to change at line 6882 skipping to change at line 7405
UpdateProcThreadAttribute( UpdateProcThreadAttribute(
__inout LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList, __inout LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList,
__in DWORD dwFlags, __in DWORD dwFlags,
__in DWORD_PTR Attribute, __in DWORD_PTR Attribute,
__in_bcount_opt(cbSize) PVOID lpValue, __in_bcount_opt(cbSize) PVOID lpValue,
__in SIZE_T cbSize, __in SIZE_T cbSize,
__out_bcount_opt(cbSize) PVOID lpPreviousValue, __out_bcount_opt(cbSize) PVOID lpPreviousValue,
__in_opt PSIZE_T lpReturnSize __in_opt PSIZE_T lpReturnSize
); );
#endif // (_WIN32_WINNT >= 0x0600)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CreateProcessA( CreateProcessA(
__in_opt LPCSTR lpApplicationName, __in_opt LPCSTR lpApplicationName,
__inout_opt LPSTR lpCommandLine, __inout_opt LPSTR lpCommandLine,
__in_opt LPSECURITY_ATTRIBUTES lpProcessAttributes, __in_opt LPSECURITY_ATTRIBUTES lpProcessAttributes,
__in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes, __in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes,
__in BOOL bInheritHandles, __in BOOL bInheritHandles,
__in DWORD dwCreationFlags, __in DWORD dwCreationFlags,
skipping to change at line 7025 skipping to change at line 7550
__in_opt LPCWSTR lpName, __in_opt LPCWSTR lpName,
__out_ecount_part_opt(nSize, return + 1) LPWSTR lpBuffer, __out_ecount_part_opt(nSize, return + 1) LPWSTR lpBuffer,
__in DWORD nSize __in DWORD nSize
); );
#ifdef UNICODE #ifdef UNICODE
#define GetEnvironmentVariable GetEnvironmentVariableW #define GetEnvironmentVariable GetEnvironmentVariableW
#else #else
#define GetEnvironmentVariable GetEnvironmentVariableA #define GetEnvironmentVariable GetEnvironmentVariableA
#endif // !UNICODE #endif // !UNICODE
#if defined(_M_CEE)
#undef GetEnvironmentVariable
__inline
DWORD
GetEnvironmentVariable(
__in_opt LPCTSTR lpName,
__out_ecount_part_opt(nSize, return + 1) LPTSTR lpBuffer,
__in DWORD nSize
)
{
#ifdef UNICODE
return GetEnvironmentVariableW(
#else
return GetEnvironmentVariableA(
#endif
lpName,
lpBuffer,
nSize
);
}
#endif /* _M_CEE */
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetEnvironmentVariableA( SetEnvironmentVariableA(
__in LPCSTR lpName, __in LPCSTR lpName,
__in_opt LPCSTR lpValue __in_opt LPCSTR lpValue
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
skipping to change at line 7334 skipping to change at line 7881
); );
#ifdef UNICODE #ifdef UNICODE
#define EnumResourceLanguages EnumResourceLanguagesW #define EnumResourceLanguages EnumResourceLanguagesW
#else #else
#define EnumResourceLanguages EnumResourceLanguagesA #define EnumResourceLanguages EnumResourceLanguagesA
#endif // !UNICODE #endif // !UNICODE
#define RESOURCE_ENUM_LN (0x0001) #define RESOURCE_ENUM_LN (0x0001)
#define RESOURCE_ENUM_MUI (0x0002) #define RESOURCE_ENUM_MUI (0x0002)
#define RESOURCE_ENUM_MUI_SYSTEM (0x0004) #define RESOURCE_ENUM_MUI_SYSTEM (0x0004)
#define RESOURCE_UPDATE_LN (0x0010) #define RESOURCE_ENUM_VALIDATE (0x0008)
#define RESOURCE_UPDATE_MUI (0x0020) #define RESOURCE_ENUM_MODULE_EXACT (0x0010)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
EnumResourceTypesExA( EnumResourceTypesExA(
__in_opt HMODULE hModule, __in_opt HMODULE hModule,
__in ENUMRESTYPEPROCA lpEnumFunc, __in ENUMRESTYPEPROCA lpEnumFunc,
__in LONG_PTR lParam, __in LONG_PTR lParam,
DWORD dwFlags, DWORD dwFlags,
LANGID LangId LANGID LangId
skipping to change at line 7741 skipping to change at line 8288
__in LPCWSTR lpKeyName, __in LPCWSTR lpKeyName,
__in INT nDefault, __in INT nDefault,
__in_opt LPCWSTR lpFileName __in_opt LPCWSTR lpFileName
); );
#ifdef UNICODE #ifdef UNICODE
#define GetPrivateProfileInt GetPrivateProfileIntW #define GetPrivateProfileInt GetPrivateProfileIntW
#else #else
#define GetPrivateProfileInt GetPrivateProfileIntA #define GetPrivateProfileInt GetPrivateProfileIntA
#endif // !UNICODE #endif // !UNICODE
#if defined(_M_CEE)
#undef GetPrivateProfileInt
__inline
UINT
GetPrivateProfileInt(
LPCTSTR lpAppName,
LPCTSTR lpKeyName,
INT nDefault,
LPCTSTR lpFileName
)
{
#ifdef UNICODE
return GetPrivateProfileIntW(
#else
return GetPrivateProfileIntA(
#endif
lpAppName,
lpKeyName,
nDefault,
lpFileName
);
}
#endif /* _M_CEE */
WINBASEAPI WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetPrivateProfileStringA( GetPrivateProfileStringA(
__in_opt LPCSTR lpAppName, __in_opt LPCSTR lpAppName,
__in_opt LPCSTR lpKeyName, __in_opt LPCSTR lpKeyName,
__in_opt LPCSTR lpDefault, __in_opt LPCSTR lpDefault,
__out_ecount_part_opt(nSize, return + 1) LPSTR lpReturnedString, __out_ecount_part_opt(nSize, return + 1) LPSTR lpReturnedString,
__in DWORD nSize, __in DWORD nSize,
__in_opt LPCSTR lpFileName __in_opt LPCSTR lpFileName
skipping to change at line 7769 skipping to change at line 8340
__out_ecount_part_opt(nSize, return + 1) LPWSTR lpReturnedString, __out_ecount_part_opt(nSize, return + 1) LPWSTR lpReturnedString,
__in DWORD nSize, __in DWORD nSize,
__in_opt LPCWSTR lpFileName __in_opt LPCWSTR lpFileName
); );
#ifdef UNICODE #ifdef UNICODE
#define GetPrivateProfileString GetPrivateProfileStringW #define GetPrivateProfileString GetPrivateProfileStringW
#else #else
#define GetPrivateProfileString GetPrivateProfileStringA #define GetPrivateProfileString GetPrivateProfileStringA
#endif // !UNICODE #endif // !UNICODE
#if defined(_M_CEE)
#undef GetPrivateProfileString
__inline
DWORD
GetPrivateProfileString(
LPCTSTR lpAppName,
LPCTSTR lpKeyName,
LPCTSTR lpDefault,
LPTSTR lpReturnedString,
DWORD nSize,
LPCTSTR lpFileName
)
{
#ifdef UNICODE
return GetPrivateProfileStringW(
#else
return GetPrivateProfileStringA(
#endif
lpAppName,
lpKeyName,
lpDefault,
lpReturnedString,
nSize,
lpFileName
);
}
#endif /* _M_CEE */
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WritePrivateProfileStringA( WritePrivateProfileStringA(
__in_opt LPCSTR lpAppName, __in_opt LPCSTR lpAppName,
__in_opt LPCSTR lpKeyName, __in_opt LPCSTR lpKeyName,
__in_opt LPCSTR lpString, __in_opt LPCSTR lpString,
__in_opt LPCSTR lpFileName __in_opt LPCSTR lpFileName
); );
WINBASEAPI WINBASEAPI
skipping to change at line 7817 skipping to change at line 8416
__out_ecount_part_opt(nSize, return + 1) LPWSTR lpReturnedString, __out_ecount_part_opt(nSize, return + 1) LPWSTR lpReturnedString,
__in DWORD nSize, __in DWORD nSize,
__in_opt LPCWSTR lpFileName __in_opt LPCWSTR lpFileName
); );
#ifdef UNICODE #ifdef UNICODE
#define GetPrivateProfileSection GetPrivateProfileSectionW #define GetPrivateProfileSection GetPrivateProfileSectionW
#else #else
#define GetPrivateProfileSection GetPrivateProfileSectionA #define GetPrivateProfileSection GetPrivateProfileSectionA
#endif // !UNICODE #endif // !UNICODE
#if defined(_M_CEE)
#undef GetPrivateProfileSection
__inline
DWORD
GetPrivateProfileSection(
LPCTSTR lpAppName,
LPTSTR lpReturnedString,
DWORD nSize,
LPCTSTR lpFileName
)
{
#ifdef UNICODE
return GetPrivateProfileSectionW(
#else
return GetPrivateProfileSectionA(
#endif
lpAppName,
lpReturnedString,
nSize,
lpFileName
);
}
#endif /* _M_CEE */
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WritePrivateProfileSectionA( WritePrivateProfileSectionA(
__in LPCSTR lpAppName, __in_opt LPCSTR lpAppName,
__in LPCSTR lpString, __in_opt LPCSTR lpString,
__in_opt LPCSTR lpFileName __in_opt LPCSTR lpFileName
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WritePrivateProfileSectionW( WritePrivateProfileSectionW(
__in LPCWSTR lpAppName, __in_opt LPCWSTR lpAppName,
__in LPCWSTR lpString, __in_opt LPCWSTR lpString,
__in_opt LPCWSTR lpFileName __in_opt LPCWSTR lpFileName
); );
#ifdef UNICODE #ifdef UNICODE
#define WritePrivateProfileSection WritePrivateProfileSectionW #define WritePrivateProfileSection WritePrivateProfileSectionW
#else #else
#define WritePrivateProfileSection WritePrivateProfileSectionA #define WritePrivateProfileSection WritePrivateProfileSectionA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
DWORD DWORD
skipping to change at line 7861 skipping to change at line 8484
__out_ecount_part_opt(nSize, return + 1) LPWSTR lpszReturnBuffer, __out_ecount_part_opt(nSize, return + 1) LPWSTR lpszReturnBuffer,
__in DWORD nSize, __in DWORD nSize,
__in_opt LPCWSTR lpFileName __in_opt LPCWSTR lpFileName
); );
#ifdef UNICODE #ifdef UNICODE
#define GetPrivateProfileSectionNames GetPrivateProfileSectionNamesW #define GetPrivateProfileSectionNames GetPrivateProfileSectionNamesW
#else #else
#define GetPrivateProfileSectionNames GetPrivateProfileSectionNamesA #define GetPrivateProfileSectionNames GetPrivateProfileSectionNamesA
#endif // !UNICODE #endif // !UNICODE
#if defined(_M_CEE)
#undef GetPrivateProfileSectionNames
__inline
DWORD
GetPrivateProfileSectionNames(
LPTSTR lpszReturnBuffer,
DWORD nSize,
LPCTSTR lpFileName
)
{
#ifdef UNICODE
return GetPrivateProfileSectionNamesW(
#else
return GetPrivateProfileSectionNamesA(
#endif
lpszReturnBuffer,
nSize,
lpFileName
);
}
#endif /* _M_CEE */
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetPrivateProfileStructA( GetPrivateProfileStructA(
__in LPCSTR lpszSection, __in LPCSTR lpszSection,
__in LPCSTR lpszKey, __in LPCSTR lpszKey,
__out_bcount_opt(uSizeStruct) LPVOID lpStruct, __out_bcount_opt(uSizeStruct) LPVOID lpStruct,
__in UINT uSizeStruct, __in UINT uSizeStruct,
__in_opt LPCSTR szFile __in_opt LPCSTR szFile
); );
skipping to change at line 7887 skipping to change at line 8532
__out_bcount_opt(uSizeStruct) LPVOID lpStruct, __out_bcount_opt(uSizeStruct) LPVOID lpStruct,
__in UINT uSizeStruct, __in UINT uSizeStruct,
__in_opt LPCWSTR szFile __in_opt LPCWSTR szFile
); );
#ifdef UNICODE #ifdef UNICODE
#define GetPrivateProfileStruct GetPrivateProfileStructW #define GetPrivateProfileStruct GetPrivateProfileStructW
#else #else
#define GetPrivateProfileStruct GetPrivateProfileStructA #define GetPrivateProfileStruct GetPrivateProfileStructA
#endif // !UNICODE #endif // !UNICODE
#if defined(_M_CEE)
#undef GetPrivateProfileStruct
__inline
BOOL
GetPrivateProfileStruct(
LPCTSTR lpszSection,
LPCTSTR lpszKey,
LPVOID lpStruct,
UINT uSizeStruct,
LPCTSTR szFile
)
{
#ifdef UNICODE
return GetPrivateProfileStructW(
#else
return GetPrivateProfileStructA(
#endif
lpszSection,
lpszKey,
lpStruct,
uSizeStruct,
szFile
);
}
#endif /* _M_CEE */
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WritePrivateProfileStructA( WritePrivateProfileStructA(
__in LPCSTR lpszSection, __in LPCSTR lpszSection,
__in LPCSTR lpszKey, __in LPCSTR lpszKey,
__in_bcount_opt(uSizeStruct) LPVOID lpStruct, __in_bcount_opt(uSizeStruct) LPVOID lpStruct,
__in UINT uSizeStruct, __in UINT uSizeStruct,
__in_opt LPCSTR szFile __in_opt LPCSTR szFile
); );
skipping to change at line 8190 skipping to change at line 8861
GetCurrentDirectoryW( GetCurrentDirectoryW(
__in DWORD nBufferLength, __in DWORD nBufferLength,
__out_ecount_part_opt(nBufferLength, return + 1) LPWSTR lpBuffer __out_ecount_part_opt(nBufferLength, return + 1) LPWSTR lpBuffer
); );
#ifdef UNICODE #ifdef UNICODE
#define GetCurrentDirectory GetCurrentDirectoryW #define GetCurrentDirectory GetCurrentDirectoryW
#else #else
#define GetCurrentDirectory GetCurrentDirectoryA #define GetCurrentDirectory GetCurrentDirectoryA
#endif // !UNICODE #endif // !UNICODE
#if defined(_M_CEE)
#undef GetCurrentDirectory
__inline
DWORD
GetCurrentDirectory(
DWORD nBufferLength,
LPTSTR lpBuffer
)
{
#ifdef UNICODE
return GetCurrentDirectoryW(
#else
return GetCurrentDirectoryA(
#endif
nBufferLength,
lpBuffer
);
}
#endif /* _M_CEE */
#if _WIN32_WINNT >= 0x0502 #if _WIN32_WINNT >= 0x0502
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetDllDirectoryA( SetDllDirectoryA(
__in_opt LPCSTR lpPathName __in_opt LPCSTR lpPathName
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
skipping to change at line 8232 skipping to change at line 8923
__out_ecount_part_opt(nBufferLength, return + 1) LPWSTR lpBuffer __out_ecount_part_opt(nBufferLength, return + 1) LPWSTR lpBuffer
); );
#ifdef UNICODE #ifdef UNICODE
#define GetDllDirectory GetDllDirectoryW #define GetDllDirectory GetDllDirectoryW
#else #else
#define GetDllDirectory GetDllDirectoryA #define GetDllDirectory GetDllDirectoryA
#endif // !UNICODE #endif // !UNICODE
#endif // _WIN32_WINNT >= 0x0502 #endif // _WIN32_WINNT >= 0x0502
#define BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE 0x1
#define BASE_SEARCH_PATH_DISABLE_SAFE_SEARCHMODE 0x10000
#define BASE_SEARCH_PATH_PERMANENT 0x8000
#define BASE_SEARCH_PATH_INVALID_FLAGS ~0x18001
WINBASEAPI
BOOL
WINAPI
SetSearchPathMode (
__in DWORD Flags
);
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetDiskFreeSpaceA( GetDiskFreeSpaceA(
__in_opt LPCSTR lpRootPathName, __in_opt LPCSTR lpRootPathName,
__out_opt LPDWORD lpSectorsPerCluster, __out_opt LPDWORD lpSectorsPerCluster,
__out_opt LPDWORD lpBytesPerSector, __out_opt LPDWORD lpBytesPerSector,
__out_opt LPDWORD lpNumberOfFreeClusters, __out_opt LPDWORD lpNumberOfFreeClusters,
__out_opt LPDWORD lpTotalNumberOfClusters __out_opt LPDWORD lpTotalNumberOfClusters
); );
skipping to change at line 8350 skipping to change at line 9053
#else #else
#define CreateDirectoryEx CreateDirectoryExA #define CreateDirectoryEx CreateDirectoryExA
#endif // !UNICODE #endif // !UNICODE
#if _WIN32_WINNT >= 0x0600 #if _WIN32_WINNT >= 0x0600
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CreateDirectoryTransactedA( CreateDirectoryTransactedA(
__in LPCSTR lpTemplateDirectory, __in_opt LPCSTR lpTemplateDirectory,
__in LPCSTR lpNewDirectory, __in LPCSTR lpNewDirectory,
__in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes, __in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes,
__in HANDLE hTransaction __in HANDLE hTransaction
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
CreateDirectoryTransactedW( CreateDirectoryTransactedW(
__in LPCWSTR lpTemplateDirectory, __in_opt LPCWSTR lpTemplateDirectory,
__in LPCWSTR lpNewDirectory, __in LPCWSTR lpNewDirectory,
__in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes, __in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes,
__in HANDLE hTransaction __in HANDLE hTransaction
); );
#ifdef UNICODE #ifdef UNICODE
#define CreateDirectoryTransacted CreateDirectoryTransactedW #define CreateDirectoryTransacted CreateDirectoryTransactedW
#else #else
#define CreateDirectoryTransacted CreateDirectoryTransactedA #define CreateDirectoryTransacted CreateDirectoryTransactedA
#endif // !UNICODE #endif // !UNICODE
skipping to change at line 8866 skipping to change at line 9569
#define CheckNameLegalDOS8Dot3 CheckNameLegalDOS8Dot3W #define CheckNameLegalDOS8Dot3 CheckNameLegalDOS8Dot3W
#else #else
#define CheckNameLegalDOS8Dot3 CheckNameLegalDOS8Dot3A #define CheckNameLegalDOS8Dot3 CheckNameLegalDOS8Dot3A
#endif // !UNICODE #endif // !UNICODE
#endif // (_WIN32_WINNT >= 0x0501) #endif // (_WIN32_WINNT >= 0x0501)
#if(_WIN32_WINNT >= 0x0400) #if(_WIN32_WINNT >= 0x0400)
typedef enum _FINDEX_INFO_LEVELS { typedef enum _FINDEX_INFO_LEVELS {
FindExInfoStandard, FindExInfoStandard,
FindExInfoBasic,
FindExInfoMaxInfoLevel FindExInfoMaxInfoLevel
} FINDEX_INFO_LEVELS; } FINDEX_INFO_LEVELS;
typedef enum _FINDEX_SEARCH_OPS { typedef enum _FINDEX_SEARCH_OPS {
FindExSearchNameMatch, FindExSearchNameMatch,
FindExSearchLimitToDirectories, FindExSearchLimitToDirectories,
FindExSearchLimitToDevices, FindExSearchLimitToDevices,
FindExSearchMaxSearchOp FindExSearchMaxSearchOp
} FINDEX_SEARCH_OPS; } FINDEX_SEARCH_OPS;
#define FIND_FIRST_EX_CASE_SENSITIVE 0x00000001 #define FIND_FIRST_EX_CASE_SENSITIVE 0x00000001
#define FIND_FIRST_EX_LARGE_FETCH 0x00000002
WINBASEAPI WINBASEAPI
__out __out
HANDLE HANDLE
WINAPI WINAPI
FindFirstFileExA( FindFirstFileExA(
__in LPCSTR lpFileName, __in LPCSTR lpFileName,
__in FINDEX_INFO_LEVELS fInfoLevelId, __in FINDEX_INFO_LEVELS fInfoLevelId,
__out LPVOID lpFindFileData, __out LPVOID lpFindFileData,
__in FINDEX_SEARCH_OPS fSearchOp, __in FINDEX_SEARCH_OPS fSearchOp,
skipping to change at line 9268 skipping to change at line 9973
#define MOVEFILE_REPLACE_EXISTING 0x00000001 #define MOVEFILE_REPLACE_EXISTING 0x00000001
#define MOVEFILE_COPY_ALLOWED 0x00000002 #define MOVEFILE_COPY_ALLOWED 0x00000002
#define MOVEFILE_DELAY_UNTIL_REBOOT 0x00000004 #define MOVEFILE_DELAY_UNTIL_REBOOT 0x00000004
#define MOVEFILE_WRITE_THROUGH 0x00000008 #define MOVEFILE_WRITE_THROUGH 0x00000008
#if (_WIN32_WINNT >= 0x0500) #if (_WIN32_WINNT >= 0x0500)
#define MOVEFILE_CREATE_HARDLINK 0x00000010 #define MOVEFILE_CREATE_HARDLINK 0x00000010
#define MOVEFILE_FAIL_IF_NOT_TRACKABLE 0x00000020 #define MOVEFILE_FAIL_IF_NOT_TRACKABLE 0x00000020
#endif // (_WIN32_WINNT >= 0x0500) #endif // (_WIN32_WINNT >= 0x0500)
#if (_WIN32_WINNT >= 0x0500) #if (_WIN32_WINNT >= 0x0500)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ReplaceFileA( ReplaceFileA(
__in LPCSTR lpReplacedFileName, __in LPCSTR lpReplacedFileName,
__in LPCSTR lpReplacementFileName, __in LPCSTR lpReplacementFileName,
__in_opt LPCSTR lpBackupFileName, __in_opt LPCSTR lpBackupFileName,
__in DWORD dwReplaceFlags, __in DWORD dwReplaceFlags,
__reserved LPVOID lpExclude, __reserved LPVOID lpExclude,
__reserved LPVOID lpReserved __reserved LPVOID lpReserved
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ReplaceFileW( ReplaceFileW(
__in LPCWSTR lpReplacedFileName, __in LPCWSTR lpReplacedFileName,
__in LPCWSTR lpReplacementFileName, __in LPCWSTR lpReplacementFileName,
__in_opt LPCWSTR lpBackupFileName, __in_opt LPCWSTR lpBackupFileName,
__in DWORD dwReplaceFlags, __in DWORD dwReplaceFlags,
__reserved LPVOID lpExclude, __reserved LPVOID lpExclude,
__reserved LPVOID lpReserved __reserved LPVOID lpReserved
); );
#ifdef UNICODE #ifdef UNICODE
#define ReplaceFile ReplaceFileW #define ReplaceFile ReplaceFileW
#else #else
#define ReplaceFile ReplaceFileA #define ReplaceFile ReplaceFileA
#endif // !UNICODE #endif // !UNICODE
#endif // (_WIN32_WINNT >= 0x0500) #endif // (_WIN32_WINNT >= 0x0500)
#if (_WIN32_WINNT >= 0x0500) #if (_WIN32_WINNT >= 0x0500)
skipping to change at line 9377 skipping to change at line 10083
} STREAM_INFO_LEVELS; } STREAM_INFO_LEVELS;
typedef struct _WIN32_FIND_STREAM_DATA { typedef struct _WIN32_FIND_STREAM_DATA {
LARGE_INTEGER StreamSize; LARGE_INTEGER StreamSize;
WCHAR cStreamName[ MAX_PATH + 36 ]; WCHAR cStreamName[ MAX_PATH + 36 ];
} WIN32_FIND_STREAM_DATA, *PWIN32_FIND_STREAM_DATA; } WIN32_FIND_STREAM_DATA, *PWIN32_FIND_STREAM_DATA;
WINBASEAPI
__out __out
HANDLE HANDLE
WINAPI WINAPI
FindFirstStreamW( FindFirstStreamW(
__in LPCWSTR lpFileName, __in LPCWSTR lpFileName,
__in STREAM_INFO_LEVELS InfoLevel, __in STREAM_INFO_LEVELS InfoLevel,
__out LPVOID lpFindStreamData, __out LPVOID lpFindStreamData,
__reserved DWORD dwFlags __reserved DWORD dwFlags
); );
#if _WIN32_WINNT >= 0x0600
WINBASEAPI
HANDLE
WINAPI
FindFirstStreamTransactedW (
__in LPCWSTR lpFileName,
__in STREAM_INFO_LEVELS InfoLevel,
__out LPVOID lpFindStreamData,
__reserved DWORD dwFlags,
__in HANDLE hTransaction
);
#endif // _WIN32_WINNT >= 0x600
WINBASEAPI
BOOL BOOL
APIENTRY APIENTRY
FindNextStreamW( FindNextStreamW(
__in HANDLE hFindStream, __in HANDLE hFindStream,
__out LPVOID lpFindStreamData __out LPVOID lpFindStreamData
); );
#endif // (_WIN32_WINNT >= 0x0501) #endif // (_WIN32_WINNT >= 0x0501)
#if _WIN32_WINNT >= 0x0600 #if _WIN32_WINNT >= 0x0600
WINBASEAPI
HANDLE HANDLE
WINAPI WINAPI
FindFirstFileNameW ( FindFirstFileNameW (
__in LPCWSTR lpFileName, __in LPCWSTR lpFileName,
__in DWORD dwFlags, __in DWORD dwFlags,
__inout LPDWORD StringLength, __inout LPDWORD StringLength,
__inout_ecount(*StringLength) PWCHAR LinkName __inout_ecount(*StringLength) PWCHAR LinkName
); );
WINBASEAPI
BOOL BOOL
APIENTRY APIENTRY
FindNextFileNameW ( FindNextFileNameW (
__in HANDLE hFindStream, __in HANDLE hFindStream,
__inout LPDWORD StringLength, __inout LPDWORD StringLength,
__inout_ecount(*StringLength) PWCHAR LinkName __inout_ecount(*StringLength) PWCHAR LinkName
); );
WINBASEAPI
HANDLE HANDLE
WINAPI WINAPI
FindFirstFileNameTransactedW ( FindFirstFileNameTransactedW (
__in LPCWSTR lpFileName, __in LPCWSTR lpFileName,
__in DWORD dwFlags, __in DWORD dwFlags,
__inout LPDWORD StringLength, __inout LPDWORD StringLength,
__inout_ecount(*StringLength) PWCHAR LinkName, __inout_ecount(*StringLength) PWCHAR LinkName,
__in_opt HANDLE hTransaction __in_opt HANDLE hTransaction
); );
skipping to change at line 10496 skipping to change at line 11220
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
IsWellKnownSid ( IsWellKnownSid (
__in PSID pSid, __in PSID pSid,
__in WELL_KNOWN_SID_TYPE WellKnownSidType __in WELL_KNOWN_SID_TYPE WellKnownSidType
); );
WINADVAPI WINADVAPI
BOOL __success(return != FALSE) BOOL
WINAPI WINAPI
CreateWellKnownSid( CreateWellKnownSid(
__in WELL_KNOWN_SID_TYPE WellKnownSidType, __in WELL_KNOWN_SID_TYPE WellKnownSidType,
__in_opt PSID DomainSid, __in_opt PSID DomainSid,
__out_bcount_part_opt(*cbSid, *cbSid) PSID pSid, __out_bcount_part_opt(*cbSid, *cbSid) PSID pSid,
__inout DWORD *cbSid __inout DWORD *cbSid
); );
WINADVAPI WINADVAPI
BOOL __success(return != FALSE) BOOL
WINAPI WINAPI
EqualDomainSid( EqualDomainSid(
__in PSID pSid1, __in PSID pSid1,
__in PSID pSid2, __in PSID pSid2,
__out BOOL *pfEqual __out BOOL *pfEqual
); );
WINADVAPI WINADVAPI
BOOL __success(return != FALSE) BOOL
WINAPI WINAPI
GetWindowsAccountDomainSid( GetWindowsAccountDomainSid(
__in PSID pSid, __in PSID pSid,
__out_bcount_part_opt(*cbDomainSid, *cbDomainSid) PSID pDomainSid, __out_bcount_part_opt(*cbDomainSid, *cbDomainSid) PSID pDomainSid,
__inout DWORD* cbDomainSid __inout DWORD* cbDomainSid
); );
#endif //(_WIN32_WINNT >= 0x0501) #endif //(_WIN32_WINNT >= 0x0501)
WINADVAPI WINADVAPI
skipping to change at line 10753 skipping to change at line 11477
WINAPI WINAPI
AddMandatoryAce ( AddMandatoryAce (
__inout PACL pAcl, __inout PACL pAcl,
__in DWORD dwAceRevision, __in DWORD dwAceRevision,
__in DWORD AceFlags, __in DWORD AceFlags,
__in DWORD MandatoryPolicy, __in DWORD MandatoryPolicy,
__in PSID pLabelSid __in PSID pLabelSid
); );
#endif /* _WIN32_WINNT >= 0x0600 */ #endif /* _WIN32_WINNT >= 0x0600 */
#if(_WIN32_WINNT >= 0x0601)
WINADVAPI
BOOL
WINAPI
AddConditionalAce (
__inout PACL pAcl,
__in DWORD dwAceRevision,
__in DWORD AceFlags,
__in UCHAR AceType,
__in DWORD AccessMask,
__in PSID pSid,
__in PWCHAR ConditionStr,
__out DWORD *ReturnLength
);
#endif /* _WIN32_WINNT >= 0x0601 */
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
AddAccessDeniedAce ( AddAccessDeniedAce (
__inout PACL pAcl, __inout PACL pAcl,
__in DWORD dwAceRevision, __in DWORD dwAceRevision,
__in DWORD AccessMask, __in DWORD AccessMask,
__in PSID pSid __in PSID pSid
); );
skipping to change at line 11076 skipping to change at line 11816
__in SECURITY_INFORMATION SecurityInformation, __in SECURITY_INFORMATION SecurityInformation,
__in PSECURITY_DESCRIPTOR ModificationDescriptor, __in PSECURITY_DESCRIPTOR ModificationDescriptor,
__deref_inout PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor, __deref_inout PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor,
__in ULONG AutoInheritFlags, __in ULONG AutoInheritFlags,
__in PGENERIC_MAPPING GenericMapping, __in PGENERIC_MAPPING GenericMapping,
__in_opt HANDLE Token __in_opt HANDLE Token
); );
#endif /* _WIN32_WINNT >= 0x0500 */ #endif /* _WIN32_WINNT >= 0x0500 */
WINADVAPI WINADVAPI
BOOL __success(return != FALSE) BOOL
WINAPI WINAPI
GetPrivateObjectSecurity ( GetPrivateObjectSecurity (
__in PSECURITY_DESCRIPTOR ObjectDescriptor, __in PSECURITY_DESCRIPTOR ObjectDescriptor,
__in SECURITY_INFORMATION SecurityInformation, __in SECURITY_INFORMATION SecurityInformation,
__out_bcount_part_opt(DescriptorLength, *ReturnLength) PSECURITY_DESCRIPTOR ResultantDescriptor, __out_bcount_part_opt(DescriptorLength, *ReturnLength) PSECURITY_DESCRIPTOR ResultantDescriptor,
__in DWORD DescriptorLength, __in DWORD DescriptorLength,
__out PDWORD ReturnLength __out PDWORD ReturnLength
); );
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
DestroyPrivateObjectSecurity ( DestroyPrivateObjectSecurity (
__deref PSECURITY_DESCRIPTOR * ObjectDescriptor __deref PSECURITY_DESCRIPTOR * ObjectDescriptor
); );
WINADVAPI WINADVAPI
BOOL __success(return != FALSE) BOOL
WINAPI WINAPI
MakeSelfRelativeSD ( MakeSelfRelativeSD (
__in PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor, __in PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,
__out_bcount_part_opt(*lpdwBufferLength, *lpdwBufferLength) PSECURITY_DESCRI PTOR pSelfRelativeSecurityDescriptor, __out_bcount_part_opt(*lpdwBufferLength, *lpdwBufferLength) PSECURITY_DESCRI PTOR pSelfRelativeSecurityDescriptor,
__inout LPDWORD lpdwBufferLength __inout LPDWORD lpdwBufferLength
); );
WINADVAPI WINADVAPI
BOOL __success(return != FALSE) BOOL
WINAPI WINAPI
MakeAbsoluteSD ( MakeAbsoluteSD (
__in PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor, __in PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,
__out_bcount_part_opt(*lpdwAbsoluteSecurityDescriptorSize, *lpdwAbsoluteSecu rityDescriptorSize) PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor, __out_bcount_part_opt(*lpdwAbsoluteSecurityDescriptorSize, *lpdwAbsoluteSecu rityDescriptorSize) PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,
__inout LPDWORD lpdwAbsoluteSecurityDescriptorSize, __inout LPDWORD lpdwAbsoluteSecurityDescriptorSize,
__out_bcount_part_opt(*lpdwDaclSize, *lpdwDaclSize) PACL pDacl, __out_bcount_part_opt(*lpdwDaclSize, *lpdwDaclSize) PACL pDacl,
__inout LPDWORD lpdwDaclSize, __inout LPDWORD lpdwDaclSize,
__out_bcount_part_opt(*lpdwSaclSize, *lpdwSaclSize) PACL pSacl, __out_bcount_part_opt(*lpdwSaclSize, *lpdwSaclSize) PACL pSacl,
__inout LPDWORD lpdwSaclSize, __inout LPDWORD lpdwSaclSize,
__out_bcount_part_opt(*lpdwOwnerSize, *lpdwOwnerSize) PSID pOwner, __out_bcount_part_opt(*lpdwOwnerSize, *lpdwOwnerSize) PSID pOwner,
__inout LPDWORD lpdwOwnerSize, __inout LPDWORD lpdwOwnerSize,
__out_bcount_part_opt(*lpdwPrimaryGroupSize, *lpdwPrimaryGroupSize) PSID pPr imaryGroup, __out_bcount_part_opt(*lpdwPrimaryGroupSize, *lpdwPrimaryGroupSize) PSID pPr imaryGroup,
__inout LPDWORD lpdwPrimaryGroupSize __inout LPDWORD lpdwPrimaryGroupSize
); );
WINADVAPI WINADVAPI
BOOL __success(return != FALSE) BOOL
WINAPI WINAPI
MakeAbsoluteSD2 ( MakeAbsoluteSD2 (
__inout_bcount_part(*lpdwBufferSize, *lpdwBufferSize) PSECURITY_DESCRIPTOR p SelfRelativeSecurityDescriptor, __inout_bcount_part(*lpdwBufferSize, *lpdwBufferSize) PSECURITY_DESCRIPTOR p SelfRelativeSecurityDescriptor,
__inout LPDWORD lpdwBufferSize __inout LPDWORD lpdwBufferSize
); );
WINADVAPI WINADVAPI
VOID VOID
WINAPI WINAPI
QuerySecurityAccessMask( QuerySecurityAccessMask(
skipping to change at line 11376 skipping to change at line 12116
__in_opt LPCWSTR lpsz, __in_opt LPCWSTR lpsz,
__in UINT_PTR ucchMax __in UINT_PTR ucchMax
); );
#ifdef UNICODE #ifdef UNICODE
#define IsBadStringPtr IsBadStringPtrW #define IsBadStringPtr IsBadStringPtrW
#else #else
#define IsBadStringPtr IsBadStringPtrA #define IsBadStringPtr IsBadStringPtrA
#endif // !UNICODE #endif // !UNICODE
WINADVAPI WINADVAPI
BOOL __success(return != FALSE) BOOL
WINAPI WINAPI
LookupAccountSidA( LookupAccountSidA(
__in_opt LPCSTR lpSystemName, __in_opt LPCSTR lpSystemName,
__in PSID Sid, __in PSID Sid,
__out_ecount_part_opt(*cchName, *cchName + 1) LPSTR Name, __out_ecount_part_opt(*cchName, *cchName + 1) LPSTR Name,
__inout LPDWORD cchName, __inout LPDWORD cchName,
__out_ecount_part_opt(*cchReferencedDomainName, *cchReferencedDomainName + 1 ) LPSTR ReferencedDomainName, __out_ecount_part_opt(*cchReferencedDomainName, *cchReferencedDomainName + 1 ) LPSTR ReferencedDomainName,
__inout LPDWORD cchReferencedDomainName, __inout LPDWORD cchReferencedDomainName,
__out PSID_NAME_USE peUse __out PSID_NAME_USE peUse
); );
WINADVAPI WINADVAPI
BOOL __success(return != FALSE) BOOL
WINAPI WINAPI
LookupAccountSidW( LookupAccountSidW(
__in_opt LPCWSTR lpSystemName, __in_opt LPCWSTR lpSystemName,
__in PSID Sid, __in PSID Sid,
__out_ecount_part_opt(*cchName, *cchName + 1) LPWSTR Name, __out_ecount_part_opt(*cchName, *cchName + 1) LPWSTR Name,
__inout LPDWORD cchName, __inout LPDWORD cchName,
__out_ecount_part_opt(*cchReferencedDomainName, *cchReferencedDomainName + 1 ) LPWSTR ReferencedDomainName, __out_ecount_part_opt(*cchReferencedDomainName, *cchReferencedDomainName + 1 ) LPWSTR ReferencedDomainName,
__inout LPDWORD cchReferencedDomainName, __inout LPDWORD cchReferencedDomainName,
__out PSID_NAME_USE peUse __out PSID_NAME_USE peUse
); );
#ifdef UNICODE #ifdef UNICODE
#define LookupAccountSid LookupAccountSidW #define LookupAccountSid LookupAccountSidW
#else #else
#define LookupAccountSid LookupAccountSidA #define LookupAccountSid LookupAccountSidA
#endif // !UNICODE #endif // !UNICODE
WINADVAPI WINADVAPI
BOOL __success(return != FALSE) BOOL
WINAPI
LookupAccountSidLocalA(
__in PSID Sid,
__out_ecount_part_opt(*cchName, *cchName + 1) LPSTR Name,
__inout LPDWORD cchName,
__out_ecount_part_opt(*cchReferencedDomainName, *cchReferencedDomainName + 1
) LPSTR ReferencedDomainName,
__inout LPDWORD cchReferencedDomainName,
__out PSID_NAME_USE peUse
);
WINADVAPI
__success(return != FALSE) BOOL
WINAPI
LookupAccountSidLocalW(
__in PSID Sid,
__out_ecount_part_opt(*cchName, *cchName + 1) LPWSTR Name,
__inout LPDWORD cchName,
__out_ecount_part_opt(*cchReferencedDomainName, *cchReferencedDomainName + 1
) LPWSTR ReferencedDomainName,
__inout LPDWORD cchReferencedDomainName,
__out PSID_NAME_USE peUse
);
#ifdef UNICODE
#define LookupAccountSidLocal LookupAccountSidLocalW
#else
#define LookupAccountSidLocal LookupAccountSidLocalA
#endif // !UNICODE
WINADVAPI
__success(return != FALSE) BOOL
WINAPI WINAPI
LookupAccountNameA( LookupAccountNameA(
__in_opt LPCSTR lpSystemName, __in_opt LPCSTR lpSystemName,
__in LPCSTR lpAccountName, __in LPCSTR lpAccountName,
__out_bcount_part_opt(*cbSid, *cbSid) PSID Sid, __out_bcount_part_opt(*cbSid, *cbSid) PSID Sid,
__inout LPDWORD cbSid, __inout LPDWORD cbSid,
__out_ecount_part_opt(*cchReferencedDomainName, *cchReferencedDomainName + 1 ) LPSTR ReferencedDomainName, __out_ecount_part_opt(*cchReferencedDomainName, *cchReferencedDomainName + 1 ) LPSTR ReferencedDomainName,
__inout LPDWORD cchReferencedDomainName, __inout LPDWORD cchReferencedDomainName,
__out PSID_NAME_USE peUse __out PSID_NAME_USE peUse
); );
WINADVAPI WINADVAPI
BOOL __success(return != FALSE) BOOL
WINAPI WINAPI
LookupAccountNameW( LookupAccountNameW(
__in_opt LPCWSTR lpSystemName, __in_opt LPCWSTR lpSystemName,
__in LPCWSTR lpAccountName, __in LPCWSTR lpAccountName,
__out_bcount_part_opt(*cbSid, *cbSid) PSID Sid, __out_bcount_part_opt(*cbSid, *cbSid) PSID Sid,
__inout LPDWORD cbSid, __inout LPDWORD cbSid,
__out_ecount_part_opt(*cchReferencedDomainName, *cchReferencedDomainName + 1 ) LPWSTR ReferencedDomainName, __out_ecount_part_opt(*cchReferencedDomainName, *cchReferencedDomainName + 1 ) LPWSTR ReferencedDomainName,
__inout LPDWORD cchReferencedDomainName, __inout LPDWORD cchReferencedDomainName,
__out PSID_NAME_USE peUse __out PSID_NAME_USE peUse
); );
#ifdef UNICODE #ifdef UNICODE
#define LookupAccountName LookupAccountNameW #define LookupAccountName LookupAccountNameW
#else #else
#define LookupAccountName LookupAccountNameA #define LookupAccountName LookupAccountNameA
#endif // !UNICODE #endif // !UNICODE
WINADVAPI WINADVAPI
__success(return != FALSE) BOOL
WINAPI
LookupAccountNameLocalA(
__in LPCSTR lpAccountName,
__out_bcount_part_opt(*cbSid, *cbSid) PSID Sid,
__inout LPDWORD cbSid,
__out_ecount_part_opt(*cchReferencedDomainName, *cchReferencedDomainName + 1
) LPSTR ReferencedDomainName,
__inout LPDWORD cchReferencedDomainName,
__out PSID_NAME_USE peUse
);
WINADVAPI
__success(return != FALSE) BOOL
WINAPI
LookupAccountNameLocalW(
__in LPCWSTR lpAccountName,
__out_bcount_part_opt(*cbSid, *cbSid) PSID Sid,
__inout LPDWORD cbSid,
__out_ecount_part_opt(*cchReferencedDomainName, *cchReferencedDomainName + 1
) LPWSTR ReferencedDomainName,
__inout LPDWORD cchReferencedDomainName,
__out PSID_NAME_USE peUse
);
#ifdef UNICODE
#define LookupAccountNameLocal LookupAccountNameLocalW
#else
#define LookupAccountNameLocal LookupAccountNameLocalA
#endif // !UNICODE
WINADVAPI
BOOL BOOL
WINAPI WINAPI
LookupPrivilegeValueA( LookupPrivilegeValueA(
__in_opt LPCSTR lpSystemName, __in_opt LPCSTR lpSystemName,
__in LPCSTR lpName, __in LPCSTR lpName,
__out PLUID lpLuid __out PLUID lpLuid
); );
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
skipping to change at line 11458 skipping to change at line 12254
__in LPCWSTR lpName, __in LPCWSTR lpName,
__out PLUID lpLuid __out PLUID lpLuid
); );
#ifdef UNICODE #ifdef UNICODE
#define LookupPrivilegeValue LookupPrivilegeValueW #define LookupPrivilegeValue LookupPrivilegeValueW
#else #else
#define LookupPrivilegeValue LookupPrivilegeValueA #define LookupPrivilegeValue LookupPrivilegeValueA
#endif // !UNICODE #endif // !UNICODE
WINADVAPI WINADVAPI
BOOL __success(return != FALSE) BOOL
WINAPI WINAPI
LookupPrivilegeNameA( LookupPrivilegeNameA(
__in_opt LPCSTR lpSystemName, __in_opt LPCSTR lpSystemName,
__in PLUID lpLuid, __in PLUID lpLuid,
__out_ecount_part_opt(*cchName, *cchName + 1) LPSTR lpName, __out_ecount_part_opt(*cchName, *cchName + 1) LPSTR lpName,
__inout LPDWORD cchName __inout LPDWORD cchName
); );
WINADVAPI WINADVAPI
BOOL __success(return != FALSE) BOOL
WINAPI WINAPI
LookupPrivilegeNameW( LookupPrivilegeNameW(
__in_opt LPCWSTR lpSystemName, __in_opt LPCWSTR lpSystemName,
__in PLUID lpLuid, __in PLUID lpLuid,
__out_ecount_part_opt(*cchName, *cchName + 1) LPWSTR lpName, __out_ecount_part_opt(*cchName, *cchName + 1) LPWSTR lpName,
__inout LPDWORD cchName __inout LPDWORD cchName
); );
#ifdef UNICODE #ifdef UNICODE
#define LookupPrivilegeName LookupPrivilegeNameW #define LookupPrivilegeName LookupPrivilegeNameW
#else #else
#define LookupPrivilegeName LookupPrivilegeNameA #define LookupPrivilegeName LookupPrivilegeNameA
#endif // !UNICODE #endif // !UNICODE
WINADVAPI WINADVAPI
BOOL __success(return != FALSE) BOOL
WINAPI WINAPI
LookupPrivilegeDisplayNameA( LookupPrivilegeDisplayNameA(
__in_opt LPCSTR lpSystemName, __in_opt LPCSTR lpSystemName,
__in LPCSTR lpName, __in LPCSTR lpName,
__out_ecount_part_opt(*cchDisplayName, *cchDisplayName + 1) LPSTR lpDisplayN ame, __out_ecount_part_opt(*cchDisplayName, *cchDisplayName + 1) LPSTR lpDisplayN ame,
__inout LPDWORD cchDisplayName, __inout LPDWORD cchDisplayName,
__out LPDWORD lpLanguageId __out LPDWORD lpLanguageId
); );
WINADVAPI WINADVAPI
BOOL __success(return != FALSE) BOOL
WINAPI WINAPI
LookupPrivilegeDisplayNameW( LookupPrivilegeDisplayNameW(
__in_opt LPCWSTR lpSystemName, __in_opt LPCWSTR lpSystemName,
__in LPCWSTR lpName, __in LPCWSTR lpName,
__out_ecount_part_opt(*cchDisplayName, *cchDisplayName + 1) LPWSTR lpDisplay Name, __out_ecount_part_opt(*cchDisplayName, *cchDisplayName + 1) LPWSTR lpDisplay Name,
__inout LPDWORD cchDisplayName, __inout LPDWORD cchDisplayName,
__out LPDWORD lpLanguageId __out LPDWORD lpLanguageId
); );
#ifdef UNICODE #ifdef UNICODE
#define LookupPrivilegeDisplayName LookupPrivilegeDisplayNameW #define LookupPrivilegeDisplayName LookupPrivilegeDisplayNameW
skipping to change at line 11633 skipping to change at line 12429
#define MAX_COMPUTERNAME_LENGTH 15 #define MAX_COMPUTERNAME_LENGTH 15
#else #else
#define MAX_COMPUTERNAME_LENGTH 31 #define MAX_COMPUTERNAME_LENGTH 31
#endif #endif
WINBASEAPI WINBASEAPI
__success(return != 0) __success(return != 0)
BOOL BOOL
WINAPI WINAPI
GetComputerNameA ( GetComputerNameA (
__out_ecount_part_opt(*nSize, *nSize + 1) __out_has_type_adt_props(SAL_Valid CompNameT) LPSTR lpBuffer, __out_ecount_part_opt(*nSize, *nSize + 1) LPSTR lpBuffer,
__inout LPDWORD nSize __inout LPDWORD nSize
); );
WINBASEAPI WINBASEAPI
__success(return != 0) __success(return != 0)
BOOL BOOL
WINAPI WINAPI
GetComputerNameW ( GetComputerNameW (
__out_ecount_part_opt(*nSize, *nSize + 1) __out_has_type_adt_props(SAL_Valid CompNameT) LPWSTR lpBuffer, __out_ecount_part_opt(*nSize, *nSize + 1) LPWSTR lpBuffer,
__inout LPDWORD nSize __inout LPDWORD nSize
); );
#ifdef UNICODE #ifdef UNICODE
#define GetComputerName GetComputerNameW #define GetComputerName GetComputerNameW
#else #else
#define GetComputerName GetComputerNameA #define GetComputerName GetComputerNameA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
BOOL BOOL
skipping to change at line 11732 skipping to change at line 12528
#else #else
#define SetComputerNameEx SetComputerNameExA #define SetComputerNameEx SetComputerNameExA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI WINBASEAPI
__success(return == TRUE) __success(return == TRUE)
BOOL BOOL
WINAPI WINAPI
DnsHostnameToComputerNameA ( DnsHostnameToComputerNameA (
__in LPCSTR Hostname, __in LPCSTR Hostname,
__out_ecount_part_opt(*nSize, *nSize + 1) __out_has_type_adt_props(SAL_Valid CompNameT) LPSTR ComputerName, __out_ecount_part_opt(*nSize, *nSize + 1) LPSTR ComputerName,
__inout LPDWORD nSize __inout LPDWORD nSize
); );
WINBASEAPI WINBASEAPI
__success(return == TRUE) __success(return == TRUE)
BOOL BOOL
WINAPI WINAPI
DnsHostnameToComputerNameW ( DnsHostnameToComputerNameW (
__in LPCWSTR Hostname, __in LPCWSTR Hostname,
__out_ecount_part_opt(*nSize, *nSize + 1) __out_has_type_adt_props(SAL_Valid CompNameT) LPWSTR ComputerName, __out_ecount_part_opt(*nSize, *nSize + 1) LPWSTR ComputerName,
__inout LPDWORD nSize __inout LPDWORD nSize
); );
#ifdef UNICODE #ifdef UNICODE
#define DnsHostnameToComputerName DnsHostnameToComputerNameW #define DnsHostnameToComputerName DnsHostnameToComputerNameW
#else #else
#define DnsHostnameToComputerName DnsHostnameToComputerNameA #define DnsHostnameToComputerName DnsHostnameToComputerNameA
#endif // !UNICODE #endif // !UNICODE
#endif // _WIN32_WINNT #endif // _WIN32_WINNT
skipping to change at line 11794 skipping to change at line 12590
#endif // (_WIN32_WINNT >= 0x0500) #endif // (_WIN32_WINNT >= 0x0500)
#define LOGON32_PROVIDER_DEFAULT 0 #define LOGON32_PROVIDER_DEFAULT 0
#define LOGON32_PROVIDER_WINNT35 1 #define LOGON32_PROVIDER_WINNT35 1
#if(_WIN32_WINNT >= 0x0400) #if(_WIN32_WINNT >= 0x0400)
#define LOGON32_PROVIDER_WINNT40 2 #define LOGON32_PROVIDER_WINNT40 2
#endif /* _WIN32_WINNT >= 0x0400 */ #endif /* _WIN32_WINNT >= 0x0400 */
#if(_WIN32_WINNT >= 0x0500) #if(_WIN32_WINNT >= 0x0500)
#define LOGON32_PROVIDER_WINNT50 3 #define LOGON32_PROVIDER_WINNT50 3
#endif // (_WIN32_WINNT >= 0x0500) #endif // (_WIN32_WINNT >= 0x0500)
#if(_WIN32_WINNT >= 0x0600)
#define LOGON32_PROVIDER_VIRTUAL 4
#endif // (_WIN32_WINNT >= 0x0600)
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
LogonUserA ( LogonUserA (
__in LPCSTR lpszUsername, __in LPCSTR lpszUsername,
__in_opt LPCSTR lpszDomain, __in_opt LPCSTR lpszDomain,
__in LPCSTR lpszPassword, __in LPCSTR lpszPassword,
__in DWORD dwLogonType, __in DWORD dwLogonType,
__in DWORD dwLogonProvider, __in DWORD dwLogonProvider,
skipping to change at line 11918 skipping to change at line 12717
#if(_WIN32_WINNT >= 0x0500) #if(_WIN32_WINNT >= 0x0500)
// //
// LogonFlags // LogonFlags
// //
#define LOGON_WITH_PROFILE 0x00000001 #define LOGON_WITH_PROFILE 0x00000001
#define LOGON_NETCREDENTIALS_ONLY 0x00000002 #define LOGON_NETCREDENTIALS_ONLY 0x00000002
#define LOGON_ZERO_PASSWORD_BUFFER 0x80000000 #define LOGON_ZERO_PASSWORD_BUFFER 0x80000000
WINADVAPI WINADVAPI
BOOL __checkReturn BOOL
WINAPI WINAPI
CreateProcessWithLogonW( CreateProcessWithLogonW(
__in LPCWSTR lpUsername, __in LPCWSTR lpUsername,
__in_opt LPCWSTR lpDomain, __in_opt LPCWSTR lpDomain,
__in LPCWSTR lpPassword, __in LPCWSTR lpPassword,
__in DWORD dwLogonFlags, __in DWORD dwLogonFlags,
__in_opt LPCWSTR lpApplicationName, __in_opt LPCWSTR lpApplicationName,
__inout_opt LPWSTR lpCommandLine, __inout_opt LPWSTR lpCommandLine,
__in DWORD dwCreationFlags, __in DWORD dwCreationFlags,
__in_opt LPVOID lpEnvironment, __in_opt LPVOID lpEnvironment,
__in_opt LPCWSTR lpCurrentDirectory, __in_opt LPCWSTR lpCurrentDirectory,
__in LPSTARTUPINFOW lpStartupInfo, __in LPSTARTUPINFOW lpStartupInfo,
__out LPPROCESS_INFORMATION lpProcessInformation __out LPPROCESS_INFORMATION lpProcessInformation
); );
WINADVAPI WINADVAPI
BOOL __checkReturn BOOL
WINAPI WINAPI
CreateProcessWithTokenW( CreateProcessWithTokenW(
__in HANDLE hToken, __in HANDLE hToken,
__in DWORD dwLogonFlags, __in DWORD dwLogonFlags,
__in_opt LPCWSTR lpApplicationName, __in_opt LPCWSTR lpApplicationName,
__inout_opt LPWSTR lpCommandLine, __inout_opt LPWSTR lpCommandLine,
__in DWORD dwCreationFlags, __in DWORD dwCreationFlags,
__in_opt LPVOID lpEnvironment, __in_opt LPVOID lpEnvironment,
__in_opt LPCWSTR lpCurrentDirectory, __in_opt LPCWSTR lpCurrentDirectory,
__in LPSTARTUPINFOW lpStartupInfo, __in LPSTARTUPINFOW lpStartupInfo,
skipping to change at line 12190 skipping to change at line 12989
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetThreadpoolThreadMinimum( SetThreadpoolThreadMinimum(
__inout PTP_POOL ptpp, __inout PTP_POOL ptpp,
__in DWORD cthrdMic __in DWORD cthrdMic
); );
WINBASEAPI WINBASEAPI
BOOL
WINAPI
SetThreadpoolStackInformation(
__inout PTP_POOL ptpp,
__in PTP_POOL_STACK_INFORMATION ptpsi
);
WINBASEAPI
BOOL
WINAPI
QueryThreadpoolStackInformation(
__in PTP_POOL ptpp,
__out PTP_POOL_STACK_INFORMATION ptpsi
);
WINBASEAPI
VOID VOID
WINAPI WINAPI
CloseThreadpool( CloseThreadpool(
__inout PTP_POOL ptpp __inout PTP_POOL ptpp
); );
WINBASEAPI WINBASEAPI
__checkReturn __checkReturn
__out __out
PTP_CLEANUP_GROUP PTP_CLEANUP_GROUP
skipping to change at line 12272 skipping to change at line 13087
FORCEINLINE FORCEINLINE
VOID VOID
SetThreadpoolCallbackLibrary( SetThreadpoolCallbackLibrary(
__inout PTP_CALLBACK_ENVIRON pcbe, __inout PTP_CALLBACK_ENVIRON pcbe,
__in PVOID mod __in PVOID mod
) )
{ {
TpSetCallbackRaceWithDll(pcbe, mod); TpSetCallbackRaceWithDll(pcbe, mod);
} }
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
FORCEINLINE
VOID
SetThreadpoolCallbackPriority(
__inout PTP_CALLBACK_ENVIRON pcbe,
__in TP_CALLBACK_PRIORITY Priority
)
{
TpSetCallbackPriority(pcbe, Priority);
}
#endif
FORCEINLINE
VOID
SetThreadpoolCallbackPersistent(
__inout PTP_CALLBACK_ENVIRON pcbe
)
{
TpSetCallbackPersistent(pcbe);
}
FORCEINLINE FORCEINLINE
VOID VOID
DestroyThreadpoolEnvironment( DestroyThreadpoolEnvironment(
__inout PTP_CALLBACK_ENVIRON pcbe __inout PTP_CALLBACK_ENVIRON pcbe
) )
{ {
TpDestroyCallbackEnviron(pcbe); TpDestroyCallbackEnviron(pcbe);
} }
#endif // !defined(MIDL_PASS) #endif // !defined(MIDL_PASS)
skipping to change at line 12564 skipping to change at line 13402
WINAPI WINAPI
ClosePrivateNamespace( ClosePrivateNamespace(
__in HANDLE Handle, __in HANDLE Handle,
__in ULONG Flags __in ULONG Flags
); );
// //
// Boundary descriptors support // Boundary descriptors support
// //
WINBASEAPI
__out_opt __out_opt
HANDLE HANDLE
APIENTRY APIENTRY
CreateBoundaryDescriptorA( CreateBoundaryDescriptorA(
__in LPCSTR Name, __in LPCSTR Name,
__in ULONG Flags __in ULONG Flags
); );
WINBASEAPI
__out_opt __out_opt
HANDLE HANDLE
APIENTRY APIENTRY
CreateBoundaryDescriptorW( CreateBoundaryDescriptorW(
__in LPCWSTR Name, __in LPCWSTR Name,
__in ULONG Flags __in ULONG Flags
); );
#ifdef UNICODE #ifdef UNICODE
#define CreateBoundaryDescriptor CreateBoundaryDescriptorW #define CreateBoundaryDescriptor CreateBoundaryDescriptorW
#else #else
skipping to change at line 12593 skipping to change at line 13433
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
AddSIDToBoundaryDescriptor( AddSIDToBoundaryDescriptor(
__inout HANDLE * BoundaryDescriptor, __inout HANDLE * BoundaryDescriptor,
__in PSID RequiredSid __in PSID RequiredSid
); );
WINBASEAPI WINBASEAPI
BOOL
WINAPI
AddIntegrityLabelToBoundaryDescriptor(
__inout HANDLE * BoundaryDescriptor,
__in PSID IntegrityLabel
);
WINBASEAPI
VOID VOID
WINAPI WINAPI
DeleteBoundaryDescriptor( DeleteBoundaryDescriptor(
__in HANDLE BoundaryDescriptor __in HANDLE BoundaryDescriptor
); );
#endif // _WIN32_WINNT >= 0x0600 #endif // _WIN32_WINNT >= 0x0600
#endif // _WIN32_WINNT >= 0x0500 #endif // _WIN32_WINNT >= 0x0500
skipping to change at line 12770 skipping to change at line 13618
typedef struct _SYSTEM_POWER_STATUS { typedef struct _SYSTEM_POWER_STATUS {
BYTE ACLineStatus; BYTE ACLineStatus;
BYTE BatteryFlag; BYTE BatteryFlag;
BYTE BatteryLifePercent; BYTE BatteryLifePercent;
BYTE Reserved1; BYTE Reserved1;
DWORD BatteryLifeTime; DWORD BatteryLifeTime;
DWORD BatteryFullLifeTime; DWORD BatteryFullLifeTime;
} SYSTEM_POWER_STATUS, *LPSYSTEM_POWER_STATUS; } SYSTEM_POWER_STATUS, *LPSYSTEM_POWER_STATUS;
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetSystemPowerStatus( GetSystemPowerStatus(
__out LPSYSTEM_POWER_STATUS lpSystemPowerStatus __out LPSYSTEM_POWER_STATUS lpSystemPowerStatus
); );
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetSystemPowerState( SetSystemPowerState(
__in BOOL fSuspend, __in BOOL fSuspend,
__in BOOL fForce __in BOOL fForce
); );
#endif /* WINVER >= 0x0400 */ #endif /* WINVER >= 0x0400 */
#if (_WIN32_WINNT >= 0x0500) #if (_WIN32_WINNT >= 0x0500)
skipping to change at line 13166 skipping to change at line 14016
__in LPCWSTR lpszFileName, __in LPCWSTR lpszFileName,
__out_ecount(cchBufferLength) LPWSTR lpszVolumePathName, __out_ecount(cchBufferLength) LPWSTR lpszVolumePathName,
__in DWORD cchBufferLength __in DWORD cchBufferLength
); );
#ifdef UNICODE #ifdef UNICODE
#define GetVolumePathName GetVolumePathNameW #define GetVolumePathName GetVolumePathNameW
#else #else
#define GetVolumePathName GetVolumePathNameA #define GetVolumePathName GetVolumePathNameA
#endif // !UNICODE #endif // !UNICODE
#endif
#if(_WIN32_WINNT >= 0x0501)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetVolumePathNamesForVolumeNameA( GetVolumePathNamesForVolumeNameA(
__in LPCSTR lpszVolumeName, __in LPCSTR lpszVolumeName,
__out_ecount_part_opt(cchBufferLength, *lpcchReturnLength) __nullnulltermina ted LPCH lpszVolumePathNames, __out_ecount_part_opt(cchBufferLength, *lpcchReturnLength) __nullnulltermina ted LPCH lpszVolumePathNames,
__in DWORD cchBufferLength, __in DWORD cchBufferLength,
__out PDWORD lpcchReturnLength __out PDWORD lpcchReturnLength
); );
WINBASEAPI WINBASEAPI
skipping to change at line 13190 skipping to change at line 14044
__out_ecount_part_opt(cchBufferLength, *lpcchReturnLength) __nullnulltermina ted LPWCH lpszVolumePathNames, __out_ecount_part_opt(cchBufferLength, *lpcchReturnLength) __nullnulltermina ted LPWCH lpszVolumePathNames,
__in DWORD cchBufferLength, __in DWORD cchBufferLength,
__out PDWORD lpcchReturnLength __out PDWORD lpcchReturnLength
); );
#ifdef UNICODE #ifdef UNICODE
#define GetVolumePathNamesForVolumeName GetVolumePathNamesForVolumeNameW #define GetVolumePathNamesForVolumeName GetVolumePathNamesForVolumeNameW
#else #else
#define GetVolumePathNamesForVolumeName GetVolumePathNamesForVolumeNameA #define GetVolumePathNamesForVolumeName GetVolumePathNamesForVolumeNameA
#endif // !UNICODE #endif // !UNICODE
#endif #endif // (_WIN32_WINNT >= 0x0501)
#if (_WIN32_WINNT >= 0x0500) || (_WIN32_FUSION >= 0x0100) || ISOLATION_AWARE_ENA BLED #if (_WIN32_WINNT >= 0x0500) || (_WIN32_FUSION >= 0x0100) || ISOLATION_AWARE_ENA BLED
#define ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID (0x00000001) #define ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID (0x00000001)
#define ACTCTX_FLAG_LANGID_VALID (0x00000002) #define ACTCTX_FLAG_LANGID_VALID (0x00000002)
#define ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID (0x00000004) #define ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID (0x00000004)
#define ACTCTX_FLAG_RESOURCE_NAME_VALID (0x00000008) #define ACTCTX_FLAG_RESOURCE_NAME_VALID (0x00000008)
#define ACTCTX_FLAG_SET_PROCESS_DEFAULT (0x00000010) #define ACTCTX_FLAG_SET_PROCESS_DEFAULT (0x00000010)
#define ACTCTX_FLAG_APPLICATION_NAME_VALID (0x00000020) #define ACTCTX_FLAG_APPLICATION_NAME_VALID (0x00000020)
#define ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF (0x00000040) #define ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF (0x00000040)
skipping to change at line 13491 skipping to change at line 14345
__in HANDLE hProcess, __in HANDLE hProcess,
__out PBOOL Wow64Process __out PBOOL Wow64Process
); );
#endif // (_WIN32_WINNT >= 0x0501) #endif // (_WIN32_WINNT >= 0x0501)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetLogicalProcessorInformation( GetLogicalProcessorInformation(
__out_bcount_part(*ReturnedLength, *ReturnedLength) PSYSTEM_LOGICAL_PROCESSO __out_bcount_part_opt(*ReturnedLength, *ReturnedLength) PSYSTEM_LOGICAL_PROC
R_INFORMATION Buffer, ESSOR_INFORMATION Buffer,
__inout PDWORD ReturnedLength
);
#if _WIN32_WINNT >= 0x0601
WINBASEAPI
BOOL
WINAPI
GetLogicalProcessorInformationEx(
__in LOGICAL_PROCESSOR_RELATIONSHIP RelationshipType,
__out_bcount_part_opt(*ReturnedLength, *ReturnedLength) PSYSTEM_LOGICAL_PROC
ESSOR_INFORMATION_EX Buffer,
__inout PDWORD ReturnedLength __inout PDWORD ReturnedLength
); );
WINBASEAPI
WORD
WINAPI
GetActiveProcessorGroupCount(
VOID
);
WINBASEAPI
WORD
WINAPI
GetMaximumProcessorGroupCount(
VOID
);
WINBASEAPI
DWORD
WINAPI
GetActiveProcessorCount(
__in WORD GroupNumber
);
WINBASEAPI
DWORD
WINAPI
GetMaximumProcessorCount(
__in WORD GroupNumber
);
#endif // (_WIN32_WINNT >=0x0601)
// //
// NUMA Information routines. // NUMA Information routines.
// //
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetNumaHighestNodeNumber( GetNumaHighestNodeNumber(
__out PULONG HighestNodeNumber __out PULONG HighestNodeNumber
); );
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetNumaProcessorNode( GetNumaProcessorNode(
__in UCHAR Processor, __in UCHAR Processor,
__out PUCHAR NodeNumber __out PUCHAR NodeNumber
); );
#if _WIN32_WINNT >= 0x0601
WINBASEAPI
BOOL
WINAPI
GetNumaNodeNumberFromHandle(
__in HANDLE hFile,
__out PUSHORT NodeNumber
);
#endif // (_WIN32_WINNT >=0x0601)
#if _WIN32_WINNT >= 0x0601
WINBASEAPI
BOOL
WINAPI
GetNumaProcessorNodeEx(
__in PPROCESSOR_NUMBER Processor,
__out PUSHORT NodeNumber
);
#endif // (_WIN32_WINNT >=0x0601)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetNumaNodeProcessorMask( GetNumaNodeProcessorMask(
__in UCHAR Node, __in UCHAR Node,
__out PULONGLONG ProcessorMask __out PULONGLONG ProcessorMask
); );
#if _WIN32_WINNT >= 0x0601
WINBASEAPI
BOOL
WINAPI
GetNumaNodeProcessorMaskEx(
__in USHORT Node,
__out PGROUP_AFFINITY ProcessorMask
);
#endif // (_WIN32_WINNT >=0x0601)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetNumaAvailableMemoryNode( GetNumaAvailableMemoryNode(
__in UCHAR Node, __in UCHAR Node,
__out PULONGLONG AvailableBytes __out PULONGLONG AvailableBytes
); );
#if _WIN32_WINNT >= 0x0601
WINBASEAPI
BOOL
WINAPI
GetNumaAvailableMemoryNodeEx(
__in USHORT Node,
__out PULONGLONG AvailableBytes
);
#endif // (_WIN32_WINNT >=0x0601)
#if (_WIN32_WINNT >= 0x0600) #if (_WIN32_WINNT >= 0x0600)
WINBASEAPI WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetNumaProximityNode( GetNumaProximityNode(
__in ULONG ProximityId, __in ULONG ProximityId,
__out PUCHAR NodeNumber __out PUCHAR NodeNumber
); );
#endif #endif
#if _WIN32_WINNT >= 0x0601
WINBASEAPI
BOOL
WINAPI
GetNumaProximityNodeEx(
__in ULONG ProximityId,
__out PUSHORT NodeNumber
);
#endif // (_WIN32_WINNT >=0x0601)
// //
// Application restart and data recovery callback // Application restart and data recovery callback
// //
typedef DWORD (WINAPI *APPLICATION_RECOVERY_CALLBACK)(PVOID pvParameter); typedef DWORD (WINAPI *APPLICATION_RECOVERY_CALLBACK)(PVOID pvParameter);
// //
// Max length of commandline in characters (including the NULL character that ca n be registered for restart) // Max length of commandline in characters (including the NULL character that ca n be registered for restart)
// //
#define RESTART_MAX_CMD_LINE 2048 #define RESTART_MAX_CMD_LINE 1024
// //
// Do not restart the process for termination due to application crashes // Do not restart the process for termination due to application crashes
// //
#define RESTART_NO_CRASH 1 #define RESTART_NO_CRASH 1
// //
// Do not restart the process for termination due to application hangs // Do not restart the process for termination due to application hangs
// //
#define RESTART_NO_HANG 2 #define RESTART_NO_HANG 2
// //
// Do not restart the process for termination due to patch installations // Do not restart the process for termination due to patch installations
// //
#define RESTART_NO_PATCH 4 #define RESTART_NO_PATCH 4
// //
// Do not restart the process when the system is rebooted because the // Do not restart the process when the system is rebooted due to patch installat ions
// //
#define RESTART_NO_REBOOT 8 #define RESTART_NO_REBOOT 8
WINBASEAPI WINBASEAPI
HRESULT HRESULT
WINAPI WINAPI
RegisterApplicationRecoveryCallback( RegisterApplicationRecoveryCallback(
__in APPLICATION_RECOVERY_CALLBACK pRecoveyCallback, __in APPLICATION_RECOVERY_CALLBACK pRecoveyCallback,
__in_opt PVOID pvParameter, __in_opt PVOID pvParameter,
__in DWORD dwPingInterval, __in DWORD dwPingInterval,
__in DWORD dwFlags __in DWORD dwFlags
); );
WINBASEAPI WINBASEAPI
HRESULT HRESULT
WINAPI WINAPI
UnregisterApplicationRecoveryCallback(); UnregisterApplicationRecoveryCallback(void);
WINBASEAPI WINBASEAPI
HRESULT HRESULT
WINAPI WINAPI
RegisterApplicationRestart( RegisterApplicationRestart(
__in_opt PCWSTR pwzCommandline, __in_opt PCWSTR pwzCommandline,
__in DWORD dwFlags __in DWORD dwFlags
); );
WINBASEAPI WINBASEAPI
HRESULT HRESULT
WINAPI WINAPI
UnregisterApplicationRestart(); UnregisterApplicationRestart(void);
#define RECOVERY_DEFAULT_PING_INTERVAL 5000 #define RECOVERY_DEFAULT_PING_INTERVAL 5000
#define RECOVERY_MAX_PING_INTERVAL (5 * 60 * 1000) #define RECOVERY_MAX_PING_INTERVAL (5 * 60 * 1000)
WINBASEAPI WINBASEAPI
HRESULT HRESULT
WINAPI WINAPI
GetApplicationRecoveryCallback( GetApplicationRecoveryCallback(
__in HANDLE hProcess, __in HANDLE hProcess,
__out APPLICATION_RECOVERY_CALLBACK* pRecoveryCallback, __out APPLICATION_RECOVERY_CALLBACK* pRecoveryCallback,
skipping to change at line 13653 skipping to change at line 14608
FileRenameInfo, FileRenameInfo,
FileDispositionInfo, FileDispositionInfo,
FileAllocationInfo, FileAllocationInfo,
FileEndOfFileInfo, FileEndOfFileInfo,
FileStreamInfo, FileStreamInfo,
FileCompressionInfo, FileCompressionInfo,
FileAttributeTagInfo, FileAttributeTagInfo,
FileIdBothDirectoryInfo, FileIdBothDirectoryInfo,
FileIdBothDirectoryRestartInfo, FileIdBothDirectoryRestartInfo,
FileIoPriorityHintInfo, FileIoPriorityHintInfo,
FileRemoteProtocolInfo,
MaximumFileInfoByHandleClass MaximumFileInfoByHandleClass
} FILE_INFO_BY_HANDLE_CLASS, *PFILE_INFO_BY_HANDLE_CLASS; } FILE_INFO_BY_HANDLE_CLASS, *PFILE_INFO_BY_HANDLE_CLASS;
typedef struct _FILE_BASIC_INFO { typedef struct _FILE_BASIC_INFO {
LARGE_INTEGER CreationTime; LARGE_INTEGER CreationTime;
LARGE_INTEGER LastAccessTime; LARGE_INTEGER LastAccessTime;
LARGE_INTEGER LastWriteTime; LARGE_INTEGER LastWriteTime;
LARGE_INTEGER ChangeTime; LARGE_INTEGER ChangeTime;
DWORD FileAttributes; DWORD FileAttributes;
} FILE_BASIC_INFO, *PFILE_BASIC_INFO; } FILE_BASIC_INFO, *PFILE_BASIC_INFO;
skipping to change at line 13747 skipping to change at line 14703
IoPriorityHintVeryLow = 0, IoPriorityHintVeryLow = 0,
IoPriorityHintLow, IoPriorityHintLow,
IoPriorityHintNormal, IoPriorityHintNormal,
MaximumIoPriorityHintType MaximumIoPriorityHintType
} PRIORITY_HINT; } PRIORITY_HINT;
typedef struct _FILE_IO_PRIORITY_HINT_INFO { typedef struct _FILE_IO_PRIORITY_HINT_INFO {
PRIORITY_HINT PriorityHint; PRIORITY_HINT PriorityHint;
} FILE_IO_PRIORITY_HINT_INFO, *PFILE_IO_PRIORITY_HINT_INFO; } FILE_IO_PRIORITY_HINT_INFO, *PFILE_IO_PRIORITY_HINT_INFO;
// Structure and constants must match those in ntioapi_x.w
#define REMOTE_PROTOCOL_INFO_FLAG_LOOPBACK 0x00000001
#define REMOTE_PROTOCOL_INFO_FLAG_OFFLINE 0x00000002
typedef struct _FILE_REMOTE_PROTOCOL_INFO
{
// Structure Version
USHORT StructureVersion; // 1
USHORT StructureSize; // sizeof(FILE_REMOTE_PROTOCOL_INFO)
DWORD Protocol; // Protocol (WNNC_NET_*) defined in wnnc.h or n
tifs.h.
// Protocol Version & Type
USHORT ProtocolMajorVersion;
USHORT ProtocolMinorVersion;
USHORT ProtocolRevision;
USHORT Reserved;
// Protocol-Generic Information
DWORD Flags;
struct {
DWORD Reserved[8];
} GenericReserved;
// Protocol specific information
struct {
DWORD Reserved[16];
} ProtocolSpecificReserved;
} FILE_REMOTE_PROTOCOL_INFO, *PFILE_REMOTE_PROTOCOL_INFO;
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetFileInformationByHandle( SetFileInformationByHandle(
__in HANDLE hFile, __in HANDLE hFile,
__in FILE_INFO_BY_HANDLE_CLASS FileInformationClass, __in FILE_INFO_BY_HANDLE_CLASS FileInformationClass,
__in_bcount(dwBufferSize) LPVOID lpFileInformation, __in_bcount(dwBufferSize) LPVOID lpFileInformation,
__in DWORD dwBufferSize __in DWORD dwBufferSize
); );
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetFileInformationByHandleEx( GetFileInformationByHandleEx(
__in HANDLE hFile, __in HANDLE hFile,
__in FILE_INFO_BY_HANDLE_CLASS FileInformationClass, __in FILE_INFO_BY_HANDLE_CLASS FileInformationClass,
__out_bcount(dwBufferSize) LPVOID lpFileInformation, __out_bcount(dwBufferSize) LPVOID lpFileInformation,
__in DWORD dwBufferSize __in DWORD dwBufferSize
); );
typedef enum _FILE_ID_TYPE { typedef enum _FILE_ID_TYPE {
skipping to change at line 13777 skipping to change at line 14770
ObjectIdType, ObjectIdType,
MaximumFileIdType MaximumFileIdType
} FILE_ID_TYPE, *PFILE_ID_TYPE; } FILE_ID_TYPE, *PFILE_ID_TYPE;
typedef struct FILE_ID_DESCRIPTOR { typedef struct FILE_ID_DESCRIPTOR {
DWORD dwSize; // Size of the struct DWORD dwSize; // Size of the struct
FILE_ID_TYPE Type; // Describes the type of identifier passed in. FILE_ID_TYPE Type; // Describes the type of identifier passed in.
union { union {
LARGE_INTEGER FileId; LARGE_INTEGER FileId;
GUID ObjectId; GUID ObjectId;
}; } DUMMYUNIONNAME;
} FILE_ID_DESCRIPTOR, *LPFILE_ID_DESCRIPTOR; } FILE_ID_DESCRIPTOR, *LPFILE_ID_DESCRIPTOR;
WINBASEAPI
__out __out
HANDLE HANDLE
WINAPI WINAPI
OpenFileById ( OpenFileById (
__in HANDLE hVolumeHint, __in HANDLE hVolumeHint,
__in LPFILE_ID_DESCRIPTOR lpFileId, __in LPFILE_ID_DESCRIPTOR lpFileId,
__in DWORD dwDesiredAccess, __in DWORD dwDesiredAccess,
__in DWORD dwShareMode, __in DWORD dwShareMode,
__in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes, __in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes,
__in DWORD dwFlagsAndAttributes __in DWORD dwFlagsAndAttributes
skipping to change at line 13803 skipping to change at line 14797
#if (_WIN32_WINNT >= 0x0600) #if (_WIN32_WINNT >= 0x0600)
// //
// Flags to be passed into CREATE_SYMBOLIC_LINK // Flags to be passed into CREATE_SYMBOLIC_LINK
// //
#define SYMBOLIC_LINK_FLAG_DIRECTORY (0x1) #define SYMBOLIC_LINK_FLAG_DIRECTORY (0x1)
#define VALID_SYMBOLIC_LINK_FLAGS SYMBOLIC_LINK_FLAG_DIRECTORY // & whatever ot her flags we think of! #define VALID_SYMBOLIC_LINK_FLAGS SYMBOLIC_LINK_FLAG_DIRECTORY // & whatever ot her flags we think of!
WINBASEAPI
BOOLEAN BOOLEAN
APIENTRY APIENTRY
CreateSymbolicLinkA ( CreateSymbolicLinkA (
__in LPCSTR lpSymlinkFileName, __in LPCSTR lpSymlinkFileName,
__in LPCSTR lpTargetFileName, __in LPCSTR lpTargetFileName,
__in DWORD dwFlags __in DWORD dwFlags
); );
WINBASEAPI
BOOLEAN BOOLEAN
APIENTRY APIENTRY
CreateSymbolicLinkW ( CreateSymbolicLinkW (
__in LPCWSTR lpSymlinkFileName, __in LPCWSTR lpSymlinkFileName,
__in LPCWSTR lpTargetFileName, __in LPCWSTR lpTargetFileName,
__in DWORD dwFlags __in DWORD dwFlags
); );
#ifdef UNICODE #ifdef UNICODE
#define CreateSymbolicLink CreateSymbolicLinkW #define CreateSymbolicLink CreateSymbolicLinkW
#else #else
#define CreateSymbolicLink CreateSymbolicLinkA #define CreateSymbolicLink CreateSymbolicLinkA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI
BOOLEAN BOOLEAN
APIENTRY APIENTRY
CreateSymbolicLinkTransactedA ( CreateSymbolicLinkTransactedA (
__in LPCSTR lpSymlinkFileName, __in LPCSTR lpSymlinkFileName,
__in LPCSTR lpTargetFileName, __in LPCSTR lpTargetFileName,
__in DWORD dwFlags, __in DWORD dwFlags,
__in HANDLE hTransaction __in HANDLE hTransaction
); );
WINBASEAPI
BOOLEAN BOOLEAN
APIENTRY APIENTRY
CreateSymbolicLinkTransactedW ( CreateSymbolicLinkTransactedW (
__in LPCWSTR lpSymlinkFileName, __in LPCWSTR lpSymlinkFileName,
__in LPCWSTR lpTargetFileName, __in LPCWSTR lpTargetFileName,
__in DWORD dwFlags, __in DWORD dwFlags,
__in HANDLE hTransaction __in HANDLE hTransaction
); );
#ifdef UNICODE #ifdef UNICODE
#define CreateSymbolicLinkTransacted CreateSymbolicLinkTransactedW #define CreateSymbolicLinkTransacted CreateSymbolicLinkTransactedW
#else #else
#define CreateSymbolicLinkTransacted CreateSymbolicLinkTransactedA #define CreateSymbolicLinkTransacted CreateSymbolicLinkTransactedA
#endif // !UNICODE #endif // !UNICODE
WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetFinalPathNameByHandleA ( GetFinalPathNameByHandleA (
__in HANDLE hFile, __in HANDLE hFile,
__out_ecount(cchFilePath) LPSTR lpszFilePath, __out_ecount(cchFilePath) LPSTR lpszFilePath,
__in DWORD cchFilePath, __in DWORD cchFilePath,
__in DWORD dwFlags __in DWORD dwFlags
); );
WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetFinalPathNameByHandleW ( GetFinalPathNameByHandleW (
__in HANDLE hFile, __in HANDLE hFile,
__out_ecount(cchFilePath) LPWSTR lpszFilePath, __out_ecount(cchFilePath) LPWSTR lpszFilePath,
__in DWORD cchFilePath, __in DWORD cchFilePath,
__in DWORD dwFlags __in DWORD dwFlags
); );
#ifdef UNICODE #ifdef UNICODE
#define GetFinalPathNameByHandle GetFinalPathNameByHandleW #define GetFinalPathNameByHandle GetFinalPathNameByHandleW
skipping to change at line 13886 skipping to change at line 14886
__in_opt HANDLE hActCtx, __in_opt HANDLE hActCtx,
__in_opt PCWSTR settingsNameSpace, __in_opt PCWSTR settingsNameSpace,
__in PCWSTR settingName, __in PCWSTR settingName,
__out_bcount_part_opt(dwBuffer, *pdwWrittenOrRequired) PWSTR pvBuffer, __out_bcount_part_opt(dwBuffer, *pdwWrittenOrRequired) PWSTR pvBuffer,
__in SIZE_T dwBuffer, __in SIZE_T dwBuffer,
__out_opt SIZE_T *pdwWrittenOrRequired __out_opt SIZE_T *pdwWrittenOrRequired
); );
#endif #endif
#if (_WIN32_WINNT >= 0x0600)
WINBASEAPI
BOOL
WINAPI
ReplacePartitionUnit (
__in PWSTR TargetPartition,
__in PWSTR SparePartition,
__in ULONG Flags
);
#endif
#if (_WIN32_WINNT >= 0x0600)
WINBASEAPI
BOOL
WINAPI
AddSecureMemoryCacheCallback(
__in __callback PSECURE_MEMORY_CACHE_CALLBACK pfnCallBack
);
WINBASEAPI
BOOL
WINAPI
RemoveSecureMemoryCacheCallback(
__in __callback PSECURE_MEMORY_CACHE_CALLBACK pfnCallBack
);
#endif
#if (_WIN32_WINNT >= 0x0601)
__checkReturn
WINBASEAPI
BOOL
WINAPI
CopyExtendedContext(
__out PCONTEXT_EX Destination,
__in DWORD ContextFlags,
__in PCONTEXT_EX Source
);
__checkReturn
WINBASEAPI
BOOL
WINAPI
InitializeExtendedContext(
__out PVOID Context,
__in DWORD ContextFlags,
__out PCONTEXT_EX* ContextEx
);
WINBASEAPI
DWORD64
WINAPI
GetEnabledExtendedFeatures(
__in DWORD64 FeatureMask
);
WINBASEAPI
BOOL
WINAPI
GetExtendedContextLength(
__in DWORD ContextFlags,
__out PDWORD ContextLength
);
WINBASEAPI
DWORD64
WINAPI
GetExtendedFeaturesMask(
__in PCONTEXT_EX ContextEx
);
WINBASEAPI
PVOID
WINAPI
LocateExtendedFeature(
__in PCONTEXT_EX ContextEx,
__in DWORD FeatureId,
__out_opt PDWORD Length
);
WINBASEAPI
PCONTEXT
WINAPI
LocateLegacyContext(
__in PCONTEXT_EX ContextEx,
__out_opt PDWORD Length
);
WINBASEAPI
VOID
WINAPI
SetExtendedFeaturesMask(
__out PCONTEXT_EX ContextEx,
__in DWORD64 FeatureMask
);
WINBASEAPI
DWORD
APIENTRY
EnableThreadProfiling(
__in HANDLE ThreadHandle,
__in DWORD Flags,
__in DWORD64 HardwareCounters,
__out HANDLE *PerformanceDataHandle
);
WINBASEAPI
DWORD
APIENTRY
DisableThreadProfiling(
__in HANDLE PerformanceDataHandle
);
WINBASEAPI
DWORD
APIENTRY
QueryThreadProfiling(
__in HANDLE ThreadHandle,
__out PBOOLEAN Enabled
);
WINBASEAPI
DWORD
APIENTRY
ReadThreadProfilingData(
__in HANDLE PerformanceDataHandle,
__in DWORD Flags,
__out PPERFORMANCE_DATA PerformanceData
);
#endif
#if !defined(RC_INVOKED) /* RC complains about long symbols in #ifs */ #if !defined(RC_INVOKED) /* RC complains about long symbols in #ifs */
#if defined(ISOLATION_AWARE_ENABLED) && (ISOLATION_AWARE_ENABLED != 0) #if defined(ISOLATION_AWARE_ENABLED) && (ISOLATION_AWARE_ENABLED != 0)
#include "winbase.inl" #include "winbase.inl"
#endif /* ISOLATION_AWARE_ENABLED */ #endif /* ISOLATION_AWARE_ENABLED */
#endif /* RC */ #endif /* RC */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif // _WINBASE_ #endif // _WINBASE_
#if !defined(RC_INVOKED)
#if !defined(NOWINBASEINTERLOCK)
#if !defined(_NTOS_)
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
winbase_interlockedcplusplus.h
Abstract:
C++ function overloads in place of "manual name mangling".
This file is meant to be #included by winbase.h or any other file declaring
the signed interlocked functions.
Author:
Jay Krell (JayKrell) April 2002
--*/
#if !defined(RC_INVOKED) /* { */
#if !defined(MICROSOFT_WINDOWS_WINBASE_INTERLOCKED_CPLUSPLUS_H_INCLUDED) /* { */
#define MICROSOFT_WINDOWS_WINBASE_INTERLOCKED_CPLUSPLUS_H_INCLUDED
#if _MSC_VER > 1000
#pragma once
#endif
#if !defined(MIDL_PASS) /* { */
/*
To turn off/hide the contents of this file:
#define MICROSOFT_WINDOWS_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS 0
*/
#if !defined(MICROSOFT_WINDOWS_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS)
#define MICROSOFT_WINDOWS_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS (_WIN
32_WINNT >= 0x0502 || !defined(_WINBASE_))
#endif
#if MICROSOFT_WINDOWS_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS /* { */
#if defined(__cplusplus) /* { */
extern "C++" {
FORCEINLINE
unsigned
InterlockedIncrement(
__inout __drv_interlocked unsigned volatile *Addend
)
{
return (unsigned) InterlockedIncrement((volatile long*) Addend);
}
FORCEINLINE
unsigned long
InterlockedIncrement(
__inout __drv_interlocked unsigned long volatile *Addend
)
{
return (unsigned long) InterlockedIncrement((volatile long*) Addend);
}
#if defined(_WIN64) || ((_WIN32_WINNT >= 0x0502) && defined(_WINBASE_))
FORCEINLINE
unsigned __int64
InterlockedIncrement(
__inout __drv_interlocked unsigned __int64 volatile *Addend
)
{
return (unsigned __int64) InterlockedIncrement64((volatile __int64*) Addend)
;
}
#endif
FORCEINLINE
unsigned
InterlockedDecrement(
__inout __drv_interlocked unsigned volatile *Addend
)
{
return (unsigned long) InterlockedDecrement((volatile long*) Addend);
}
FORCEINLINE
unsigned long
InterlockedDecrement(
__inout __drv_interlocked unsigned long volatile *Addend
)
{
return (unsigned long) InterlockedDecrement((volatile long*) Addend);
}
#if defined(_WIN64) || ((_WIN32_WINNT >= 0x0502) && defined(_WINBASE_))
FORCEINLINE
unsigned __int64
InterlockedDecrement(
__inout __drv_interlocked unsigned __int64 volatile *Addend
)
{
return (unsigned __int64) InterlockedDecrement64((volatile __int64*) Addend)
;
}
#endif
FORCEINLINE
unsigned
InterlockedExchange(
__inout __drv_interlocked unsigned volatile *Target,
__in unsigned Value
)
{
return (unsigned) InterlockedExchange((volatile long*) Target, (long) Value)
;
}
FORCEINLINE
unsigned long
InterlockedExchange(
__inout __drv_interlocked unsigned long volatile *Target,
__in unsigned long Value
)
{
return (unsigned long) InterlockedExchange((volatile long*) Target, (long) V
alue);
}
#if defined(_WIN64) || ((_WIN32_WINNT >= 0x0502) && defined(_WINBASE_))
FORCEINLINE
unsigned __int64
InterlockedExchange(
__inout __drv_interlocked unsigned __int64 volatile *Target,
__in unsigned __int64 Value
)
{
return (unsigned __int64) InterlockedExchange64((volatile __int64*) Target,
(__int64) Value);
}
#endif
FORCEINLINE
unsigned
InterlockedExchangeAdd(
__inout __drv_interlocked unsigned volatile *Addend,
__in unsigned Value
)
{
return (unsigned) InterlockedExchangeAdd((volatile long*) Addend, (long) Val
ue);
}
FORCEINLINE
unsigned
InterlockedExchangeSubtract(
__inout __drv_interlocked unsigned volatile *Addend,
__in unsigned Value
)
{
return (unsigned) InterlockedExchangeAdd((volatile long*) Addend, - (long)
Value);
}
FORCEINLINE
unsigned long
InterlockedExchangeAdd(
__inout __drv_interlocked unsigned long volatile *Addend,
__in unsigned long Value
)
{
return (unsigned long) InterlockedExchangeAdd((volatile long*) Addend, (long
) Value);
}
FORCEINLINE
unsigned long
InterlockedExchangeSubtract(
__inout __drv_interlocked unsigned long volatile *Addend,
__in unsigned long Value
)
{
return (unsigned long) InterlockedExchangeAdd((volatile long*) Addend, - (l
ong) Value);
}
#if defined(_WIN64) || ((_WIN32_WINNT >= 0x0502) && defined(_WINBASE_))
FORCEINLINE
unsigned __int64
InterlockedExchangeAdd(
__inout __drv_interlocked unsigned __int64 volatile *Addend,
__in unsigned __int64 Value
)
{
return (unsigned __int64) InterlockedExchangeAdd64((volatile __int64*) Adden
d, (__int64) Value);
}
FORCEINLINE
unsigned __int64
InterlockedExchangeSubtract(
__inout __drv_interlocked unsigned __int64 volatile *Addend,
__in unsigned __int64 Value
)
{
return (unsigned __int64) InterlockedExchangeAdd64((volatile __int64*) Adden
d, - (__int64) Value);
}
#endif
FORCEINLINE
unsigned
InterlockedCompareExchange(
__inout __drv_interlocked unsigned volatile *Destination,
__in unsigned Exchange,
__in unsigned Comperand
)
{
return (unsigned) InterlockedCompareExchange((volatile long*) Destination, (
long) Exchange, (long) Comperand);
}
FORCEINLINE
unsigned long
InterlockedCompareExchange(
__inout __drv_interlocked unsigned long volatile *Destination,
__in unsigned long Exchange,
__in unsigned long Comperand
)
{
return (unsigned long) InterlockedCompareExchange((volatile long*) Destinati
on, (long) Exchange, (long) Comperand);
}
#if defined(_WIN64) || ((_WIN32_WINNT >= 0x0502) && defined(_WINBASE_))
FORCEINLINE
unsigned __int64
InterlockedCompareExchange(
__inout __drv_interlocked unsigned __int64 volatile *Destination,
__in unsigned __int64 Exchange,
__in unsigned __int64 Comperand
)
{
return (unsigned __int64) InterlockedCompareExchange64((volatile __int64*) D
estination, (__int64) Exchange, (__int64) Comperand);
}
FORCEINLINE
unsigned __int64
InterlockedAnd(
__inout __drv_interlocked unsigned __int64 volatile *Destination,
__in unsigned __int64 Value
)
{
return (unsigned __int64) InterlockedAnd64((volatile __int64*) Destination,
(__int64) Value);
}
FORCEINLINE
unsigned __int64
InterlockedOr(
__inout __drv_interlocked unsigned __int64 volatile *Destination,
__in unsigned __int64 Value
)
{
return (unsigned __int64) InterlockedOr64((volatile __int64*) Destination, (
__int64) Value);
}
FORCEINLINE
unsigned __int64
InterlockedXor(
__inout __drv_interlocked unsigned __int64 volatile *Destination,
__in unsigned __int64 Value
)
{
return (unsigned __int64) InterlockedXor64((volatile __int64*) Destination,
(__int64) Value);
}
#endif
} /* extern "C++" */
#endif /* } __cplusplus */
#endif /* } MICROSOFT_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS */
#undef MICROSOFT_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS
#define MICROSOFT_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS 0
#endif /* } MIDL_PASS */
#endif /* } MICROSOFT_WINDOWS_WINBASE_INTERLOCKED_CPLUSPLUS_H_INCLUDED */
#endif /* } RC_INVOKED */
#endif /* _NTOS_ */
#endif /* NOWINBASEINTERLOCK */
#endif /* RC_INVOKED */
 End of changes. 156 change blocks. 
91 lines changed or deleted 1252 lines changed or added


 wincred.h (6.0.6002.18005-Windows 6.0)   wincred.h (6.1.7601.23418-Windows 7.0) 
//depot/vbl_srv_wcsmain/ds/published/inc/wincred.w#4 - integrate change 66730 (t ext)
/*++ BUILD Version: 0001 // Increment this if a change has global effects /*++ BUILD Version: 0001 // Increment this if a change has global effects
Copyright (c) 2000 Microsoft Corporation Copyright (c) 2000 Microsoft Corporation
Module Name: Module Name:
wincred.h wincred.h
Abstract: Abstract:
skipping to change at line 146 skipping to change at line 145
(_Status) == HRESULT_FROM_NT( STATUS_LOGON_FAILURE ) || \ (_Status) == HRESULT_FROM_NT( STATUS_LOGON_FAILURE ) || \
(_Status) == ERROR_ACCESS_DENIED || \ (_Status) == ERROR_ACCESS_DENIED || \
(_Status) == __HRESULT_FROM_WIN32( ERROR_ACCESS_DENIED ) || \ (_Status) == __HRESULT_FROM_WIN32( ERROR_ACCESS_DENIED ) || \
(_Status) == STATUS_ACCESS_DENIED || \ (_Status) == STATUS_ACCESS_DENIED || \
(_Status) == HRESULT_FROM_NT( STATUS_ACCESS_DENIED ) || \ (_Status) == HRESULT_FROM_NT( STATUS_ACCESS_DENIED ) || \
(_Status) == ERROR_INVALID_PASSWORD || \ (_Status) == ERROR_INVALID_PASSWORD || \
(_Status) == __HRESULT_FROM_WIN32( ERROR_INVALID_PASSWORD ) || \ (_Status) == __HRESULT_FROM_WIN32( ERROR_INVALID_PASSWORD ) || \
(_Status) == STATUS_WRONG_PASSWORD || \ (_Status) == STATUS_WRONG_PASSWORD || \
(_Status) == HRESULT_FROM_NT( STATUS_WRONG_PASSWORD ) || \ (_Status) == HRESULT_FROM_NT( STATUS_WRONG_PASSWORD ) || \
(_Status) == SEC_E_NO_CREDENTIALS || \ (_Status) == SEC_E_NO_CREDENTIALS || \
(_Status) == SEC_E_LOGON_DENIED \ (_Status) == SEC_E_LOGON_DENIED || \
) (_Status) == SEC_E_NO_CONTEXT || \
(_Status) == STATUS_NO_SECURITY_CONTEXT )
#define CREDUIP_IS_DOWNGRADE_ERROR( _Status ) ( \ #define CREDUIP_IS_DOWNGRADE_ERROR( _Status ) ( \
(_Status) == ERROR_DOWNGRADE_DETECTED || \ (_Status) == ERROR_DOWNGRADE_DETECTED || \
(_Status) == __HRESULT_FROM_WIN32( ERROR_DOWNGRADE_DETECTED ) || \ (_Status) == __HRESULT_FROM_WIN32( ERROR_DOWNGRADE_DETECTED ) || \
(_Status) == STATUS_DOWNGRADE_DETECTED || \ (_Status) == STATUS_DOWNGRADE_DETECTED || \
(_Status) == HRESULT_FROM_NT( STATUS_DOWNGRADE_DETECTED ) \ (_Status) == HRESULT_FROM_NT( STATUS_DOWNGRADE_DETECTED ) \
) )
#define CREDUIP_IS_EXPIRED_ERROR( _Status ) ( \ #define CREDUIP_IS_EXPIRED_ERROR( _Status ) ( \
(_Status) == ERROR_PASSWORD_EXPIRED || \ (_Status) == ERROR_PASSWORD_EXPIRED || \
skipping to change at line 287 skipping to change at line 287
#define CRED_TARGETNAME_DOMAIN_NAMESPACE_LENGTH (sizeof(CRED_TARGETNAME_DOMAIN_N AMESPACE_A)-1) #define CRED_TARGETNAME_DOMAIN_NAMESPACE_LENGTH (sizeof(CRED_TARGETNAME_DOMAIN_N AMESPACE_A)-1)
#define CRED_UNIVERSAL_WILDCARD_W L'*' #define CRED_UNIVERSAL_WILDCARD_W L'*'
#define CRED_UNIVERSAL_WILDCARD_A '*' #define CRED_UNIVERSAL_WILDCARD_A '*'
#define CRED_TARGETNAME_LEGACYGENERIC_NAMESPACE_W L"LegacyGeneric" #define CRED_TARGETNAME_LEGACYGENERIC_NAMESPACE_W L"LegacyGeneric"
#define CRED_TARGETNAME_LEGACYGENERIC_NAMESPACE_A "LegacyGeneric" #define CRED_TARGETNAME_LEGACYGENERIC_NAMESPACE_A "LegacyGeneric"
#define CRED_TARGETNAME_LEGACYGENERIC_NAMESPACE_LENGTH (sizeof(CRED_TARGETNAME_L EGACYGENERIC_NAMESPACE_A)-1) #define CRED_TARGETNAME_LEGACYGENERIC_NAMESPACE_LENGTH (sizeof(CRED_TARGETNAME_L EGACYGENERIC_NAMESPACE_A)-1)
#define CRED_TARGETNAME_NAMESPACE_SEPERATOR_W L':' #define CRED_TARGETNAME_NAMESPACE_SEPERATOR_W L':'
#define CRED_TARGETNAME_NAMESPACE_SEPERATOR_A ':' #define CRED_TARGETNAME_NAMESPACE_SEPERATOR_A ':'
#define CRED_TARGETNAME_ATTRIBUTE_SEPERATOR_W L'=' #define CRED_TARGETNAME_ATTRIBUTE_SEPERATOR_W L'='
#define CRED_TARGETNAME_ATTRIBUTE_SEPERATOR_A '=' #define CRED_TARGETNAME_ATTRIBUTE_SEPERATOR_A '='
#define CRED_TARGETNAME_DOMAIN_EXTENDED_USERNAME_SEPARATOR_W L'|'
#define CRED_TARGETNAME_DOMAIN_EXTENDED_USERNAME_SEPARATOR_A '|'
#define CRED_TARGETNAME_ATTRIBUTE_TARGET_W L"target" #define CRED_TARGETNAME_ATTRIBUTE_TARGET_W L"target"
#define CRED_TARGETNAME_ATTRIBUTE_TARGET_A "target" #define CRED_TARGETNAME_ATTRIBUTE_TARGET_A "target"
#define CRED_TARGETNAME_ATTRIBUTE_TARGET_LENGTH (sizeof(CRED_TARGETNAME_ATTRIBUT E_TARGET_A)-1) #define CRED_TARGETNAME_ATTRIBUTE_TARGET_LENGTH (sizeof(CRED_TARGETNAME_ATTRIBUT E_TARGET_A)-1)
#define CRED_TARGETNAME_ATTRIBUTE_NAME_W L"name" #define CRED_TARGETNAME_ATTRIBUTE_NAME_W L"name"
#define CRED_TARGETNAME_ATTRIBUTE_NAME_A "name" #define CRED_TARGETNAME_ATTRIBUTE_NAME_A "name"
#define CRED_TARGETNAME_ATTRIBUTE_NAME_LENGTH (sizeof(CRED_TARGETNAME_ATTRIBUTE_ NAME_A)-1) #define CRED_TARGETNAME_ATTRIBUTE_NAME_LENGTH (sizeof(CRED_TARGETNAME_ATTRIBUTE_ NAME_A)-1)
#define CRED_TARGETNAME_ATTRIBUTE_BATCH_W L"batch" #define CRED_TARGETNAME_ATTRIBUTE_BATCH_W L"batch"
#define CRED_TARGETNAME_ATTRIBUTE_BATCH_A "batch" #define CRED_TARGETNAME_ATTRIBUTE_BATCH_A "batch"
#define CRED_TARGETNAME_ATTRIBUTE_BATCH_LENGTH (sizeof(CRED_TARGETNAME_ATTRIBUTE _BATCH_A)-1) #define CRED_TARGETNAME_ATTRIBUTE_BATCH_LENGTH (sizeof(CRED_TARGETNAME_ATTRIBUTE _BATCH_A)-1)
#define CRED_TARGETNAME_ATTRIBUTE_INTERACTIVE_W L"interactive" #define CRED_TARGETNAME_ATTRIBUTE_INTERACTIVE_W L"interactive"
skipping to change at line 365 skipping to change at line 367
#define CredRemoveLogonTypeFromFlags(Flags) (Flags) &= ~CRED_LOGON _TYPES_MASK #define CredRemoveLogonTypeFromFlags(Flags) (Flags) &= ~CRED_LOGON _TYPES_MASK
// //
// Values of the Credential Flags field. // Values of the Credential Flags field.
// //
#define CRED_FLAGS_PASSWORD_FOR_CERT 0x0001 #define CRED_FLAGS_PASSWORD_FOR_CERT 0x0001
#define CRED_FLAGS_PROMPT_NOW 0x0002 #define CRED_FLAGS_PROMPT_NOW 0x0002
#define CRED_FLAGS_USERNAME_TARGET 0x0004 #define CRED_FLAGS_USERNAME_TARGET 0x0004
#define CRED_FLAGS_OWF_CRED_BLOB 0x0008 #define CRED_FLAGS_OWF_CRED_BLOB 0x0008
#define CRED_FLAGS_REQUIRE_CONFIRMATION 0x0010 #define CRED_FLAGS_REQUIRE_CONFIRMATION 0x0010
#define CRED_FLAGS_VALID_FLAGS 0xF01F // Mask of all valid flags
//
// Valid only for return and only with CredReadDomainCredentials().
// Indicates credential was returned due to wildcard match
// of targetname with credential.
//
#define CRED_FLAGS_WILDCARD_MATCH 0x0020
#define CRED_FLAGS_VALID_FLAGS 0xF03F // Mask of all valid flags
//
// Bit mask for only those flags which can be passed to the credman
// APIs.
//
#define CRED_FLAGS_VALID_INPUT_FLAGS 0xF01F
// //
// Values of the Credential Type field. // Values of the Credential Type field.
// //
#define CRED_TYPE_GENERIC 1 #define CRED_TYPE_GENERIC 1
#define CRED_TYPE_DOMAIN_PASSWORD 2 #define CRED_TYPE_DOMAIN_PASSWORD 2
#define CRED_TYPE_DOMAIN_CERTIFICATE 3 #define CRED_TYPE_DOMAIN_CERTIFICATE 3
#define CRED_TYPE_DOMAIN_VISIBLE_PASSWORD 4 #define CRED_TYPE_DOMAIN_VISIBLE_PASSWORD 4
#define CRED_TYPE_GENERIC_CERTIFICATE 5 #define CRED_TYPE_GENERIC_CERTIFICATE 5
#define CRED_TYPE_MAXIMUM 6 // Maximum supported cred type #define CRED_TYPE_DOMAIN_EXTENDED 6
#define CRED_TYPE_MAXIMUM 7 // Maximum supported cred type
#define CRED_TYPE_MAXIMUM_EX (CRED_TYPE_MAXIMUM+1000) // Allow new application s to run on old OSes #define CRED_TYPE_MAXIMUM_EX (CRED_TYPE_MAXIMUM+1000) // Allow new application s to run on old OSes
// //
// Maximum size of the CredBlob field (in bytes) // Maximum size of the CredBlob field (in bytes)
// //
#define CRED_MAX_CREDENTIAL_BLOB_SIZE 512
#define CRED_MAX_CREDENTIAL_BLOB_SIZE (5*512)
// //
// Values of the Credential Persist field // Values of the Credential Persist field
// //
#define CRED_PERSIST_NONE 0 #define CRED_PERSIST_NONE 0
#define CRED_PERSIST_SESSION 1 #define CRED_PERSIST_SESSION 1
#define CRED_PERSIST_LOCAL_MACHINE 2 #define CRED_PERSIST_LOCAL_MACHINE 2
#define CRED_PERSIST_ENTERPRISE 3 #define CRED_PERSIST_ENTERPRISE 3
// //
skipping to change at line 567 skipping to change at line 586
LPBYTE pbBlob; LPBYTE pbBlob;
} BINARY_BLOB_CREDENTIAL_INFO, *PBINARY_BLOB_CREDENTIAL_INFO; } BINARY_BLOB_CREDENTIAL_INFO, *PBINARY_BLOB_CREDENTIAL_INFO;
// //
// Credential type for credential marshaling routines // Credential type for credential marshaling routines
// //
typedef enum _CRED_MARSHAL_TYPE { typedef enum _CRED_MARSHAL_TYPE {
CertCredential = 1, CertCredential = 1,
UsernameTargetCredential, UsernameTargetCredential,
BinaryBlobCredential BinaryBlobCredential,
UsernameForPackedCredentials, // internal only, reserved
} CRED_MARSHAL_TYPE, *PCRED_MARSHAL_TYPE; } CRED_MARSHAL_TYPE, *PCRED_MARSHAL_TYPE;
// //
// Protection type for credential providers secret protection routines // Protection type for credential providers secret protection routines
// //
typedef enum _CRED_PROTECTION_TYPE { typedef enum _CRED_PROTECTION_TYPE {
CredUnprotected, CredUnprotected,
CredUserProtection, CredUserProtection,
CredTrustedProtection CredTrustedProtection
skipping to change at line 591 skipping to change at line 611
// Values for authentication buffers packing // Values for authentication buffers packing
// //
#define CRED_PACK_PROTECTED_CREDENTIALS 0x1 #define CRED_PACK_PROTECTED_CREDENTIALS 0x1
#define CRED_PACK_WOW_BUFFER 0x2 #define CRED_PACK_WOW_BUFFER 0x2
#define CRED_PACK_GENERIC_CREDENTIALS 0x4 #define CRED_PACK_GENERIC_CREDENTIALS 0x4
// //
// Credential UI info // Credential UI info
// //
#define _CREDUI_INFO_DEFINED
typedef struct _CREDUI_INFOA typedef struct _CREDUI_INFOA
{ {
DWORD cbSize; DWORD cbSize;
HWND hwndParent; HWND hwndParent;
PCSTR pszMessageText; PCSTR pszMessageText;
PCSTR pszCaptionText; PCSTR pszCaptionText;
HBITMAP hbmBanner; HBITMAP hbmBanner;
} CREDUI_INFOA, *PCREDUI_INFOA; } CREDUI_INFOA, *PCREDUI_INFOA;
typedef struct _CREDUI_INFOW typedef struct _CREDUI_INFOW
skipping to change at line 627 skipping to change at line 649
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Values // Values
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// String length limits: // String length limits:
#define CREDUI_MAX_MESSAGE_LENGTH 32767 #define CREDUI_MAX_MESSAGE_LENGTH 32767
#define CREDUI_MAX_CAPTION_LENGTH 128 #define CREDUI_MAX_CAPTION_LENGTH 128
#define CREDUI_MAX_GENERIC_TARGET_LENGTH CRED_MAX_GENERIC_TARGET_NAME_LENGTH #define CREDUI_MAX_GENERIC_TARGET_LENGTH CRED_MAX_GENERIC_TARGET_NAME_LENGTH
#define CREDUI_MAX_DOMAIN_TARGET_LENGTH CRED_MAX_DOMAIN_TARGET_NAME_LENGTH #define CREDUI_MAX_DOMAIN_TARGET_LENGTH CRED_MAX_DOMAIN_TARGET_NAME_LENGTH
//
// Username can be in <domain>\<user> or <user>@<domain>
// Length in characters, not including NULL termination.
//
#define CREDUI_MAX_USERNAME_LENGTH CRED_MAX_USERNAME_LENGTH #define CREDUI_MAX_USERNAME_LENGTH CRED_MAX_USERNAME_LENGTH
#define CREDUI_MAX_PASSWORD_LENGTH (CRED_MAX_CREDENTIAL_BLOB_SIZE / 2) #define CREDUI_MAX_PASSWORD_LENGTH (512 / 2)
//
// Packed credential returned by SspiEncodeAuthIdentityAsStrings().
// Length in characters, not including NULL termination.
//
#define CREDUI_MAX_PACKED_CREDENTIALS_LENGTH ((MAXUSHORT / 2) - 2)
// maximum length in bytes for binary credential blobs
#define CREDUI_MAX_CREDENTIALS_BLOB_SIZE (MAXUSHORT)
// //
// Flags for CredUIPromptForCredentials and/or CredUICmdLinePromptForCredentials // Flags for CredUIPromptForCredentials and/or CredUICmdLinePromptForCredentials
// //
#define CREDUI_FLAGS_INCORRECT_PASSWORD 0x00001 // indicates the usernam e is valid, but password is not #define CREDUI_FLAGS_INCORRECT_PASSWORD 0x00001 // indicates the usernam e is valid, but password is not
#define CREDUI_FLAGS_DO_NOT_PERSIST 0x00002 // Do not show "Save" ch eckbox, and do not persist credentials #define CREDUI_FLAGS_DO_NOT_PERSIST 0x00002 // Do not show "Save" ch eckbox, and do not persist credentials
#define CREDUI_FLAGS_REQUEST_ADMINISTRATOR 0x00004 // Populate list box wit h admin accounts #define CREDUI_FLAGS_REQUEST_ADMINISTRATOR 0x00004 // Populate list box wit h admin accounts
#define CREDUI_FLAGS_EXCLUDE_CERTIFICATES 0x00008 // do not include certif icates in the drop list #define CREDUI_FLAGS_EXCLUDE_CERTIFICATES 0x00008 // do not include certif icates in the drop list
#define CREDUI_FLAGS_REQUIRE_CERTIFICATE 0x00010 #define CREDUI_FLAGS_REQUIRE_CERTIFICATE 0x00010
skipping to change at line 684 skipping to change at line 723
// //
// Flags for CredUIPromptForWindowsCredentials and CPUS_CREDUI Usage Scenarios // Flags for CredUIPromptForWindowsCredentials and CPUS_CREDUI Usage Scenarios
// //
#define CREDUIWIN_GENERIC 0x00000001 // Plain text username/p assword is being requested #define CREDUIWIN_GENERIC 0x00000001 // Plain text username/p assword is being requested
#define CREDUIWIN_CHECKBOX 0x00000002 // Show the Save Credent ial checkbox #define CREDUIWIN_CHECKBOX 0x00000002 // Show the Save Credent ial checkbox
#define CREDUIWIN_AUTHPACKAGE_ONLY 0x00000010 // Only Cred Providers t hat support the input auth package should enumerate #define CREDUIWIN_AUTHPACKAGE_ONLY 0x00000010 // Only Cred Providers t hat support the input auth package should enumerate
#define CREDUIWIN_IN_CRED_ONLY 0x00000020 // Only the incoming cre d for the specific auth package should be enumerated #define CREDUIWIN_IN_CRED_ONLY 0x00000020 // Only the incoming cre d for the specific auth package should be enumerated
#define CREDUIWIN_ENUMERATE_ADMINS 0x00000100 // Cred Providers should enumerate administrators only #define CREDUIWIN_ENUMERATE_ADMINS 0x00000100 // Cred Providers should enumerate administrators only
#define CREDUIWIN_ENUMERATE_CURRENT_USER 0x00000200 // Only the incoming cre d for the specific auth package should be enumerated #define CREDUIWIN_ENUMERATE_CURRENT_USER 0x00000200 // Only the incoming cre d for the specific auth package should be enumerated
#define CREDUIWIN_SECURE_PROMPT 0x00001000 // The Credui prompt sho uld be displayed on the secure desktop
#define CREDUIWIN_PACK_32_WOW 0x10000000 // Tell the credential p rovider it should be packing its Auth Blob 32 bit even though it is running 64 n ative #define CREDUIWIN_PACK_32_WOW 0x10000000 // Tell the credential p rovider it should be packing its Auth Blob 32 bit even though it is running 64 n ative
#define CREDUIWIN_VALID_FLAGS ( \ #define CREDUIWIN_VALID_FLAGS ( \
CREDUIWIN_GENERIC | \ CREDUIWIN_GENERIC | \
CREDUIWIN_CHECKBOX | \ CREDUIWIN_CHECKBOX | \
CREDUIWIN_AUTHPACKAGE_ONLY | \ CREDUIWIN_AUTHPACKAGE_ONLY | \
CREDUIWIN_IN_CRED_ONLY | \ CREDUIWIN_IN_CRED_ONLY | \
CREDUIWIN_ENUMERATE_ADMINS | \ CREDUIWIN_ENUMERATE_ADMINS | \
CREDUIWIN_ENUMERATE_CURRENT_USER | \ CREDUIWIN_ENUMERATE_CURRENT_USER | \
CREDUIWIN_SECURE_PROMPT | \
CREDUIWIN_PACK_32_WOW ) CREDUIWIN_PACK_32_WOW )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Functions // Functions
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// Values of flags to CredWrite and CredWriteDomainCredentials // Values of flags to CredWrite and CredWriteDomainCredentials
// //
skipping to change at line 1090 skipping to change at line 1131
#define CredProtect CredProtectA #define CredProtect CredProtectA
#endif //UNICODE #endif //UNICODE
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
CredUnprotectW( CredUnprotectW(
__in BOOL fAsSelf, __in BOOL fAsSelf,
__in_ecount(cchProtectedCredentials) LPWSTR pszProtectedCredentials, __in_ecount(cchProtectedCredentials) LPWSTR pszProtectedCredentials,
__in DWORD cchProtectedCredentials, __in DWORD cchProtectedCredentials,
__out_ecount(*pcchMaxChars) LPWSTR pszCredentials, __out_ecount_opt(*pcchMaxChars) LPWSTR pszCredentials,
__inout DWORD* pcchMaxChars __inout DWORD* pcchMaxChars
); );
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
CredUnprotectA( CredUnprotectA(
__in BOOL fAsSelf, __in BOOL fAsSelf,
__in_ecount(cchProtectedCredentials) LPSTR pszProtectedCredentials, __in_ecount(cchProtectedCredentials) LPSTR pszProtectedCredentials,
__in DWORD cchProtectedCredentials, __in DWORD cchProtectedCredentials,
__out_ecount(*pcchMaxChars) LPSTR pszCredentials, __out_ecount_opt(*pcchMaxChars) LPSTR pszCredentials,
__inout DWORD* pcchMaxChars __inout DWORD* pcchMaxChars
); );
#ifdef UNICODE #ifdef UNICODE
#define CredUnprotect CredUnprotectW #define CredUnprotect CredUnprotectW
#else #else
#define CredUnprotect CredUnprotectA #define CredUnprotect CredUnprotectA
#endif //UNICODE #endif //UNICODE
WINADVAPI WINADVAPI
 End of changes. 14 change blocks. 
10 lines changed or deleted 51 lines changed or added


 wincrypt.h (6.0.6002.18005-Windows 6.0)   wincrypt.h (6.1.7601.23418-Windows 7.0) 
skipping to change at line 210 skipping to change at line 210
#define ALG_SID_SHA1 4 #define ALG_SID_SHA1 4
#define ALG_SID_MAC 5 #define ALG_SID_MAC 5
#define ALG_SID_RIPEMD 6 #define ALG_SID_RIPEMD 6
#define ALG_SID_RIPEMD160 7 #define ALG_SID_RIPEMD160 7
#define ALG_SID_SSL3SHAMD5 8 #define ALG_SID_SSL3SHAMD5 8
#define ALG_SID_HMAC 9 #define ALG_SID_HMAC 9
#define ALG_SID_TLS1PRF 10 #define ALG_SID_TLS1PRF 10
#if (NTDDI_VERSION >= NTDDI_WINXP) #if (NTDDI_VERSION >= NTDDI_WINXP)
#define ALG_SID_HASH_REPLACE_OWF 11 #define ALG_SID_HASH_REPLACE_OWF 11
#endif //(NTDDI_VERSION >= NTDDI_WINXP) #endif //(NTDDI_VERSION >= NTDDI_WINXP)
#if (NTDDI_VERSION >= NTDDI_WS03) #if (NTDDI_VERSION > NTDDI_WINXPSP2)
#define ALG_SID_SHA_256 12 #define ALG_SID_SHA_256 12
#define ALG_SID_SHA_384 13 #define ALG_SID_SHA_384 13
#define ALG_SID_SHA_512 14 #define ALG_SID_SHA_512 14
#endif //(NTDDI_VERSION >= NTDDI_WS03) #endif //(NTDDI_VERSION > NTDDI_WINXPSP2)
// secure channel sub ids // secure channel sub ids
#define ALG_SID_SSL3_MASTER 1 #define ALG_SID_SSL3_MASTER 1
#define ALG_SID_SCHANNEL_MASTER_HASH 2 #define ALG_SID_SCHANNEL_MASTER_HASH 2
#define ALG_SID_SCHANNEL_MAC_KEY 3 #define ALG_SID_SCHANNEL_MAC_KEY 3
#define ALG_SID_PCT1_MASTER 4 #define ALG_SID_PCT1_MASTER 4
#define ALG_SID_SSL2_MASTER 5 #define ALG_SID_SSL2_MASTER 5
#define ALG_SID_TLS1_MASTER 6 #define ALG_SID_TLS1_MASTER 6
#define ALG_SID_SCHANNEL_ENC_KEY 7 #define ALG_SID_SCHANNEL_ENC_KEY 7
skipping to change at line 286 skipping to change at line 286
#define CALG_RC5 (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|ALG_SID_R C5) #define CALG_RC5 (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|ALG_SID_R C5)
#define CALG_HMAC (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_HMAC) #define CALG_HMAC (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_HMAC)
#define CALG_TLS1PRF (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_TLS1PRF ) #define CALG_TLS1PRF (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_TLS1PRF )
#if (NTDDI_VERSION >= NTDDI_WINXP) #if (NTDDI_VERSION >= NTDDI_WINXP)
#define CALG_HASH_REPLACE_OWF (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_HASH_RE PLACE_OWF) #define CALG_HASH_REPLACE_OWF (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_HASH_RE PLACE_OWF)
#define CALG_AES_128 (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|ALG_SID_A ES_128) #define CALG_AES_128 (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|ALG_SID_A ES_128)
#define CALG_AES_192 (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|ALG_SID_A ES_192) #define CALG_AES_192 (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|ALG_SID_A ES_192)
#define CALG_AES_256 (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|ALG_SID_A ES_256) #define CALG_AES_256 (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|ALG_SID_A ES_256)
#define CALG_AES (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|ALG_SID_A ES) #define CALG_AES (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|ALG_SID_A ES)
#endif //(NTDDI_VERSION >= NTDDI_WINXP) #endif //(NTDDI_VERSION >= NTDDI_WINXP)
#if (NTDDI_VERSION >= NTDDI_WS03) #if (NTDDI_VERSION > NTDDI_WINXPSP2)
#define CALG_SHA_256 (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA_256 ) #define CALG_SHA_256 (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA_256 )
#define CALG_SHA_384 (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA_384 ) #define CALG_SHA_384 (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA_384 )
#define CALG_SHA_512 (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA_512 ) #define CALG_SHA_512 (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA_512 )
#endif //(NTDDI_VERSION >= NTDDI_WS03) #endif //(NTDDI_VERSION > NTDDI_WINXPSP2)
#if (NTDDI_VERSION >= NTDDI_WINLH) #if (NTDDI_VERSION >= NTDDI_WINLH)
#define CALG_ECDH (ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_DH | ALG_SID_ ECDH) #define CALG_ECDH (ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_DH | ALG_SID_ ECDH)
#define CALG_ECMQV (ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_ANY | ALG_SID _ECMQV) #define CALG_ECMQV (ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_ANY | ALG_SID _ECMQV)
#define CALG_ECDSA (ALG_CLASS_SIGNATURE | ALG_TYPE_DSS | ALG_SID_EC DSA) #define CALG_ECDSA (ALG_CLASS_SIGNATURE | ALG_TYPE_DSS | ALG_SID_EC DSA)
#endif //(NTDDI_VERSION >= NTDDI_WINLH) #endif //(NTDDI_VERSION >= NTDDI_WINLH)
#if (NTDDI_VERSION < NTDDI_WINXP) #if (NTDDI_VERSION < NTDDI_WINXP)
// resource number for signatures in the CSP // resource number for signatures in the CSP
#define SIGNATURE_RESOURCE_NUMBER 0x29A #define SIGNATURE_RESOURCE_NUMBER 0x29A
skipping to change at line 468 skipping to change at line 468
#endif //(NTDDI_VERSION >= NTDDI_WS03) #endif //(NTDDI_VERSION >= NTDDI_WS03)
#define KP_OAEP_PARAMS 36 // for setting OAEP params on RSA keys #define KP_OAEP_PARAMS 36 // for setting OAEP params on RSA keys
#define KP_CMS_KEY_INFO 37 #define KP_CMS_KEY_INFO 37
#define KP_CMS_DH_KEY_INFO 38 #define KP_CMS_DH_KEY_INFO 38
#define KP_PUB_PARAMS 39 // for setting public parameters #define KP_PUB_PARAMS 39 // for setting public parameters
#define KP_VERIFY_PARAMS 40 // for verifying DSA and DH parameters #define KP_VERIFY_PARAMS 40 // for verifying DSA and DH parameters
#define KP_HIGHEST_VERSION 41 // for TLS protocol version setting #define KP_HIGHEST_VERSION 41 // for TLS protocol version setting
#if (NTDDI_VERSION >= NTDDI_WS03) #if (NTDDI_VERSION >= NTDDI_WS03)
#define KP_GET_USE_COUNT 42 // for use with PP_CRYPT_COUNT_KEY_USE c ontexts #define KP_GET_USE_COUNT 42 // for use with PP_CRYPT_COUNT_KEY_USE c ontexts
#endif //(NTDDI_VERSION >= NTDDI_WS03) #endif //(NTDDI_VERSION >= NTDDI_WS03)
#define KP_PIN_ID 43
#define KP_PIN_INFO 44
// KP_PADDING // KP_PADDING
#define PKCS5_PADDING 1 // PKCS 5 (sec 6.2) padding method #define PKCS5_PADDING 1 // PKCS 5 (sec 6.2) padding method
#define RANDOM_PADDING 2 #define RANDOM_PADDING 2
#define ZERO_PADDING 3 #define ZERO_PADDING 3
// KP_MODE // KP_MODE
#define CRYPT_MODE_CBC 1 // Cipher block chaining #define CRYPT_MODE_CBC 1 // Cipher block chaining
#define CRYPT_MODE_ECB 2 // Electronic code book #define CRYPT_MODE_ECB 2 // Electronic code book
#define CRYPT_MODE_OFB 3 // Output feedback mode #define CRYPT_MODE_OFB 3 // Output feedback mode
skipping to change at line 588 skipping to change at line 590
// CryptSetProvParam // CryptSetProvParam
// //
#define PP_CLIENT_HWND 1 #define PP_CLIENT_HWND 1
#define PP_CONTEXT_INFO 11 #define PP_CONTEXT_INFO 11
#define PP_KEYEXCHANGE_KEYSIZE 12 #define PP_KEYEXCHANGE_KEYSIZE 12
#define PP_SIGNATURE_KEYSIZE 13 #define PP_SIGNATURE_KEYSIZE 13
#define PP_KEYEXCHANGE_ALG 14 #define PP_KEYEXCHANGE_ALG 14
#define PP_SIGNATURE_ALG 15 #define PP_SIGNATURE_ALG 15
#define PP_DELETEKEY 24 #define PP_DELETEKEY 24
#if (NTDDI_VERSION >= NTDDI_WINLH) #if (NTDDI_VERSION >= NTDDI_WINLH)
#define PP_PIN_PROMPT_STRING 44 #define PP_PIN_PROMPT_STRING 44
#define PP_SECURE_KEYEXCHANGE_PIN 47
#define PP_SECURE_SIGNATURE_PIN 48
#endif //(NTDDI_VERSION >= NTDDI_WINLH) #endif //(NTDDI_VERSION >= NTDDI_WINLH)
// certenrolld_begin -- PROV_RSA_* // certenrolld_begin -- PROV_RSA_*
#define PROV_RSA_FULL 1 #define PROV_RSA_FULL 1
#define PROV_RSA_SIG 2 #define PROV_RSA_SIG 2
#define PROV_DSS 3 #define PROV_DSS 3
#define PROV_FORTEZZA 4 #define PROV_FORTEZZA 4
#define PROV_MS_EXCHANGE 5 #define PROV_MS_EXCHANGE 5
#define PROV_SSL 6 #define PROV_SSL 6
#define PROV_RSA_SCHANNEL 12 #define PROV_RSA_SCHANNEL 12
skipping to change at line 708 skipping to change at line 712
#endif #endif
#define MS_SCARD_PROV_A "Microsoft Base Smart Card Crypto Provider" #define MS_SCARD_PROV_A "Microsoft Base Smart Card Crypto Provider"
#define MS_SCARD_PROV_W L"Microsoft Base Smart Card Crypto Provider" #define MS_SCARD_PROV_W L"Microsoft Base Smart Card Crypto Provider"
#ifdef UNICODE #ifdef UNICODE
#define MS_SCARD_PROV MS_SCARD_PROV_W #define MS_SCARD_PROV MS_SCARD_PROV_W
#else #else
#define MS_SCARD_PROV MS_SCARD_PROV_A #define MS_SCARD_PROV MS_SCARD_PROV_A
#endif #endif
#if (NTDDI_VERSION >= NTDDI_WS03) #if (NTDDI_VERSION >= NTDDI_WINXP)
#define MS_ENH_RSA_AES_PROV_A "Microsoft Enhanced RSA and AES Cryptographic Pr ovider" #define MS_ENH_RSA_AES_PROV_A "Microsoft Enhanced RSA and AES Cryptographic Pr ovider"
#define MS_ENH_RSA_AES_PROV_W L"Microsoft Enhanced RSA and AES Cryptographic P rovider" #define MS_ENH_RSA_AES_PROV_W L"Microsoft Enhanced RSA and AES Cryptographic P rovider"
#elif (NTDDI_VERSION == NTDDI_WINXP) #define MS_ENH_RSA_AES_PROV_XP_A "Microsoft Enhanced RSA and AES Cryptographic P
#define MS_ENH_RSA_AES_PROV_A "Microsoft Enhanced RSA and AES Cryptographic Pr rovider (Prototype)"
ovider (Prototype)" #define MS_ENH_RSA_AES_PROV_XP_W L"Microsoft Enhanced RSA and AES Cryptographic
#define MS_ENH_RSA_AES_PROV_W L"Microsoft Enhanced RSA and AES Cryptographic P Provider (Prototype)"
rovider (Prototype)"
#endif //(NTDDI_VERSION >= NTDDI_WS03)
#if (NTDDI_VERSION >= NTDDI_WINXP)
#ifdef UNICODE #ifdef UNICODE
#define MS_ENH_RSA_AES_PROV_XP MS_ENH_RSA_AES_PROV_XP_W
#define MS_ENH_RSA_AES_PROV MS_ENH_RSA_AES_PROV_W #define MS_ENH_RSA_AES_PROV MS_ENH_RSA_AES_PROV_W
#else #else
#define MS_ENH_RSA_AES_PROV_XP MS_ENH_RSA_AES_PROV_XP_A
#define MS_ENH_RSA_AES_PROV MS_ENH_RSA_AES_PROV_A #define MS_ENH_RSA_AES_PROV MS_ENH_RSA_AES_PROV_A
#endif #endif
#endif //(NTDDI_VERSION >= NTDDI_WINXP) #endif //(NTDDI_VERSION >= NTDDI_WINXP)
#define MAXUIDLEN 64 #define MAXUIDLEN 64
// Exponentiation Offload Reg Location // Exponentiation Offload Reg Location
#define EXPO_OFFLOAD_REG_VALUE "ExpoOffload" #define EXPO_OFFLOAD_REG_VALUE "ExpoOffload"
#define EXPO_OFFLOAD_FUNC_NAME "OffloadModExpo" #define EXPO_OFFLOAD_FUNC_NAME "OffloadModExpo"
skipping to change at line 974 skipping to change at line 977
unsigned char EncryptionState[15][16]; // 14 rounds + 1 unsigned char EncryptionState[15][16]; // 14 rounds + 1
unsigned char DecryptionState[15][16]; unsigned char DecryptionState[15][16];
unsigned char Feedback[16]; unsigned char Feedback[16];
} CRYPT_AES_256_KEY_STATE, *PCRYPT_AES_256_KEY_STATE; } CRYPT_AES_256_KEY_STATE, *PCRYPT_AES_256_KEY_STATE;
#endif //(NTDDI_VERSION >= NTDDI_WINLH) #endif //(NTDDI_VERSION >= NTDDI_WINLH)
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// CRYPTOAPI BLOB definitions // CRYPTOAPI BLOB definitions
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
// certenrolls_begin -- *_BLOB // certenrolls_begin -- *_BLOB
#ifndef CRYPTO_BLOBS_DEFINED
#define CRYPTO_BLOBS_DEFINED
typedef struct _CRYPTOAPI_BLOB { typedef struct _CRYPTOAPI_BLOB {
DWORD cbData; DWORD cbData;
__field_bcount(cbData) BYTE *pbData; __field_bcount(cbData) BYTE *pbData;
} CRYPT_INTEGER_BLOB, *PCRYPT_INTEGER_BLOB, } CRYPT_INTEGER_BLOB, *PCRYPT_INTEGER_BLOB,
CRYPT_UINT_BLOB, *PCRYPT_UINT_BLOB, CRYPT_UINT_BLOB, *PCRYPT_UINT_BLOB,
CRYPT_OBJID_BLOB, *PCRYPT_OBJID_BLOB, CRYPT_OBJID_BLOB, *PCRYPT_OBJID_BLOB,
CERT_NAME_BLOB, *PCERT_NAME_BLOB, CERT_NAME_BLOB, *PCERT_NAME_BLOB,
CERT_RDN_VALUE_BLOB, *PCERT_RDN_VALUE_BLOB, CERT_RDN_VALUE_BLOB, *PCERT_RDN_VALUE_BLOB,
CERT_BLOB, *PCERT_BLOB, CERT_BLOB, *PCERT_BLOB,
CRL_BLOB, *PCRL_BLOB, CRL_BLOB, *PCRL_BLOB,
DATA_BLOB, *PDATA_BLOB, DATA_BLOB, *PDATA_BLOB,
CRYPT_DATA_BLOB, *PCRYPT_DATA_BLOB, CRYPT_DATA_BLOB, *PCRYPT_DATA_BLOB,
CRYPT_HASH_BLOB, *PCRYPT_HASH_BLOB, CRYPT_HASH_BLOB, *PCRYPT_HASH_BLOB,
CRYPT_DIGEST_BLOB, *PCRYPT_DIGEST_BLOB, CRYPT_DIGEST_BLOB, *PCRYPT_DIGEST_BLOB,
CRYPT_DER_BLOB, *PCRYPT_DER_BLOB, CRYPT_DER_BLOB, *PCRYPT_DER_BLOB,
CRYPT_ATTR_BLOB, *PCRYPT_ATTR_BLOB; CRYPT_ATTR_BLOB, *PCRYPT_ATTR_BLOB;
#endif
// certenrolls_end // certenrolls_end
// structure for use with CryptSetKeyParam for CMS keys // structure for use with CryptSetKeyParam for CMS keys
typedef struct _CMS_DH_KEY_INFO { typedef struct _CMS_DH_KEY_INFO {
DWORD dwVersion; // sizeof(CMS_DH_KEY_INF O) DWORD dwVersion; // sizeof(CMS_DH_KEY_INF O)
ALG_ID Algid; // algorithmm id for the key to be converted ALG_ID Algid; // algorithmm id for the key to be converted
LPSTR pszContentEncObjId; // pointer to OID to hash in with Z LPSTR pszContentEncObjId; // pointer to OID to hash in with Z
CRYPT_DATA_BLOB PubInfo; // OPTIONAL - public information CRYPT_DATA_BLOB PubInfo; // OPTIONAL - public information
void *pReserved; // reserved - should be NULL void *pReserved; // reserved - should be NULL
} CMS_DH_KEY_INFO, *PCMS_DH_KEY_INFO; } CMS_DH_KEY_INFO, *PCMS_DH_KEY_INFO;
skipping to change at line 1159 skipping to change at line 1165
DWORD dwParam, DWORD dwParam,
BYTE *pbData, BYTE *pbData,
DWORD dwFlags DWORD dwFlags
); );
#endif //(NTDDI_VERSION < NTDDI_WINXP) #endif //(NTDDI_VERSION < NTDDI_WINXP)
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
CryptGetKeyParam( CryptGetKeyParam(
__in HCRYPTKEY hKey, __in HCRYPTKEY hKey,
__in DWORD dwParam, __in DWORD dwParam,
__out_bcount_part(*pdwDataLen, *pdwDataLen) BYTE *pbData, __out_bcount_part_opt(*pdwDataLen, *pdwDataLen) BYTE *pbData,
__inout DWORD *pdwDataLen, __inout DWORD *pdwDataLen,
__in DWORD dwFlags __in DWORD dwFlags
); );
#if (NTDDI_VERSION >= NTDDI_WINXP) #if (NTDDI_VERSION >= NTDDI_WINXP)
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
CryptSetHashParam( CryptSetHashParam(
__in HCRYPTHASH hHash, __in HCRYPTHASH hHash,
__in DWORD dwParam, __in DWORD dwParam,
__in CONST BYTE *pbData, __in CONST BYTE *pbData,
skipping to change at line 1196 skipping to change at line 1202
DWORD dwFlags DWORD dwFlags
); );
#endif //(NTDDI_VERSION < NTDDI_WINXP) #endif //(NTDDI_VERSION < NTDDI_WINXP)
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
CryptGetHashParam( CryptGetHashParam(
__in HCRYPTHASH hHash, __in HCRYPTHASH hHash,
__in DWORD dwParam, __in DWORD dwParam,
__out_bcount_part(*pdwDataLen, *pdwDataLen) BYTE *pbData, __out_bcount_part_opt(*pdwDataLen, *pdwDataLen) BYTE *pbData,
__inout DWORD *pdwDataLen, __inout DWORD *pdwDataLen,
__in DWORD dwFlags __in DWORD dwFlags
); );
#if (NTDDI_VERSION >= NTDDI_WINXP) #if (NTDDI_VERSION >= NTDDI_WINXP)
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
CryptSetProvParam( CryptSetProvParam(
__in HCRYPTPROV hProv, __in HCRYPTPROV hProv,
skipping to change at line 1279 skipping to change at line 1285
CryptImportKey( CryptImportKey(
__in HCRYPTPROV hProv, __in HCRYPTPROV hProv,
__in_bcount(dwDataLen) CONST BYTE *pbData, __in_bcount(dwDataLen) CONST BYTE *pbData,
__in DWORD dwDataLen, __in DWORD dwDataLen,
__in HCRYPTKEY hPubKey, __in HCRYPTKEY hPubKey,
__in DWORD dwFlags, __in DWORD dwFlags,
__out HCRYPTKEY *phKey __out HCRYPTKEY *phKey
); );
WINADVAPI WINADVAPI
__success(0 < return) BOOL __success(0 != return) BOOL
WINAPI WINAPI
CryptEncrypt( CryptEncrypt(
__in HCRYPTKEY hKey, __in HCRYPTKEY hKey,
__in HCRYPTHASH hHash, __in HCRYPTHASH hHash,
__in BOOL Final, __in BOOL Final,
__in DWORD dwFlags, __in DWORD dwFlags,
__inout_bcount_part(dwBufLen, *pdwDataLen) BYTE *pbData, __inout_bcount_part_opt(dwBufLen, *pdwDataLen) BYTE *pbData,
__out DWORD *pdwDataLen, __inout DWORD *pdwDataLen,
__in DWORD dwBufLen __in DWORD dwBufLen
); );
WINADVAPI WINADVAPI
BOOL __success(0 != return) BOOL
WINAPI WINAPI
CryptDecrypt( CryptDecrypt(
__in HCRYPTKEY hKey, __in HCRYPTKEY hKey,
__in HCRYPTHASH hHash, __in HCRYPTHASH hHash,
__in BOOL Final, __in BOOL Final,
__in DWORD dwFlags, __in DWORD dwFlags,
__inout_bcount_part(*pdwDataLen, *pdwDataLen) BYTE *pbData, __inout_bcount_part(*pdwDataLen, *pdwDataLen) BYTE *pbData,
__deref_inout DWORD *pdwDataLen __inout DWORD *pdwDataLen
); );
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
CryptCreateHash( CryptCreateHash(
__in HCRYPTPROV hProv, __in HCRYPTPROV hProv,
__in ALG_ID Algid, __in ALG_ID Algid,
__in HCRYPTKEY hKey, __in HCRYPTKEY hKey,
__in DWORD dwFlags, __in DWORD dwFlags,
skipping to change at line 1347 skipping to change at line 1353
__in HCRYPTHASH hHash __in HCRYPTHASH hHash
); );
#if (NTDDI_VERSION >= NTDDI_WINLH) #if (NTDDI_VERSION >= NTDDI_WINLH)
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
CryptSignHashA( CryptSignHashA(
__in HCRYPTHASH hHash, __in HCRYPTHASH hHash,
__in DWORD dwKeySpec, __in DWORD dwKeySpec,
__in LPCSTR szDescription, __in_opt LPCSTR szDescription,
__in DWORD dwFlags, __in DWORD dwFlags,
__out_bcount_part_opt(*pdwSigLen, *pdwSigLen) BYTE *pbSignature, __out_bcount_part_opt(*pdwSigLen, *pdwSigLen) BYTE *pbSignature,
__inout DWORD *pdwSigLen __inout DWORD *pdwSigLen
); );
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
CryptSignHashW( CryptSignHashW(
__in HCRYPTHASH hHash, __in HCRYPTHASH hHash,
__in DWORD dwKeySpec, __in DWORD dwKeySpec,
__in LPCWSTR szDescription, __in_opt LPCWSTR szDescription,
__in DWORD dwFlags, __in DWORD dwFlags,
__out_bcount_part_opt(*pdwSigLen, *pdwSigLen) BYTE *pbSignature, __out_bcount_part_opt(*pdwSigLen, *pdwSigLen) BYTE *pbSignature,
__inout DWORD *pdwSigLen __inout DWORD *pdwSigLen
); );
#ifdef UNICODE #ifdef UNICODE
#define CryptSignHash CryptSignHashW #define CryptSignHash CryptSignHashW
#else #else
#define CryptSignHash CryptSignHashA #define CryptSignHash CryptSignHashA
#endif // !UNICODE #endif // !UNICODE
#endif //(NTDDI_VERSION >= NTDDI_WINLH) #endif //(NTDDI_VERSION >= NTDDI_WINLH)
skipping to change at line 1437 skipping to change at line 1443
#if (NTDDI_VERSION >= NTDDI_WINLH) #if (NTDDI_VERSION >= NTDDI_WINLH)
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
CryptVerifySignatureA( CryptVerifySignatureA(
__in HCRYPTHASH hHash, __in HCRYPTHASH hHash,
__in_bcount(dwSigLen) CONST BYTE *pbSignature, __in_bcount(dwSigLen) CONST BYTE *pbSignature,
__in DWORD dwSigLen, __in DWORD dwSigLen,
__in HCRYPTKEY hPubKey, __in HCRYPTKEY hPubKey,
__in LPCSTR szDescription, __in_opt LPCSTR szDescription,
__in DWORD dwFlags __in DWORD dwFlags
); );
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
CryptVerifySignatureW( CryptVerifySignatureW(
__in HCRYPTHASH hHash, __in HCRYPTHASH hHash,
__in_bcount(dwSigLen) CONST BYTE *pbSignature, __in_bcount(dwSigLen) CONST BYTE *pbSignature,
__in DWORD dwSigLen, __in DWORD dwSigLen,
__in HCRYPTKEY hPubKey, __in HCRYPTKEY hPubKey,
__in LPCWSTR szDescription, __in_opt LPCWSTR szDescription,
__in DWORD dwFlags __in DWORD dwFlags
); );
#ifdef UNICODE #ifdef UNICODE
#define CryptVerifySignature CryptVerifySignatureW #define CryptVerifySignature CryptVerifySignatureW
#else #else
#define CryptVerifySignature CryptVerifySignatureA #define CryptVerifySignature CryptVerifySignatureA
#endif // !UNICODE #endif // !UNICODE
#endif //(NTDDI_VERSION >= NTDDI_WINLH) #endif //(NTDDI_VERSION >= NTDDI_WINLH)
#if (NTDDI_VERSION >= NTDDI_WINXP) && (NTDDI_VERSION < NTDDI_WINLH) #if (NTDDI_VERSION >= NTDDI_WINXP) && (NTDDI_VERSION < NTDDI_WINLH)
skipping to change at line 1614 skipping to change at line 1620
); );
#ifdef UNICODE #ifdef UNICODE
#define CryptSetProviderEx CryptSetProviderExW #define CryptSetProviderEx CryptSetProviderExW
#else #else
#define CryptSetProviderEx CryptSetProviderExA #define CryptSetProviderEx CryptSetProviderExA
#endif // !UNICODE #endif // !UNICODE
#endif //(NTDDI_VERSION < NTDDI_WINLH) #endif //(NTDDI_VERSION < NTDDI_WINLH)
#if (NTDDI_VERSION >= NTDDI_WINLH) #if (NTDDI_VERSION >= NTDDI_WINLH)
WINADVAPI WINADVAPI
BOOL __success(0 != return) BOOL
WINAPI WINAPI
CryptGetDefaultProviderA( CryptGetDefaultProviderA(
__in DWORD dwProvType, __in DWORD dwProvType,
__reserved DWORD *pdwReserved, __reserved DWORD *pdwReserved,
__in DWORD dwFlags, __in DWORD dwFlags,
__out_bcount_part(*pcbProvName, *pcbProvName) LPSTR pszProvName, __out_bcount_part_opt(*pcbProvName, *pcbProvName) LPSTR pszProvName,
__out DWORD *pcbProvName __inout DWORD *pcbProvName
); );
WINADVAPI WINADVAPI
BOOL __success(0 != return) BOOL
WINAPI WINAPI
CryptGetDefaultProviderW( CryptGetDefaultProviderW(
__in DWORD dwProvType, __in DWORD dwProvType,
__reserved DWORD *pdwReserved, __reserved DWORD *pdwReserved,
__in DWORD dwFlags, __in DWORD dwFlags,
__out_bcount_part(*pcbProvName, *pcbProvName) LPWSTR pszProvName, __out_bcount_part_opt(*pcbProvName, *pcbProvName) LPWSTR pszProvName,
__out DWORD *pcbProvName __inout DWORD *pcbProvName
); );
#ifdef UNICODE #ifdef UNICODE
#define CryptGetDefaultProvider CryptGetDefaultProviderW #define CryptGetDefaultProvider CryptGetDefaultProviderW
#else #else
#define CryptGetDefaultProvider CryptGetDefaultProviderA #define CryptGetDefaultProvider CryptGetDefaultProviderA
#endif // !UNICODE #endif // !UNICODE
#endif //(NTDDI_VERSION >= NTDDI_WINLH) #endif //(NTDDI_VERSION >= NTDDI_WINLH)
#if (NTDDI_VERSION < NTDDI_WINLH) #if (NTDDI_VERSION < NTDDI_WINLH)
WINADVAPI WINADVAPI
skipping to change at line 1670 skipping to change at line 1676
); );
#ifdef UNICODE #ifdef UNICODE
#define CryptGetDefaultProvider CryptGetDefaultProviderW #define CryptGetDefaultProvider CryptGetDefaultProviderW
#else #else
#define CryptGetDefaultProvider CryptGetDefaultProviderA #define CryptGetDefaultProvider CryptGetDefaultProviderA
#endif // !UNICODE #endif // !UNICODE
#endif //(NTDDI_VERSION < NTDDI_WINLH) #endif //(NTDDI_VERSION < NTDDI_WINLH)
#if (NTDDI_VERSION >= NTDDI_WINLH) #if (NTDDI_VERSION >= NTDDI_WINLH)
WINADVAPI WINADVAPI
BOOL __success(0 != return) BOOL
WINAPI WINAPI
CryptEnumProviderTypesA( CryptEnumProviderTypesA(
__in DWORD dwIndex, __in DWORD dwIndex,
__reserved DWORD *pdwReserved, __reserved DWORD *pdwReserved,
__in DWORD dwFlags, __in DWORD dwFlags,
__out DWORD *pdwProvType, __out DWORD *pdwProvType,
__out_bcount_part(*pcbTypeName, *pcbTypeName) LPSTR szTypeName, __out_bcount_part_opt(*pcbTypeName, *pcbTypeName) LPSTR szTypeName,
__out DWORD *pcbTypeName __inout DWORD *pcbTypeName
); );
WINADVAPI WINADVAPI
BOOL __success(0 != return) BOOL
WINAPI WINAPI
CryptEnumProviderTypesW( CryptEnumProviderTypesW(
__in DWORD dwIndex, __in DWORD dwIndex,
__reserved DWORD *pdwReserved, __reserved DWORD *pdwReserved,
__in DWORD dwFlags, __in DWORD dwFlags,
__out DWORD *pdwProvType, __out DWORD *pdwProvType,
__out_bcount_part(*pcbTypeName, *pcbTypeName) LPWSTR szTypeName, __out_bcount_part_opt(*pcbTypeName, *pcbTypeName) LPWSTR szTypeName,
__out DWORD *pcbTypeName __inout DWORD *pcbTypeName
); );
#ifdef UNICODE #ifdef UNICODE
#define CryptEnumProviderTypes CryptEnumProviderTypesW #define CryptEnumProviderTypes CryptEnumProviderTypesW
#else #else
#define CryptEnumProviderTypes CryptEnumProviderTypesA #define CryptEnumProviderTypes CryptEnumProviderTypesA
#endif // !UNICODE #endif // !UNICODE
#endif //(NTDDI_VERSION >= NTDDI_WINLH) #endif //(NTDDI_VERSION >= NTDDI_WINLH)
#if (NTDDI_VERSION >= NTDDI_WINXP) && (NTDDI_VERSION < NTDDI_WINLH) #if (NTDDI_VERSION >= NTDDI_WINXP) && (NTDDI_VERSION < NTDDI_WINLH)
WINADVAPI WINADVAPI
skipping to change at line 1758 skipping to change at line 1764
#if (NTDDI_VERSION < NTDDI_WINLH) #if (NTDDI_VERSION < NTDDI_WINLH)
#ifdef UNICODE #ifdef UNICODE
#define CryptEnumProviderTypes CryptEnumProviderTypesW #define CryptEnumProviderTypes CryptEnumProviderTypesW
#else #else
#define CryptEnumProviderTypes CryptEnumProviderTypesA #define CryptEnumProviderTypes CryptEnumProviderTypesA
#endif // !UNICODE #endif // !UNICODE
#endif //(NTDDI_VERSION < NTDDI_WINLH) #endif //(NTDDI_VERSION < NTDDI_WINLH)
#if (NTDDI_VERSION >= NTDDI_WINLH) #if (NTDDI_VERSION >= NTDDI_WINLH)
WINADVAPI WINADVAPI
BOOL __success(0 != return) BOOL
WINAPI WINAPI
CryptEnumProvidersA( CryptEnumProvidersA(
__in DWORD dwIndex, __in DWORD dwIndex,
__reserved DWORD *pdwReserved, __reserved DWORD *pdwReserved,
__in DWORD dwFlags, __in DWORD dwFlags,
__out DWORD *pdwProvType, __out DWORD *pdwProvType,
__out_ecount_part_opt(*pcbProvName, *pcbProvName+1) LPSTR szProvName, __out_bcount_part_opt(*pcbProvName, *pcbProvName) LPSTR szProvName,
__inout DWORD *pcbProvName __inout DWORD *pcbProvName
); );
WINADVAPI WINADVAPI
BOOL __success(0 != return) BOOL
WINAPI WINAPI
CryptEnumProvidersW( CryptEnumProvidersW(
__in DWORD dwIndex, __in DWORD dwIndex,
__reserved DWORD *pdwReserved, __reserved DWORD *pdwReserved,
__in DWORD dwFlags, __in DWORD dwFlags,
__out DWORD *pdwProvType, __out DWORD *pdwProvType,
__out_ecount_part_opt(*pcbProvName, *pcbProvName+1) LPWSTR szProvName, __out_bcount_part_opt(*pcbProvName, *pcbProvName) LPWSTR szProvName,
__inout DWORD *pcbProvName __inout DWORD *pcbProvName
); );
#ifdef UNICODE #ifdef UNICODE
#define CryptEnumProviders CryptEnumProvidersW #define CryptEnumProviders CryptEnumProvidersW
#else #else
#define CryptEnumProviders CryptEnumProvidersA #define CryptEnumProviders CryptEnumProvidersA
#endif // !UNICODE #endif // !UNICODE
#endif //(NTDDI_VERSION >= NTDDI_WINLH) #endif //(NTDDI_VERSION >= NTDDI_WINLH)
#if (NTDDI_VERSION >= NTDDI_WINXP) && (NTDDI_VERSION < NTDDI_WINLH) #if (NTDDI_VERSION >= NTDDI_WINXP) && (NTDDI_VERSION < NTDDI_WINLH)
skipping to change at line 1888 skipping to change at line 1894
// encryption provider. // encryption provider.
// //
BOOL BOOL
__cdecl __cdecl
GetEncSChannel( GetEncSChannel(
BYTE **pData, BYTE **pData,
DWORD *dwDecSize DWORD *dwDecSize
); );
#endif //(NTDDI_VERSION >= NTDDI_WS03) #endif //(NTDDI_VERSION >= NTDDI_WS03)
#if (NTDDI_VERSION == NTDDI_WINXP)
typedef struct {
DWORD dwVersion;
ALG_ID algId;
DWORD dwMinKeyLength;
DWORD dwMaxKeyLength;
DWORD dwRequiredFlags;
DWORD dwDisallowedFlags;
} _CRYPT_KEY_LIMITS_V01;
typedef _CRYPT_KEY_LIMITS_V01 CRYPT_KEY_LIMITS, *PCRYPT_KEY_LIMITS;
// Request Flag definitions
#define CRYPTLIMIT_USING_PCT 0x0001
#define CRYPTLIMIT_USING_SGC 0x0002
WINADVAPI
BOOL
WINAPI
CryptGetLocalKeyLimits(
IN ALG_ID algId,
IN DWORD dwFlags,
OUT PCRYPT_KEY_LIMITS pLimits,
IN OUT LPDWORD cbLimitLength);
#endif //(NTDDI_VERSION = NTDDI_WINXP)
#if !defined(_DDK_DRIVER_) #if !defined(_DDK_DRIVER_)
// In Longhorn, the following APIs were updated to support the new // In Vista, the following APIs were updated to support the new
// CNG (Cryptography Next Generation) BCrypt* and NCrypt* APIs in addition // CNG (Cryptography Next Generation) BCrypt* and NCrypt* APIs in addition
// to the above CAPI1 APIs. // to the above CAPI1 APIs.
// Include the definitions for the CNG APIs // Include the definitions for the CNG APIs
#include <bcrypt.h> #include <bcrypt.h>
#include <ncrypt.h> #include <ncrypt.h>
// This type is used when the API can take either the CAPI1 HCRYPTPROV or // This type is used when the API can take either the CAPI1 HCRYPTPROV or
// the CNG NCRYPT_KEY_HANDLE. Where appropriate, the HCRYPTPROV will be // the CNG NCRYPT_KEY_HANDLE. Where appropriate, the HCRYPTPROV will be
// converted to a NCRYPT_KEY_HANDLE via the CNG NCryptTranslateHandle(). // converted to a NCRYPT_KEY_HANDLE via the CNG NCryptTranslateHandle().
skipping to change at line 2012 skipping to change at line 1993
#define szOID_RSA_messageDigest "1.2.840.113549.1.9.4" #define szOID_RSA_messageDigest "1.2.840.113549.1.9.4"
#define szOID_RSA_signingTime "1.2.840.113549.1.9.5" #define szOID_RSA_signingTime "1.2.840.113549.1.9.5"
#define szOID_RSA_counterSign "1.2.840.113549.1.9.6" #define szOID_RSA_counterSign "1.2.840.113549.1.9.6"
#define szOID_RSA_challengePwd "1.2.840.113549.1.9.7" #define szOID_RSA_challengePwd "1.2.840.113549.1.9.7"
#define szOID_RSA_unstructAddr "1.2.840.113549.1.9.8" #define szOID_RSA_unstructAddr "1.2.840.113549.1.9.8"
#define szOID_RSA_extCertAttrs "1.2.840.113549.1.9.9" #define szOID_RSA_extCertAttrs "1.2.840.113549.1.9.9"
#define szOID_RSA_certExtensions "1.2.840.113549.1.9.14" #define szOID_RSA_certExtensions "1.2.840.113549.1.9.14"
#define szOID_RSA_SMIMECapabilities "1.2.840.113549.1.9.15" #define szOID_RSA_SMIMECapabilities "1.2.840.113549.1.9.15"
#define szOID_RSA_preferSignedData "1.2.840.113549.1.9.15.1" #define szOID_RSA_preferSignedData "1.2.840.113549.1.9.15.1"
#define szOID_TIMESTAMP_TOKEN "1.2.840.113549.1.9.16.1.4"
#define szOID_RFC3161_counterSign "1.3.6.1.4.1.311.3.3.1"
#define szOID_RSA_SMIMEalg "1.2.840.113549.1.9.16.3" #define szOID_RSA_SMIMEalg "1.2.840.113549.1.9.16.3"
#define szOID_RSA_SMIMEalgESDH "1.2.840.113549.1.9.16.3.5" #define szOID_RSA_SMIMEalgESDH "1.2.840.113549.1.9.16.3.5"
#define szOID_RSA_SMIMEalgCMS3DESwrap "1.2.840.113549.1.9.16.3.6" #define szOID_RSA_SMIMEalgCMS3DESwrap "1.2.840.113549.1.9.16.3.6"
#define szOID_RSA_SMIMEalgCMSRC2wrap "1.2.840.113549.1.9.16.3.7" #define szOID_RSA_SMIMEalgCMSRC2wrap "1.2.840.113549.1.9.16.3.7"
#define szOID_RSA_MD2 "1.2.840.113549.2.2" #define szOID_RSA_MD2 "1.2.840.113549.2.2"
#define szOID_RSA_MD4 "1.2.840.113549.2.4" #define szOID_RSA_MD4 "1.2.840.113549.2.4"
#define szOID_RSA_MD5 "1.2.840.113549.2.5" #define szOID_RSA_MD5 "1.2.840.113549.2.5"
#define szOID_RSA_RC2CBC "1.2.840.113549.3.2" #define szOID_RSA_RC2CBC "1.2.840.113549.3.2"
skipping to change at line 2082 skipping to change at line 2066
// NIST AES WRAP Algorithms // NIST AES WRAP Algorithms
#define szOID_NIST_AES128_WRAP "2.16.840.1.101.3.4.1.5" #define szOID_NIST_AES128_WRAP "2.16.840.1.101.3.4.1.5"
#define szOID_NIST_AES192_WRAP "2.16.840.1.101.3.4.1.25" #define szOID_NIST_AES192_WRAP "2.16.840.1.101.3.4.1.25"
#define szOID_NIST_AES256_WRAP "2.16.840.1.101.3.4.1.45" #define szOID_NIST_AES256_WRAP "2.16.840.1.101.3.4.1.45"
// x9-63-scheme OBJECT IDENTIFIER ::= { iso(1) // x9-63-scheme OBJECT IDENTIFIER ::= { iso(1)
// identified-organization(3) tc68(133) country(16) x9(840) // identified-organization(3) tc68(133) country(16) x9(840)
// x9-63(63) schemes(0) } // x9-63(63) schemes(0) }
// ECDH single pass ephemeral-static KeyAgreement KeyEncryptionAlgorithm // ECDH single pass ephemeral-static KeyAgreement KeyEncryptionAlgorithm
#define szOID_DH_SINGLE_PASS_STDDH_SHA1_KDF "1.3.133.16.840.63.0.2" #define szOID_DH_SINGLE_PASS_STDDH_SHA1_KDF "1.3.133.16.840.63.0.2"
#define szOID_DH_SINGLE_PASS_STDDH_SHA256_KDF "1.3.132.1.11.1"
#define szOID_DH_SINGLE_PASS_STDDH_SHA384_KDF "1.3.132.1.11.2"
// For the above KeyEncryptionAlgorithm the following wrap algorithms are // For the above KeyEncryptionAlgorithm the following wrap algorithms are
// supported: // supported:
// szOID_RSA_SMIMEalgCMS3DESwrap // szOID_RSA_SMIMEalgCMS3DESwrap
// szOID_RSA_SMIMEalgCMSRC2wrap // szOID_RSA_SMIMEalgCMSRC2wrap
// szOID_NIST_AES128_WRAP // szOID_NIST_AES128_WRAP
// szOID_NIST_AES192_WRAP // szOID_NIST_AES192_WRAP
// szOID_NIST_AES256_WRAP // szOID_NIST_AES256_WRAP
// ITU-T UsefulDefinitions // ITU-T UsefulDefinitions
skipping to change at line 2196 skipping to change at line 2182
// Type used for an extension to an encoded content // Type used for an extension to an encoded content
// //
// Where the Value's CRYPT_OBJID_BLOB is in its encoded representation. // Where the Value's CRYPT_OBJID_BLOB is in its encoded representation.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
// certenrolls_begin -- CERT_CONTEXT // certenrolls_begin -- CERT_CONTEXT
typedef struct _CERT_EXTENSION { typedef struct _CERT_EXTENSION {
LPSTR pszObjId; LPSTR pszObjId;
BOOL fCritical; BOOL fCritical;
CRYPT_OBJID_BLOB Value; CRYPT_OBJID_BLOB Value;
} CERT_EXTENSION, *PCERT_EXTENSION; } CERT_EXTENSION, *PCERT_EXTENSION;
typedef const CERT_EXTENSION* PCCERT_EXTENSION;
// certenrolls_end // certenrolls_end
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// AttributeTypeValue // AttributeTypeValue
// //
// Where the Value's CRYPT_OBJID_BLOB is in its encoded representation. // Where the Value's CRYPT_OBJID_BLOB is in its encoded representation.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
// certenrolls_begin -- CRYPT_ATTRIBUTE_TYPE_VALUE // certenrolls_begin -- CRYPT_ATTRIBUTE_TYPE_VALUE
typedef struct _CRYPT_ATTRIBUTE_TYPE_VALUE { typedef struct _CRYPT_ATTRIBUTE_TYPE_VALUE {
LPSTR pszObjId; LPSTR pszObjId;
skipping to change at line 2330 skipping to change at line 2317
#define szOID_LOCAL_MACHINE_KEYSET "1.3.6.1.4.1.311.17.2" #define szOID_LOCAL_MACHINE_KEYSET "1.3.6.1.4.1.311.17.2"
#define szOID_PKCS_12_EXTENDED_ATTRIBUTES "1.3.6.1.4.1.311.17.3" #define szOID_PKCS_12_EXTENDED_ATTRIBUTES "1.3.6.1.4.1.311.17.3"
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// Microsoft CERT_RDN attribute Object Identifiers // Microsoft CERT_RDN attribute Object Identifiers
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
// Special RDN containing the KEY_ID. Its value type is CERT_RDN_OCTET_STRING. // Special RDN containing the KEY_ID. Its value type is CERT_RDN_OCTET_STRING.
#define szOID_KEYID_RDN "1.3.6.1.4.1.311.10.7.1" #define szOID_KEYID_RDN "1.3.6.1.4.1.311.10.7.1"
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// EV RDN OIDs
//--------------------------------------------------------------------------
#define szOID_EV_RDN_LOCALE "1.3.6.1.4.1.311.60.2.1.1"
#define szOID_EV_RDN_STATE_OR_PROVINCE "1.3.6.1.4.1.311.60.2.1.2"
#define szOID_EV_RDN_COUNTRY "1.3.6.1.4.1.311.60.2.1.3"
//+-------------------------------------------------------------------------
// CERT_RDN Attribute Value Types // CERT_RDN Attribute Value Types
// //
// For RDN_ENCODED_BLOB, the Value's CERT_RDN_VALUE_BLOB is in its encoded // For RDN_ENCODED_BLOB, the Value's CERT_RDN_VALUE_BLOB is in its encoded
// representation. Otherwise, its an array of bytes. // representation. Otherwise, its an array of bytes.
// //
// For all CERT_RDN types, Value.cbData is always the number of bytes, not // For all CERT_RDN types, Value.cbData is always the number of bytes, not
// necessarily the number of elements in the string. For instance, // necessarily the number of elements in the string. For instance,
// RDN_UNIVERSAL_STRING is an array of ints (cbData == intCnt * 4) and // RDN_UNIVERSAL_STRING is an array of ints (cbData == intCnt * 4) and
// RDN_BMP_STRING is an array of unsigned shorts (cbData == ushortCnt * 2). // RDN_BMP_STRING is an array of unsigned shorts (cbData == ushortCnt * 2).
// //
skipping to change at line 2394 skipping to change at line 2388
// For encoding: when set, the characters aren't checked to see if they // For encoding: when set, the characters aren't checked to see if they
// are valid for the Value Type. // are valid for the Value Type.
#define CERT_RDN_DISABLE_CHECK_TYPE_FLAG 0x40000000 #define CERT_RDN_DISABLE_CHECK_TYPE_FLAG 0x40000000
// For decoding: by default, CERT_RDN_T61_STRING values are initially decoded // For decoding: by default, CERT_RDN_T61_STRING values are initially decoded
// as UTF8. If the UTF8 decoding fails, then, decoded as 8 bit characters. // as UTF8. If the UTF8 decoding fails, then, decoded as 8 bit characters.
// Setting this flag skips the initial attempt to decode as UTF8. // Setting this flag skips the initial attempt to decode as UTF8.
#define CERT_RDN_DISABLE_IE4_UTF8_FLAG 0x01000000 #define CERT_RDN_DISABLE_IE4_UTF8_FLAG 0x01000000
// For encoding: If the string contains E/Email RDN, and the email-address
// (in RDN value) contains unicode characters outside of ASCII character set,
// the localpart and the hostname portion of the email-address would be first
// encoded in punycode and then the resultant Email-Address would be attempted
// to be encoded as IA5String. Punycode encoding of hostname is done on
// label-by-label basis.
// For decoding: If the name contains E/Email RDN, and local part or hostname
// portion of the email-address contains punycode encoded IA5String,
// The RDN string value is converted to its unicode equivalent.
#define CERT_RDN_ENABLE_PUNYCODE_FLAG 0x02000000
// Macro to check that the dwValueType is a character string and not an // Macro to check that the dwValueType is a character string and not an
// encoded blob or octet string // encoded blob or octet string
#define IS_CERT_RDN_CHAR_STRING(X) \ #define IS_CERT_RDN_CHAR_STRING(X) \
(((X) & CERT_RDN_TYPE_MASK) >= CERT_RDN_NUMERIC_STRING) (((X) & CERT_RDN_TYPE_MASK) >= CERT_RDN_NUMERIC_STRING)
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// A CERT_RDN consists of an array of the above attributes // A CERT_RDN consists of an array of the above attributes
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
typedef struct _CERT_RDN { typedef struct _CERT_RDN {
DWORD cRDNAttr; DWORD cRDNAttr;
skipping to change at line 2641 skipping to change at line 2646
PCERT_EXTENSION rgExtension; PCERT_EXTENSION rgExtension;
} CRL_INFO, *PCRL_INFO; } CRL_INFO, *PCRL_INFO;
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// CRL versions // CRL versions
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
#define CRL_V1 0 #define CRL_V1 0
#define CRL_V2 1 #define CRL_V2 1
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// Certificate Bundle
//--------------------------------------------------------------------------
#define CERT_BUNDLE_CERTIFICATE 0
#define CERT_BUNDLE_CRL 1
typedef struct _CERT_OR_CRL_BLOB {
DWORD dwChoice;
DWORD cbEncoded;
__field_bcount(cbEncoded)
BYTE *pbEncoded;
} CERT_OR_CRL_BLOB, * PCERT_OR_CRL_BLOB;
typedef struct _CERT_OR_CRL_BUNDLE {
DWORD cItem;
__field_ecount(cItem)
PCERT_OR_CRL_BLOB rgItem;
} CERT_OR_CRL_BUNDLE, *PCERT_OR_CRL_BUNDLE;
//+-------------------------------------------------------------------------
// Information stored in a certificate request // Information stored in a certificate request
// //
// The Subject, Algorithm, PublicKey and Attribute BLOBs are the encoded // The Subject, Algorithm, PublicKey and Attribute BLOBs are the encoded
// representation of the information. // representation of the information.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
typedef struct _CERT_REQUEST_INFO { typedef struct _CERT_REQUEST_INFO {
DWORD dwVersion; DWORD dwVersion;
CERT_NAME_BLOB Subject; CERT_NAME_BLOB Subject;
CERT_PUBLIC_KEY_INFO SubjectPublicKeyInfo; CERT_PUBLIC_KEY_INFO SubjectPublicKeyInfo;
DWORD cAttribute; DWORD cAttribute;
skipping to change at line 2695 skipping to change at line 2719
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// CTL Usage. Also used for EnhancedKeyUsage extension. // CTL Usage. Also used for EnhancedKeyUsage extension.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
typedef struct _CTL_USAGE { typedef struct _CTL_USAGE {
DWORD cUsageIdentifier; DWORD cUsageIdentifier;
LPSTR *rgpszUsageIdentifier; // array of pszObjId LPSTR *rgpszUsageIdentifier; // array of pszObjId
} CTL_USAGE, *PCTL_USAGE, } CTL_USAGE, *PCTL_USAGE,
CERT_ENHKEY_USAGE, *PCERT_ENHKEY_USAGE; CERT_ENHKEY_USAGE, *PCERT_ENHKEY_USAGE;
typedef const CTL_USAGE* PCCTL_USAGE;
typedef const CERT_ENHKEY_USAGE* PCCERT_ENHKEY_USAGE;
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// An entry in a CTL // An entry in a CTL
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
typedef struct _CTL_ENTRY { typedef struct _CTL_ENTRY {
CRYPT_DATA_BLOB SubjectIdentifier; // For example, its hash CRYPT_DATA_BLOB SubjectIdentifier; // For example, its hash
DWORD cAttribute; DWORD cAttribute;
PCRYPT_ATTRIBUTE rgAttribute; // OPTIONAL PCRYPT_ATTRIBUTE rgAttribute; // OPTIONAL
} CTL_ENTRY, *PCTL_ENTRY; } CTL_ENTRY, *PCTL_ENTRY;
skipping to change at line 2906 skipping to change at line 2932
WINCRYPT32API WINCRYPT32API
BOOL BOOL
WINAPI WINAPI
CryptEncodeObjectEx( CryptEncodeObjectEx(
__in DWORD dwCertEncodingType, __in DWORD dwCertEncodingType,
__in LPCSTR lpszStructType, __in LPCSTR lpszStructType,
__in const void *pvStructInfo, __in const void *pvStructInfo,
__in DWORD dwFlags, __in DWORD dwFlags,
__in_opt PCRYPT_ENCODE_PARA pEncodePara, __in_opt PCRYPT_ENCODE_PARA pEncodePara,
__out_opt void *pvEncoded, __out_opt void *pvEncoded,
IN __out DWORD *pcbEncoded __inout DWORD *pcbEncoded
); );
WINCRYPT32API WINCRYPT32API
BOOL BOOL
WINAPI WINAPI
CryptEncodeObject( CryptEncodeObject(
__in DWORD dwCertEncodingType, __in DWORD dwCertEncodingType,
__in LPCSTR lpszStructType, __in LPCSTR lpszStructType,
__in const void *pvStructInfo, __in const void *pvStructInfo,
__out_bcount_part_opt(*pcbEncoded, *pcbEncoded) BYTE *pbEncoded, __out_bcount_part_opt(*pcbEncoded, *pcbEncoded) BYTE *pbEncoded,
skipping to change at line 2971 skipping to change at line 2997
// When set, the characters aren't checked to see if they // When set, the characters aren't checked to see if they
// are valid for the specified Value Type. // are valid for the specified Value Type.
#define CRYPT_UNICODE_NAME_ENCODE_DISABLE_CHECK_TYPE_FLAG \ #define CRYPT_UNICODE_NAME_ENCODE_DISABLE_CHECK_TYPE_FLAG \
CERT_RDN_DISABLE_CHECK_TYPE_FLAG CERT_RDN_DISABLE_CHECK_TYPE_FLAG
// The following flag is applicable when encoding the PKCS_SORTED_CTL. This // The following flag is applicable when encoding the PKCS_SORTED_CTL. This
// flag should be set if the identifier for the TrustedSubjects is a hash, // flag should be set if the identifier for the TrustedSubjects is a hash,
// such as, MD5 or SHA1. // such as, MD5 or SHA1.
#define CRYPT_SORTED_CTL_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG 0x10000 #define CRYPT_SORTED_CTL_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG 0x10000
// The following flag is applicable when encoding structures that require
// IA5String encoding of host name(in DNS Name/ URL/ EmailAddress) containing
// non-IA5 characters by encoding the host name in punycode first.
#define CRYPT_ENCODE_ENABLE_PUNYCODE_FLAG 0x20000
typedef struct _CRYPT_DECODE_PARA { typedef struct _CRYPT_DECODE_PARA {
DWORD cbSize; DWORD cbSize;
PFN_CRYPT_ALLOC pfnAlloc; // OPTIONAL PFN_CRYPT_ALLOC pfnAlloc; // OPTIONAL
PFN_CRYPT_FREE pfnFree; // OPTIONAL PFN_CRYPT_FREE pfnFree; // OPTIONAL
} CRYPT_DECODE_PARA, *PCRYPT_DECODE_PARA; } CRYPT_DECODE_PARA, *PCRYPT_DECODE_PARA;
WINCRYPT32API WINCRYPT32API
BOOL BOOL
WINAPI WINAPI
CryptDecodeObjectEx( CryptDecodeObjectEx(
__in DWORD dwCertEncodingType, __in DWORD dwCertEncodingType,
__in LPCSTR lpszStructType, __in LPCSTR lpszStructType,
__in_bcount(cbEncoded) const BYTE *pbEncoded, __in_bcount(cbEncoded) const BYTE *pbEncoded,
__in DWORD cbEncoded, __in DWORD cbEncoded,
__in DWORD dwFlags, __in DWORD dwFlags,
__in_opt PCRYPT_DECODE_PARA pDecodePara, __in_opt PCRYPT_DECODE_PARA pDecodePara,
__out_opt void *pvStructInfo, __out_opt void *pvStructInfo,
IN __out DWORD *pcbStructInfo __inout DWORD *pcbStructInfo
); );
WINCRYPT32API WINCRYPT32API
BOOL BOOL
WINAPI WINAPI
CryptDecodeObject( CryptDecodeObject(
__in DWORD dwCertEncodingType, __in DWORD dwCertEncodingType,
__in LPCSTR lpszStructType, __in LPCSTR lpszStructType,
__in_bcount(cbEncoded) const BYTE *pbEncoded, __in_bcount(cbEncoded) const BYTE *pbEncoded,
__in DWORD cbEncoded, __in DWORD cbEncoded,
skipping to change at line 3059 skipping to change at line 3090
#define CRYPT_DECODE_ALLOC_FLAG 0x8000 #define CRYPT_DECODE_ALLOC_FLAG 0x8000
// The following flag is applicable when decoding X509_UNICODE_NAME, // The following flag is applicable when decoding X509_UNICODE_NAME,
// X509_UNICODE_NAME_VALUE or X509_UNICODE_ANY_STRING. // X509_UNICODE_NAME_VALUE or X509_UNICODE_ANY_STRING.
// By default, CERT_RDN_T61_STRING values are initially decoded // By default, CERT_RDN_T61_STRING values are initially decoded
// as UTF8. If the UTF8 decoding fails, then, decoded as 8 bit characters. // as UTF8. If the UTF8 decoding fails, then, decoded as 8 bit characters.
// Setting this flag skips the initial attempt to decode as UTF8. // Setting this flag skips the initial attempt to decode as UTF8.
#define CRYPT_UNICODE_NAME_DECODE_DISABLE_IE4_UTF8_FLAG \ #define CRYPT_UNICODE_NAME_DECODE_DISABLE_IE4_UTF8_FLAG \
CERT_RDN_DISABLE_IE4_UTF8_FLAG CERT_RDN_DISABLE_IE4_UTF8_FLAG
// The following flag is applicable when decoding structures that contain
// IA5String encoding of punycode encoded host name (in DNS Name/ URL/
// EmailAddress). Decoded value contains the the unicode equivalent of
// punycode encoded data.
#define CRYPT_DECODE_ENABLE_PUNYCODE_FLAG 0x02000000
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// Predefined X509 certificate data structures that can be encoded / decoded. // Predefined X509 certificate data structures that can be encoded / decoded.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
#define CRYPT_ENCODE_DECODE_NONE 0 #define CRYPT_ENCODE_DECODE_NONE 0
#define X509_CERT ((LPCSTR) 1) #define X509_CERT ((LPCSTR) 1)
#define X509_CERT_TO_BE_SIGNED ((LPCSTR) 2) #define X509_CERT_TO_BE_SIGNED ((LPCSTR) 2)
#define X509_CERT_CRL_TO_BE_SIGNED ((LPCSTR) 3) #define X509_CERT_CRL_TO_BE_SIGNED ((LPCSTR) 3)
#define X509_CERT_REQUEST_TO_BE_SIGNED ((LPCSTR) 4) #define X509_CERT_REQUEST_TO_BE_SIGNED ((LPCSTR) 4)
#define X509_EXTENSIONS ((LPCSTR) 5) #define X509_EXTENSIONS ((LPCSTR) 5)
#define X509_NAME_VALUE ((LPCSTR) 6) #define X509_NAME_VALUE ((LPCSTR) 6)
skipping to change at line 3224 skipping to change at line 3261
#define CNG_RSA_PUBLIC_KEY_BLOB ((LPCSTR) 72) #define CNG_RSA_PUBLIC_KEY_BLOB ((LPCSTR) 72)
#define X509_OBJECT_IDENTIFIER ((LPCSTR) 73) #define X509_OBJECT_IDENTIFIER ((LPCSTR) 73)
#define X509_ALGORITHM_IDENTIFIER ((LPCSTR) 74) #define X509_ALGORITHM_IDENTIFIER ((LPCSTR) 74)
#define PKCS_RSA_SSA_PSS_PARAMETERS ((LPCSTR) 75) #define PKCS_RSA_SSA_PSS_PARAMETERS ((LPCSTR) 75)
#define PKCS_RSAES_OAEP_PARAMETERS ((LPCSTR) 76) #define PKCS_RSAES_OAEP_PARAMETERS ((LPCSTR) 76)
#define ECC_CMS_SHARED_INFO ((LPCSTR) 77) #define ECC_CMS_SHARED_INFO ((LPCSTR) 77)
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// TIMESTAMP
//--------------------------------------------------------------------------
#define TIMESTAMP_REQUEST ((LPCSTR) 78)
#define TIMESTAMP_RESPONSE ((LPCSTR) 79)
#define TIMESTAMP_INFO ((LPCSTR) 80)
//+-------------------------------------------------------------------------
// CertificateBundle
//--------------------------------------------------------------------------
#define X509_CERT_BUNDLE ((LPCSTR) 81)
//+-------------------------------------------------------------------------
// Predefined PKCS #7 data structures that can be encoded / decoded. // Predefined PKCS #7 data structures that can be encoded / decoded.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
#define PKCS7_SIGNER_INFO ((LPCSTR) 500) #define PKCS7_SIGNER_INFO ((LPCSTR) 500)
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// Predefined PKCS #7 data structures that can be encoded / decoded. // Predefined PKCS #7 data structures that can be encoded / decoded.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
#define CMS_SIGNER_INFO ((LPCSTR) 501) #define CMS_SIGNER_INFO ((LPCSTR) 501)
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
skipping to change at line 3551 skipping to change at line 3600
#ifndef szOID_LICENSE_SERVER #ifndef szOID_LICENSE_SERVER
#define szOID_LICENSE_SERVER "1.3.6.1.4.1.311.10.6.2" #define szOID_LICENSE_SERVER "1.3.6.1.4.1.311.10.6.2"
#endif #endif
#ifndef szOID_KP_SMARTCARD_LOGON #ifndef szOID_KP_SMARTCARD_LOGON
#define szOID_KP_SMARTCARD_LOGON "1.3.6.1.4.1.311.20.2.2" #define szOID_KP_SMARTCARD_LOGON "1.3.6.1.4.1.311.20.2.2"
#endif #endif
#define szOID_KP_KERNEL_MODE_CODE_SIGNING "1.3.6.1.4.1.311.61.1.1" #define szOID_KP_KERNEL_MODE_CODE_SIGNING "1.3.6.1.4.1.311.61.1.1"
// Signer of CRL
#define szOID_REVOKED_LIST_SIGNER "1.3.6.1.4.1.311.10.3.19"
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// Microsoft Attribute Object Identifiers // Microsoft Attribute Object Identifiers
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
#define szOID_YESNO_TRUST_ATTR "1.3.6.1.4.1.311.10.4.1" #define szOID_YESNO_TRUST_ATTR "1.3.6.1.4.1.311.10.4.1"
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// Qualifiers that may be part of the szOID_CERT_POLICIES and // Qualifiers that may be part of the szOID_CERT_POLICIES and
// szOID_CERT_POLICIES95 extensions // szOID_CERT_POLICIES95 extensions
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
#define szOID_PKIX_POLICY_QUALIFIER_CPS "1.3.6.1.5.5.7.2.1" #define szOID_PKIX_POLICY_QUALIFIER_CPS "1.3.6.1.5.5.7.2.1"
#define szOID_PKIX_POLICY_QUALIFIER_USERNOTICE "1.3.6.1.5.5.7.2.2" #define szOID_PKIX_POLICY_QUALIFIER_USERNOTICE "1.3.6.1.5.5.7.2.2"
#define szOID_ROOT_PROGRAM_FLAGS "1.3.6.1.4.1.311.60.1.1" #define szOID_ROOT_PROGRAM_FLAGS "1.3.6.1.4.1.311.60.1.1"
//+-------------------------------------------------------------------------
// Root program qualifier flags, used in pbData field of
// CERT_POLICY_QUALIFIER_INFO structure.
//+-------------------------------------------------------------------------
// Validation of the Organization (O) field in the subject name meets
// Root Program Requirements for display.
#define CERT_ROOT_PROGRAM_FLAG_ORG 0x80
// Validation of the Locale (L), State (S), and Country (C) fields in
// the subject name meets Program Requirements for display.
#define CERT_ROOT_PROGRAM_FLAG_LSC 0x40
// Subject logotype
#define CERT_ROOT_PROGRAM_FLAG_SUBJECT_LOGO 0x20
// Validation of the OrganizationalUnit (OU) field in the subject name
// meets Root Program Requirements for display.
#define CERT_ROOT_PROGRAM_FLAG_OU 0x10
// Validation of the address field in the subject name meets Root
// Program Requirements for display.
#define CERT_ROOT_PROGRAM_FLAG_ADDRESS 0x08
// OID for old qualifer // OID for old qualifer
#define szOID_CERT_POLICIES_95_QUALIFIER1 "2.16.840.1.113733.1.7.1.1 " #define szOID_CERT_POLICIES_95_QUALIFIER1 "2.16.840.1.113733.1.7.1.1 "
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// X509_CERT // X509_CERT
// //
// The "to be signed" encoded content plus its signature. The ToBeSigned // The "to be signed" encoded content plus its signature. The ToBeSigned
// content is the CryptEncodeObject() output for one of the following: // content is the CryptEncodeObject() output for one of the following:
// X509_CERT_TO_BE_SIGNED, X509_CERT_CRL_TO_BE_SIGNED or // X509_CERT_TO_BE_SIGNED, X509_CERT_CRL_TO_BE_SIGNED or
// X509_CERT_REQUEST_TO_BE_SIGNED. // X509_CERT_REQUEST_TO_BE_SIGNED.
skipping to change at line 3870 skipping to change at line 3946
union { // certenrolls_skip union { // certenrolls_skip
PCERT_OTHER_NAME pOtherName; // 1 PCERT_OTHER_NAME pOtherName; // 1
LPWSTR pwszRfc822Name; // 2 (encoded IA5) LPWSTR pwszRfc822Name; // 2 (encoded IA5)
LPWSTR pwszDNSName; // 3 (encoded IA5) LPWSTR pwszDNSName; // 3 (encoded IA5)
// Not implemented x400Address; // 4 // Not implemented x400Address; // 4
CERT_NAME_BLOB DirectoryName; // 5 CERT_NAME_BLOB DirectoryName; // 5
// Not implemented pEdiPartyName; // 6 // Not implemented pEdiPartyName; // 6
LPWSTR pwszURL; // 7 (encoded IA5) LPWSTR pwszURL; // 7 (encoded IA5)
CRYPT_DATA_BLOB IPAddress; // 8 (Octet String) CRYPT_DATA_BLOB IPAddress; // 8 (Octet String)
LPSTR pszRegisteredID; // 9 (Object Identifer) LPSTR pszRegisteredID; // 9 (Object Identifer)
}; // certenrolls_skip } DUMMYUNIONNAME; // certenrolls_skip
} CERT_ALT_NAME_ENTRY, *PCERT_ALT_NAME_ENTRY; } CERT_ALT_NAME_ENTRY, *PCERT_ALT_NAME_ENTRY;
// certenrolls_end // certenrolls_end
// certenrolld_begin -- CERT_ALT_NAME_* // certenrolld_begin -- CERT_ALT_NAME_*
#define CERT_ALT_NAME_OTHER_NAME 1 #define CERT_ALT_NAME_OTHER_NAME 1
#define CERT_ALT_NAME_RFC822_NAME 2 #define CERT_ALT_NAME_RFC822_NAME 2
#define CERT_ALT_NAME_DNS_NAME 3 #define CERT_ALT_NAME_DNS_NAME 3
#define CERT_ALT_NAME_X400_ADDRESS 4 #define CERT_ALT_NAME_X400_ADDRESS 4
#define CERT_ALT_NAME_DIRECTORY_NAME 5 #define CERT_ALT_NAME_DIRECTORY_NAME 5
#define CERT_ALT_NAME_EDI_PARTY_NAME 6 #define CERT_ALT_NAME_EDI_PARTY_NAME 6
skipping to change at line 4310 skipping to change at line 4386
// VALUE_INDEX - 16 bits (unicode character index) // VALUE_INDEX - 16 bits (unicode character index)
// //
// See X509_ALTERNATE_NAME for ENTRY_INDEX and VALUE_INDEX error location // See X509_ALTERNATE_NAME for ENTRY_INDEX and VALUE_INDEX error location
// defines. // defines.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
typedef struct _CRL_DIST_POINT_NAME { typedef struct _CRL_DIST_POINT_NAME {
DWORD dwDistPointNameChoice; DWORD dwDistPointNameChoice;
union { union {
CERT_ALT_NAME_INFO FullName; // 1 CERT_ALT_NAME_INFO FullName; // 1
// Not implemented IssuerRDN; // 2 // Not implemented IssuerRDN; // 2
}; } DUMMYUNIONNAME;
} CRL_DIST_POINT_NAME, *PCRL_DIST_POINT_NAME; } CRL_DIST_POINT_NAME, *PCRL_DIST_POINT_NAME;
#define CRL_DIST_POINT_NO_NAME 0 #define CRL_DIST_POINT_NO_NAME 0
#define CRL_DIST_POINT_FULL_NAME 1 #define CRL_DIST_POINT_FULL_NAME 1
#define CRL_DIST_POINT_ISSUER_RDN_NAME 2 #define CRL_DIST_POINT_ISSUER_RDN_NAME 2
typedef struct _CRL_DIST_POINT { typedef struct _CRL_DIST_POINT {
CRL_DIST_POINT_NAME DistPointName; // OPTIONAL CRL_DIST_POINT_NAME DistPointName; // OPTIONAL
CRYPT_BIT_BLOB ReasonFlags; // OPTIONAL CRYPT_BIT_BLOB ReasonFlags; // OPTIONAL
CERT_ALT_NAME_INFO CRLIssuer; // OPTIONAL CERT_ALT_NAME_INFO CRLIssuer; // OPTIONAL
skipping to change at line 5081 skipping to change at line 5157
typedef struct _CMC_TAGGED_CERT_REQUEST { typedef struct _CMC_TAGGED_CERT_REQUEST {
DWORD dwBodyPartID; DWORD dwBodyPartID;
CRYPT_DER_BLOB SignedCertRequest; CRYPT_DER_BLOB SignedCertRequest;
} CMC_TAGGED_CERT_REQUEST, *PCMC_TAGGED_CERT_REQUEST; } CMC_TAGGED_CERT_REQUEST, *PCMC_TAGGED_CERT_REQUEST;
typedef struct _CMC_TAGGED_REQUEST { typedef struct _CMC_TAGGED_REQUEST {
DWORD dwTaggedRequestChoice; DWORD dwTaggedRequestChoice;
union { union {
// CMC_TAGGED_CERT_REQUEST_CHOICE // CMC_TAGGED_CERT_REQUEST_CHOICE
PCMC_TAGGED_CERT_REQUEST pTaggedCertRequest; PCMC_TAGGED_CERT_REQUEST pTaggedCertRequest;
}; } DUMMYUNIONNAME;
} CMC_TAGGED_REQUEST, *PCMC_TAGGED_REQUEST; } CMC_TAGGED_REQUEST, *PCMC_TAGGED_REQUEST;
#define CMC_TAGGED_CERT_REQUEST_CHOICE 1 #define CMC_TAGGED_CERT_REQUEST_CHOICE 1
typedef struct _CMC_TAGGED_CONTENT_INFO { typedef struct _CMC_TAGGED_CONTENT_INFO {
DWORD dwBodyPartID; DWORD dwBodyPartID;
CRYPT_DER_BLOB EncodedContentInfo; CRYPT_DER_BLOB EncodedContentInfo;
} CMC_TAGGED_CONTENT_INFO, *PCMC_TAGGED_CONTENT_INFO; } CMC_TAGGED_CONTENT_INFO, *PCMC_TAGGED_CONTENT_INFO;
typedef struct _CMC_TAGGED_OTHER_MSG { typedef struct _CMC_TAGGED_OTHER_MSG {
skipping to change at line 5144 skipping to change at line 5220
DWORD *rgdwBodyList; DWORD *rgdwBodyList;
LPWSTR pwszStatusString; // OPTIONAL LPWSTR pwszStatusString; // OPTIONAL
DWORD dwOtherInfoChoice; DWORD dwOtherInfoChoice;
union { union {
// CMC_OTHER_INFO_NO_CHOICE // CMC_OTHER_INFO_NO_CHOICE
// none // none
// CMC_OTHER_INFO_FAIL_CHOICE // CMC_OTHER_INFO_FAIL_CHOICE
DWORD dwFailInfo; DWORD dwFailInfo;
// CMC_OTHER_INFO_PEND_CHOICE // CMC_OTHER_INFO_PEND_CHOICE
PCMC_PEND_INFO pPendInfo; PCMC_PEND_INFO pPendInfo;
}; } DUMMYUNIONNAME;
} CMC_STATUS_INFO, *PCMC_STATUS_INFO; } CMC_STATUS_INFO, *PCMC_STATUS_INFO;
#define CMC_OTHER_INFO_NO_CHOICE 0 #define CMC_OTHER_INFO_NO_CHOICE 0
#define CMC_OTHER_INFO_FAIL_CHOICE 1 #define CMC_OTHER_INFO_FAIL_CHOICE 1
#define CMC_OTHER_INFO_PEND_CHOICE 2 #define CMC_OTHER_INFO_PEND_CHOICE 2
// //
// dwStatus values // dwStatus values
// //
skipping to change at line 5304 skipping to change at line 5380
DWORD dwLogotypeImageResolutionChoice; DWORD dwLogotypeImageResolutionChoice;
union { union {
// CERT_LOGOTYPE_NO_IMAGE_RESOLUTION_CHOICE // CERT_LOGOTYPE_NO_IMAGE_RESOLUTION_CHOICE
// No resolution value // No resolution value
// CERT_LOGOTYPE_BITS_IMAGE_RESOLUTION_CHOICE // CERT_LOGOTYPE_BITS_IMAGE_RESOLUTION_CHOICE
DWORD dwNumBits; // Resolution in bits DWORD dwNumBits; // Resolution in bits
// CERT_LOGOTYPE_TABLE_SIZE_IMAGE_RESOLUTION_CHOICE // CERT_LOGOTYPE_TABLE_SIZE_IMAGE_RESOLUTION_CHOICE
DWORD dwTableSize; // Number of color or grey t ones DWORD dwTableSize; // Number of color or grey t ones
}; } DUMMYUNIONNAME;
LPWSTR pwszLanguage; // Optional. Encoded as IA5. LPWSTR pwszLanguage; // Optional. Encoded as IA5.
// RFC 3066 Language Tag // RFC 3066 Language Tag
} CERT_LOGOTYPE_IMAGE_INFO, *PCERT_LOGOTYPE_IMAGE_INFO; } CERT_LOGOTYPE_IMAGE_INFO, *PCERT_LOGOTYPE_IMAGE_INFO;
#define CERT_LOGOTYPE_GRAY_SCALE_IMAGE_INFO_CHOICE 1 #define CERT_LOGOTYPE_GRAY_SCALE_IMAGE_INFO_CHOICE 1
#define CERT_LOGOTYPE_COLOR_IMAGE_INFO_CHOICE 2 #define CERT_LOGOTYPE_COLOR_IMAGE_INFO_CHOICE 2
#define CERT_LOGOTYPE_NO_IMAGE_RESOLUTION_CHOICE 0 #define CERT_LOGOTYPE_NO_IMAGE_RESOLUTION_CHOICE 0
#define CERT_LOGOTYPE_BITS_IMAGE_RESOLUTION_CHOICE 1 #define CERT_LOGOTYPE_BITS_IMAGE_RESOLUTION_CHOICE 1
#define CERT_LOGOTYPE_TABLE_SIZE_IMAGE_RESOLUTION_CHOICE 2 #define CERT_LOGOTYPE_TABLE_SIZE_IMAGE_RESOLUTION_CHOICE 2
skipping to change at line 5354 skipping to change at line 5430
} CERT_LOGOTYPE_DATA, *PCERT_LOGOTYPE_DATA; } CERT_LOGOTYPE_DATA, *PCERT_LOGOTYPE_DATA;
typedef struct _CERT_LOGOTYPE_INFO { typedef struct _CERT_LOGOTYPE_INFO {
DWORD dwLogotypeInfoChoice; DWORD dwLogotypeInfoChoice;
union { union {
// CERT_LOGOTYPE_DIRECT_INFO_CHOICE // CERT_LOGOTYPE_DIRECT_INFO_CHOICE
PCERT_LOGOTYPE_DATA pLogotypeDirectInfo; PCERT_LOGOTYPE_DATA pLogotypeDirectInfo;
// CERT_LOGOTYPE_INDIRECT_INFO_CHOICE // CERT_LOGOTYPE_INDIRECT_INFO_CHOICE
PCERT_LOGOTYPE_REFERENCE pLogotypeIndirectInfo; PCERT_LOGOTYPE_REFERENCE pLogotypeIndirectInfo;
}; } DUMMYUNIONNAME;
} CERT_LOGOTYPE_INFO, *PCERT_LOGOTYPE_INFO; } CERT_LOGOTYPE_INFO, *PCERT_LOGOTYPE_INFO;
#define CERT_LOGOTYPE_DIRECT_INFO_CHOICE 1 #define CERT_LOGOTYPE_DIRECT_INFO_CHOICE 1
#define CERT_LOGOTYPE_INDIRECT_INFO_CHOICE 2 #define CERT_LOGOTYPE_INDIRECT_INFO_CHOICE 2
typedef struct _CERT_OTHER_LOGOTYPE_INFO { typedef struct _CERT_OTHER_LOGOTYPE_INFO {
LPSTR pszObjId; LPSTR pszObjId;
CERT_LOGOTYPE_INFO LogotypeInfo; CERT_LOGOTYPE_INFO LogotypeInfo;
} CERT_OTHER_LOGOTYPE_INFO, *PCERT_OTHER_LOGOTYPE_INFO; } CERT_OTHER_LOGOTYPE_INFO, *PCERT_OTHER_LOGOTYPE_INFO;
skipping to change at line 5394 skipping to change at line 5470
//========================================================================== //==========================================================================
typedef struct _CERT_BIOMETRIC_DATA { typedef struct _CERT_BIOMETRIC_DATA {
DWORD dwTypeOfBiometricDataChoice; DWORD dwTypeOfBiometricDataChoice;
union { union {
// CERT_BIOMETRIC_PREDEFINED_DATA_CHOICE // CERT_BIOMETRIC_PREDEFINED_DATA_CHOICE
DWORD dwPredefined; DWORD dwPredefined;
// CERT_BIOMETRIC_OID_DATA_CHOICE // CERT_BIOMETRIC_OID_DATA_CHOICE
LPSTR pszObjId; LPSTR pszObjId;
}; } DUMMYUNIONNAME;
CERT_HASHED_URL HashedUrl; // pwszUrl is Optional. CERT_HASHED_URL HashedUrl; // pwszUrl is Optional.
} CERT_BIOMETRIC_DATA, *PCERT_BIOMETRIC_DATA; } CERT_BIOMETRIC_DATA, *PCERT_BIOMETRIC_DATA;
#define CERT_BIOMETRIC_PREDEFINED_DATA_CHOICE 1 #define CERT_BIOMETRIC_PREDEFINED_DATA_CHOICE 1
#define CERT_BIOMETRIC_OID_DATA_CHOICE 2 #define CERT_BIOMETRIC_OID_DATA_CHOICE 2
#define CERT_BIOMETRIC_PICTURE_TYPE 0 #define CERT_BIOMETRIC_PICTURE_TYPE 0
#define CERT_BIOMETRIC_SIGNATURE_TYPE 1 #define CERT_BIOMETRIC_SIGNATURE_TYPE 1
skipping to change at line 5521 skipping to change at line 5597
OCSP_CERT_ID CertId; OCSP_CERT_ID CertId;
DWORD dwCertStatus; DWORD dwCertStatus;
union { union {
// OCSP_BASIC_GOOD_CERT_STATUS // OCSP_BASIC_GOOD_CERT_STATUS
// OCSP_BASIC_UNKNOWN_CERT_STATUS // OCSP_BASIC_UNKNOWN_CERT_STATUS
// No additional information // No additional information
// OCSP_BASIC_REVOKED_CERT_STATUS // OCSP_BASIC_REVOKED_CERT_STATUS
POCSP_BASIC_REVOKED_INFO pRevokedInfo; POCSP_BASIC_REVOKED_INFO pRevokedInfo;
}; } DUMMYUNIONNAME;
FILETIME ThisUpdate; FILETIME ThisUpdate;
FILETIME NextUpdate; // Optional, zero filetime implies FILETIME NextUpdate; // Optional, zero filetime implies
// never expires // never expires
DWORD cExtension; DWORD cExtension;
PCERT_EXTENSION rgExtension; PCERT_EXTENSION rgExtension;
} OCSP_BASIC_RESPONSE_ENTRY, *POCSP_BASIC_RESPONSE_ENTRY; } OCSP_BASIC_RESPONSE_ENTRY, *POCSP_BASIC_RESPONSE_ENTRY;
#define OCSP_BASIC_GOOD_CERT_STATUS 0 #define OCSP_BASIC_GOOD_CERT_STATUS 0
#define OCSP_BASIC_REVOKED_CERT_STATUS 1 #define OCSP_BASIC_REVOKED_CERT_STATUS 1
#define OCSP_BASIC_UNKNOWN_CERT_STATUS 2 #define OCSP_BASIC_UNKNOWN_CERT_STATUS 2
typedef struct _OCSP_BASIC_RESPONSE_INFO { typedef struct _OCSP_BASIC_RESPONSE_INFO {
DWORD dwVersion; DWORD dwVersion;
DWORD dwResponderIdChoice; DWORD dwResponderIdChoice;
union { union {
// OCSP_BASIC_BY_NAME_RESPONDER_ID // OCSP_BASIC_BY_NAME_RESPONDER_ID
CERT_NAME_BLOB ByNameResponderId; CERT_NAME_BLOB ByNameResponderId;
// OCSP_BASIC_BY_KEY_RESPONDER_ID // OCSP_BASIC_BY_KEY_RESPONDER_ID
CRYPT_HASH_BLOB ByKeyResponderId; CRYPT_HASH_BLOB ByKeyResponderId;
}; } DUMMYUNIONNAME;
FILETIME ProducedAt; FILETIME ProducedAt;
DWORD cResponseEntry; DWORD cResponseEntry;
POCSP_BASIC_RESPONSE_ENTRY rgResponseEntry; POCSP_BASIC_RESPONSE_ENTRY rgResponseEntry;
DWORD cExtension; DWORD cExtension;
PCERT_EXTENSION rgExtension; PCERT_EXTENSION rgExtension;
} OCSP_BASIC_RESPONSE_INFO, *POCSP_BASIC_RESPONSE_INFO; } OCSP_BASIC_RESPONSE_INFO, *POCSP_BASIC_RESPONSE_INFO;
#define OCSP_BASIC_RESPONSE_V1 0 #define OCSP_BASIC_RESPONSE_V1 0
#define OCSP_BASIC_BY_NAME_RESPONDER_ID 1 #define OCSP_BASIC_BY_NAME_RESPONDER_ID 1
skipping to change at line 5987 skipping to change at line 6063
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
typedef struct _CRYPT_OID_INFO { typedef struct _CRYPT_OID_INFO {
DWORD cbSize; DWORD cbSize;
LPCSTR pszOID; LPCSTR pszOID;
LPCWSTR pwszName; LPCWSTR pwszName;
DWORD dwGroupId; DWORD dwGroupId;
union { union {
DWORD dwValue; DWORD dwValue;
ALG_ID Algid; ALG_ID Algid;
DWORD dwLength; DWORD dwLength;
}; } DUMMYUNIONNAME;
CRYPT_DATA_BLOB ExtraInfo; CRYPT_DATA_BLOB ExtraInfo;
#ifdef CRYPT_OID_INFO_HAS_EXTRA_FIELDS #ifdef CRYPT_OID_INFO_HAS_EXTRA_FIELDS
// Note, if you #define CRYPT_OID_INFO_HAS_EXTRA_FIELDS, then, you // Note, if you #define CRYPT_OID_INFO_HAS_EXTRA_FIELDS, then, you
// must zero all unused fields in this data structure. // must zero all unused fields in this data structure.
// More fields could be added in a future release. // More fields could be added in a future release.
// The following 2 fields are set to an empty string, L"", if not defined. // The following 2 fields are set to an empty string, L"", if not defined.
// This is the Algid string passed to the BCrypt* and NCrypt* APIs // This is the Algid string passed to the BCrypt* and NCrypt* APIs
skipping to change at line 6031 skipping to change at line 6107
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
#define CRYPT_HASH_ALG_OID_GROUP_ID 1 #define CRYPT_HASH_ALG_OID_GROUP_ID 1
#define CRYPT_ENCRYPT_ALG_OID_GROUP_ID 2 #define CRYPT_ENCRYPT_ALG_OID_GROUP_ID 2
#define CRYPT_PUBKEY_ALG_OID_GROUP_ID 3 #define CRYPT_PUBKEY_ALG_OID_GROUP_ID 3
#define CRYPT_SIGN_ALG_OID_GROUP_ID 4 #define CRYPT_SIGN_ALG_OID_GROUP_ID 4
#define CRYPT_RDN_ATTR_OID_GROUP_ID 5 #define CRYPT_RDN_ATTR_OID_GROUP_ID 5
#define CRYPT_EXT_OR_ATTR_OID_GROUP_ID 6 #define CRYPT_EXT_OR_ATTR_OID_GROUP_ID 6
#define CRYPT_ENHKEY_USAGE_OID_GROUP_ID 7 #define CRYPT_ENHKEY_USAGE_OID_GROUP_ID 7
#define CRYPT_POLICY_OID_GROUP_ID 8 #define CRYPT_POLICY_OID_GROUP_ID 8
#define CRYPT_TEMPLATE_OID_GROUP_ID 9 #define CRYPT_TEMPLATE_OID_GROUP_ID 9
#define CRYPT_LAST_OID_GROUP_ID 9 #define CRYPT_KDF_OID_GROUP_ID 10
#define CRYPT_LAST_OID_GROUP_ID 10
#define CRYPT_FIRST_ALG_OID_GROUP_ID CRYPT_HASH_ALG_OID_GROUP_ID #define CRYPT_FIRST_ALG_OID_GROUP_ID CRYPT_HASH_ALG_OID_GROUP_ID
#define CRYPT_LAST_ALG_OID_GROUP_ID CRYPT_SIGN_ALG_OID_GROUP_ID #define CRYPT_LAST_ALG_OID_GROUP_ID CRYPT_SIGN_ALG_OID_GROUP_ID
// certenrolld_end // certenrolld_end
// The CRYPT_*_ALG_OID_GROUP_ID's have an Algid. The CRYPT_RDN_ATTR_OID_GROUP_ID // The CRYPT_*_ALG_OID_GROUP_ID's have an Algid. The CRYPT_RDN_ATTR_OID_GROUP_ID
// has a dwLength. The CRYPT_EXT_OR_ATTR_OID_GROUP_ID, // has a dwLength. The CRYPT_EXT_OR_ATTR_OID_GROUP_ID,
// CRYPT_ENHKEY_USAGE_OID_GROUP_ID, CRYPT_POLICY_OID_GROUP_ID or // CRYPT_ENHKEY_USAGE_OID_GROUP_ID, CRYPT_POLICY_OID_GROUP_ID or
// CRYPT_TEMPLATE_OID_GROUP_ID don't have a dwValue. // CRYPT_TEMPLATE_OID_GROUP_ID don't have a dwValue.
// //
skipping to change at line 6134 skipping to change at line 6211
// valid for signing or encrypting // valid for signing or encrypting
// certenrolld_begin -- CRYPT_*_KEY_FLAG // certenrolld_begin -- CRYPT_*_KEY_FLAG
#define CRYPT_OID_INFO_OID_KEY_FLAGS_MASK 0xFFFF0000 #define CRYPT_OID_INFO_OID_KEY_FLAGS_MASK 0xFFFF0000
#define CRYPT_OID_INFO_PUBKEY_SIGN_KEY_FLAG 0x80000000 #define CRYPT_OID_INFO_PUBKEY_SIGN_KEY_FLAG 0x80000000
#define CRYPT_OID_INFO_PUBKEY_ENCRYPT_KEY_FLAG 0x40000000 #define CRYPT_OID_INFO_PUBKEY_ENCRYPT_KEY_FLAG 0x40000000
// The following flag can be set in above dwGroupId parameter to disable // The following flag can be set in above dwGroupId parameter to disable
// searching the directory server // searching the directory server
#define CRYPT_OID_DISABLE_SEARCH_DS_FLAG 0x80000000 #define CRYPT_OID_DISABLE_SEARCH_DS_FLAG 0x80000000
#ifdef CRYPT_OID_INFO_HAS_EXTRA_FIELDS
// The following flag can be set in above dwGroupId parameter to search
// through CRYPT_OID_INFO records. If there are multiple records that meet
// the search criteria, the first record with defined pwszCNGAlgid would be
// returned. If none of the records (meeting the search criteria) have
// pwszCNGAlgid defined, first record (meeting the search criteria) would be
// returned.
#define CRYPT_OID_PREFER_CNG_ALGID_FLAG 0x40000000
#endif
// certenrolld_end -- CRYPT_*_KEY_FLAG // certenrolld_end -- CRYPT_*_KEY_FLAG
// The bit length shifted left 16 bits can be OR'ed into the above // The bit length shifted left 16 bits can be OR'ed into the above
// dwGroupId parameter. Only applicable to the CRYPT_ENCRYPT_ALG_OID_GROUP_ID. // dwGroupId parameter. Only applicable to the CRYPT_ENCRYPT_ALG_OID_GROUP_ID.
// Also, only applicable to encryption algorithms having a dwBitLen ExtraInfo. // Also, only applicable to encryption algorithms having a dwBitLen ExtraInfo.
// Currently, only the AES encryption algorithms have this. // Currently, only the AES encryption algorithms have this.
// //
// For example, to find the OIDInfo for BCRYPT_AES_ALGORITHM, bit length 192, // For example, to find the OIDInfo for BCRYPT_AES_ALGORITHM, bit length 192,
// CryptFindOIDInfo would be called as follows: // CryptFindOIDInfo would be called as follows:
// PCCRYPT_OID_INFO pOIDInfo = // PCCRYPT_OID_INFO pOIDInfo =
skipping to change at line 6302 skipping to change at line 6391
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
typedef struct _CERT_ID { typedef struct _CERT_ID {
DWORD dwIdChoice; DWORD dwIdChoice;
union { union {
// CERT_ID_ISSUER_SERIAL_NUMBER // CERT_ID_ISSUER_SERIAL_NUMBER
CERT_ISSUER_SERIAL_NUMBER IssuerSerialNumber; CERT_ISSUER_SERIAL_NUMBER IssuerSerialNumber;
// CERT_ID_KEY_IDENTIFIER // CERT_ID_KEY_IDENTIFIER
CRYPT_HASH_BLOB KeyId; CRYPT_HASH_BLOB KeyId;
// CERT_ID_SHA1_HASH // CERT_ID_SHA1_HASH
CRYPT_HASH_BLOB HashId; CRYPT_HASH_BLOB HashId;
}; } DUMMYUNIONNAME;
} CERT_ID, *PCERT_ID; } CERT_ID, *PCERT_ID;
#define CERT_ID_ISSUER_SERIAL_NUMBER 1 #define CERT_ID_ISSUER_SERIAL_NUMBER 1
#define CERT_ID_KEY_IDENTIFIER 2 #define CERT_ID_KEY_IDENTIFIER 2
#define CERT_ID_SHA1_HASH 3 #define CERT_ID_SHA1_HASH 3
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// The message encode information (pvMsgEncodeInfo) is message type dependent // The message encode information (pvMsgEncodeInfo) is message type dependent
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
skipping to change at line 6365 skipping to change at line 6454
// CMS signed messages allow the inclusion of Attribute Certs. // CMS signed messages allow the inclusion of Attribute Certs.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
typedef struct _CMSG_SIGNER_ENCODE_INFO { typedef struct _CMSG_SIGNER_ENCODE_INFO {
DWORD cbSize; DWORD cbSize;
PCERT_INFO pCertInfo; PCERT_INFO pCertInfo;
// NCryptIsKeyHandle() is called to determine the union choice. // NCryptIsKeyHandle() is called to determine the union choice.
union { union {
HCRYPTPROV hCryptProv; HCRYPTPROV hCryptProv;
NCRYPT_KEY_HANDLE hNCryptKey; NCRYPT_KEY_HANDLE hNCryptKey;
}; } DUMMYUNIONNAME;
// not applicable for hNCryptKey choice // not applicable for hNCryptKey choice
DWORD dwKeySpec; DWORD dwKeySpec;
CRYPT_ALGORITHM_IDENTIFIER HashAlgorithm; CRYPT_ALGORITHM_IDENTIFIER HashAlgorithm;
void *pvHashAuxInfo; void *pvHashAuxInfo;
DWORD cAuthAttr; DWORD cAuthAttr;
PCRYPT_ATTRIBUTE rgAuthAttr; PCRYPT_ATTRIBUTE rgAuthAttr;
DWORD cUnauthAttr; DWORD cUnauthAttr;
PCRYPT_ATTRIBUTE rgUnauthAttr; PCRYPT_ATTRIBUTE rgUnauthAttr;
skipping to change at line 6582 skipping to change at line 6671
union { union {
// CMSG_KEY_AGREE_EPHEMERAL_KEY_CHOICE // CMSG_KEY_AGREE_EPHEMERAL_KEY_CHOICE
// //
// The ephemeral public key algorithm and parameters. // The ephemeral public key algorithm and parameters.
PCRYPT_ALGORITHM_IDENTIFIER pEphemeralAlgorithm; PCRYPT_ALGORITHM_IDENTIFIER pEphemeralAlgorithm;
// CMSG_KEY_AGREE_STATIC_KEY_CHOICE // CMSG_KEY_AGREE_STATIC_KEY_CHOICE
// //
// The CertId of the sender's certificate // The CertId of the sender's certificate
PCERT_ID pSenderId; PCERT_ID pSenderId;
}; } DUMMYUNIONNAME;
CRYPT_DATA_BLOB UserKeyingMaterial; // OPTIONAL CRYPT_DATA_BLOB UserKeyingMaterial; // OPTIONAL
DWORD cRecipientEncryptedKeys; DWORD cRecipientEncryptedKeys;
PCMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO *rgpRecipientEncryptedKeys; PCMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO *rgpRecipientEncryptedKeys;
} CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO, *PCMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO; } CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO, *PCMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO;
#define CMSG_KEY_AGREE_EPHEMERAL_KEY_CHOICE 1 #define CMSG_KEY_AGREE_EPHEMERAL_KEY_CHOICE 1
#define CMSG_KEY_AGREE_STATIC_KEY_CHOICE 2 #define CMSG_KEY_AGREE_STATIC_KEY_CHOICE 2
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
skipping to change at line 6622 skipping to change at line 6711
DWORD cbSize; DWORD cbSize;
CRYPT_ALGORITHM_IDENTIFIER KeyEncryptionAlgorithm; CRYPT_ALGORITHM_IDENTIFIER KeyEncryptionAlgorithm;
void *pvKeyEncryptionAuxInfo; void *pvKeyEncryptionAuxInfo;
HCRYPTPROV hCryptProv; HCRYPTPROV hCryptProv;
DWORD dwKeyChoice; DWORD dwKeyChoice;
union { union {
// CMSG_MAIL_LIST_HANDLE_KEY_CHOICE // CMSG_MAIL_LIST_HANDLE_KEY_CHOICE
HCRYPTKEY hKeyEncryptionKey; HCRYPTKEY hKeyEncryptionKey;
// Reserve space for a potential pointer choice // Reserve space for a potential pointer choice
void *pvKeyEncryptionKey; void *pvKeyEncryptionKey;
}; } DUMMYUNIONNAME;
CRYPT_DATA_BLOB KeyId; CRYPT_DATA_BLOB KeyId;
// Following fields are optional. // Following fields are optional.
FILETIME Date; FILETIME Date;
PCRYPT_ATTRIBUTE_TYPE_VALUE pOtherAttr; PCRYPT_ATTRIBUTE_TYPE_VALUE pOtherAttr;
} CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO, *PCMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO; } CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO, *PCMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO;
#define CMSG_MAIL_LIST_HANDLE_KEY_CHOICE 1 #define CMSG_MAIL_LIST_HANDLE_KEY_CHOICE 1
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
skipping to change at line 6646 skipping to change at line 6735
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
struct _CMSG_RECIPIENT_ENCODE_INFO { struct _CMSG_RECIPIENT_ENCODE_INFO {
DWORD dwRecipientChoice; DWORD dwRecipientChoice;
union { union {
// CMSG_KEY_TRANS_RECIPIENT // CMSG_KEY_TRANS_RECIPIENT
PCMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO pKeyTrans; PCMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO pKeyTrans;
// CMSG_KEY_AGREE_RECIPIENT // CMSG_KEY_AGREE_RECIPIENT
PCMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO pKeyAgree; PCMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO pKeyAgree;
// CMSG_MAIL_LIST_RECIPIENT // CMSG_MAIL_LIST_RECIPIENT
PCMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO pMailList; PCMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO pMailList;
}; } DUMMYUNIONNAME;
}; };
#define CMSG_KEY_TRANS_RECIPIENT 1 #define CMSG_KEY_TRANS_RECIPIENT 1
#define CMSG_KEY_AGREE_RECIPIENT 2 #define CMSG_KEY_AGREE_RECIPIENT 2
#define CMSG_MAIL_LIST_RECIPIENT 3 #define CMSG_MAIL_LIST_RECIPIENT 3
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// CMSG_RC2_AUX_INFO // CMSG_RC2_AUX_INFO
// //
// AuxInfo for RC2 encryption algorithms. The pvEncryptionAuxInfo field // AuxInfo for RC2 encryption algorithms. The pvEncryptionAuxInfo field
skipping to change at line 7420 skipping to change at line 7509
} CMSG_RECIPIENT_ENCRYPTED_KEY_INFO, *PCMSG_RECIPIENT_ENCRYPTED_KEY_INFO; } CMSG_RECIPIENT_ENCRYPTED_KEY_INFO, *PCMSG_RECIPIENT_ENCRYPTED_KEY_INFO;
typedef struct _CMSG_KEY_AGREE_RECIPIENT_INFO { typedef struct _CMSG_KEY_AGREE_RECIPIENT_INFO {
DWORD dwVersion; DWORD dwVersion;
DWORD dwOriginatorChoice; DWORD dwOriginatorChoice;
union { union {
// CMSG_KEY_AGREE_ORIGINATOR_CERT // CMSG_KEY_AGREE_ORIGINATOR_CERT
CERT_ID OriginatorCertId; CERT_ID OriginatorCertId;
// CMSG_KEY_AGREE_ORIGINATOR_PUBLIC_KEY // CMSG_KEY_AGREE_ORIGINATOR_PUBLIC_KEY
CERT_PUBLIC_KEY_INFO OriginatorPublicKeyInfo; CERT_PUBLIC_KEY_INFO OriginatorPublicKeyInfo;
}; } DUMMYUNIONNAME;
CRYPT_DATA_BLOB UserKeyingMaterial; CRYPT_DATA_BLOB UserKeyingMaterial;
CRYPT_ALGORITHM_IDENTIFIER KeyEncryptionAlgorithm; CRYPT_ALGORITHM_IDENTIFIER KeyEncryptionAlgorithm;
DWORD cRecipientEncryptedKeys; DWORD cRecipientEncryptedKeys;
PCMSG_RECIPIENT_ENCRYPTED_KEY_INFO *rgpRecipientEncryptedKeys; PCMSG_RECIPIENT_ENCRYPTED_KEY_INFO *rgpRecipientEncryptedKeys;
} CMSG_KEY_AGREE_RECIPIENT_INFO, *PCMSG_KEY_AGREE_RECIPIENT_INFO; } CMSG_KEY_AGREE_RECIPIENT_INFO, *PCMSG_KEY_AGREE_RECIPIENT_INFO;
#define CMSG_KEY_AGREE_ORIGINATOR_CERT 1 #define CMSG_KEY_AGREE_ORIGINATOR_CERT 1
#define CMSG_KEY_AGREE_ORIGINATOR_PUBLIC_KEY 2 #define CMSG_KEY_AGREE_ORIGINATOR_PUBLIC_KEY 2
skipping to change at line 7451 skipping to change at line 7540
typedef struct _CMSG_CMS_RECIPIENT_INFO { typedef struct _CMSG_CMS_RECIPIENT_INFO {
DWORD dwRecipientChoice; DWORD dwRecipientChoice;
union { union {
// CMSG_KEY_TRANS_RECIPIENT // CMSG_KEY_TRANS_RECIPIENT
PCMSG_KEY_TRANS_RECIPIENT_INFO pKeyTrans; PCMSG_KEY_TRANS_RECIPIENT_INFO pKeyTrans;
// CMSG_KEY_AGREE_RECIPIENT // CMSG_KEY_AGREE_RECIPIENT
PCMSG_KEY_AGREE_RECIPIENT_INFO pKeyAgree; PCMSG_KEY_AGREE_RECIPIENT_INFO pKeyAgree;
// CMSG_MAIL_LIST_RECIPIENT // CMSG_MAIL_LIST_RECIPIENT
PCMSG_MAIL_LIST_RECIPIENT_INFO pMailList; PCMSG_MAIL_LIST_RECIPIENT_INFO pMailList;
}; } DUMMYUNIONNAME;
} CMSG_CMS_RECIPIENT_INFO, *PCMSG_CMS_RECIPIENT_INFO; } CMSG_CMS_RECIPIENT_INFO, *PCMSG_CMS_RECIPIENT_INFO;
// dwVersion numbers for the KeyTrans, KeyAgree and MailList recipients // dwVersion numbers for the KeyTrans, KeyAgree and MailList recipients
#define CMSG_ENVELOPED_RECIPIENT_V0 0 #define CMSG_ENVELOPED_RECIPIENT_V0 0
#define CMSG_ENVELOPED_RECIPIENT_V2 2 #define CMSG_ENVELOPED_RECIPIENT_V2 2
#define CMSG_ENVELOPED_RECIPIENT_V3 3 #define CMSG_ENVELOPED_RECIPIENT_V3 3
#define CMSG_ENVELOPED_RECIPIENT_V4 4 #define CMSG_ENVELOPED_RECIPIENT_V4 4
#define CMSG_KEY_TRANS_PKCS_1_5_VERSION CMSG_ENVELOPED_RECIPIENT_V0 #define CMSG_KEY_TRANS_PKCS_1_5_VERSION CMSG_ENVELOPED_RECIPIENT_V0
#define CMSG_KEY_TRANS_CMS_VERSION CMSG_ENVELOPED_RECIPIENT_V2 #define CMSG_KEY_TRANS_CMS_VERSION CMSG_ENVELOPED_RECIPIENT_V2
#define CMSG_KEY_AGREE_VERSION CMSG_ENVELOPED_RECIPIENT_V3 #define CMSG_KEY_AGREE_VERSION CMSG_ENVELOPED_RECIPIENT_V3
skipping to change at line 7611 skipping to change at line 7700
// //
// Note, the message can only be decrypted once. // Note, the message can only be decrypted once.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
typedef struct _CMSG_CTRL_DECRYPT_PARA { typedef struct _CMSG_CTRL_DECRYPT_PARA {
DWORD cbSize; DWORD cbSize;
// NCryptIsKeyHandle() is called to determine the union choice. // NCryptIsKeyHandle() is called to determine the union choice.
union { union {
HCRYPTPROV hCryptProv; HCRYPTPROV hCryptProv;
NCRYPT_KEY_HANDLE hNCryptKey; NCRYPT_KEY_HANDLE hNCryptKey;
}; } DUMMYUNIONNAME;
// not applicable for hNCryptKey choice // not applicable for hNCryptKey choice
DWORD dwKeySpec; DWORD dwKeySpec;
DWORD dwRecipientIndex; DWORD dwRecipientIndex;
} CMSG_CTRL_DECRYPT_PARA, *PCMSG_CTRL_DECRYPT_PARA; } CMSG_CTRL_DECRYPT_PARA, *PCMSG_CTRL_DECRYPT_PARA;
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// CMSG_CTRL_KEY_TRANS_DECRYPT // CMSG_CTRL_KEY_TRANS_DECRYPT
// //
skipping to change at line 7649 skipping to change at line 7738
// with the hCryptProv's or hNCryptKey's private key. // with the hCryptProv's or hNCryptKey's private key.
// //
// Note, the message can only be decrypted once. // Note, the message can only be decrypted once.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
typedef struct _CMSG_CTRL_KEY_TRANS_DECRYPT_PARA { typedef struct _CMSG_CTRL_KEY_TRANS_DECRYPT_PARA {
DWORD cbSize; DWORD cbSize;
// NCryptIsKeyHandle() is called to determine the union choice. // NCryptIsKeyHandle() is called to determine the union choice.
union { union {
HCRYPTPROV hCryptProv; HCRYPTPROV hCryptProv;
NCRYPT_KEY_HANDLE hNCryptKey; NCRYPT_KEY_HANDLE hNCryptKey;
}; } DUMMYUNIONNAME;
// not applicable for hNCryptKey choice // not applicable for hNCryptKey choice
DWORD dwKeySpec; DWORD dwKeySpec;
PCMSG_KEY_TRANS_RECIPIENT_INFO pKeyTrans; PCMSG_KEY_TRANS_RECIPIENT_INFO pKeyTrans;
DWORD dwRecipientIndex; DWORD dwRecipientIndex;
} CMSG_CTRL_KEY_TRANS_DECRYPT_PARA, *PCMSG_CTRL_KEY_TRANS_DECRYPT_PARA; } CMSG_CTRL_KEY_TRANS_DECRYPT_PARA, *PCMSG_CTRL_KEY_TRANS_DECRYPT_PARA;
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// CMSG_CTRL_KEY_AGREE_DECRYPT // CMSG_CTRL_KEY_AGREE_DECRYPT
skipping to change at line 7694 skipping to change at line 7783
// //
// Note, the message can only be decrypted once. // Note, the message can only be decrypted once.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
typedef struct _CMSG_CTRL_KEY_AGREE_DECRYPT_PARA { typedef struct _CMSG_CTRL_KEY_AGREE_DECRYPT_PARA {
DWORD cbSize; DWORD cbSize;
// NCryptIsKeyHandle() is called to determine the union choice. // NCryptIsKeyHandle() is called to determine the union choice.
union { union {
HCRYPTPROV hCryptProv; HCRYPTPROV hCryptProv;
NCRYPT_KEY_HANDLE hNCryptKey; NCRYPT_KEY_HANDLE hNCryptKey;
}; } DUMMYUNIONNAME;
// not applicable for hNCryptKey choice // not applicable for hNCryptKey choice
DWORD dwKeySpec; DWORD dwKeySpec;
PCMSG_KEY_AGREE_RECIPIENT_INFO pKeyAgree; PCMSG_KEY_AGREE_RECIPIENT_INFO pKeyAgree;
DWORD dwRecipientIndex; DWORD dwRecipientIndex;
DWORD dwRecipientEncryptedKeyIndex; DWORD dwRecipientEncryptedKeyIndex;
CRYPT_BIT_BLOB OriginatorPublicKey; CRYPT_BIT_BLOB OriginatorPublicKey;
} CMSG_CTRL_KEY_AGREE_DECRYPT_PARA, *PCMSG_CTRL_KEY_AGREE_DECRYPT_PARA; } CMSG_CTRL_KEY_AGREE_DECRYPT_PARA, *PCMSG_CTRL_KEY_AGREE_DECRYPT_PARA;
skipping to change at line 7741 skipping to change at line 7830
DWORD cbSize; DWORD cbSize;
HCRYPTPROV hCryptProv; HCRYPTPROV hCryptProv;
PCMSG_MAIL_LIST_RECIPIENT_INFO pMailList; PCMSG_MAIL_LIST_RECIPIENT_INFO pMailList;
DWORD dwRecipientIndex; DWORD dwRecipientIndex;
DWORD dwKeyChoice; DWORD dwKeyChoice;
union { union {
// CMSG_MAIL_LIST_HANDLE_KEY_CHOICE // CMSG_MAIL_LIST_HANDLE_KEY_CHOICE
HCRYPTKEY hKeyEncryptionKey; HCRYPTKEY hKeyEncryptionKey;
// Reserve space for a potential pointer choice // Reserve space for a potential pointer choice
void *pvKeyEncryptionKey; void *pvKeyEncryptionKey;
}; } DUMMYUNIONNAME;
} CMSG_CTRL_MAIL_LIST_DECRYPT_PARA, *PCMSG_CTRL_MAIL_LIST_DECRYPT_PARA; } CMSG_CTRL_MAIL_LIST_DECRYPT_PARA, *PCMSG_CTRL_MAIL_LIST_DECRYPT_PARA;
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// CMSG_CTRL_VERIFY_HASH // CMSG_CTRL_VERIFY_HASH
// //
// Verify the hash of a HASHED message after it has been decoded. // Verify the hash of a HASHED message after it has been decoded.
// //
// Only the hCryptMsg parameter is used, to specify the message whose // Only the hCryptMsg parameter is used, to specify the message whose
// hash is being verified. // hash is being verified.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
skipping to change at line 8040 skipping to change at line 8129
DWORD cRecipients; DWORD cRecipients;
PCMSG_RECIPIENT_ENCODE_INFO rgCmsRecipients; PCMSG_RECIPIENT_ENCODE_INFO rgCmsRecipients;
PFN_CMSG_ALLOC pfnAlloc; PFN_CMSG_ALLOC pfnAlloc;
PFN_CMSG_FREE pfnFree; PFN_CMSG_FREE pfnFree;
DWORD dwEncryptFlags; DWORD dwEncryptFlags;
union { union {
// fCNG == FALSE // fCNG == FALSE
HCRYPTKEY hContentEncryptKey; HCRYPTKEY hContentEncryptKey;
// fCNG == TRUE // fCNG == TRUE
BCRYPT_KEY_HANDLE hCNGContentEncryptKey; BCRYPT_KEY_HANDLE hCNGContentEncryptKey;
}; } DUMMYUNIONNAME;
DWORD dwFlags; DWORD dwFlags;
BOOL fCNG; BOOL fCNG;
// When fCNG == TRUE, pfnAlloc'ed // When fCNG == TRUE, pfnAlloc'ed
BYTE *pbCNGContentEncryptKeyObject; BYTE *pbCNGContentEncryptKeyObject;
BYTE *pbContentEncryptKey; BYTE *pbContentEncryptKey;
DWORD cbContentEncryptKey; DWORD cbContentEncryptKey;
} CMSG_CONTENT_ENCRYPT_INFO, *PCMSG_CONTENT_ENCRYPT_INFO; } CMSG_CONTENT_ENCRYPT_INFO, *PCMSG_CONTENT_ENCRYPT_INFO;
#define CMSG_CONTENT_ENCRYPT_PAD_ENCODED_LEN_FLAG 0x00000001 #define CMSG_CONTENT_ENCRYPT_PAD_ENCODED_LEN_FLAG 0x00000001
skipping to change at line 8212 skipping to change at line 8301
DWORD cbSize; DWORD cbSize;
DWORD dwRecipientIndex; DWORD dwRecipientIndex;
CRYPT_ALGORITHM_IDENTIFIER KeyEncryptionAlgorithm; CRYPT_ALGORITHM_IDENTIFIER KeyEncryptionAlgorithm;
CRYPT_DATA_BLOB UserKeyingMaterial; CRYPT_DATA_BLOB UserKeyingMaterial;
DWORD dwOriginatorChoice; DWORD dwOriginatorChoice;
union { union {
// CMSG_KEY_AGREE_ORIGINATOR_CERT // CMSG_KEY_AGREE_ORIGINATOR_CERT
CERT_ID OriginatorCertId; CERT_ID OriginatorCertId;
// CMSG_KEY_AGREE_ORIGINATOR_PUBLIC_KEY // CMSG_KEY_AGREE_ORIGINATOR_PUBLIC_KEY
CERT_PUBLIC_KEY_INFO OriginatorPublicKeyInfo; CERT_PUBLIC_KEY_INFO OriginatorPublicKeyInfo;
}; } DUMMYUNIONNAME;
DWORD cKeyAgreeKeyEncryptInfo; DWORD cKeyAgreeKeyEncryptInfo;
PCMSG_KEY_AGREE_KEY_ENCRYPT_INFO *rgpKeyAgreeKeyEncryptInfo; PCMSG_KEY_AGREE_KEY_ENCRYPT_INFO *rgpKeyAgreeKeyEncryptInfo;
DWORD dwFlags; DWORD dwFlags;
} CMSG_KEY_AGREE_ENCRYPT_INFO, *PCMSG_KEY_AGREE_ENCRYPT_INFO; } CMSG_KEY_AGREE_ENCRYPT_INFO, *PCMSG_KEY_AGREE_ENCRYPT_INFO;
#define CMSG_KEY_AGREE_ENCRYPT_FREE_PARA_FLAG 0x00000001 #define CMSG_KEY_AGREE_ENCRYPT_FREE_PARA_FLAG 0x00000001
#define CMSG_KEY_AGREE_ENCRYPT_FREE_MATERIAL_FLAG 0x00000002 #define CMSG_KEY_AGREE_ENCRYPT_FREE_MATERIAL_FLAG 0x00000002
#define CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_ALG_FLAG 0x00000004 #define CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_ALG_FLAG 0x00000004
#define CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_PARA_FLAG 0x00000008 #define CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_PARA_FLAG 0x00000008
#define CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_BITS_FLAG 0x00000010 #define CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_BITS_FLAG 0x00000010
skipping to change at line 8657 skipping to change at line 8746
#define CERT_FRIENDLY_NAME_PROP_ID 11 // string #define CERT_FRIENDLY_NAME_PROP_ID 11 // string
#define CERT_PVK_FILE_PROP_ID 12 #define CERT_PVK_FILE_PROP_ID 12
#define CERT_DESCRIPTION_PROP_ID 13 // string #define CERT_DESCRIPTION_PROP_ID 13 // string
#define CERT_ACCESS_STATE_PROP_ID 14 #define CERT_ACCESS_STATE_PROP_ID 14
#define CERT_SIGNATURE_HASH_PROP_ID 15 #define CERT_SIGNATURE_HASH_PROP_ID 15
#define CERT_SMART_CARD_DATA_PROP_ID 16 #define CERT_SMART_CARD_DATA_PROP_ID 16
#define CERT_EFS_PROP_ID 17 #define CERT_EFS_PROP_ID 17
#define CERT_FORTEZZA_DATA_PROP_ID 18 #define CERT_FORTEZZA_DATA_PROP_ID 18
#define CERT_ARCHIVED_PROP_ID 19 #define CERT_ARCHIVED_PROP_ID 19
#define CERT_KEY_IDENTIFIER_PROP_ID 20 #define CERT_KEY_IDENTIFIER_PROP_ID 20
#define CERT_AUTO_ENROLL_PROP_ID 21 // string:machine DNS name #define CERT_AUTO_ENROLL_PROP_ID 21 // string:Template name
#define CERT_PUBKEY_ALG_PARA_PROP_ID 22 #define CERT_PUBKEY_ALG_PARA_PROP_ID 22
#define CERT_CROSS_CERT_DIST_POINTS_PROP_ID 23 #define CERT_CROSS_CERT_DIST_POINTS_PROP_ID 23
#define CERT_ISSUER_PUBLIC_KEY_MD5_HASH_PROP_ID 24 #define CERT_ISSUER_PUBLIC_KEY_MD5_HASH_PROP_ID 24
#define CERT_SUBJECT_PUBLIC_KEY_MD5_HASH_PROP_ID 25 #define CERT_SUBJECT_PUBLIC_KEY_MD5_HASH_PROP_ID 25
#define CERT_ENROLLMENT_PROP_ID 26 // RequestId+CADNS+CACN+Friendly Name #define CERT_ENROLLMENT_PROP_ID 26 // RequestId+CADNS+CACN+Friendly Name
#define CERT_DATE_STAMP_PROP_ID 27 #define CERT_DATE_STAMP_PROP_ID 27
#define CERT_ISSUER_SERIAL_NUMBER_MD5_HASH_PROP_ID 28 #define CERT_ISSUER_SERIAL_NUMBER_MD5_HASH_PROP_ID 28
#define CERT_SUBJECT_NAME_MD5_HASH_PROP_ID 29 #define CERT_SUBJECT_NAME_MD5_HASH_PROP_ID 29
#define CERT_EXTENDED_ERROR_INFO_PROP_ID 30 // string #define CERT_EXTENDED_ERROR_INFO_PROP_ID 30 // string
// Note, 32 - 35 are reserved for the CERT, CRL, CTL and KeyId file element IDs. // Note, 32 - 35 are reserved for the CERT, CRL, CTL and KeyId file element IDs.
// 36 - 63 are reserved for future element IDs. // 36 - 62 are reserved for future element IDs.
#define CERT_RENEWAL_PROP_ID 64 #define CERT_RENEWAL_PROP_ID 64
#define CERT_ARCHIVED_KEY_HASH_PROP_ID 65 // Encrypted key hash #define CERT_ARCHIVED_KEY_HASH_PROP_ID 65 // Encrypted key hash
#define CERT_AUTO_ENROLL_RETRY_PROP_ID 66 // AE_RETRY_INFO:cb+cRetry+FILETI ME #define CERT_AUTO_ENROLL_RETRY_PROP_ID 66 // AE_RETRY_INFO:cb+cRetry+FILETI ME
#define CERT_AIA_URL_RETRIEVED_PROP_ID 67 #define CERT_AIA_URL_RETRIEVED_PROP_ID 67
#define CERT_AUTHORITY_INFO_ACCESS_PROP_ID 68 #define CERT_AUTHORITY_INFO_ACCESS_PROP_ID 68
#define CERT_BACKED_UP_PROP_ID 69 // VARIANT_BOOL+FILETIME #define CERT_BACKED_UP_PROP_ID 69 // VARIANT_BOOL+FILETIME
#define CERT_OCSP_RESPONSE_PROP_ID 70 #define CERT_OCSP_RESPONSE_PROP_ID 70
#define CERT_REQUEST_ORIGINATOR_PROP_ID 71 // string:machine DNS name #define CERT_REQUEST_ORIGINATOR_PROP_ID 71 // string:machine DNS name
#define CERT_SOURCE_LOCATION_PROP_ID 72 // string #define CERT_SOURCE_LOCATION_PROP_ID 72 // string
skipping to change at line 8693 skipping to change at line 8782
#define CERT_SMART_CARD_ROOT_INFO_PROP_ID 76 // CRYPT_SMART_CARD_ROOT_INFO #define CERT_SMART_CARD_ROOT_INFO_PROP_ID 76 // CRYPT_SMART_CARD_ROOT_INFO
#define CERT_NO_AUTO_EXPIRE_CHECK_PROP_ID 77 #define CERT_NO_AUTO_EXPIRE_CHECK_PROP_ID 77
#define CERT_NCRYPT_KEY_HANDLE_PROP_ID 78 #define CERT_NCRYPT_KEY_HANDLE_PROP_ID 78
#define CERT_HCRYPTPROV_OR_NCRYPT_KEY_HANDLE_PROP_ID 79 #define CERT_HCRYPTPROV_OR_NCRYPT_KEY_HANDLE_PROP_ID 79
#define CERT_SUBJECT_INFO_ACCESS_PROP_ID 80 #define CERT_SUBJECT_INFO_ACCESS_PROP_ID 80
#define CERT_CA_OCSP_AUTHORITY_INFO_ACCESS_PROP_ID 81 #define CERT_CA_OCSP_AUTHORITY_INFO_ACCESS_PROP_ID 81
#define CERT_CA_DISABLE_CRL_PROP_ID 82 #define CERT_CA_DISABLE_CRL_PROP_ID 82
#define CERT_ROOT_PROGRAM_CERT_POLICIES_PROP_ID 83 #define CERT_ROOT_PROGRAM_CERT_POLICIES_PROP_ID 83
#define CERT_ROOT_PROGRAM_NAME_CONSTRAINTS_PROP_ID 84 #define CERT_ROOT_PROGRAM_NAME_CONSTRAINTS_PROP_ID 84
#define CERT_FIRST_RESERVED_PROP_ID 85 #define CERT_SUBJECT_OCSP_AUTHORITY_INFO_ACCESS_PROP_ID 85
#define CERT_SUBJECT_DISABLE_CRL_PROP_ID 86
#define CERT_CEP_PROP_ID 87 // Version+PropFlags+AuthType+Url
Flags+CESAuthType+Url+Id+CESUrl+ReqId
// 88 reserved, originally used for CERT_CEP_PROP_ID
#define CERT_SIGN_HASH_CNG_ALG_PROP_ID 89
#define CERT_SCARD_PIN_ID_PROP_ID 90
#define CERT_SCARD_PIN_INFO_PROP_ID 91
#define CERT_FIRST_RESERVED_PROP_ID 92
#define CERT_LAST_RESERVED_PROP_ID 0x00007FFF #define CERT_LAST_RESERVED_PROP_ID 0x00007FFF
#define CERT_FIRST_USER_PROP_ID 0x00008000 #define CERT_FIRST_USER_PROP_ID 0x00008000
#define CERT_LAST_USER_PROP_ID 0x0000FFFF #define CERT_LAST_USER_PROP_ID 0x0000FFFF
// certenrolld_end // certenrolld_end
#define IS_CERT_HASH_PROP_ID(X) (CERT_SHA1_HASH_PROP_ID == (X) || \ #define IS_CERT_HASH_PROP_ID(X) (CERT_SHA1_HASH_PROP_ID == (X) || \
CERT_MD5_HASH_PROP_ID == (X) || \ CERT_MD5_HASH_PROP_ID == (X) || \
CERT_SIGNATURE_HASH_PROP_ID == (X)) CERT_SIGNATURE_HASH_PROP_ID == (X))
#define IS_PUBKEY_HASH_PROP_ID(X) (CERT_ISSUER_PUBLIC_KEY_MD5_HASH_PROP_ID = = (X) || \ #define IS_PUBKEY_HASH_PROP_ID(X) (CERT_ISSUER_PUBLIC_KEY_MD5_HASH_PROP_ID = = (X) || \
skipping to change at line 8820 skipping to change at line 8917
// dwKeySpec is set to the special CERT_NCRYPT_KEY_SPEC to select the // dwKeySpec is set to the special CERT_NCRYPT_KEY_SPEC to select the
// hNCryptKey choice. // hNCryptKey choice.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
typedef struct _CERT_KEY_CONTEXT { typedef struct _CERT_KEY_CONTEXT {
DWORD cbSize; // sizeof(CERT_KEY_CONTEXT) DWORD cbSize; // sizeof(CERT_KEY_CONTEXT)
union { union {
HCRYPTPROV hCryptProv; HCRYPTPROV hCryptProv;
// dwKeySpec == CERT_NCRYPT_KEY_SPEC // dwKeySpec == CERT_NCRYPT_KEY_SPEC
NCRYPT_KEY_HANDLE hNCryptKey; NCRYPT_KEY_HANDLE hNCryptKey;
}; } DUMMYUNIONNAME;
DWORD dwKeySpec; DWORD dwKeySpec;
} CERT_KEY_CONTEXT, *PCERT_KEY_CONTEXT; } CERT_KEY_CONTEXT, *PCERT_KEY_CONTEXT;
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// Cryptographic Smart Card Root Information // Cryptographic Smart Card Root Information
// //
// CRYPT_SMART_CARD_ROOT_INFO defines the // CRYPT_SMART_CARD_ROOT_INFO defines the
// CERT_SMART_CARD_ROOT_INFO_PROP_ID's pvData. // CERT_SMART_CARD_ROOT_INFO_PROP_ID's pvData.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
typedef struct _ROOT_INFO_LUID { typedef struct _ROOT_INFO_LUID {
skipping to change at line 8942 skipping to change at line 9039
// Includes flags and location // Includes flags and location
#define CERT_SYSTEM_STORE_MASK 0xFFFF0000 #define CERT_SYSTEM_STORE_MASK 0xFFFF0000
// Set if pvPara points to a CERT_SYSTEM_STORE_RELOCATE_PARA structure // Set if pvPara points to a CERT_SYSTEM_STORE_RELOCATE_PARA structure
#define CERT_SYSTEM_STORE_RELOCATE_FLAG 0x80000000 #define CERT_SYSTEM_STORE_RELOCATE_FLAG 0x80000000
typedef struct _CERT_SYSTEM_STORE_RELOCATE_PARA { typedef struct _CERT_SYSTEM_STORE_RELOCATE_PARA {
union { union {
HKEY hKeyBase; HKEY hKeyBase;
void *pvBase; void *pvBase;
}; } DUMMYUNIONNAME;
union { union {
void *pvSystemStore; void *pvSystemStore;
LPCSTR pszSystemStore; LPCSTR pszSystemStore;
LPCWSTR pwszSystemStore; LPCWSTR pwszSystemStore;
}; } DUMMYUNIONNAME2;
} CERT_SYSTEM_STORE_RELOCATE_PARA, *PCERT_SYSTEM_STORE_RELOCATE_PARA; } CERT_SYSTEM_STORE_RELOCATE_PARA, *PCERT_SYSTEM_STORE_RELOCATE_PARA;
// By default, when the CurrentUser "Root" store is opened, any SystemRegistry // By default, when the CurrentUser "Root" store is opened, any SystemRegistry
// roots not also on the protected root list are deleted from the cache before // roots not also on the protected root list are deleted from the cache before
// CertOpenStore() returns. Set the following flag to return all the roots // CertOpenStore() returns. Set the following flag to return all the roots
// in the SystemRegistry without checking the protected root list. // in the SystemRegistry without checking the protected root list.
#define CERT_SYSTEM_STORE_UNPROTECTED_FLAG 0x40000000 #define CERT_SYSTEM_STORE_UNPROTECTED_FLAG 0x40000000
// Location of the system store: // Location of the system store:
#define CERT_SYSTEM_STORE_LOCATION_MASK 0x00FF0000 #define CERT_SYSTEM_STORE_LOCATION_MASK 0x00FF0000
skipping to change at line 9136 skipping to change at line 9233
// chain. // chain.
#define CERT_TRUST_PUB_CHECK_PUBLISHER_REV_FLAG 0x00000100 #define CERT_TRUST_PUB_CHECK_PUBLISHER_REV_FLAG 0x00000100
// Set the following flag to enable revocation checking of the time stamp // Set the following flag to enable revocation checking of the time stamp
// chain. // chain.
#define CERT_TRUST_PUB_CHECK_TIMESTAMP_REV_FLAG 0x00000200 #define CERT_TRUST_PUB_CHECK_TIMESTAMP_REV_FLAG 0x00000200
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// OCM Subcomponents Definitions // OCM Subcomponents Definitions
// //
// Reading of the following registry key has been deprecated on Longhorn. // Reading of the following registry key has been deprecated on Vista.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
// Registry path to the OCM Subcomponents local machine subkey // Registry path to the OCM Subcomponents local machine subkey
#define CERT_OCM_SUBCOMPONENTS_LOCAL_MACHINE_REGPATH \ #define CERT_OCM_SUBCOMPONENTS_LOCAL_MACHINE_REGPATH \
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup\\OC Manager\\Subcompon ents" L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup\\OC Manager\\Subcompon ents"
// REG_DWORD, 1 is installed, 0 is NOT installed // REG_DWORD, 1 is installed, 0 is NOT installed
#define CERT_OCM_SUBCOMPONENTS_ROOT_AUTO_UPDATE_VALUE_NAME L"RootAutoUpdate" #define CERT_OCM_SUBCOMPONENTS_ROOT_AUTO_UPDATE_VALUE_NAME L"RootAutoUpdate"
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
skipping to change at line 10728 skipping to change at line 10825
// CryptEncodeObject(X509_DSS_PARAMETERS). This property may be set // CryptEncodeObject(X509_DSS_PARAMETERS). This property may be set
// by CryptVerifyCertificateSignatureEx(). // by CryptVerifyCertificateSignatureEx().
// //
// CERT_CROSS_CERT_DIST_POINTS_PROP_ID - location of the cross certs. // CERT_CROSS_CERT_DIST_POINTS_PROP_ID - location of the cross certs.
// Currently only applicable to certs. pvData points to a CRYPT_DATA_BLOB // Currently only applicable to certs. pvData points to a CRYPT_DATA_BLOB
// containing an ASN.1 encoded CROSS_CERT_DIST_POINTS_INFO (encoded via // containing an ASN.1 encoded CROSS_CERT_DIST_POINTS_INFO (encoded via
// CryptEncodeObject(X509_CROSS_CERT_DIST_POINTS)). // CryptEncodeObject(X509_CROSS_CERT_DIST_POINTS)).
// //
// CERT_ENROLLMENT_PROP_ID - enrollment information of the pending request. // CERT_ENROLLMENT_PROP_ID - enrollment information of the pending request.
// It contains RequestID, CADNSName, CAName, and FriendlyName. // It contains RequestID, CADNSName, CAName, and FriendlyName.
// The data format is defined as, the first 4 bytes - pending request ID, // The data format is defined as: the first 4 bytes - pending request ID,
// next 4 bytes - CADNSName size in characters including null-terminator // next 4 bytes - CADNSName size in characters including null-terminator
// followed by CADNSName string with null-terminator, // followed by CADNSName string with null-terminator,
// next 4 bytes - CAName size in characters including null-terminator // next 4 bytes - CAName size in characters including null-terminator
// followed by CAName string with null-terminator, // followed by CAName string with null-terminator,
// next 4 bytes - FriendlyName size in characters including null-terminator // next 4 bytes - FriendlyName size in characters including null-terminator
// followed by FriendlyName string with null-terminator. // followed by FriendlyName string with null-terminator.
// //
// CERT_DATE_STAMP_PROP_ID - contains the time when added to the store // CERT_DATE_STAMP_PROP_ID - contains the time when added to the store
// by an admin tool. pvData points to a CRYPT_DATA_BLOB containing // by an admin tool. pvData points to a CRYPT_DATA_BLOB containing
// the FILETIME. // the FILETIME.
skipping to change at line 10757 skipping to change at line 10854
// to use before doing an URL retrieval. // to use before doing an URL retrieval.
// //
// CERT_SOURCE_LOCATION_PROP_ID - contains source location of the CRL or // CERT_SOURCE_LOCATION_PROP_ID - contains source location of the CRL or
// OCSP. pvData points to a CRYPT_DATA_BLOB. pbData is a pointer to a NULL // OCSP. pvData points to a CRYPT_DATA_BLOB. pbData is a pointer to a NULL
// terminated unicode, wide character string. Where, // terminated unicode, wide character string. Where,
// cbData = (wcslen((LPWSTR) pbData) + 1) * sizeof(WCHAR). // cbData = (wcslen((LPWSTR) pbData) + 1) * sizeof(WCHAR).
// //
// CERT_SOURCE_URL_PROP_ID - contains URL for the CRL or OCSP. pvData // CERT_SOURCE_URL_PROP_ID - contains URL for the CRL or OCSP. pvData
// is the same as for CERT_SOURCE_LOCATION_PROP_ID. // is the same as for CERT_SOURCE_LOCATION_PROP_ID.
// //
// CERT_CEP_PROP_ID - contains Version, PropertyFlags, AuthType,
// UrlFlags and CESAuthType, followed by the CEPUrl, CEPId, CESUrl and
// RequestId strings
// The data format is defined as: the first 4 bytes - property version,
// next 4 bytes - Property Flags
// next 4 bytes - Authentication Type
// next 4 bytes - Url Flags
// next 4 bytes - CES Authentication Type
// followed by Url string with null-terminator,
// followed by Id string with null-terminator,
// followed by CES Url string with null-terminator,
// followed by RequestId string with null-terminator.
// a single null-terminator indicates no string is present.
//
// For all the other PROP_IDs: an encoded PCRYPT_DATA_BLOB is passed in pvData. // For all the other PROP_IDs: an encoded PCRYPT_DATA_BLOB is passed in pvData.
// //
// If the property already exists, then, the old value is deleted and silently // If the property already exists, then, the old value is deleted and silently
// replaced. Setting, pvData to NULL, deletes the property. // replaced. Setting, pvData to NULL, deletes the property.
// //
// CERT_SET_PROPERTY_IGNORE_PERSIST_ERROR_FLAG can be set to ignore any // CERT_SET_PROPERTY_IGNORE_PERSIST_ERROR_FLAG can be set to ignore any
// provider write errors and always update the cached context's property. // provider write errors and always update the cached context's property.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
WINCRYPT32API WINCRYPT32API
BOOL BOOL
skipping to change at line 12970 skipping to change at line 13081
PCCRL_CONTEXT pBaseCrlContext; PCCRL_CONTEXT pBaseCrlContext;
PCCRL_CONTEXT pDeltaCrlContext; PCCRL_CONTEXT pDeltaCrlContext;
// When revoked, points to entry in either of the above CRL contexts. // When revoked, points to entry in either of the above CRL contexts.
// Don't free. // Don't free.
PCRL_ENTRY pCrlEntry; PCRL_ENTRY pCrlEntry;
BOOL fDeltaCrlEntry; // TRUE if in pDeltaCrlContext BOOL fDeltaCrlEntry; // TRUE if in pDeltaCrlContext
} CERT_REVOCATION_CRL_INFO, *PCERT_REVOCATION_CRL_INFO; } CERT_REVOCATION_CRL_INFO, *PCERT_REVOCATION_CRL_INFO;
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// This data structure is optionally pointed to by the pChainPara field
// in the CERT_REVOCATION_PARA and CRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO
// data structures.
//
// Its struct definition follows the CertGetCertificateChain() API
// definition below.
//--------------------------------------------------------------------------
typedef struct _CERT_REVOCATION_CHAIN_PARA
CERT_REVOCATION_CHAIN_PARA,
*PCERT_REVOCATION_CHAIN_PARA;
//+-------------------------------------------------------------------------
// The following data structure may be passed to CertVerifyRevocation to // The following data structure may be passed to CertVerifyRevocation to
// assist in finding the issuer of the context to be verified. // assist in finding the issuer of the context to be verified.
// //
// When pIssuerCert is specified, pIssuerCert is the issuer of // When pIssuerCert is specified, pIssuerCert is the issuer of
// rgpvContext[cContext - 1]. // rgpvContext[cContext - 1].
// //
// When cCertStore and rgCertStore are specified, these stores may contain // When cCertStore and rgCertStore are specified, these stores may contain
// an issuer certificate. // an issuer certificate.
// //
// When hCrlStore is specified then a handler which uses CRLs can search this // When hCrlStore is specified then a handler which uses CRLs can search this
skipping to change at line 13024 skipping to change at line 13147
// CRL contexts must be freed by the caller. // CRL contexts must be freed by the caller.
// //
// The CRL info is only applicable to the last context checked. If // The CRL info is only applicable to the last context checked. If
// interested in this information, then, CertVerifyRevocation should be // interested in this information, then, CertVerifyRevocation should be
// called with cContext = 1. // called with cContext = 1.
PCERT_REVOCATION_CRL_INFO pCrlInfo; PCERT_REVOCATION_CRL_INFO pCrlInfo;
// If nonNULL, any cached information before this time is considered // If nonNULL, any cached information before this time is considered
// time invalid and forces a wire retrieval. // time invalid and forces a wire retrieval.
LPFILETIME pftCacheResync; LPFILETIME pftCacheResync;
// If nonNULL, CertGetCertificateChain() parameters used by the caller.
// Enables independent OCSP signer certificate chain verification.
PCERT_REVOCATION_CHAIN_PARA pChainPara;
#endif #endif
} CERT_REVOCATION_PARA, *PCERT_REVOCATION_PARA; } CERT_REVOCATION_PARA, *PCERT_REVOCATION_PARA;
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// The following data structure is returned by CertVerifyRevocation to // The following data structure is returned by CertVerifyRevocation to
// specify the status of the revoked or unchecked context. Review the // specify the status of the revoked or unchecked context. Review the
// following CertVerifyRevocation comments for details. // following CertVerifyRevocation comments for details.
// //
// Upon input to CertVerifyRevocation, cbSize must be set to a size // Upon input to CertVerifyRevocation, cbSize must be set to a size
// >= (offsetof(CERT_REVOCATION_STATUS, dwReason) + sizeof(DWORD) ). // >= (offsetof(CERT_REVOCATION_STATUS, dwReason) + sizeof(DWORD) ).
skipping to change at line 13423 skipping to change at line 13550
CryptHashCertificate( CryptHashCertificate(
__in_opt HCRYPTPROV_LEGACY hCryptProv, __in_opt HCRYPTPROV_LEGACY hCryptProv,
__in ALG_ID Algid, __in ALG_ID Algid,
__in DWORD dwFlags, __in DWORD dwFlags,
__in_bcount_opt(cbEncoded) const BYTE *pbEncoded, __in_bcount_opt(cbEncoded) const BYTE *pbEncoded,
__in DWORD cbEncoded, __in DWORD cbEncoded,
__out_bcount_part_opt(*pcbComputedHash, *pcbComputedHash) BYTE *pbComputedHa sh, __out_bcount_part_opt(*pcbComputedHash, *pcbComputedHash) BYTE *pbComputedHa sh,
__inout DWORD *pcbComputedHash __inout DWORD *pcbComputedHash
); );
#if (NTDDI_VERSION >= NTDDI_WINLH)
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// Hash the encoded content using the CNG hash algorithm provider. // Hash the encoded content using the CNG hash algorithm provider.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
WINCRYPT32API WINCRYPT32API
BOOL BOOL
WINAPI WINAPI
CryptHashCertificate2( CryptHashCertificate2(
__in LPCWSTR pwszCNGHashAlgid, __in LPCWSTR pwszCNGHashAlgid,
__in DWORD dwFlags, __in DWORD dwFlags,
__reserved void *pvReserved, __reserved void *pvReserved,
__in_bcount_opt(cbEncoded) const BYTE *pbEncoded, __in_bcount_opt(cbEncoded) const BYTE *pbEncoded,
__in DWORD cbEncoded, __in DWORD cbEncoded,
__out_bcount_part_opt(*pcbComputedHash, *pcbComputedHash) BYTE *pbComputedHa sh, __out_bcount_part_opt(*pcbComputedHash, *pcbComputedHash) BYTE *pbComputedHa sh,
__inout DWORD *pcbComputedHash __inout DWORD *pcbComputedHash
); );
#endif // (NTDDI_VERSION >= NTDDI_WINLH)
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// Sign the "to be signed" information in the encoded signed content. // Sign the "to be signed" information in the encoded signed content.
// //
// hCryptProvOrNCryptKey specifies the crypto provider to use to do the // hCryptProvOrNCryptKey specifies the crypto provider to use to do the
// signature. It uses the specified private key. // signature. It uses the specified private key.
// //
// If the SignatureAlgorithm is a hash algorithm, then, the signature // If the SignatureAlgorithm is a hash algorithm, then, the signature
// contains the hash octets. A private key isn't used to encrypt the hash. // contains the hash octets. A private key isn't used to encrypt the hash.
// dwKeySpec isn't used and hCryptProvOrNCryptKey can be NULL where an // dwKeySpec isn't used and hCryptProvOrNCryptKey can be NULL where an
// appropriate default provider will be used for hashing. // appropriate default provider will be used for hashing.
skipping to change at line 13857 skipping to change at line 13988
typedef BOOL (WINAPI *PFN_CRYPT_EXPORT_PUBLIC_KEY_INFO_EX2_FUNC) ( typedef BOOL (WINAPI *PFN_CRYPT_EXPORT_PUBLIC_KEY_INFO_EX2_FUNC) (
__in NCRYPT_KEY_HANDLE hNCryptKey, __in NCRYPT_KEY_HANDLE hNCryptKey,
__in DWORD dwCertEncodingType, __in DWORD dwCertEncodingType,
__in LPSTR pszPublicKeyObjId, __in LPSTR pszPublicKeyObjId,
__in DWORD dwFlags, __in DWORD dwFlags,
__in_opt void *pvAuxInfo, __in_opt void *pvAuxInfo,
__out_bcount_part_opt(*pcbInfo, *pcbInfo) PCERT_PUBLIC_KEY_INFO pInfo, __out_bcount_part_opt(*pcbInfo, *pcbInfo) PCERT_PUBLIC_KEY_INFO pInfo,
__inout DWORD *pcbInfo __inout DWORD *pcbInfo
); );
#if (NTDDI_VERSION >= NTDDI_WIN7)
//+-------------------------------------------------------------------------
// Export the public key info associated with the provider's corresponding
// private key.
//
// Uses the dwCertEncodingType and pszPublicKeyObjId to call the
// installable CRYPT_OID_EXPORT_PUBLIC_KEY_INFO_FROM_BCRYPT_HANDLE_FUNC. The
// called function has the same signature as
// CryptExportPublicKeyInfoFromBCryptKeyHandle.
//
// If unable to find an installable OID function for the pszPublicKeyObjId,
// attempts to export as a RSA Public Key (szOID_RSA_RSA).
//
// The dwFlags and pvAuxInfo aren't used for szOID_RSA_RSA.
//
// In addition dwFlags can be set with the following 2 flags passed directly
// to CryptFindOIDInfo:
// CRYPT_OID_INFO_PUBKEY_SIGN_KEY_FLAG
// CRYPT_OID_INFO_PUBKEY_ENCRYPT_KEY_FLAG
//--------------------------------------------------------------------------
WINCRYPT32API
BOOL
WINAPI
CryptExportPublicKeyInfoFromBCryptKeyHandle(
__in BCRYPT_KEY_HANDLE hBCryptKey,
__in DWORD dwCertEncodingType,
__in_opt LPSTR pszPublicKeyObjId,
__in DWORD dwFlags,
__in_opt void *pvAuxInfo,
__out_bcount_part_opt(*pcbInfo, *pcbInfo) PCERT_PUBLIC_KEY_INFO pInfo,
__inout DWORD *pcbInfo
);
//+-------------------------------------------------------------------------
// Export CNG PublicKeyInfo OID installable function. Note, not called
// for a HCRYPTPROV or NCRYPT_KEY_HANDLE choice.
//--------------------------------------------------------------------------
#define CRYPT_OID_EXPORT_PUBLIC_KEY_INFO_FROM_BCRYPT_HANDLE_FUNC \
"CryptDllExportPublicKeyInfoFromBCryptKeyHandle"
typedef BOOL (WINAPI *PFN_CRYPT_EXPORT_PUBLIC_KEY_INFO_FROM_BCRYPT_HANDLE_FUNC)
(
__in BCRYPT_KEY_HANDLE hBCryptKey,
__in DWORD dwCertEncodingType,
__in LPSTR pszPublicKeyObjId,
__in DWORD dwFlags,
__in_opt void *pvAuxInfo,
__out_bcount_part_opt(*pcbInfo, *pcbInfo) PCERT_PUBLIC_KEY_INFO pInfo,
__inout DWORD *pcbInfo
);
#endif // (NTDDI_VERSION >= NTDDI_WIN7)
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// Convert and import the public key info into the provider and return a // Convert and import the public key info into the provider and return a
// handle to the public key. // handle to the public key.
// //
// Calls CryptImportPublicKeyInfoEx with aiKeyAlg = 0, dwFlags = 0 and // Calls CryptImportPublicKeyInfoEx with aiKeyAlg = 0, dwFlags = 0 and
// pvAuxInfo = NULL. // pvAuxInfo = NULL.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
WINCRYPT32API WINCRYPT32API
BOOL BOOL
WINAPI WINAPI
skipping to change at line 13903 skipping to change at line 14087
CryptImportPublicKeyInfoEx( CryptImportPublicKeyInfoEx(
__in HCRYPTPROV hCryptProv, __in HCRYPTPROV hCryptProv,
__in DWORD dwCertEncodingType, __in DWORD dwCertEncodingType,
__in PCERT_PUBLIC_KEY_INFO pInfo, __in PCERT_PUBLIC_KEY_INFO pInfo,
__in ALG_ID aiKeyAlg, __in ALG_ID aiKeyAlg,
__in DWORD dwFlags, __in DWORD dwFlags,
__in_opt void *pvAuxInfo, __in_opt void *pvAuxInfo,
__out HCRYPTKEY *phKey __out HCRYPTKEY *phKey
); );
#if (NTDDI_VERSION >= NTDDI_WINLH)
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// Convert and import the public key info into the CNG asymmetric or // Convert and import the public key info into the CNG asymmetric or
// signature algorithm provider and return a BCRYPT_KEY_HANDLE to it. // signature algorithm provider and return a BCRYPT_KEY_HANDLE to it.
// //
// Uses the dwCertEncodingType and pInfo->Algorithm.pszObjId to call the // Uses the dwCertEncodingType and pInfo->Algorithm.pszObjId to call the
// installable CRYPT_OID_IMPORT_PUBLIC_KEY_INFO_EX2_FUNC. The called function // installable CRYPT_OID_IMPORT_PUBLIC_KEY_INFO_EX2_FUNC. The called function
// has the same signature as CryptImportPublicKeyInfoEx2. // has the same signature as CryptImportPublicKeyInfoEx2.
// //
// dwFlags can be set with the following 2 flags passed directly to // dwFlags can be set with the following 2 flags passed directly to
// CryptFindOIDInfo: // CryptFindOIDInfo:
// CRYPT_OID_INFO_PUBKEY_SIGN_KEY_FLAG // CRYPT_OID_INFO_PUBKEY_SIGN_KEY_FLAG
// CRYPT_OID_INFO_PUBKEY_ENCRYPT_KEY_FLAG // CRYPT_OID_INFO_PUBKEY_ENCRYPT_KEY_FLAG
// dwFlags can also have BCRYPT_NO_KEY_VALIDATION OR'd in. This flag is
// passed to BCryptImportKeyPair.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
WINCRYPT32API WINCRYPT32API
BOOL BOOL
WINAPI WINAPI
CryptImportPublicKeyInfoEx2( CryptImportPublicKeyInfoEx2(
__in DWORD dwCertEncodingType, __in DWORD dwCertEncodingType,
__in PCERT_PUBLIC_KEY_INFO pInfo, __in PCERT_PUBLIC_KEY_INFO pInfo,
__in DWORD dwFlags, __in DWORD dwFlags,
__in_opt void *pvAuxInfo, __in_opt void *pvAuxInfo,
__out BCRYPT_KEY_HANDLE *phKey __out BCRYPT_KEY_HANDLE *phKey
skipping to change at line 13940 skipping to change at line 14128
#define CRYPT_OID_IMPORT_PUBLIC_KEY_INFO_EX2_FUNC \ #define CRYPT_OID_IMPORT_PUBLIC_KEY_INFO_EX2_FUNC \
"CryptDllImportPublicKeyInfoEx2" "CryptDllImportPublicKeyInfoEx2"
typedef BOOL (WINAPI *PFN_IMPORT_PUBLIC_KEY_INFO_EX2_FUNC) ( typedef BOOL (WINAPI *PFN_IMPORT_PUBLIC_KEY_INFO_EX2_FUNC) (
__in DWORD dwCertEncodingType, __in DWORD dwCertEncodingType,
__in PCERT_PUBLIC_KEY_INFO pInfo, __in PCERT_PUBLIC_KEY_INFO pInfo,
__in DWORD dwFlags, __in DWORD dwFlags,
__in_opt void *pvAuxInfo, __in_opt void *pvAuxInfo,
__out BCRYPT_KEY_HANDLE *phKey __out BCRYPT_KEY_HANDLE *phKey
); );
#endif // (NTDDI_VERSION >= NTDDI_WINLH)
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// Acquire a HCRYPTPROV and dwKeySpec or NCRYPT_KEY_HANDLE for the // Acquire a HCRYPTPROV and dwKeySpec or NCRYPT_KEY_HANDLE for the
// specified certificate context. Uses the certificate's // specified certificate context. Uses the certificate's
// CERT_KEY_PROV_INFO_PROP_ID property. // CERT_KEY_PROV_INFO_PROP_ID property.
// The returned HCRYPTPROV or NCRYPT_KEY_HANDLE handle may optionally be // The returned HCRYPTPROV or NCRYPT_KEY_HANDLE handle may optionally be
// cached using the certificate's CERT_KEY_CONTEXT_PROP_ID property. // cached using the certificate's CERT_KEY_CONTEXT_PROP_ID property.
// //
// If CRYPT_ACQUIRE_CACHE_FLAG is set, then, if an already acquired and // If CRYPT_ACQUIRE_CACHE_FLAG is set, then, if an already acquired and
// cached HCRYPTPROV or NCRYPT_KEY_HANDLE exists for the certificate, its // cached HCRYPTPROV or NCRYPT_KEY_HANDLE exists for the certificate, its
// returned. Otherwise, a HCRYPTPROV or NCRYPT_KEY_HANDLE is acquired and // returned. Otherwise, a HCRYPTPROV or NCRYPT_KEY_HANDLE is acquired and
skipping to change at line 14128 skipping to change at line 14318
__in DWORD dwKeySpec, // in __in DWORD dwKeySpec, // in
__in LPSTR pszPrivateKeyObjId, // in __in LPSTR pszPrivateKeyObjId, // in
__in DWORD dwFlags, // in __in DWORD dwFlags, // in
__in_opt void* pvAuxInfo, // in __in_opt void* pvAuxInfo, // in
__out_bcount_opt (*pcbPrivateKeyInfo) CRYPT_PRIVATE_KEY_INFO* pPrivateKeyInf o, // out __out_bcount_opt (*pcbPrivateKeyInfo) CRYPT_PRIVATE_KEY_INFO* pPrivateKeyInf o, // out
__inout DWORD* pcbPrivateKeyInfo // in, out __inout DWORD* pcbPrivateKeyInfo // in, out
); );
#define CRYPT_OID_EXPORT_PRIVATE_KEY_INFO_FUNC "CryptDllExportPrivateKeyInfoEx " #define CRYPT_OID_EXPORT_PRIVATE_KEY_INFO_FUNC "CryptDllExportPrivateKeyInfoEx "
#define CRYPT_DELETE_KEYSET 0x0001 #define CRYPT_DELETE_KEYSET CRYPT_DELETEKEYSET
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// CryptExportPKCS8 -- superseded by CryptExportPKCS8Ex // CryptExportPKCS8 -- superseded by CryptExportPKCS8Ex
// //
// Export the private key in PKCS8 format // Export the private key in PKCS8 format
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
WINCRYPT32API WINCRYPT32API
BOOL BOOL
WINAPI WINAPI
CryptExportPKCS8( CryptExportPKCS8(
__in HCRYPTPROV hCryptProv, // in __in HCRYPTPROV hCryptProv, // in
skipping to change at line 14326 skipping to change at line 14516
// the above quoting. // the above quoting.
// //
// CERT_NAME_STR_REVERSE_FLAG can be or'ed into dwStrType to reverse the // CERT_NAME_STR_REVERSE_FLAG can be or'ed into dwStrType to reverse the
// order of the RDNs before converting to the string. // order of the RDNs before converting to the string.
// //
// By default, CERT_RDN_T61_STRING encoded values are initially decoded // By default, CERT_RDN_T61_STRING encoded values are initially decoded
// as UTF8. If the UTF8 decoding fails, then, decoded as 8 bit characters. // as UTF8. If the UTF8 decoding fails, then, decoded as 8 bit characters.
// CERT_NAME_STR_DISABLE_IE4_UTF8_FLAG can be or'ed into dwStrType to // CERT_NAME_STR_DISABLE_IE4_UTF8_FLAG can be or'ed into dwStrType to
// skip the initial attempt to decode as UTF8. // skip the initial attempt to decode as UTF8.
// //
// CERT_NAME_STR_ENABLE_PUNYCODE_FLAG can be or'ed into dwStrType to enable
// encoding/decoding of unicode characters in email RDN value.
//
// Returns the number of characters converted including the terminating null // Returns the number of characters converted including the terminating null
// character. If psz is NULL or csz is 0, returns the required size of the // character. If psz is NULL or csz is 0, returns the required size of the
// destination string (including the terminating null char). // destination string (including the terminating null char).
// //
// If psz != NULL && csz != 0, returned psz is always NULL terminated. // If psz != NULL && csz != 0, returned psz is always NULL terminated.
// //
// Note: csz includes the NULL char. // Note: csz includes the NULL char.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
skipping to change at line 14390 skipping to change at line 14583
#define CERT_NAME_STR_CRLF_FLAG 0x08000000 #define CERT_NAME_STR_CRLF_FLAG 0x08000000
#define CERT_NAME_STR_COMMA_FLAG 0x04000000 #define CERT_NAME_STR_COMMA_FLAG 0x04000000
#define CERT_NAME_STR_REVERSE_FLAG 0x02000000 #define CERT_NAME_STR_REVERSE_FLAG 0x02000000
#define CERT_NAME_STR_FORWARD_FLAG 0x01000000 #define CERT_NAME_STR_FORWARD_FLAG 0x01000000
#define CERT_NAME_STR_DISABLE_IE4_UTF8_FLAG 0x00010000 #define CERT_NAME_STR_DISABLE_IE4_UTF8_FLAG 0x00010000
#define CERT_NAME_STR_ENABLE_T61_UNICODE_FLAG 0x00020000 #define CERT_NAME_STR_ENABLE_T61_UNICODE_FLAG 0x00020000
#define CERT_NAME_STR_ENABLE_UTF8_UNICODE_FLAG 0x00040000 #define CERT_NAME_STR_ENABLE_UTF8_UNICODE_FLAG 0x00040000
#define CERT_NAME_STR_FORCE_UTF8_DIR_STR_FLAG 0x00080000 #define CERT_NAME_STR_FORCE_UTF8_DIR_STR_FLAG 0x00080000
#define CERT_NAME_STR_DISABLE_UTF8_DIR_STR_FLAG 0x00100000 #define CERT_NAME_STR_DISABLE_UTF8_DIR_STR_FLAG 0x00100000
#define CERT_NAME_STR_ENABLE_PUNYCODE_FLAG 0x00200000
// certenrolld_end // certenrolld_end
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// Convert the null terminated X500 string to an encoded certificate name. // Convert the null terminated X500 string to an encoded certificate name.
// //
// The input string is expected to be formatted the same as the output // The input string is expected to be formatted the same as the output
// from the above CertNameToStr API. // from the above CertNameToStr API.
// //
// The CERT_SIMPLE_NAME_STR type and CERT_XML_NAME_STR aren't supported. // The CERT_SIMPLE_NAME_STR type and CERT_XML_NAME_STR aren't supported.
// Otherwise, when dwStrType // Otherwise, when dwStrType
skipping to change at line 14971 skipping to change at line 15165
// LastError will be updated with E_INVALIDARG. // LastError will be updated with E_INVALIDARG.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
typedef struct _CRYPT_KEY_SIGN_MESSAGE_PARA { typedef struct _CRYPT_KEY_SIGN_MESSAGE_PARA {
DWORD cbSize; DWORD cbSize;
DWORD dwMsgAndCertEncodingType; DWORD dwMsgAndCertEncodingType;
// NCryptIsKeyHandle() is called to determine the union choice. // NCryptIsKeyHandle() is called to determine the union choice.
union { union {
HCRYPTPROV hCryptProv; HCRYPTPROV hCryptProv;
NCRYPT_KEY_HANDLE hNCryptKey; NCRYPT_KEY_HANDLE hNCryptKey;
}; } DUMMYUNIONNAME;
// not applicable for hNCryptKey choice // not applicable for hNCryptKey choice
DWORD dwKeySpec; DWORD dwKeySpec;
CRYPT_ALGORITHM_IDENTIFIER HashAlgorithm; CRYPT_ALGORITHM_IDENTIFIER HashAlgorithm;
void *pvHashAuxInfo; void *pvHashAuxInfo;
// This is also referred to as the SignatureAlgorithm // This is also referred to as the SignatureAlgorithm
CRYPT_ALGORITHM_IDENTIFIER PubKeyAlgorithm; CRYPT_ALGORITHM_IDENTIFIER PubKeyAlgorithm;
} CRYPT_KEY_SIGN_MESSAGE_PARA, *PCRYPT_KEY_SIGN_MESSAGE_PARA; } CRYPT_KEY_SIGN_MESSAGE_PARA, *PCRYPT_KEY_SIGN_MESSAGE_PARA;
skipping to change at line 16462 skipping to change at line 16656
// This will be retrieved from the authority info access and // This will be retrieved from the authority info access and
// CRL distribution point extension or property on the certificate. // CRL distribution point extension or property on the certificate.
// If any OCSP URLs are present, they will be first with each URL prefixed // If any OCSP URLs are present, they will be first with each URL prefixed
// with L"ocsp:". The L"ocsp:" prefix should be removed before using. // with L"ocsp:". The L"ocsp:" prefix should be removed before using.
// //
// URL_OID_CERTIFICATE_CRL_DIST_POINT_AND_OCSP // URL_OID_CERTIFICATE_CRL_DIST_POINT_AND_OCSP
// //
// Same as URL_OID_CERTIFICATE_OCSP_AND_CRL_DIST_POINT, except, // Same as URL_OID_CERTIFICATE_OCSP_AND_CRL_DIST_POINT, except,
// the CRL URLs will be first // the CRL URLs will be first
// //
// URL_OID_CERTIFICATE_ONLY_OCSP
//
// Same as URL_OID_CERTIFICATE_OCSP_AND_CRL_DIST_POINT, except,
// only OCSP URLs are retrieved.
//
// URL_OID_CROSS_CERT_SUBJECT_INFO_ACCESS // URL_OID_CROSS_CERT_SUBJECT_INFO_ACCESS
// //
// pvPara == PCCERT_CONTEXT, certificate whose cross certificates // pvPara == PCCERT_CONTEXT, certificate whose cross certificates
// are being requested // are being requested
// //
// This will be retrieved from the Authority Info Access // This will be retrieved from the Authority Info Access
// extension or property on the certificate. Only access methods // extension or property on the certificate. Only access methods
// matching szOID_PKIX_CA_REPOSITORY will be returned. // matching szOID_PKIX_CA_REPOSITORY will be returned.
#define URL_OID_CERTIFICATE_ISSUER ((LPCSTR)1) #define URL_OID_CERTIFICATE_ISSUER ((LPCSTR)1)
skipping to change at line 16483 skipping to change at line 16682
#define URL_OID_CTL_ISSUER ((LPCSTR)3) #define URL_OID_CTL_ISSUER ((LPCSTR)3)
#define URL_OID_CTL_NEXT_UPDATE ((LPCSTR)4) #define URL_OID_CTL_NEXT_UPDATE ((LPCSTR)4)
#define URL_OID_CRL_ISSUER ((LPCSTR)5) #define URL_OID_CRL_ISSUER ((LPCSTR)5)
#define URL_OID_CERTIFICATE_FRESHEST_CRL ((LPCSTR)6) #define URL_OID_CERTIFICATE_FRESHEST_CRL ((LPCSTR)6)
#define URL_OID_CRL_FRESHEST_CRL ((LPCSTR)7) #define URL_OID_CRL_FRESHEST_CRL ((LPCSTR)7)
#define URL_OID_CROSS_CERT_DIST_POINT ((LPCSTR)8) #define URL_OID_CROSS_CERT_DIST_POINT ((LPCSTR)8)
#define URL_OID_CERTIFICATE_OCSP ((LPCSTR)9) #define URL_OID_CERTIFICATE_OCSP ((LPCSTR)9)
#define URL_OID_CERTIFICATE_OCSP_AND_CRL_DIST_POINT ((LPCSTR)10) #define URL_OID_CERTIFICATE_OCSP_AND_CRL_DIST_POINT ((LPCSTR)10)
#define URL_OID_CERTIFICATE_CRL_DIST_POINT_AND_OCSP ((LPCSTR)11) #define URL_OID_CERTIFICATE_CRL_DIST_POINT_AND_OCSP ((LPCSTR)11)
#define URL_OID_CROSS_CERT_SUBJECT_INFO_ACCESS ((LPCSTR)12) #define URL_OID_CROSS_CERT_SUBJECT_INFO_ACCESS ((LPCSTR)12)
#define URL_OID_CERTIFICATE_ONLY_OCSP ((LPCSTR)13)
typedef struct _CERT_CRL_CONTEXT_PAIR { typedef struct _CERT_CRL_CONTEXT_PAIR {
PCCERT_CONTEXT pCertContext; PCCERT_CONTEXT pCertContext;
PCCRL_CONTEXT pCrlContext; PCCRL_CONTEXT pCrlContext;
} CERT_CRL_CONTEXT_PAIR, *PCERT_CRL_CONTEXT_PAIR; } CERT_CRL_CONTEXT_PAIR, *PCERT_CRL_CONTEXT_PAIR;
typedef const CERT_CRL_CONTEXT_PAIR *PCCERT_CRL_CONTEXT_PAIR; typedef const CERT_CRL_CONTEXT_PAIR *PCCERT_CRL_CONTEXT_PAIR;
// //
// Get a time valid CAPI2 object // Get a time valid CAPI2 object
// //
skipping to change at line 16505 skipping to change at line 16705
// The following optional Extra Info may be passed to // The following optional Extra Info may be passed to
// CryptGetTimeValidObject(). // CryptGetTimeValidObject().
// //
// All unused fields in this data structure must be zeroed. More fields // All unused fields in this data structure must be zeroed. More fields
// could be added in a future release. // could be added in a future release.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
typedef struct _CRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO { typedef struct _CRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO {
DWORD cbSize; DWORD cbSize;
// If > 0, check that the CRL's number is >= // If > 0, check that the CRL's number is >=
// Should be 0x7fffffff if pDeltaCrlIndicator is nonNull
int iDeltaCrlIndicator; int iDeltaCrlIndicator;
// If nonNULL, any cached information before this time is considered // If nonNULL, any cached information before this time is considered
// time invalid and forces a wire retrieval. // time invalid and forces a wire retrieval.
LPFILETIME pftCacheResync; LPFILETIME pftCacheResync;
// If nonNull, returns the cache's LastSyncTime // If nonNull, returns the cache's LastSyncTime
LPFILETIME pLastSyncTime; LPFILETIME pLastSyncTime;
// If nonNull, returns the internal MaxAge expiration time // If nonNull, returns the internal MaxAge expiration time
// for the object. If the object doesn't have a MaxAge expiration, set // for the object. If the object doesn't have a MaxAge expiration, set
// to zero. // to zero.
LPFILETIME pMaxAgeTime; LPFILETIME pMaxAgeTime;
// If nonNULL, CertGetCertificateChain() parameters used by the caller.
// Enables independent OCSP signer certificate chain verification.
PCERT_REVOCATION_CHAIN_PARA pChainPara;
// Should be used if the DeltaCrlIndicator value is more than 4 bytes
// If nonNull and iDeltaCrlIndicator == MAXLONG, check that the CRL's number
is >=
PCRYPT_INTEGER_BLOB pDeltaCrlIndicator;
} CRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO, } CRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO,
*PCRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO; *PCRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO;
WINCRYPT32API WINCRYPT32API
__success(return == TRUE) __success(return == TRUE)
BOOL BOOL
WINAPI WINAPI
CryptGetTimeValidObject ( CryptGetTimeValidObject (
__in LPCSTR pszTimeValidOid, __in LPCSTR pszTimeValidOid,
__in LPVOID pvPara, __in LPVOID pvPara,
skipping to change at line 16718 skipping to change at line 16928
#define CRYPTPROTECT_LAST_RESERVED_FLAGVAL 0xFFFFFFFF #define CRYPTPROTECT_LAST_RESERVED_FLAGVAL 0xFFFFFFFF
// //
// flags specific to base provider // flags specific to base provider
// //
WINCRYPT32API WINCRYPT32API
BOOL BOOL
WINAPI WINAPI
CryptProtectData( CryptProtectData(
IN DATA_BLOB* pDataIn, __in DATA_BLOB* pDataIn,
__in_opt LPCWSTR szDataDescr, __in_opt LPCWSTR szDataDescr,
IN OPTIONAL DATA_BLOB* pOptionalEntropy, __in_opt DATA_BLOB* pOptionalEntropy,
__reserved PVOID pvReserved, __reserved PVOID pvReserved,
IN OPTIONAL CRYPTPROTECT_PROMPTSTRUCT* pPromptStruct, __in_opt CRYPTPROTECT_PROMPTSTRUCT* pPromptStruct,
IN DWORD dwFlags, __in DWORD dwFlags,
OUT DATA_BLOB* pDataOut // out encr blob __out DATA_BLOB* pDataOut // out encr blob
); );
WINCRYPT32API WINCRYPT32API
BOOL BOOL
WINAPI WINAPI
CryptUnprotectData( CryptUnprotectData(
IN DATA_BLOB* pDataIn, // in encr blob __in DATA_BLOB* pDataIn, // in encr blob
__deref_opt_out_opt LPWSTR* ppszDataDescr, // out __deref_opt_out_opt LPWSTR* ppszDataDescr, // out
IN OPTIONAL DATA_BLOB* pOptionalEntropy, __in_opt DATA_BLOB* pOptionalEntropy,
__reserved PVOID pvReserved, __reserved PVOID pvReserved,
IN OPTIONAL CRYPTPROTECT_PROMPTSTRUCT* pPromptStruct, __in_opt CRYPTPROTECT_PROMPTSTRUCT* pPromptStruct,
IN DWORD dwFlags, __in DWORD dwFlags,
OUT DATA_BLOB* pDataOut __out DATA_BLOB* pDataOut
); );
#if (NTDDI_VERSION >= NTDDI_WINLH)
WINCRYPT32API WINCRYPT32API
BOOL BOOL
WINAPI WINAPI
CryptUpdateProtectedState( CryptUpdateProtectedState(
__in_opt PSID pOldSid, __in_opt PSID pOldSid,
__in_opt LPCWSTR pwszOldPassword, __in_opt LPCWSTR pwszOldPassword,
__in DWORD dwFlags, __in DWORD dwFlags,
__out_opt DWORD *pdwSuccessCount, __out_opt DWORD *pdwSuccessCount,
__out_opt DWORD *pdwFailureCount); __out_opt DWORD *pdwFailureCount);
#endif // (NTDDI_VERSION >= NTDDI_WINLH)
// //
// The buffer length passed into CryptProtectMemory and CryptUnprotectMemory // The buffer length passed into CryptProtectMemory and CryptUnprotectMemory
// must be a multiple of this length (or zero). // must be a multiple of this length (or zero).
// //
#define CRYPTPROTECTMEMORY_BLOCK_SIZE 16 #define CRYPTPROTECTMEMORY_BLOCK_SIZE 16
// //
// CryptProtectMemory/CryptUnprotectMemory dwFlags // CryptProtectMemory/CryptUnprotectMemory dwFlags
// //
skipping to change at line 16785 skipping to change at line 16999
// Encrypt/Decrypt across callers with same LogonId. // Encrypt/Decrypt across callers with same LogonId.
// eg: encrypted buffer passed across LPC to another process which calls CryptUn protectMemory whilst impersonating. // eg: encrypted buffer passed across LPC to another process which calls CryptUn protectMemory whilst impersonating.
// //
#define CRYPTPROTECTMEMORY_SAME_LOGON 0x02 #define CRYPTPROTECTMEMORY_SAME_LOGON 0x02
WINCRYPT32API WINCRYPT32API
BOOL BOOL
WINAPI WINAPI
CryptProtectMemory( CryptProtectMemory(
IN OUT LPVOID pDataIn, // in out data to encry __inout LPVOID pDataIn, // in out data to encry
pt pt
IN DWORD cbDataIn, // multiple of CRYPTPRO __in DWORD cbDataIn, // multiple of CRYPTPRO
TECTMEMORY_BLOCK_SIZE TECTMEMORY_BLOCK_SIZE
IN DWORD dwFlags __in DWORD dwFlags
); );
WINCRYPT32API WINCRYPT32API
BOOL BOOL
WINAPI WINAPI
CryptUnprotectMemory( CryptUnprotectMemory(
IN OUT LPVOID pDataIn, // in out data to decry __inout LPVOID pDataIn, // in out data to decry
pt pt
IN DWORD cbDataIn, // multiple of CRYPTPRO __in DWORD cbDataIn, // multiple of CRYPTPRO
TECTMEMORY_BLOCK_SIZE TECTMEMORY_BLOCK_SIZE
IN DWORD dwFlags __in DWORD dwFlags
); );
//+========================================================================= //+=========================================================================
// Helper functions to build certificates // Helper functions to build certificates
//========================================================================== //==========================================================================
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// //
// Builds a self-signed certificate and returns a PCCERT_CONTEXT representing // Builds a self-signed certificate and returns a PCCERT_CONTEXT representing
// the certificate. A hProv may be specified to build the cert context. // the certificate. A hProv may be specified to build the cert context.
skipping to change at line 17015 skipping to change at line 17229
__inout DWORD *pcbHash __inout DWORD *pcbHash
); );
//+========================================================================= //+=========================================================================
// Certificate Chaining Infrastructure // Certificate Chaining Infrastructure
//========================================================================== //==========================================================================
#define CERT_CHAIN_CONFIG_REGPATH \ #define CERT_CHAIN_CONFIG_REGPATH \
L"Software\\Microsoft\\Cryptography\\OID\\EncodingType 0\\CertDllCreateCerti ficateChainEngine\\Config" L"Software\\Microsoft\\Cryptography\\OID\\EncodingType 0\\CertDllCreateCerti ficateChainEngine\\Config"
// max size of the cryptographic object to download, in bytes
// NOTE: AIA has different configuration
#define CERT_CHAIN_MAX_URL_RETRIEVAL_BYTE_COUNT_VALUE_NAME \
L"MaxUrlRetrievalByteCount"
#define CERT_CHAIN_MAX_URL_RETRIEVAL_BYTE_COUNT_DEFAULT (100*1024*1024)
// The following is a REG_BINARY. It contains the cache resync FILETIME. // The following is a REG_BINARY. It contains the cache resync FILETIME.
// Any cached information before this time is considered time invalid // Any cached information before this time is considered time invalid
// and forces a wire retrieval. By default this is disabled. // and forces a wire retrieval. By default this is disabled.
#define CERT_CHAIN_CACHE_RESYNC_FILETIME_VALUE_NAME \ #define CERT_CHAIN_CACHE_RESYNC_FILETIME_VALUE_NAME \
L"ChainCacheResyncFiletime" L"ChainCacheResyncFiletime"
// The following are REG_DWORD's. These configuration parameters are used // The following are REG_DWORD's. These configuration parameters are used
// to disable different chain building semantics enabled by default. Set // to disable different chain building semantics enabled by default. Set
// the appropriate registry value to nonzero to disable. // the appropriate registry value to nonzero to disable.
skipping to change at line 17050 skipping to change at line 17270
// The following are REG_DWORD's. These configuration parameters are used // The following are REG_DWORD's. These configuration parameters are used
// to restrict Authority Info Access (AIA) URL retrieval. // to restrict Authority Info Access (AIA) URL retrieval.
#define CERT_CHAIN_MAX_AIA_URL_COUNT_IN_CERT_VALUE_NAME \ #define CERT_CHAIN_MAX_AIA_URL_COUNT_IN_CERT_VALUE_NAME \
L"MaxAIAUrlCountInCert" L"MaxAIAUrlCountInCert"
#define CERT_CHAIN_MAX_AIA_URL_COUNT_IN_CERT_DEFAULT 5 #define CERT_CHAIN_MAX_AIA_URL_COUNT_IN_CERT_DEFAULT 5
#define CERT_CHAIN_MAX_AIA_URL_RETRIEVAL_COUNT_PER_CHAIN_VALUE_NAME \ #define CERT_CHAIN_MAX_AIA_URL_RETRIEVAL_COUNT_PER_CHAIN_VALUE_NAME \
L"MaxAIAUrlRetrievalCountPerChain" L"MaxAIAUrlRetrievalCountPerChain"
#define CERT_CHAIN_MAX_AIA_URL_RETRIEVAL_COUNT_PER_CHAIN_DEFAULT 10 #define CERT_CHAIN_MAX_AIA_URL_RETRIEVAL_COUNT_PER_CHAIN_DEFAULT 3
// max size of the object to download, specified by a URL in AIA extention, in b ytes
#define CERT_CHAIN_MAX_AIA_URL_RETRIEVAL_BYTE_COUNT_VALUE_NAME \ #define CERT_CHAIN_MAX_AIA_URL_RETRIEVAL_BYTE_COUNT_VALUE_NAME \
L"MaxAIAUrlRetrievalByteCount" L"MaxAIAUrlRetrievalByteCount"
#define CERT_CHAIN_MAX_AIA_URL_RETRIEVAL_BYTE_COUNT_DEFAULT 100000 #define CERT_CHAIN_MAX_AIA_URL_RETRIEVAL_BYTE_COUNT_DEFAULT 100000
#define CERT_CHAIN_MAX_AIA_URL_RETRIEVAL_CERT_COUNT_VALUE_NAME \ #define CERT_CHAIN_MAX_AIA_URL_RETRIEVAL_CERT_COUNT_VALUE_NAME \
L"MaxAIAUrlRetrievalCertCount" L"MaxAIAUrlRetrievalCertCount"
#define CERT_CHAIN_MAX_AIA_URL_RETRIEVAL_CERT_COUNT_DEFAULT 10 #define CERT_CHAIN_MAX_AIA_URL_RETRIEVAL_CERT_COUNT_DEFAULT 10
// The following is a REG_DWORD. If the OCSP response NextUpdate is zero, // The following is a REG_DWORD. If the OCSP response NextUpdate is zero,
// this value is added to the ThisUpdate to get a nonzero NextUpdate. // this value is added to the ThisUpdate to get a nonzero NextUpdate.
skipping to change at line 17299 skipping to change at line 17520
#define CRYPTNET_PRE_FETCH_RETRIEVAL_TIMEOUT_SECONDS_DEFAULT \ #define CRYPTNET_PRE_FETCH_RETRIEVAL_TIMEOUT_SECONDS_DEFAULT \
(5 * 60) (5 * 60)
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// The following configuration parameters are store in HKLM group policy // The following configuration parameters are store in HKLM group policy
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
#define CERT_GROUP_POLICY_CHAIN_CONFIG_REGPATH \ #define CERT_GROUP_POLICY_CHAIN_CONFIG_REGPATH \
CERT_GROUP_POLICY_SYSTEM_STORE_REGPATH L"\\ChainEngine\\Config" CERT_GROUP_POLICY_SYSTEM_STORE_REGPATH L"\\ChainEngine\\Config"
// In Longhorn, the following have been moved from the above HKLM // In Vista, the following have been moved from the above HKLM
// configuration parameters: // configuration parameters:
// The following are REG_DWORD's. These configuration parameters are used // The following are REG_DWORD's. These configuration parameters are used
// to override the default URL timeouts in chain building // to override the default URL timeouts in chain building
// This is the default URL timeout in milliseconds // This is the default URL timeout in milliseconds
#define CERT_CHAIN_URL_RETRIEVAL_TIMEOUT_MILLISECONDS_VALUE_NAME \ #define CERT_CHAIN_URL_RETRIEVAL_TIMEOUT_MILLISECONDS_VALUE_NAME \
L"ChainUrlRetrievalTimeoutMilliseconds" L"ChainUrlRetrievalTimeoutMilliseconds"
// 15 seconds // 15 seconds
#define CERT_CHAIN_URL_RETRIEVAL_TIMEOUT_MILLISECONDS_DEFAULT \ #define CERT_CHAIN_URL_RETRIEVAL_TIMEOUT_MILLISECONDS_DEFAULT \
(15 * 1000) (15 * 1000)
// This is the default revocation accumulative URL timeout in milliseconds // This is the default revocation accumulative URL timeout in milliseconds
// The first revocation URL retrieval uses half of this timeout // The first revocation URL retrieval uses half of this timeout
#define CERT_CHAIN_REV_ACCUMULATIVE_URL_RETRIEVAL_TIMEOUT_MILLISECONDS_VALUE_NAM E \ #define CERT_CHAIN_REV_ACCUMULATIVE_URL_RETRIEVAL_TIMEOUT_MILLISECONDS_VALUE_NAM E \
L"ChainRevAccumulativeUrlRetrievalTimeoutMilliseconds" L"ChainRevAccumulativeUrlRetrievalTimeoutMilliseconds"
// 20 seconds // 20 seconds
#define CERT_CHAIN_REV_ACCUMULATIVE_URL_RETRIEVAL_TIMEOUT_MILLISECONDS_DEFAULT \ #define CERT_CHAIN_REV_ACCUMULATIVE_URL_RETRIEVAL_TIMEOUT_MILLISECONDS_DEFAULT \
(20 * 1000) (20 * 1000)
// REG_DWORD: Set this value to non-zero in order to enable Internet connections
// with Unknown Authorization
#define CERT_RETR_BEHAVIOR_INET_AUTH_VALUE_NAME L"EnableInetUnknownAuth"
// REG_DWORD: Set this value to non-zero in order to override Internet
// connectivity status allowing LOCAL to be treated as INTERNET.
#define CERT_RETR_BEHAVIOR_INET_STATUS_VALUE_NAME L"EnableInetLocal"
// REG_DWORD: Set this value to non-zero in order to allow
// file:// URL scheme.
#define CERT_RETR_BEHAVIOR_FILE_VALUE_NAME L"AllowFileUrlScheme"
// REG_DWORD: Set this value to non-zero in order to disable
// LDAP mutual authentication and & encryption.
#define CERT_RETR_BEHAVIOR_LDAP_VALUE_NAME L"DisableLDAPSignAndEncrypt"
// Note, will allow the machine setting to be used if this value isn't // Note, will allow the machine setting to be used if this value isn't
// defined. // defined.
// By default AIA OCSP URLs are before CDP CRL URLs. When the number of cached // By default AIA OCSP URLs are before CDP CRL URLs. When the number of cached
// OCSP URLs associated with the same CDP extension equal or exceed this // OCSP URLs associated with the same CDP extension equal or exceed this
// number, the CRL URLs are placed before the OCSP URLs. // number, the CRL URLs are placed before the OCSP URLs.
#define CRYPTNET_CACHED_OCSP_SWITCH_TO_CRL_COUNT_VALUE_NAME \ #define CRYPTNET_CACHED_OCSP_SWITCH_TO_CRL_COUNT_VALUE_NAME \
L"CryptnetCachedOcspSwitchToCrlCount" L"CryptnetCachedOcspSwitchToCrlCount"
#define CRYPTNET_CACHED_OCSP_SWITCH_TO_CRL_COUNT_DEFAULT \ #define CRYPTNET_CACHED_OCSP_SWITCH_TO_CRL_COUNT_DEFAULT \
50 50
// The above registry value can be set to this value, to always place // The above registry value can be set to this value, to always place
// the CRL URLs before the OCSP URLs. Note, a registry value of 0, uses the // the CRL URLs before the OCSP URLs. Note, a registry value of 0, uses the
// above default value. // above default value.
#define CRYPTNET_CRL_BEFORE_OCSP_ENABLE \ #define CRYPTNET_CRL_BEFORE_OCSP_ENABLE \
0xFFFFFFFF 0xFFFFFFFF
// Support for the following was removed in Longhorn. Changed to use // Support for the following was removed in Vista. Changed to use
// the following OPTIONS flags in HKLM Group Policy // the following OPTIONS flags in HKLM Group Policy
#define CERT_CHAIN_DISABLE_AIA_URL_RETRIEVAL_VALUE_NAME \ #define CERT_CHAIN_DISABLE_AIA_URL_RETRIEVAL_VALUE_NAME \
L"DisableAIAUrlRetrieval" L"DisableAIAUrlRetrieval"
// By default AIA Url Retrieval is enabled. Set this registry value to nonzero // By default AIA Url Retrieval is enabled. Set this registry value to nonzero
// to disable // to disable
// This is the name of the REG_DWORD for chain engine Options // This is the name of the REG_DWORD for chain engine Options
#define CERT_CHAIN_OPTIONS_VALUE_NAME \ #define CERT_CHAIN_OPTIONS_VALUE_NAME \
L"Options" L"Options"
// Disable AIA URL retrieval when this bit is set in the Options // Disable AIA URL retrieval when this bit is set in the Options
#define CERT_CHAIN_OPTION_DISABLE_AIA_URL_RETRIEVAL 0x2 #define CERT_CHAIN_OPTION_DISABLE_AIA_URL_RETRIEVAL 0x2
// Enable SIA URL retrieval when this bit is set in the Options
#define CERT_CHAIN_OPTION_ENABLE_SIA_URL_RETRIEVAL 0x4
#define CERT_CHAIN_CROSS_CERT_DOWNLOAD_INTERVAL_HOURS_VALUE_NAME \ #define CERT_CHAIN_CROSS_CERT_DOWNLOAD_INTERVAL_HOURS_VALUE_NAME \
L"CrossCertDownloadIntervalHours" L"CrossCertDownloadIntervalHours"
// 7 days // 7 days
#define CERT_CHAIN_CROSS_CERT_DOWNLOAD_INTERVAL_HOURS_DEFAULT (24 * 7) #define CERT_CHAIN_CROSS_CERT_DOWNLOAD_INTERVAL_HOURS_DEFAULT (24 * 7)
// When not defined or zero, the CRL validity isn't extended // When not defined or zero, the CRL validity isn't extended
#define CERT_CHAIN_CRL_VALIDITY_EXT_PERIOD_HOURS_VALUE_NAME \ #define CERT_CHAIN_CRL_VALIDITY_EXT_PERIOD_HOURS_VALUE_NAME \
L"CRLValidityExtensionPeriod" L"CRLValidityExtensionPeriod"
// 12 hour // 12 hour
skipping to change at line 17392 skipping to change at line 17631
// Configuration parameters for the certificate chain engine // Configuration parameters for the certificate chain engine
// //
// hRestrictedRoot - restrict the root store (must be a subset of "Root") // hRestrictedRoot - restrict the root store (must be a subset of "Root")
// //
// hRestrictedTrust - restrict the store for CTLs // hRestrictedTrust - restrict the store for CTLs
// //
// hRestrictedOther - restrict the store for certs and CRLs // hRestrictedOther - restrict the store for certs and CRLs
// //
// cAdditionalStore, rghAdditionalStore - additional stores // cAdditionalStore, rghAdditionalStore - additional stores
// //
// NOTE: The algorithm used to define the stores for the engine is as // hExclusiveRoot - the root store to be used exclusively.
// If not NULL, then the restricted stores
// the system "Root" and "TrustedPeople" are not used
//
// hExclusiveTrustedPeople - the trusted people store to be used exclusivel
y.
// If not NULL, then the restricted stores
// the system "Root" and "TrustedPeople" are not used
//
// NOTE:
//
// (hExclusiveRoot, hExclusiveTrustedPeople) are mutually exclusive
// with (hRestrictedRoot, hRestrictedTrust, hRestrictedOther).
// If either hExclusiveRoot or hExclusiveTrustedPeople are used,
// then all restricted handles must be NULL and non of the system
// "Root" and "TrustedPeople" are used.
//
// The algorithm used to define the stores for the engine is as
// follows: // follows:
// //
// hRoot = hRestrictedRoot or System Store "Root" // If NULL!=hExclusiveRoot or NULL!=hExclusiveTrustedPeople
// hRoot = hExclusiveRoot
// //
// hTrust = hRestrictedTrust or hWorld (defined later) // hTrust = hWorld (defined later)
// //
// hOther = hRestrictedOther or (hRestrictedTrust == NULL) ? hWorld : // hOther = hWorld
// hRestrictedTrust + hWorld
// //
// hWorld = hRoot + "CA" + "My" + "Trust" + rghAdditionalStore // hWorld = hRoot + hExclusiveTrustedPeople + "CA" + "My" + rghAddi
tionalStore
//
// Else
// hRoot = hRestrictedRoot or System Store "Root"
//
// hTrust = hRestrictedTrust or hWorld (defined later)
//
// hOther = hRestrictedOther or (hRestrictedTrust == NULL) ? hWorld
:
// hRestrictedTrust + hWorld
//
// hWorld = hRoot + "CA" + "My" + "Trust" + rghAdditionalStore
// Endif
// //
// dwFlags - flags // dwFlags - flags
// //
// CERT_CHAIN_CACHE_END_CERT - information will be cached on // CERT_CHAIN_CACHE_END_CERT - information will be cached on
// the end cert as well as the other // the end cert as well as the other
// certs in the chain // certs in the chain
// //
// CERT_CHAIN_THREAD_STORE_SYNC - use separate thread for store syncs // CERT_CHAIN_THREAD_STORE_SYNC - use separate thread for store syncs
// and related cache updates // and related cache updates
// //
// CERT_CHAIN_CACHE_ONLY_URL_RETRIEVAL - don't hit the wire to get // CERT_CHAIN_CACHE_ONLY_URL_RETRIEVAL - don't hit the wire to get
// URL based objects // URL based objects
// //
// dwUrlRetrievalTimeout - timeout for wire based URL object retrievals // dwUrlRetrievalTimeout - timeout for wire based URL object retrievals
// (milliseconds) // (milliseconds)
// //
#define CERT_CHAIN_CACHE_END_CERT 0x00000001 #define CERT_CHAIN_CACHE_END_CERT 0x00000001
#define CERT_CHAIN_THREAD_STORE_SYNC 0x00000002 #define CERT_CHAIN_THREAD_STORE_SYNC 0x00000002
#define CERT_CHAIN_CACHE_ONLY_URL_RETRIEVAL 0x00000004 #define CERT_CHAIN_CACHE_ONLY_URL_RETRIEVAL 0x00000004
#define CERT_CHAIN_USE_LOCAL_MACHINE_STORE 0x00000008 #define CERT_CHAIN_USE_LOCAL_MACHINE_STORE 0x00000008
#define CERT_CHAIN_ENABLE_CACHE_AUTO_UPDATE 0x00000010 #define CERT_CHAIN_ENABLE_CACHE_AUTO_UPDATE 0x00000010
#define CERT_CHAIN_ENABLE_SHARE_STORE 0x00000020 #define CERT_CHAIN_ENABLE_SHARE_STORE 0x00000020
typedef struct _CERT_CHAIN_ENGINE_CONFIG { typedef struct _CERT_CHAIN_ENGINE_CONFIG {
DWORD cbSize; DWORD cbSize;
HCERTSTORE hRestrictedRoot; HCERTSTORE hRestrictedRoot;
HCERTSTORE hRestrictedTrust; HCERTSTORE hRestrictedTrust;
HCERTSTORE hRestrictedOther; HCERTSTORE hRestrictedOther;
DWORD cAdditionalStore; DWORD cAdditionalStore;
HCERTSTORE* rghAdditionalStore; HCERTSTORE* rghAdditionalStore;
DWORD dwFlags; DWORD dwFlags;
DWORD dwUrlRetrievalTimeout; // milliseconds DWORD dwUrlRetrievalTimeout; // milliseconds
DWORD MaximumCachedCertificates; DWORD MaximumCachedCertificates;
DWORD CycleDetectionModulus; DWORD CycleDetectionModulus;
#if (NTDDI_VERSION >= NTDDI_WIN7)
HCERTSTORE hExclusiveRoot;
HCERTSTORE hExclusiveTrustedPeople;
#endif
} CERT_CHAIN_ENGINE_CONFIG, *PCERT_CHAIN_ENGINE_CONFIG; } CERT_CHAIN_ENGINE_CONFIG, *PCERT_CHAIN_ENGINE_CONFIG;
WINCRYPT32API WINCRYPT32API
__success(return == TRUE) __success(return == TRUE)
BOOL BOOL
WINAPI WINAPI
CertCreateCertificateChainEngine ( CertCreateCertificateChainEngine (
__in PCERT_CHAIN_ENGINE_CONFIG pConfig, __in PCERT_CHAIN_ENGINE_CONFIG pConfig,
__out HCERTCHAINENGINE* phChainEngine __out HCERTCHAINENGINE* phChainEngine
); );
skipping to change at line 17554 skipping to change at line 17825
#define CERT_TRUST_IS_SELF_SIGNED 0x00000008 #define CERT_TRUST_IS_SELF_SIGNED 0x00000008
// These can be applied to certificates and chains // These can be applied to certificates and chains
#define CERT_TRUST_HAS_PREFERRED_ISSUER 0x00000100 #define CERT_TRUST_HAS_PREFERRED_ISSUER 0x00000100
#define CERT_TRUST_HAS_ISSUANCE_CHAIN_POLICY 0x00000200 #define CERT_TRUST_HAS_ISSUANCE_CHAIN_POLICY 0x00000200
#define CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS 0x00000400 #define CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS 0x00000400
#define CERT_TRUST_IS_PEER_TRUSTED 0x00000800 #define CERT_TRUST_IS_PEER_TRUSTED 0x00000800
#define CERT_TRUST_HAS_CRL_VALIDITY_EXTENDED 0x00001000 #define CERT_TRUST_HAS_CRL_VALIDITY_EXTENDED 0x00001000
// Indicates that the certificate was found in
// a store specified by hExclusiveRoot or hExclusiveTrustedPeople
#define CERT_TRUST_IS_FROM_EXCLUSIVE_TRUST_STORE 0x00002000
// These can be applied to chains only // These can be applied to chains only
#define CERT_TRUST_IS_COMPLEX_CHAIN 0x00010000 #define CERT_TRUST_IS_COMPLEX_CHAIN 0x00010000
// //
// Each certificate context in a simple chain has a corresponding chain element // Each certificate context in a simple chain has a corresponding chain element
// in the simple chain context // in the simple chain context
// //
// dwErrorStatus has CERT_TRUST_IS_REVOKED, pRevocationInfo set // dwErrorStatus has CERT_TRUST_IS_REVOKED, pRevocationInfo set
// dwErrorStatus has CERT_TRUST_REVOCATION_STATUS_UNKNOWN, pRevocationInfo set // dwErrorStatus has CERT_TRUST_REVOCATION_STATUS_UNKNOWN, pRevocationInfo set
skipping to change at line 17620 skipping to change at line 17895
DWORD cbSize; DWORD cbSize;
PCCERT_CONTEXT pCertContext; PCCERT_CONTEXT pCertContext;
CERT_TRUST_STATUS TrustStatus; CERT_TRUST_STATUS TrustStatus;
PCERT_REVOCATION_INFO pRevocationInfo; PCERT_REVOCATION_INFO pRevocationInfo;
PCERT_ENHKEY_USAGE pIssuanceUsage; // If NULL, any PCERT_ENHKEY_USAGE pIssuanceUsage; // If NULL, any
PCERT_ENHKEY_USAGE pApplicationUsage; // If NULL, any PCERT_ENHKEY_USAGE pApplicationUsage; // If NULL, any
LPCWSTR pwszExtendedErrorInfo; // If NULL, none LPCWSTR pwszExtendedErrorInfo; // If NULL, none
} CERT_CHAIN_ELEMENT, *PCERT_CHAIN_ELEMENT; } CERT_CHAIN_ELEMENT, *PCERT_CHAIN_ELEMENT;
typedef const CERT_CHAIN_ELEMENT* PCCERT_CHAIN_ELEMENT;
// //
// The simple chain is an array of chain elements and a summary trust status // The simple chain is an array of chain elements and a summary trust status
// for the chain // for the chain
// //
// rgpElements[0] is the end certificate chain element // rgpElements[0] is the end certificate chain element
// //
// rgpElements[cElement-1] is the self-signed "root" certificate chain element // rgpElements[cElement-1] is the self-signed "root" certificate chain element
// //
skipping to change at line 17648 skipping to change at line 17924
// fHasRevocationFreshnessTime is only set if we are able to retrieve // fHasRevocationFreshnessTime is only set if we are able to retrieve
// revocation information for all elements checked for revocation. // revocation information for all elements checked for revocation.
// For a CRL its CurrentTime - ThisUpdate. // For a CRL its CurrentTime - ThisUpdate.
// //
// dwRevocationFreshnessTime is the largest time across all elements // dwRevocationFreshnessTime is the largest time across all elements
// checked. // checked.
BOOL fHasRevocationFreshnessTime; BOOL fHasRevocationFreshnessTime;
DWORD dwRevocationFreshnessTime; // seconds DWORD dwRevocationFreshnessTime; // seconds
} CERT_SIMPLE_CHAIN, *PCERT_SIMPLE_CHAIN; } CERT_SIMPLE_CHAIN, *PCERT_SIMPLE_CHAIN;
typedef const CERT_SIMPLE_CHAIN* PCCERT_SIMPLE_CHAIN;
// //
// And the chain context contains an array of simple chains and summary trust // And the chain context contains an array of simple chains and summary trust
// status for all the connected simple chains // status for all the connected simple chains
// //
// rgpChains[0] is the end certificate simple chain // rgpChains[0] is the end certificate simple chain
// //
// rgpChains[cChain-1] is the final (possibly trust list signer) chain which // rgpChains[cChain-1] is the final (possibly trust list signer) chain which
// ends in a certificate which is contained in the root store // ends in a certificate which is contained in the root store
// //
skipping to change at line 17779 skipping to change at line 18056
#define CERT_CHAIN_REVOCATION_CHECK_CHAIN 0x20000000 #define CERT_CHAIN_REVOCATION_CHECK_CHAIN 0x20000000
#define CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT 0x40000000 #define CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT 0x40000000
#define CERT_CHAIN_REVOCATION_CHECK_CACHE_ONLY 0x80000000 #define CERT_CHAIN_REVOCATION_CHECK_CACHE_ONLY 0x80000000
// By default, the dwUrlRetrievalTimeout in pChainPara is the timeout used // By default, the dwUrlRetrievalTimeout in pChainPara is the timeout used
// for each revocation URL wire retrieval. When the following flag is set, // for each revocation URL wire retrieval. When the following flag is set,
// dwUrlRetrievalTimeout is the accumulative timeout across all // dwUrlRetrievalTimeout is the accumulative timeout across all
// revocation URL wire retrievals. // revocation URL wire retrievals.
#define CERT_CHAIN_REVOCATION_ACCUMULATIVE_TIMEOUT 0x08000000 #define CERT_CHAIN_REVOCATION_ACCUMULATIVE_TIMEOUT 0x08000000
// Revocation checking for an independent OCSP signer certificate.
//
// The above revocation flags indicate if just the signer certificate or all
// the certificates in the chain, excluding the root should be checked
// for revocation. If the signer certificate contains the
// szOID_PKIX_OCSP_NOCHECK extension, then, revocation checking is skipped
// for the leaf signer certificate. Both OCSP and CRL checking are allowed.
// However, recursive, independent OCSP signer certs are disabled.
#define CERT_CHAIN_REVOCATION_CHECK_OCSP_CERT 0x04000000
// First pass determines highest quality based upon: // First pass determines highest quality based upon:
// - Chain signature valid (higest quality bit of this set) // - Chain signature valid (higest quality bit of this set)
// - Complete chain // - Complete chain
// - Trusted root (lowestest quality bit of this set) // - Trusted root (lowestest quality bit of this set)
// By default, second pass only considers paths >= highest first pass quality // By default, second pass only considers paths >= highest first pass quality
#define CERT_CHAIN_DISABLE_PASS1_QUALITY_FILTERING 0x00000040 #define CERT_CHAIN_DISABLE_PASS1_QUALITY_FILTERING 0x00000040
#define CERT_CHAIN_RETURN_LOWER_QUALITY_CONTEXTS 0x00000080 #define CERT_CHAIN_RETURN_LOWER_QUALITY_CONTEXTS 0x00000080
#define CERT_CHAIN_DISABLE_AUTH_ROOT_AUTO_UPDATE 0x00000100 #define CERT_CHAIN_DISABLE_AUTH_ROOT_AUTO_UPDATE 0x00000100
skipping to change at line 17854 skipping to change at line 18141
// Duplicate (add a reference to) a certificate chain // Duplicate (add a reference to) a certificate chain
// //
WINCRYPT32API WINCRYPT32API
PCCERT_CHAIN_CONTEXT PCCERT_CHAIN_CONTEXT
WINAPI WINAPI
CertDuplicateCertificateChain ( CertDuplicateCertificateChain (
__in PCCERT_CHAIN_CONTEXT pChainContext __in PCCERT_CHAIN_CONTEXT pChainContext
); );
//+-------------------------------------------------------------------------
// This data structure is optionally pointed to by the pChainPara field
// in the CERT_REVOCATION_PARA and CRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO
// data structures. CertGetCertificateChain() populates when it calls
// the CertVerifyRevocation() API.
//--------------------------------------------------------------------------
struct _CERT_REVOCATION_CHAIN_PARA {
DWORD cbSize;
HCERTCHAINENGINE hChainEngine;
HCERTSTORE hAdditionalStore;
DWORD dwChainFlags;
DWORD dwUrlRetrievalTimeout; // milliseconds
LPFILETIME pftCurrentTime;
LPFILETIME pftCacheResync;
// Max size of the URL object to download, in bytes.
// 0 value means no limit.
DWORD cbMaxUrlRetrievalByteCount;
};
// //
// Specific Revocation Type OID and structure definitions // Specific Revocation Type OID and structure definitions
// //
// //
// CRL Revocation OID // CRL Revocation OID
// //
#define REVOCATION_OID_CRL_REVOCATION ((LPCSTR)1) #define REVOCATION_OID_CRL_REVOCATION ((LPCSTR)1)
skipping to change at line 18151 skipping to change at line 18458
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// Predefined verify chain policies // Predefined verify chain policies
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
#define CERT_CHAIN_POLICY_BASE ((LPCSTR) 1) #define CERT_CHAIN_POLICY_BASE ((LPCSTR) 1)
#define CERT_CHAIN_POLICY_AUTHENTICODE ((LPCSTR) 2) #define CERT_CHAIN_POLICY_AUTHENTICODE ((LPCSTR) 2)
#define CERT_CHAIN_POLICY_AUTHENTICODE_TS ((LPCSTR) 3) #define CERT_CHAIN_POLICY_AUTHENTICODE_TS ((LPCSTR) 3)
#define CERT_CHAIN_POLICY_SSL ((LPCSTR) 4) #define CERT_CHAIN_POLICY_SSL ((LPCSTR) 4)
#define CERT_CHAIN_POLICY_BASIC_CONSTRAINTS ((LPCSTR) 5) #define CERT_CHAIN_POLICY_BASIC_CONSTRAINTS ((LPCSTR) 5)
#define CERT_CHAIN_POLICY_NT_AUTH ((LPCSTR) 6) #define CERT_CHAIN_POLICY_NT_AUTH ((LPCSTR) 6)
#define CERT_CHAIN_POLICY_MICROSOFT_ROOT ((LPCSTR) 7) #define CERT_CHAIN_POLICY_MICROSOFT_ROOT ((LPCSTR) 7)
#define CERT_CHAIN_POLICY_EV ((LPCSTR) 8)
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// CERT_CHAIN_POLICY_BASE // CERT_CHAIN_POLICY_BASE
// //
// Implements the base chain policy verification checks. dwFlags can // Implements the base chain policy verification checks. dwFlags can
// be set in pPolicyPara to alter the default policy checking behaviour. // be set in pPolicyPara to alter the default policy checking behaviour.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// CERT_CHAIN_POLICY_AUTHENTICODE // CERT_CHAIN_POLICY_AUTHENTICODE
skipping to change at line 18219 skipping to change at line 18527
// pvExtraPolicyPara may optionally be set to point to the following // pvExtraPolicyPara may optionally be set to point to the following
// SSL_EXTRA_CERT_CHAIN_POLICY_PARA data structure // SSL_EXTRA_CERT_CHAIN_POLICY_PARA data structure
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
// fdwChecks flags are defined in wininet.h // fdwChecks flags are defined in wininet.h
typedef struct _HTTPSPolicyCallbackData typedef struct _HTTPSPolicyCallbackData
{ {
union { union {
DWORD cbStruct; // sizeof(HTTPSPolicyCallbackData); DWORD cbStruct; // sizeof(HTTPSPolicyCallbackData);
DWORD cbSize; // sizeof(HTTPSPolicyCallbackData); DWORD cbSize; // sizeof(HTTPSPolicyCallbackData);
}; } DUMMYUNIONNAME;
DWORD dwAuthType; DWORD dwAuthType;
# define AUTHTYPE_CLIENT 1 # define AUTHTYPE_CLIENT 1
# define AUTHTYPE_SERVER 2 # define AUTHTYPE_SERVER 2
DWORD fdwChecks; DWORD fdwChecks;
WCHAR *pwszServerName; // used to check against CN=xxxx WCHAR *pwszServerName; // used to check against CN=xxxx
} HTTPSPolicyCallbackData, *PHTTPSPolicyCallbackData, } HTTPSPolicyCallbackData, *PHTTPSPolicyCallbackData,
skipping to change at line 18309 skipping to change at line 18617
// pPolicyPara is optional. However, // pPolicyPara is optional. However,
// MICROSOFT_ROOT_CERT_CHAIN_POLICY_ENABLE_TEST_ROOT_FLAG can be set in // MICROSOFT_ROOT_CERT_CHAIN_POLICY_ENABLE_TEST_ROOT_FLAG can be set in
// the dwFlags in pPolicyPara to also check for the Microsoft Test Roots. // the dwFlags in pPolicyPara to also check for the Microsoft Test Roots.
// //
// pvExtraPolicyPara and pvExtraPolicyStatus aren't used and must be set // pvExtraPolicyPara and pvExtraPolicyStatus aren't used and must be set
// to NULL. // to NULL.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
#define MICROSOFT_ROOT_CERT_CHAIN_POLICY_ENABLE_TEST_ROOT_FLAG 0x00010000 #define MICROSOFT_ROOT_CERT_CHAIN_POLICY_ENABLE_TEST_ROOT_FLAG 0x00010000
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// CERT_CHAIN_POLICY_EV
//
// Verify the issuance policy in the end certificate of the first simple
// chain matches with the root certificate EV policy.
//
// pvExtraPolicyPara may optionally be set to point to the following
// EV_EXTRA_CERT_CHAIN_POLICY_PARA. The dwRootProgramQualifierFlags member
// can be set to one or more of the CERT_ROOT_PROGRAM_FLAG_* to define
// which of the EV policy qualifier bits are required for validation.
//
// pvExtraPolicyStatus may optionally be set to point to the following
// EV_EXTRA_CERT_CHAIN_POLICY_STATUS. The fQualifiers member will contain
// a combination of CERT_ROOT_PROGRAM_FLAG_* flags.
//--------------------------------------------------------------------------
typedef struct _EV_EXTRA_CERT_CHAIN_POLICY_PARA {
DWORD cbSize;
DWORD dwRootProgramQualifierFlags;
} EV_EXTRA_CERT_CHAIN_POLICY_PARA,
*PEV_EXTRA_CERT_CHAIN_POLICY_PARA;
typedef struct _EV_EXTRA_CERT_CHAIN_POLICY_STATUS {
DWORD cbSize;
DWORD dwQualifiers;
DWORD dwIssuanceUsageIndex;
} EV_EXTRA_CERT_CHAIN_POLICY_STATUS, *PEV_EXTRA_CERT_CHAIN_POLICY_STATUS;
//+-------------------------------------------------------------------------
// convert formatted string to binary // convert formatted string to binary
// If cchString is 0, then pszString is NULL terminated and // If cchString is 0, then pszString is NULL terminated and
// cchString is obtained via strlen() + 1. // cchString is obtained via strlen() + 1.
// dwFlags defines string format // dwFlags defines string format
// if pbBinary is NULL, *pcbBinary returns the size of required memory // if pbBinary is NULL, *pcbBinary returns the size of required memory
// *pdwSkip returns the character count of skipped strings, optional // *pdwSkip returns the character count of skipped strings, optional
// *pdwFlags returns the actual format used in the conversion, optional // *pdwFlags returns the actual format used in the conversion, optional
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
WINCRYPT32STRINGAPI WINCRYPT32STRINGAPI
BOOL BOOL
skipping to change at line 18410 skipping to change at line 18746
#define CRYPT_STRING_HEX 0x00000004 #define CRYPT_STRING_HEX 0x00000004
#define CRYPT_STRING_HEXASCII 0x00000005 #define CRYPT_STRING_HEXASCII 0x00000005
#define CRYPT_STRING_BASE64_ANY 0x00000006 #define CRYPT_STRING_BASE64_ANY 0x00000006
#define CRYPT_STRING_ANY 0x00000007 #define CRYPT_STRING_ANY 0x00000007
#define CRYPT_STRING_HEX_ANY 0x00000008 #define CRYPT_STRING_HEX_ANY 0x00000008
#define CRYPT_STRING_BASE64X509CRLHEADER 0x00000009 #define CRYPT_STRING_BASE64X509CRLHEADER 0x00000009
#define CRYPT_STRING_HEXADDR 0x0000000a #define CRYPT_STRING_HEXADDR 0x0000000a
#define CRYPT_STRING_HEXASCIIADDR 0x0000000b #define CRYPT_STRING_HEXASCIIADDR 0x0000000b
#define CRYPT_STRING_HEXRAW 0x0000000c #define CRYPT_STRING_HEXRAW 0x0000000c
#define CRYPT_STRING_HASHDATA 0x10000000
#define CRYPT_STRING_STRICT 0x20000000
#define CRYPT_STRING_NOCRLF 0x40000000 #define CRYPT_STRING_NOCRLF 0x40000000
#define CRYPT_STRING_NOCR 0x80000000 #define CRYPT_STRING_NOCR 0x80000000
// certenrolld_end // certenrolld_end
// CryptBinaryToString uses the following flags // CryptBinaryToString uses the following flags
// CRYPT_STRING_BASE64HEADER - base64 format with certificate begin // CRYPT_STRING_BASE64HEADER - base64 format with certificate begin
// and end headers // and end headers
// CRYPT_STRING_BASE64 - only base64 without headers // CRYPT_STRING_BASE64 - only base64 without headers
// CRYPT_STRING_BINARY - pure binary copy // CRYPT_STRING_BINARY - pure binary copy
// CRYPT_STRING_BASE64REQUESTHEADER - base64 format with request begin // CRYPT_STRING_BASE64REQUESTHEADER - base64 format with request begin
skipping to change at line 18616 skipping to change at line 18954
__in DWORD dwFlags); __in DWORD dwFlags);
//+========================================================================= //+=========================================================================
// APIs to get a non-blocking, time valid OCSP response for // APIs to get a non-blocking, time valid OCSP response for
// a server certificate chain. // a server certificate chain.
// //
// Normally, this OCSP response will be included along with the server // Normally, this OCSP response will be included along with the server
// certificate in a message returned to the client. As a result only the // certificate in a message returned to the client. As a result only the
// server should need to contact the OCSP responser for its certificate. // server should need to contact the OCSP responser for its certificate.
//========================================================================== //==========================================================================
#if (NTDDI_VERSION >= NTDDI_WINLH)
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// Server OCSP response handle. // Server OCSP response handle.
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
typedef VOID *HCERT_SERVER_OCSP_RESPONSE; typedef VOID *HCERT_SERVER_OCSP_RESPONSE;
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// Open a handle to an OCSP response associated with a server certificate // Open a handle to an OCSP response associated with a server certificate
// chain. If the end certificate doesn't have an OCSP AIA URL, NULL is // chain. If the end certificate doesn't have an OCSP AIA URL, NULL is
// returned with LastError set to CRYPT_E_NOT_IN_REVOCATION_DATABASE. NULL // returned with LastError set to CRYPT_E_NOT_IN_REVOCATION_DATABASE. NULL
skipping to change at line 18740 skipping to change at line 19079
// Free the OCSP response context returned by // Free the OCSP response context returned by
// CertGetServerOcspResponseContext(). // CertGetServerOcspResponseContext().
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
WINCRYPT32API WINCRYPT32API
VOID VOID
WINAPI WINAPI
CertFreeServerOcspResponseContext( CertFreeServerOcspResponseContext(
__in_opt PCCERT_SERVER_OCSP_RESPONSE_CONTEXT pServerOcspResponseContext __in_opt PCCERT_SERVER_OCSP_RESPONSE_CONTEXT pServerOcspResponseContext
); );
#endif // (NTDDI_VERSION >= NTDDI_WINLH)
//+------------------------------------------------------------------------- //+-------------------------------------------------------------------------
// Helper function to do URL retrieval of logo or biometric information // Helper function to do URL retrieval of logo or biometric information
// specified in either the szOID_LOGOTYPE_EXT or szOID_BIOMETRIC_EXT // specified in either the szOID_LOGOTYPE_EXT or szOID_BIOMETRIC_EXT
// certificate extension. // certificate extension.
// //
// Only the first hashed URL matching lpszLogoOrBiometricType is used // Only the first hashed URL matching lpszLogoOrBiometricType is used
// to do the URL retrieval. Only direct logotypes are supported. // to do the URL retrieval. Only direct logotypes are supported.
// The bytes at the first URL are retrieved via // The bytes at the first URL are retrieved via
// CryptRetrieveObjectByUrlW and hashed. The computed hash is compared // CryptRetrieveObjectByUrlW and hashed. The computed hash is compared
// against the hash in the certificate. For success, ppbData, pcbData // against the hash in the certificate. For success, ppbData, pcbData
skipping to change at line 18816 skipping to change at line 19157
#define CERT_RETRIEVE_COMMUNITY_LOGO ((LPCSTR) 3) #define CERT_RETRIEVE_COMMUNITY_LOGO ((LPCSTR) 3)
// Predefined Biometric types // Predefined Biometric types
#define CERT_RETRIEVE_BIOMETRIC_PREDEFINED_BASE_TYPE ((LPCSTR) 1000) #define CERT_RETRIEVE_BIOMETRIC_PREDEFINED_BASE_TYPE ((LPCSTR) 1000)
#define CERT_RETRIEVE_BIOMETRIC_PICTURE_TYPE \ #define CERT_RETRIEVE_BIOMETRIC_PICTURE_TYPE \
(CERT_RETRIEVE_BIOMETRIC_PREDEFINED_BASE_TYPE + CERT_BIOMETRIC_PICTURE_TYPE) (CERT_RETRIEVE_BIOMETRIC_PREDEFINED_BASE_TYPE + CERT_BIOMETRIC_PICTURE_TYPE)
#define CERT_RETRIEVE_BIOMETRIC_SIGNATURE_TYPE \ #define CERT_RETRIEVE_BIOMETRIC_SIGNATURE_TYPE \
(CERT_RETRIEVE_BIOMETRIC_PREDEFINED_BASE_TYPE + CERT_BIOMETRIC_SIGNATURE_TYP E) (CERT_RETRIEVE_BIOMETRIC_PREDEFINED_BASE_TYPE + CERT_BIOMETRIC_SIGNATURE_TYP E)
//
// Certificate Selection API
//
#if (NTDDI_VERSION >= NTDDI_WIN7)
typedef struct _CERT_SELECT_CHAIN_PARA
{
HCERTCHAINENGINE hChainEngine;
PFILETIME pTime;
HCERTSTORE hAdditionalStore;
PCERT_CHAIN_PARA pChainPara;
DWORD dwFlags;
}
CERT_SELECT_CHAIN_PARA, *PCERT_SELECT_CHAIN_PARA;
typedef const CERT_SELECT_CHAIN_PARA* PCCERT_SELECT_CHAIN_PARA;
#define CERT_SELECT_MAX_PARA 500
typedef struct _CERT_SELECT_CRITERIA
{
DWORD dwType;
DWORD cPara;
__field_ecount(cPara) void** ppPara;
}
CERT_SELECT_CRITERIA, *PCERT_SELECT_CRITERIA;
typedef const CERT_SELECT_CRITERIA* PCCERT_SELECT_CRITERIA;
// Selection Criteria
#define CERT_SELECT_BY_ENHKEY_USAGE 1
#define CERT_SELECT_BY_KEY_USAGE 2
#define CERT_SELECT_BY_POLICY_OID 3
#define CERT_SELECT_BY_PROV_NAME 4
#define CERT_SELECT_BY_EXTENSION 5
#define CERT_SELECT_BY_SUBJECT_HOST_NAME 6
#define CERT_SELECT_BY_ISSUER_ATTR 7
#define CERT_SELECT_BY_SUBJECT_ATTR 8
#define CERT_SELECT_BY_ISSUER_NAME 9
#define CERT_SELECT_BY_PUBLIC_KEY 10
#define CERT_SELECT_BY_TLS_SIGNATURES 11
#define CERT_SELECT_LAST CERT_SELECT_BY_TLS_SIGNATURES
#define CERT_SELECT_MAX (CERT_SELECT_LAST * 3)
// Selection Flags
#define CERT_SELECT_ALLOW_EXPIRED 0x00000001
#define CERT_SELECT_TRUSTED_ROOT 0x00000002
#define CERT_SELECT_DISALLOW_SELFSIGNED 0x00000004
#define CERT_SELECT_HAS_PRIVATE_KEY 0x00000008
#define CERT_SELECT_HAS_KEY_FOR_SIGNATURE 0x00000010
#define CERT_SELECT_HAS_KEY_FOR_KEY_EXCHANGE 0x00000020
#define CERT_SELECT_HARDWARE_ONLY 0x00000040
#define CERT_SELECT_ALLOW_DUPLICATES 0x00000080
//+-------------------------------------------------------------------------
// Build certificate chains from the certificates in the store and select
// the matching ones based on the flags and selection criteria.
//--------------------------------------------------------------------------
WINCRYPT32API
BOOL
WINAPI
CertSelectCertificateChains(
__in_opt LPCGUID pSelectionContext,
__in DWORD dwFlags,
__in_opt PCCERT_SELECT_CHAIN_PARA pChainParameters,
__in DWORD cCriteria,
__in_ecount_opt(cCriteria) PCCERT_SELECT_CRITERIA rgpCriteria,
__in HCERTSTORE hStore,
__out PDWORD pcSelection,
__out_ecount(*pcSelection) PCCERT_CHAIN_CONTEXT** pprgpSelection
);
//+-------------------------------------------------------------------------
// Free the array of pointers to chain contexts.
// CertFreeCertificateChain is NOT called for each entry.
//--------------------------------------------------------------------------
WINCRYPT32API
VOID
WINAPI
CertFreeCertificateChainList(
__in PCCERT_CHAIN_CONTEXT* prgpSelection
);
#endif // (NTDDI_VERSION >= NTDDI_WIN7)
//
// Time stamp API
//
#if (NTDDI_VERSION >= NTDDI_WIN7)
//+-------------------------------------------------------------------------
// CRYPT_TIMESTAMP_REQUEST
//
//--------------------------------------------------------------------------
#define TIMESTAMP_VERSION 1
typedef struct _CRYPT_TIMESTAMP_REQUEST
{
DWORD dwVersion; // v1
CRYPT_ALGORITHM_IDENTIFIER HashAlgorithm;
CRYPT_DER_BLOB HashedMessage;
LPSTR pszTSAPolicyId; // OPTIONAL
CRYPT_INTEGER_BLOB Nonce; // OPTIONAL
BOOL fCertReq; // DEFAULT FALSE
DWORD cExtension;
__field_ecount(cExtension)
PCERT_EXTENSION rgExtension; // OPTIONAL
} CRYPT_TIMESTAMP_REQUEST, *PCRYPT_TIMESTAMP_REQUEST;
//+-------------------------------------------------------------------------
// CRYPT_TIMESTAMP_RESPONSE
//
//--------------------------------------------------------------------------
typedef struct _CRYPT_TIMESTAMP_RESPONSE
{
DWORD dwStatus;
DWORD cFreeText; // OPTIONAL
__field_ecount(cFreeText)
LPWSTR* rgFreeText;
CRYPT_BIT_BLOB FailureInfo; // OPTIONAL
CRYPT_DER_BLOB ContentInfo; // OPTIONAL
} CRYPT_TIMESTAMP_RESPONSE, *PCRYPT_TIMESTAMP_RESPONSE;
#define TIMESTAMP_STATUS_GRANTED 0
#define TIMESTAMP_STATUS_GRANTED_WITH_MODS 1
#define TIMESTAMP_STATUS_REJECTED 2
#define TIMESTAMP_STATUS_WAITING 3
#define TIMESTAMP_STATUS_REVOCATION_WARNING 4
#define TIMESTAMP_STATUS_REVOKED 5
#define TIMESTAMP_FAILURE_BAD_ALG 0
#define TIMESTAMP_FAILURE_BAD_REQUEST 2
#define TIMESTAMP_FAILURE_BAD_FORMAT 5
#define TIMESTAMP_FAILURE_TIME_NOT_AVAILABLE 14
#define TIMESTAMP_FAILURE_POLICY_NOT_SUPPORTED 15
#define TIMESTAMP_FAILURE_EXTENSION_NOT_SUPPORTED 16
#define TIMESTAMP_FAILURE_INFO_NOT_AVAILABLE 17
#define TIMESTAMP_FAILURE_SYSTEM_FAILURE 25
//+-------------------------------------------------------------------------
// CRYPT_TIMESTAMP_ACCURACY
//
//--------------------------------------------------------------------------
typedef struct _CRYPT_TIMESTAMP_ACCURACY
{
DWORD dwSeconds; // OPTIONAL
DWORD dwMillis; // OPTIONAL
DWORD dwMicros; // OPTIONAL
} CRYPT_TIMESTAMP_ACCURACY, *PCRYPT_TIMESTAMP_ACCURACY;
//+-------------------------------------------------------------------------
// CRYPT_TIMESTAMP_INFO
//
//--------------------------------------------------------------------------
typedef struct _CRYPT_TIMESTAMP_INFO
{
DWORD dwVersion; // v1
LPSTR pszTSAPolicyId;
CRYPT_ALGORITHM_IDENTIFIER HashAlgorithm;
CRYPT_DER_BLOB HashedMessage;
CRYPT_INTEGER_BLOB SerialNumber;
FILETIME ftTime;
PCRYPT_TIMESTAMP_ACCURACY pvAccuracy; // OPTIONAL
BOOL fOrdering; // OPTIONAL
CRYPT_DER_BLOB Nonce; // OPTIONAL
CRYPT_DER_BLOB Tsa; // OPTIONAL
DWORD cExtension;
__field_ecount(cExtension)
PCERT_EXTENSION rgExtension; // OPTIONAL
} CRYPT_TIMESTAMP_INFO, *PCRYPT_TIMESTAMP_INFO;
//+-------------------------------------------------------------------------
// CRYPT_TIMESTAMP_CONTEXT
//
//--------------------------------------------------------------------------
typedef struct _CRYPT_TIMESTAMP_CONTEXT
{
DWORD cbEncoded;
__field_bcount(cbEncoded)
BYTE *pbEncoded;
PCRYPT_TIMESTAMP_INFO pTimeStamp;
} CRYPT_TIMESTAMP_CONTEXT, *PCRYPT_TIMESTAMP_CONTEXT;
//+-------------------------------------------------------------------------
// CRYPT_TIMESTAMP_PARA
//
// pszTSAPolicyId
// [optional] Specifies the TSA policy under which the time stamp token
// should be provided.
//
// Nonce
// [optional] Specifies the nonce value used by the client to verify the
// timeliness of the response when no local clock is available.
//
// fCertReq
// Specifies whether the TSA must include in response the certificates
// used to sign the time stamp token.
//
// rgExtension
// [optional] Specifies Extensions to be included in request.
//--------------------------------------------------------------------------
typedef struct _CRYPT_TIMESTAMP_PARA
{
LPCSTR pszTSAPolicyId; // OPTIONAL
BOOL fRequestCerts; // Default is TRUE
CRYPT_INTEGER_BLOB Nonce; // OPTIONAL
DWORD cExtension;
__field_ecount(cExtension)
PCERT_EXTENSION rgExtension; // OPTIONAL
} CRYPT_TIMESTAMP_PARA, *PCRYPT_TIMESTAMP_PARA;
//+-------------------------------------------------------------------------
// CryptRetrieveTimeStamp
//
// wszUrl
// [in] Specifies TSA where to send request to.
//
// dwRetrievalFlags
// [in]
// TIMESTAMP_VERIFY_CONTEXT_SIGNATURE
// TIMESTAMP_NO_AUTH_RETRIEVAL
// TIMESTAMP_DONT_HASH_DATA
//
// dwTimeout
// [in] Specifies the maximum number of milliseconds to wait for retrieval.
// If a value of zero is specified, this function does not time-out.
//
// pszHashId
// [in] Specifies hash algorithm OID.
//
// pPara
// [in, optional] Specifies additional request parameters.
//
// pbData
// [in] Points to array of bytes to be timestamped.
//
// cbData
// [in] Number of bytes in pbData.
//
// ppTsContext
// [out] The caller must free ppTsContext with CryptMemFree.
//
// ppTsSigner
// [out, optional] The address of a CERT_CONTEXT structure pointer that
// receives the certificate of the signer.
// When you have finished using this structure, free it by passing this
// pointer to the CertFreeCertificateContext function.
// This parameter can be NULL if the TSA signer's certificate is not needed.
//
// Remarks:
//
// The TIMESTAMP_VERIFY_CONTEXT_SIGNATURE flag can be only used,
// if fRequestCerts value is TRUE.
//
//--------------------------------------------------------------------------
BOOL
WINAPI
CryptRetrieveTimeStamp(
__in LPCWSTR wszUrl,
DWORD dwRetrievalFlags,
DWORD dwTimeout,
__in LPCSTR pszHashId,
__in_opt const CRYPT_TIMESTAMP_PARA *pPara,
__in_bcount(cbData)
const BYTE *pbData,
DWORD cbData,
__deref_out PCRYPT_TIMESTAMP_CONTEXT *ppTsContext,
__deref_out_opt PCCERT_CONTEXT *ppTsSigner,
__out_opt HCERTSTORE *phStore
);
// Set this flag to inhibit hash calculation on pbData
#define TIMESTAMP_DONT_HASH_DATA 0x00000001
// Set this flag to enforce signature validation on retrieved time stamp.
#define TIMESTAMP_VERIFY_CONTEXT_SIGNATURE 0x00000020 // CRYPT_VERIFY_CON
TEXT_SIGNATURE
// Set this flag to inhibit automatic authentication handling. See the
// wininet flag, INTERNET_FLAG_NO_AUTH, for more details.
#define TIMESTAMP_NO_AUTH_RETRIEVAL 0x00020000 // CRYPT_NO_AUTH_RE
TRIEVAL
//+-------------------------------------------------------------------------
// CryptVerifyTimeStampSignature
//
// pbTSContentInfo
// [in] Points to a buffer with timestamp content.
// These bytes are the same as returned in response by CRYPT_TIMESTAMP_CONT
EXT::pbEncoded
//
// cbTSContentInfo
// [in] Number of bytes in pbTSContentInfo.
//
// pbData
// [in] Points to array of bytes to be timestamped.
//
// cbData
// [in] Number of bytes in pbData.
//
// hAdditionalStore
// [in] Handle of any additional store to search for supporting
// TSA's signing certificates and certificate trust lists (CTLs).
// This parameter can be NULL if no additional store is to be searched.
//
// ppTsContext
// [out] The caller must free ppTsContext with CryptMemFree
//
// ppTsSigner
// [out, optional] The address of a CERT_CONTEXT structure pointer that
// receives the certificate of the signer.
// When you have finished using this structure, free it by passing this
// pointer to the CertFreeCertificateContext function.
// This parameter can be NULL if the TSA signer's certificate is not needed.
//
// NOTE:
// The caller should validate pszTSAPolicyId, if any was specified in the req
uest,
// and ftTime.
// The caller should also build a chain for ppTsSigner and validate the trust
.
//--------------------------------------------------------------------------
__success(return == TRUE)
BOOL
WINAPI
CryptVerifyTimeStampSignature (
__in_bcount( cbTSContentInfo )
const BYTE *pbTSContentInfo,
DWORD cbTSContentInfo,
__in_bcount_opt(cbData)
const BYTE *pbData,
DWORD cbData,
__in_opt HCERTSTORE hAdditionalStore,
__deref_out PCRYPT_TIMESTAMP_CONTEXT *ppTsContext,
__deref_out_opt PCCERT_CONTEXT *ppTsSigner,
__out_opt HCERTSTORE *phStore
);
#endif // (NTDDI_VERSION >= NTDDI_WIN7)
#endif //!defined(_DDK_DRIVER_) #endif //!defined(_DDK_DRIVER_)
#ifdef __cplusplus #ifdef __cplusplus
} // Balance extern "C" above } // Balance extern "C" above
#endif #endif
#if defined (_MSC_VER) #if defined (_MSC_VER)
#if ( _MSC_VER >= 800 ) #if ( _MSC_VER >= 800 )
#if _MSC_VER >= 1200 #if _MSC_VER >= 1200
 End of changes. 137 change blocks. 
143 lines changed or deleted 836 lines changed or added


 winefs.h (6.0.6002.18005-Windows 6.0)   winefs.h (6.1.7601.23418-Windows 7.0) 
skipping to change at line 27 skipping to change at line 27
#if _MSC_VER > 1000 #if _MSC_VER > 1000
#pragma once #pragma once
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#define WINEFS_SETUSERKEY_SET_CAPABILITIES 0x00000001 #define WINEFS_SETUSERKEY_SET_CAPABILITIES 0x00000001
#define WINEFS_SETUSERKEY_BLOCK_CACHE_FLUSH 0x00000002
//+----------------------------------------------------------------------------- ----/ //+----------------------------------------------------------------------------- ----/
// / // /
// / // /
// Data Structures / // Data Structures /
// / // /
// / // /
//------------------------------------------------------------------------------ ----/ //------------------------------------------------------------------------------ ----/
// ALG_ID define is used as part of EFS_KEY_INFO (not available pre-WXP) // ALG_ID define is used as part of EFS_KEY_INFO (not available pre-WXP)
skipping to change at line 110 skipping to change at line 109
#ifdef MIDL_PASS #ifdef MIDL_PASS
[size_is(cbData)] [size_is(cbData)]
#endif // MIDL_PASS #endif // MIDL_PASS
PBYTE pbData; PBYTE pbData;
} EFS_RPC_BLOB, *PEFS_RPC_BLOB; } EFS_RPC_BLOB, *PEFS_RPC_BLOB;
#endif // #if (NTDDI_VERSION >= NTDDI_WINXP) #endif // #if (NTDDI_VERSION >= NTDDI_WINXP)
// EFS_PIN_BLOB was not available pre-LH // EFS_PIN_BLOB was not available pre-LH
#if (NTDDI_VERSION >= NTDDI_LONGHORN) #if (NTDDI_VERSION >= NTDDI_VISTA)
typedef struct _EFS_PIN_BLOB { typedef struct _EFS_PIN_BLOB {
#ifdef MIDL_PASS #ifdef MIDL_PASS
[range(0,8)] [range(0,8)]
#endif // MIDL_PASS #endif // MIDL_PASS
DWORD cbPadding; DWORD cbPadding;
#ifdef MIDL_PASS #ifdef MIDL_PASS
[range(0,300)] [range(0,2048)]
#endif // MIDL_PASS #endif // MIDL_PASS
DWORD cbData; DWORD cbData;
#ifdef MIDL_PASS #ifdef MIDL_PASS
[size_is(cbData+cbPadding)] [size_is(cbData+cbPadding)]
#endif // MIDL_PASS #endif // MIDL_PASS
PBYTE pbData; PBYTE pbData;
} EFS_PIN_BLOB, *PEFS_PIN_BLOB; } EFS_PIN_BLOB, *PEFS_PIN_BLOB;
#endif // #if (NTDDI_VERSION >= NTDDI_LONGHORN) #endif // #if (NTDDI_VERSION >= NTDDI_VISTA)
// EFS_KEY_INFO was not available pre-WXP // EFS_KEY_INFO was not available pre-WXP
#if (NTDDI_VERSION >= NTDDI_WINXP) #if (NTDDI_VERSION >= NTDDI_WINXP)
typedef struct _EFS_KEY_INFO { typedef struct _EFS_KEY_INFO {
DWORD dwVersion; DWORD dwVersion;
ULONG Entropy; ULONG Entropy;
ALG_ID Algorithm; ALG_ID Algorithm;
ULONG KeyLength; ULONG KeyLength;
} EFS_KEY_INFO, *PEFS_KEY_INFO; } EFS_KEY_INFO, *PEFS_KEY_INFO;
#endif // #if (NTDDI_VERSION >= NTDDI_WINXP) #endif // #if (NTDDI_VERSION >= NTDDI_WINXP)
// EFS_COMPATIBILITY_INFO was not available pre-Windows 7
#if (NTDDI_VERSION >= NTDDI_WIN7)
typedef struct _EFS_COMPATIBILITY_INFO {
DWORD EfsVersion;
} EFS_COMPATIBILITY_INFO, *PEFS_COMPATIBILITY_INFO;
#endif // #if (NTDDI_VERSION >= NTDDI_WIN7)
// EFS_(EN/DE)CRYPTION_STATUS_INFO was not available pre-LH // EFS_(EN/DE)CRYPTION_STATUS_INFO was not available pre-LH
#if (NTDDI_VERSION >= NTDDI_LONGHORN) #if (NTDDI_VERSION >= NTDDI_VISTA)
typedef struct _EFS_DECRYPTION_STATUS_INFO { typedef struct _EFS_DECRYPTION_STATUS_INFO {
DWORD dwDecryptionError; DWORD dwDecryptionError;
DWORD dwHashOffset; DWORD dwHashOffset;
DWORD cbHash; DWORD cbHash;
} EFS_DECRYPTION_STATUS_INFO, *PEFS_DECRYPTION_STATUS_INFO; } EFS_DECRYPTION_STATUS_INFO, *PEFS_DECRYPTION_STATUS_INFO;
typedef struct _EFS_ENCRYPTION_STATUS_INFO { typedef struct _EFS_ENCRYPTION_STATUS_INFO {
BOOL bHasCurrentKey; BOOL bHasCurrentKey;
DWORD dwEncryptionError; DWORD dwEncryptionError;
} EFS_ENCRYPTION_STATUS_INFO, *PEFS_ENCRYPTION_STATUS_INFO; } EFS_ENCRYPTION_STATUS_INFO, *PEFS_ENCRYPTION_STATUS_INFO;
#endif // #if (NTDDI_VERSION >= NTDDI_LONGHORN) #endif // #if (NTDDI_VERSION >= NTDDI_VISTA)
// //
// Input to add a user to an encrypted file // Input to add a user to an encrypted file
// //
typedef struct _ENCRYPTION_CERTIFICATE { typedef struct _ENCRYPTION_CERTIFICATE {
DWORD cbTotalLength; DWORD cbTotalLength;
SID * pUserSid; SID * pUserSid;
PEFS_CERTIFICATE_BLOB pCertBlob; PEFS_CERTIFICATE_BLOB pCertBlob;
} ENCRYPTION_CERTIFICATE, *PENCRYPTION_CERTIFICATE; } ENCRYPTION_CERTIFICATE, *PENCRYPTION_CERTIFICATE;
skipping to change at line 214 skipping to change at line 224
[range(0,500)] [range(0,500)]
#endif // MIDL_PASS #endif // MIDL_PASS
DWORD nUsers; DWORD nUsers;
#ifdef MIDL_PASS #ifdef MIDL_PASS
[size_is(nUsers)] [size_is(nUsers)]
#endif // MIDL_PASS #endif // MIDL_PASS
PENCRYPTION_CERTIFICATE * pUsers; PENCRYPTION_CERTIFICATE * pUsers;
} ENCRYPTION_CERTIFICATE_LIST, *PENCRYPTION_CERTIFICATE_LIST; } ENCRYPTION_CERTIFICATE_LIST, *PENCRYPTION_CERTIFICATE_LIST;
// ENCRYPTED_FILE_METADATA_SIGNATURE was not available pre-LH // ENCRYPTED_FILE_METADATA_SIGNATURE was not available pre-LH
#if (NTDDI_VERSION >= NTDDI_LONGHORN) #if (NTDDI_VERSION >= NTDDI_VISTA)
#define EFS_METADATA_ADD_USER 0x00000001 #define EFS_METADATA_ADD_USER 0x00000001
#define EFS_METADATA_REMOVE_USER 0x00000002 #define EFS_METADATA_REMOVE_USER 0x00000002
#define EFS_METADATA_REPLACE_USER 0x00000004 #define EFS_METADATA_REPLACE_USER 0x00000004
#define EFS_METADATA_GENERAL_OP 0x00000008 #define EFS_METADATA_GENERAL_OP 0x00000008
typedef struct _ENCRYPTED_FILE_METADATA_SIGNATURE { typedef struct _ENCRYPTED_FILE_METADATA_SIGNATURE {
DWORD dwEfsAcce ssType; DWORD dwEfsAcce ssType;
PENCRYPTION_CERTIFICATE_HASH_LIST pCertificatesAdded; PENCRYPTION_CERTIFICATE_HASH_LIST pCertificatesAdded;
PENCRYPTION_CERTIFICATE pEncryptionCertificate; PENCRYPTION_CERTIFICATE pEncryptionCertificate;
PEFS_RPC_BLOB pEfsStreamSignatu re; PEFS_RPC_BLOB pEfsStreamSignatu re;
} ENCRYPTED_FILE_METADATA_SIGNATURE, *PENCRYPTED_FILE_METADATA_SIGNATURE; } ENCRYPTED_FILE_METADATA_SIGNATURE, *PENCRYPTED_FILE_METADATA_SIGNATURE;
#endif // #if (NTDDI_VERSION >= NTDDI_LONGHORN) #endif // #if (NTDDI_VERSION >= NTDDI_VISTA)
//+----------------------------------------------------------------------------- ----/ //+----------------------------------------------------------------------------- ----/
// / // /
// / // /
// Prototypes / // Prototypes /
// / // /
// / // /
//------------------------------------------------------------------------------ ----/ //------------------------------------------------------------------------------ ----/
WINADVAPI WINADVAPI
skipping to change at line 272 skipping to change at line 282
); );
WINADVAPI WINADVAPI
DWORD DWORD
WINAPI WINAPI
AddUsersToEncryptedFile( AddUsersToEncryptedFile(
__in LPCWSTR lpFileName, __in LPCWSTR lpFileName,
__in PENCRYPTION_CERTIFICATE_LIST pEncryptionCertificates __in PENCRYPTION_CERTIFICATE_LIST pEncryptionCertificates
); );
//
// SetUserFileEncryptionKey signature change in Vista to allow NULL certificate
//
#if (NTDDI_VERSION >= NTDDI_VISTA)
WINADVAPI
DWORD
WINAPI
SetUserFileEncryptionKey(
__in_opt PENCRYPTION_CERTIFICATE pEncryptionCertificate
);
#else
WINADVAPI WINADVAPI
DWORD DWORD
WINAPI WINAPI
SetUserFileEncryptionKey( SetUserFileEncryptionKey(
__in PENCRYPTION_CERTIFICATE pEncryptionCertificate __in PENCRYPTION_CERTIFICATE pEncryptionCertificate
); );
#endif
// SetUserFileEncryptionKeyEx was not available pre-LH // SetUserFileEncryptionKeyEx was not available pre-LH
#if (NTDDI_VERSION >= NTDDI_LONGHORN) #if (NTDDI_VERSION >= NTDDI_VISTA)
WINADVAPI WINADVAPI
DWORD DWORD
WINAPI WINAPI
SetUserFileEncryptionKeyEx( SetUserFileEncryptionKeyEx(
__in PENCRYPTION_CERTIFICATE pEncryptionCertificate, __in_opt PENCRYPTION_CERTIFICATE pEncryptionCertificate,
DWORD dwCapabilities, DWORD dwCapabilities,
DWORD dwFlags, DWORD dwFlags,
__reserved LPVOID pvReserved __reserved LPVOID pvReserved
); );
#endif // #if (NTDDI_VERSION >= NTDDI_LONGHORN) #endif // #if (NTDDI_VERSION >= NTDDI_VISTA)
WINADVAPI WINADVAPI
VOID VOID
WINAPI WINAPI
FreeEncryptionCertificateHashList( FreeEncryptionCertificateHashList(
__in PENCRYPTION_CERTIFICATE_HASH_LIST pUsers __in PENCRYPTION_CERTIFICATE_HASH_LIST pUsers
); );
WINADVAPI WINADVAPI
BOOL BOOL
skipping to change at line 341 skipping to change at line 368
__in LPCWSTR SrcFileName, __in LPCWSTR SrcFileName,
__in LPCWSTR DstFileName, __in LPCWSTR DstFileName,
DWORD dwCreationDistribution, DWORD dwCreationDistribution,
DWORD dwAttributes, DWORD dwAttributes,
__in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes __in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes
); );
#endif #endif
// *EncryptedFileMetadata routines were not available pre-LH // *EncryptedFileMetadata routines were not available pre-LH
#if (NTDDI_VERSION >= NTDDI_LONGHORN) #if (NTDDI_VERSION >= NTDDI_VISTA)
__declspec(deprecated)
WINADVAPI WINADVAPI
DWORD DWORD
WINAPI WINAPI
GetEncryptedFileMetadata( GetEncryptedFileMetadata(
__in LPCWSTR lpFileName, __in LPCWSTR lpFileName,
__out PDWORD pcbMetadata, __out PDWORD pcbMetadata,
__deref_out_bcount(*pcbMetadata) PBYTE *ppbMetadata __deref_out_bcount(*pcbMetadata) PBYTE *ppbMetadata
); );
__declspec(deprecated)
WINADVAPI WINADVAPI
DWORD DWORD
WINAPI WINAPI
SetEncryptedFileMetadata( SetEncryptedFileMetadata(
__in LPCWSTR lpFileName, __in LPCWSTR lpFileName,
__in_opt PBYTE pbOldMetadata, __in_opt PBYTE pbOldMetadata,
__in PBYTE pbNewMetadata, __in PBYTE pbNewMetadata,
__in PENCRYPTION_CERTIFICATE_HASH pOwnerHash, __in PENCRYPTION_CERTIFICATE_HASH pOwnerHash,
DWORD dwOperation, DWORD dwOperation,
__in_opt PENCRYPTION_CERTIFICATE_HASH_LIST pCertificatesAdded __in_opt PENCRYPTION_CERTIFICATE_HASH_LIST pCertificatesAdded
); );
__declspec(deprecated)
WINADVAPI WINADVAPI
VOID VOID
WINAPI WINAPI
FreeEncryptedFileMetadata( FreeEncryptedFileMetadata(
__in PBYTE pbMetadata __in PBYTE pbMetadata
); );
#endif // #if (NTDDI_VERSION >= NTDDI_LONGHORN) #endif // #if (NTDDI_VERSION >= NTDDI_VISTA)
#ifdef __cplusplus #ifdef __cplusplus
} // Balance extern "C" above } // Balance extern "C" above
#endif #endif
#endif // #if (NTDDI_VERSION >= NTDDI_WIN2K) #endif // #if (NTDDI_VERSION >= NTDDI_WIN2K)
#endif // __WINEFS_H__ #endif // __WINEFS_H__
 End of changes. 19 change blocks. 
13 lines changed or deleted 43 lines changed or added


 winreg.h (6.0.6002.18005-Windows 6.0)   winreg.h (6.1.7601.23418-Windows 7.0) 
skipping to change at line 80 skipping to change at line 80
#define HKEY_CLASSES_ROOT (( HKEY ) (ULONG_PTR)((LONG)0x800000 00) ) #define HKEY_CLASSES_ROOT (( HKEY ) (ULONG_PTR)((LONG)0x800000 00) )
#define HKEY_CURRENT_USER (( HKEY ) (ULONG_PTR)((LONG)0x800000 01) ) #define HKEY_CURRENT_USER (( HKEY ) (ULONG_PTR)((LONG)0x800000 01) )
#define HKEY_LOCAL_MACHINE (( HKEY ) (ULONG_PTR)((LONG)0x800000 02) ) #define HKEY_LOCAL_MACHINE (( HKEY ) (ULONG_PTR)((LONG)0x800000 02) )
#define HKEY_USERS (( HKEY ) (ULONG_PTR)((LONG)0x800000 03) ) #define HKEY_USERS (( HKEY ) (ULONG_PTR)((LONG)0x800000 03) )
#define HKEY_PERFORMANCE_DATA (( HKEY ) (ULONG_PTR)((LONG)0x800000 04) ) #define HKEY_PERFORMANCE_DATA (( HKEY ) (ULONG_PTR)((LONG)0x800000 04) )
#define HKEY_PERFORMANCE_TEXT (( HKEY ) (ULONG_PTR)((LONG)0x800000 50) ) #define HKEY_PERFORMANCE_TEXT (( HKEY ) (ULONG_PTR)((LONG)0x800000 50) )
#define HKEY_PERFORMANCE_NLSTEXT (( HKEY ) (ULONG_PTR)((LONG)0x800000 60) ) #define HKEY_PERFORMANCE_NLSTEXT (( HKEY ) (ULONG_PTR)((LONG)0x800000 60) )
#if(WINVER >= 0x0400) #if(WINVER >= 0x0400)
#define HKEY_CURRENT_CONFIG (( HKEY ) (ULONG_PTR)((LONG)0x800000 05) ) #define HKEY_CURRENT_CONFIG (( HKEY ) (ULONG_PTR)((LONG)0x800000 05) )
#define HKEY_DYN_DATA (( HKEY ) (ULONG_PTR)((LONG)0x800000 06) ) #define HKEY_DYN_DATA (( HKEY ) (ULONG_PTR)((LONG)0x800000 06) )
#define HKEY_CURRENT_USER_LOCAL_SETTINGS (( HKEY ) (ULONG_PTR)((LONG)0x800000 07) )
// //
// RegConnectRegistryEx supported flags // RegConnectRegistryEx supported flags
// //
#define REG_SECURE_CONNECTION 1 #define REG_SECURE_CONNECTION 1
/*NOINC*/ /*NOINC*/
#ifndef _PROVIDER_STRUCTS_DEFINED #ifndef _PROVIDER_STRUCTS_DEFINED
#define _PROVIDER_STRUCTS_DEFINED #define _PROVIDER_STRUCTS_DEFINED
skipping to change at line 120 skipping to change at line 121
}PVALUEW, FAR *PPVALUEW; }PVALUEW, FAR *PPVALUEW;
#ifdef UNICODE #ifdef UNICODE
typedef PVALUEW PVALUE; typedef PVALUEW PVALUE;
typedef PPVALUEW PPVALUE; typedef PPVALUEW PPVALUE;
#else #else
typedef PVALUEA PVALUE; typedef PVALUEA PVALUE;
typedef PPVALUEA PPVALUE; typedef PPVALUEA PPVALUE;
#endif // UNICODE #endif // UNICODE
typedef typedef
DWORD _cdecl DWORD __cdecl
QUERYHANDLER (LPVOID keycontext, PVALCONTEXT val_list, DWORD num_vals, QUERYHANDLER (LPVOID keycontext, PVALCONTEXT val_list, DWORD num_vals,
LPVOID outputbuffer, DWORD FAR *total_outlen, DWORD input_blen); LPVOID outputbuffer, DWORD FAR *total_outlen, DWORD input_blen);
typedef QUERYHANDLER FAR *PQUERYHANDLER; typedef QUERYHANDLER FAR *PQUERYHANDLER;
typedef struct provider_info { typedef struct provider_info {
PQUERYHANDLER pi_R0_1val; PQUERYHANDLER pi_R0_1val;
PQUERYHANDLER pi_R0_allvals; PQUERYHANDLER pi_R0_allvals;
PQUERYHANDLER pi_R3_1val; PQUERYHANDLER pi_R3_1val;
PQUERYHANDLER pi_R3_allvals; PQUERYHANDLER pi_R3_allvals;
skipping to change at line 642 skipping to change at line 643
#else #else
#define RegOpenKey RegOpenKeyA #define RegOpenKey RegOpenKeyA
#endif // !UNICODE #endif // !UNICODE
WINADVAPI WINADVAPI
LSTATUS LSTATUS
APIENTRY APIENTRY
RegOpenKeyExA ( RegOpenKeyExA (
__in HKEY hKey, __in HKEY hKey,
__in_opt LPCSTR lpSubKey, __in_opt LPCSTR lpSubKey,
__reserved DWORD ulOptions, __in_opt DWORD ulOptions,
__in REGSAM samDesired, __in REGSAM samDesired,
__out PHKEY phkResult __out PHKEY phkResult
); );
WINADVAPI WINADVAPI
LSTATUS LSTATUS
APIENTRY APIENTRY
RegOpenKeyExW ( RegOpenKeyExW (
__in HKEY hKey, __in HKEY hKey,
__in_opt LPCWSTR lpSubKey, __in_opt LPCWSTR lpSubKey,
__reserved DWORD ulOptions, __in_opt DWORD ulOptions,
__in REGSAM samDesired, __in REGSAM samDesired,
__out PHKEY phkResult __out PHKEY phkResult
); );
#ifdef UNICODE #ifdef UNICODE
#define RegOpenKeyEx RegOpenKeyExW #define RegOpenKeyEx RegOpenKeyExW
#else #else
#define RegOpenKeyEx RegOpenKeyExA #define RegOpenKeyEx RegOpenKeyExA
#endif // !UNICODE #endif // !UNICODE
WINADVAPI WINADVAPI
LSTATUS LSTATUS
APIENTRY APIENTRY
RegOpenKeyTransactedA ( RegOpenKeyTransactedA (
__in HKEY hKey, __in HKEY hKey,
__in_opt LPCSTR lpSubKey, __in_opt LPCSTR lpSubKey,
__in DWORD ulOptions, __in_opt DWORD ulOptions,
__in REGSAM samDesired, __in REGSAM samDesired,
__out PHKEY phkResult, __out PHKEY phkResult,
__in HANDLE hTransaction, __in HANDLE hTransaction,
__reserved PVOID pExtendedParemeter __reserved PVOID pExtendedParemeter
); );
WINADVAPI WINADVAPI
LSTATUS LSTATUS
APIENTRY APIENTRY
RegOpenKeyTransactedW ( RegOpenKeyTransactedW (
__in HKEY hKey, __in HKEY hKey,
__in_opt LPCWSTR lpSubKey, __in_opt LPCWSTR lpSubKey,
__in DWORD ulOptions, __in_opt DWORD ulOptions,
__in REGSAM samDesired, __in REGSAM samDesired,
__out PHKEY phkResult, __out PHKEY phkResult,
__in HANDLE hTransaction, __in HANDLE hTransaction,
__reserved PVOID pExtendedParemeter __reserved PVOID pExtendedParemeter
); );
#ifdef UNICODE #ifdef UNICODE
#define RegOpenKeyTransacted RegOpenKeyTransactedW #define RegOpenKeyTransacted RegOpenKeyTransactedW
#else #else
#define RegOpenKeyTransacted RegOpenKeyTransactedA #define RegOpenKeyTransacted RegOpenKeyTransactedA
#endif // !UNICODE #endif // !UNICODE
skipping to change at line 859 skipping to change at line 860
__in HKEY hKey, __in HKEY hKey,
__in LPCWSTR lpFile, __in LPCWSTR lpFile,
__in DWORD dwFlags __in DWORD dwFlags
); );
#ifdef UNICODE #ifdef UNICODE
#define RegRestoreKey RegRestoreKeyW #define RegRestoreKey RegRestoreKeyW
#else #else
#define RegRestoreKey RegRestoreKeyA #define RegRestoreKey RegRestoreKeyA
#endif // !UNICODE #endif // !UNICODE
#if(WINVER >= 0x0600)
WINADVAPI
LSTATUS
APIENTRY
RegRenameKey(
__in HKEY hKey,
__in_opt LPCWSTR lpSubKeyName,
__in LPCWSTR lpNewKeyName
);
#endif /* WINVER >= 0x0600 */
WINADVAPI WINADVAPI
LSTATUS LSTATUS
APIENTRY APIENTRY
RegSaveKeyA ( RegSaveKeyA (
__in HKEY hKey, __in HKEY hKey,
__in LPCSTR lpFile, __in LPCSTR lpFile,
__in_opt CONST LPSECURITY_ATTRIBUTES lpSecurityAttributes __in_opt CONST LPSECURITY_ATTRIBUTES lpSecurityAttributes
); );
WINADVAPI WINADVAPI
LSTATUS LSTATUS
skipping to change at line 1153 skipping to change at line 1167
#else #else
#define RegLoadAppKey RegLoadAppKeyA #define RegLoadAppKey RegLoadAppKeyA
#endif // !UNICODE #endif // !UNICODE
#endif // _WIN32_WINNT >= 0x0600 #endif // _WIN32_WINNT >= 0x0600
// //
// Remoteable System Shutdown APIs // Remoteable System Shutdown APIs
// //
__drv_preferredFunction("InitiateSystemShutdownEx", "Legacy API. Rearchitect to avoid Reboot")
WINADVAPI WINADVAPI
BOOL BOOL
APIENTRY APIENTRY
InitiateSystemShutdownA( InitiateSystemShutdownA(
__in_opt LPSTR lpMachineName, __in_opt LPSTR lpMachineName,
__in_opt LPSTR lpMessage, __in_opt LPSTR lpMessage,
__in DWORD dwTimeout, __in DWORD dwTimeout,
__in BOOL bForceAppsClosed, __in BOOL bForceAppsClosed,
__in BOOL bRebootAfterShutdown __in BOOL bRebootAfterShutdown
); );
__drv_preferredFunction("InitiateSystemShutdownEx", "Legacy API. Rearchitect to avoid Reboot")
WINADVAPI WINADVAPI
BOOL BOOL
APIENTRY APIENTRY
InitiateSystemShutdownW( InitiateSystemShutdownW(
__in_opt LPWSTR lpMachineName, __in_opt LPWSTR lpMachineName,
__in_opt LPWSTR lpMessage, __in_opt LPWSTR lpMessage,
__in DWORD dwTimeout, __in DWORD dwTimeout,
__in BOOL bForceAppsClosed, __in BOOL bForceAppsClosed,
__in BOOL bRebootAfterShutdown __in BOOL bRebootAfterShutdown
); );
skipping to change at line 1220 skipping to change at line 1236
#define REASON_OTHER (SHTDN_REASON_MAJOR_OTHER|SHTDN_REASON_MINOR_OTHER) #define REASON_OTHER (SHTDN_REASON_MAJOR_OTHER|SHTDN_REASON_MINOR_OTHER)
#define REASON_UNKNOWN SHTDN_REASON_UNKNOWN #define REASON_UNKNOWN SHTDN_REASON_UNKNOWN
#define REASON_LEGACY_API SHTDN_REASON_LEGACY_API #define REASON_LEGACY_API SHTDN_REASON_LEGACY_API
#define REASON_PLANNED_FLAG SHTDN_REASON_FLAG_PLANNED #define REASON_PLANNED_FLAG SHTDN_REASON_FLAG_PLANNED
// //
// MAX Shutdown TimeOut == 10 Years in seconds // MAX Shutdown TimeOut == 10 Years in seconds
// //
#define MAX_SHUTDOWN_TIMEOUT (10*365*24*60*60) #define MAX_SHUTDOWN_TIMEOUT (10*365*24*60*60)
__drv_preferredFunction("a design alternative", "Rearchitect to avoid Reboot")
__drv_when(((dwReason==0 && lpMessage==0)) || dwReason>=0xd0000000,
__drv_reportError("Requires a valid dwReason or lpMessage"))
WINADVAPI WINADVAPI
BOOL BOOL
APIENTRY APIENTRY
InitiateSystemShutdownExA( InitiateSystemShutdownExA(
__in_opt LPSTR lpMachineName, __in_opt LPSTR lpMachineName,
__in_opt LPSTR lpMessage, __in_opt LPSTR lpMessage,
__in DWORD dwTimeout, __in DWORD dwTimeout,
__in BOOL bForceAppsClosed, __in BOOL bForceAppsClosed,
__in BOOL bRebootAfterShutdown, __in BOOL bRebootAfterShutdown,
__in DWORD dwReason __in DWORD dwReason
); );
__drv_preferredFunction("a design alternative", "Rearchitect to avoid Reboot")
__drv_when(((dwReason==0 && lpMessage==0)) || dwReason>=0xd0000000,
__drv_reportError("Requires a valid dwReason or lpMessage"))
WINADVAPI WINADVAPI
BOOL BOOL
APIENTRY APIENTRY
InitiateSystemShutdownExW( InitiateSystemShutdownExW(
__in_opt LPWSTR lpMachineName, __in_opt LPWSTR lpMachineName,
__in_opt LPWSTR lpMessage, __in_opt LPWSTR lpMessage,
__in DWORD dwTimeout, __in DWORD dwTimeout,
__in BOOL bForceAppsClosed, __in BOOL bForceAppsClosed,
__in BOOL bRebootAfterShutdown, __in BOOL bRebootAfterShutdown,
__in DWORD dwReason __in DWORD dwReason
skipping to change at line 1252 skipping to change at line 1274
#ifdef UNICODE #ifdef UNICODE
#define InitiateSystemShutdownEx InitiateSystemShutdownExW #define InitiateSystemShutdownEx InitiateSystemShutdownExW
#else #else
#define InitiateSystemShutdownEx InitiateSystemShutdownExA #define InitiateSystemShutdownEx InitiateSystemShutdownExA
#endif // !UNICODE #endif // !UNICODE
// //
// Shutdown flags // Shutdown flags
// //
#define SHUTDOWN_FORCE_OTHERS 0x00000001 #define SHUTDOWN_FORCE_OTHERS 0x00000001
#define SHUTDOWN_FORCE_SELF 0x00000002 #define SHUTDOWN_FORCE_SELF 0x00000002
#define SHUTDOWN_RESTART 0x00000004 #define SHUTDOWN_RESTART 0x00000004
#define SHUTDOWN_POWEROFF 0x00000008 #define SHUTDOWN_POWEROFF 0x00000008
#define SHUTDOWN_NOREBOOT 0x00000010 #define SHUTDOWN_NOREBOOT 0x00000010
#define SHUTDOWN_GRACE_OVERRIDE 0x00000020 #define SHUTDOWN_GRACE_OVERRIDE 0x00000020
#define SHUTDOWN_INSTALL_UPDATES 0x00000040 #define SHUTDOWN_INSTALL_UPDATES 0x00000040
#define SHUTDOWN_RESTARTAPPS 0x00000080 #define SHUTDOWN_RESTARTAPPS 0x00000080
#define SHUTDOWN_SKIP_SVC_PRESHUTDOWN 0x00000100
WINADVAPI WINADVAPI
DWORD DWORD
APIENTRY APIENTRY
InitiateShutdownA( InitiateShutdownA(
__in_opt LPSTR lpMachineName, __in_opt LPSTR lpMachineName,
__in_opt LPSTR lpMessage, __in_opt LPSTR lpMessage,
__in DWORD dwGracePeriod, __in DWORD dwGracePeriod,
__in DWORD dwShutdownFlags, __in DWORD dwShutdownFlags,
__in DWORD dwReason __in DWORD dwReason
skipping to change at line 1311 skipping to change at line 1334
__in LPCWSTR lpFile, __in LPCWSTR lpFile,
__in_opt CONST LPSECURITY_ATTRIBUTES lpSecurityAttributes, __in_opt CONST LPSECURITY_ATTRIBUTES lpSecurityAttributes,
__in DWORD Flags __in DWORD Flags
); );
#ifdef UNICODE #ifdef UNICODE
#define RegSaveKeyEx RegSaveKeyExW #define RegSaveKeyEx RegSaveKeyExW
#else #else
#define RegSaveKeyEx RegSaveKeyExA #define RegSaveKeyEx RegSaveKeyExA
#endif // !UNICODE #endif // !UNICODE
WINADVAPI
LONG
APIENTRY
Wow64Win32ApiEntry (
__in DWORD dwFuncNumber,
__in DWORD dwFlag,
__in DWORD dwRes
);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif // _WINREG_ #endif // _WINREG_
 End of changes. 13 change blocks. 
22 lines changed or deleted 36 lines changed or added


 winsafer.h (6.0.6002.18005-Windows 6.0)   winsafer.h (6.1.7601.23418-Windows 7.0) 
skipping to change at line 505 skipping to change at line 505
// controls to disable transparent enforcement, and perform level // controls to disable transparent enforcement, and perform level
// enumeration operations. // enumeration operations.
// //
WINADVAPI WINADVAPI
BOOL WINAPI BOOL WINAPI
SaferGetPolicyInformation( SaferGetPolicyInformation(
__in DWORD dwScopeId, __in DWORD dwScopeId,
__in SAFER_POLICY_INFO_CLASS SaferPolicyInfoClass, __in SAFER_POLICY_INFO_CLASS SaferPolicyInfoClass,
__in DWORD InfoBufferSize, __in DWORD InfoBufferSize,
__inout_bcount(InfoBufferSize) PVOID InfoBuffer, __out_bcount(InfoBufferSize) PVOID InfoBuffer,
__inout PDWORD InfoBuffe __out PDWORD InfoBufferRetSize,
rRetSize, __reserved LPVOID lpReserved
__reserved LPVOID lpReserved
); );
WINADVAPI WINADVAPI
BOOL WINAPI BOOL WINAPI
SaferSetPolicyInformation( SaferSetPolicyInformation(
__in DWORD dwScopeId, __in DWORD dwScopeId,
__in SAFER_POLICY_INFO_CLASS SaferPolicyInfoClass, __in SAFER_POLICY_INFO_CLASS SaferPolicyInfoClass,
__in DWORD InfoBufferSize, __in DWORD InfoBufferSize,
__in_bcount(InfoBufferSize) PVOID InfoBuffer, __in_bcount(InfoBufferSize) PVOID InfoBuffer,
__reserved LPVOID lpReserved __reserved LPVOID lpReserved
); );
// //
// Functions to open or close a handle to a Safer Level. // Functions to open or close a handle to a Safer Level.
// //
WINADVAPI WINADVAPI
BOOL WINAPI BOOL WINAPI
SaferCreateLevel( SaferCreateLevel(
__in DWORD dwScopeId, __in DWORD dwScopeId,
skipping to change at line 543 skipping to change at line 543
WINADVAPI WINADVAPI
BOOL WINAPI BOOL WINAPI
SaferCloseLevel( SaferCloseLevel(
__in SAFER_LEVEL_HANDLE hLevelHandle __in SAFER_LEVEL_HANDLE hLevelHandle
); );
WINADVAPI WINADVAPI
BOOL WINAPI BOOL WINAPI
SaferIdentifyLevel( SaferIdentifyLevel(
__in DWORD dwNumProperties, __in DWORD dwNumProperties,
__in_ecount_opt(dwNumProperties) PSAFER_CODE_PROPERTIES pCodeProperties, __in_ecount_opt(dwNumProperties) PSAFER_CODE_PROPERTIES pCodeProperties,
__deref_out SAFER_LEVEL_HANDLE * pLevelHandle, __deref_out SAFER_LEVEL_HANDLE * pLevelHandle,
__reserved LPVOID lpReserved __in_opt LPVOID lpReserved
); );
WINADVAPI WINADVAPI
BOOL WINAPI BOOL WINAPI
SaferComputeTokenFromLevel( SaferComputeTokenFromLevel(
__in SAFER_LEVEL_HANDLE LevelHandle, __in SAFER_LEVEL_HANDLE LevelHandle,
__in_opt HANDLE InAccessToken, __in_opt HANDLE InAccessToken,
__out PHANDLE OutAccessToken, __out PHANDLE OutAccessToken,
__in DWORD dwFlags, __in DWORD dwFlags,
__inout_opt LPVOID lpReserved __inout_opt LPVOID lpReserved
); );
WINADVAPI WINADVAPI
BOOL WINAPI BOOL WINAPI
SaferGetLevelInformation( SaferGetLevelInformation(
__in SAFER_LEVEL_HANDLE LevelHandle, __in SAFER_LEVEL_HANDLE LevelHandle,
__in SAFER_OBJECT_INFO_CLASS dwInfoType, __in SAFER_OBJECT_INFO_CLASS dwInfoType,
__out_bcount_opt(dwInBufferSize) LPVOID lpQueryBuffer, __out_bcount_opt(dwInBufferSize) LPVOID lpQueryBuffer,
__in DWORD dwInBufferSize, __in DWORD dwInBufferSize,
__out LPDWORD lpdwOutBufferSize __out LPDWORD lpdwOutBufferSize
); );
WINADVAPI WINADVAPI
BOOL WINAPI BOOL WINAPI
SaferSetLevelInformation( SaferSetLevelInformation(
__in SAFER_LEVEL_HANDLE LevelHandle, __in SAFER_LEVEL_HANDLE LevelHandle,
__in SAFER_OBJECT_INFO_CLASS dwInfoType, __in SAFER_OBJECT_INFO_CLASS dwInfoType,
__in_bcount(dwInBufferSize) LPVOID lpQueryBuffer, __in_bcount(dwInBufferSize) LPVOID lpQueryBuffer,
__in DWORD dwInBufferSize __in DWORD dwInBufferSize
); );
// //
// This function performs logging of messages to the Application // This function performs logging of messages to the Application
// event log. This is called by the hooks within CreateProcess, // event log. This is called by the hooks within CreateProcess,
// ShellExecute and cmd when a lower trust evaluation result occurs. // ShellExecute and cmd when a lower trust evaluation result occurs.
// //
WINADVAPI WINADVAPI
BOOL WINAPI BOOL WINAPI
skipping to change at line 599 skipping to change at line 599
__reserved LPVOID lpReserved __reserved LPVOID lpReserved
); );
WINADVAPI WINADVAPI
BOOL WINAPI BOOL WINAPI
SaferiIsExecutableFileType( SaferiIsExecutableFileType(
__in LPCWSTR szFullPathname, __in LPCWSTR szFullPathname,
__in BOOLEAN bFromShellExecute __in BOOLEAN bFromShellExecute
); );
#define SRP_POLICY_EXE L"EXE"
#define SRP_POLICY_DLL L"DLL"
#define SRP_POLICY_MSI L"MSI"
#define SRP_POLICY_SCRIPT L"SCRIPT"
#define SRP_POLICY_SHELL L"SHELL"
#define SRP_POLICY_NOV2 L"IGNORESRPV2"
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 8 change blocks. 
25 lines changed or deleted 31 lines changed or added


 winsvc.h (6.0.6002.18005-Windows 6.0)   winsvc.h (6.1.7601.23418-Windows 7.0) 
skipping to change at line 104 skipping to change at line 104
#define SERVICE_CONTROL_PARAMCHANGE 0x00000006 #define SERVICE_CONTROL_PARAMCHANGE 0x00000006
#define SERVICE_CONTROL_NETBINDADD 0x00000007 #define SERVICE_CONTROL_NETBINDADD 0x00000007
#define SERVICE_CONTROL_NETBINDREMOVE 0x00000008 #define SERVICE_CONTROL_NETBINDREMOVE 0x00000008
#define SERVICE_CONTROL_NETBINDENABLE 0x00000009 #define SERVICE_CONTROL_NETBINDENABLE 0x00000009
#define SERVICE_CONTROL_NETBINDDISABLE 0x0000000A #define SERVICE_CONTROL_NETBINDDISABLE 0x0000000A
#define SERVICE_CONTROL_DEVICEEVENT 0x0000000B #define SERVICE_CONTROL_DEVICEEVENT 0x0000000B
#define SERVICE_CONTROL_HARDWAREPROFILECHANGE 0x0000000C #define SERVICE_CONTROL_HARDWAREPROFILECHANGE 0x0000000C
#define SERVICE_CONTROL_POWEREVENT 0x0000000D #define SERVICE_CONTROL_POWEREVENT 0x0000000D
#define SERVICE_CONTROL_SESSIONCHANGE 0x0000000E #define SERVICE_CONTROL_SESSIONCHANGE 0x0000000E
#define SERVICE_CONTROL_PRESHUTDOWN 0x0000000F #define SERVICE_CONTROL_PRESHUTDOWN 0x0000000F
#define SERVICE_CONTROL_TIMECHANGE 0x00000010
#define SERVICE_CONTROL_TRIGGEREVENT 0x00000020
// //
// Service State -- for CurrentState // Service State -- for CurrentState
// //
#define SERVICE_STOPPED 0x00000001 #define SERVICE_STOPPED 0x00000001
#define SERVICE_START_PENDING 0x00000002 #define SERVICE_START_PENDING 0x00000002
#define SERVICE_STOP_PENDING 0x00000003 #define SERVICE_STOP_PENDING 0x00000003
#define SERVICE_RUNNING 0x00000004 #define SERVICE_RUNNING 0x00000004
#define SERVICE_CONTINUE_PENDING 0x00000005 #define SERVICE_CONTINUE_PENDING 0x00000005
#define SERVICE_PAUSE_PENDING 0x00000006 #define SERVICE_PAUSE_PENDING 0x00000006
skipping to change at line 128 skipping to change at line 130
// //
#define SERVICE_ACCEPT_STOP 0x00000001 #define SERVICE_ACCEPT_STOP 0x00000001
#define SERVICE_ACCEPT_PAUSE_CONTINUE 0x00000002 #define SERVICE_ACCEPT_PAUSE_CONTINUE 0x00000002
#define SERVICE_ACCEPT_SHUTDOWN 0x00000004 #define SERVICE_ACCEPT_SHUTDOWN 0x00000004
#define SERVICE_ACCEPT_PARAMCHANGE 0x00000008 #define SERVICE_ACCEPT_PARAMCHANGE 0x00000008
#define SERVICE_ACCEPT_NETBINDCHANGE 0x00000010 #define SERVICE_ACCEPT_NETBINDCHANGE 0x00000010
#define SERVICE_ACCEPT_HARDWAREPROFILECHANGE 0x00000020 #define SERVICE_ACCEPT_HARDWAREPROFILECHANGE 0x00000020
#define SERVICE_ACCEPT_POWEREVENT 0x00000040 #define SERVICE_ACCEPT_POWEREVENT 0x00000040
#define SERVICE_ACCEPT_SESSIONCHANGE 0x00000080 #define SERVICE_ACCEPT_SESSIONCHANGE 0x00000080
#define SERVICE_ACCEPT_PRESHUTDOWN 0x00000100 #define SERVICE_ACCEPT_PRESHUTDOWN 0x00000100
#define SERVICE_ACCEPT_TIMECHANGE 0x00000200
#define SERVICE_ACCEPT_TRIGGEREVENT 0x00000400
// //
// Service Control Manager object specific access types // Service Control Manager object specific access types
// //
#define SC_MANAGER_CONNECT 0x0001 #define SC_MANAGER_CONNECT 0x0001
#define SC_MANAGER_CREATE_SERVICE 0x0002 #define SC_MANAGER_CREATE_SERVICE 0x0002
#define SC_MANAGER_ENUMERATE_SERVICE 0x0004 #define SC_MANAGER_ENUMERATE_SERVICE 0x0004
#define SC_MANAGER_LOCK 0x0008 #define SC_MANAGER_LOCK 0x0008
#define SC_MANAGER_QUERY_LOCK_STATUS 0x0010 #define SC_MANAGER_QUERY_LOCK_STATUS 0x0010
#define SC_MANAGER_MODIFY_BOOT_CONFIG 0x0020 #define SC_MANAGER_MODIFY_BOOT_CONFIG 0x0020
skipping to change at line 186 skipping to change at line 190
// //
// Info levels for ChangeServiceConfig2 and QueryServiceConfig2 // Info levels for ChangeServiceConfig2 and QueryServiceConfig2
// //
#define SERVICE_CONFIG_DESCRIPTION 1 #define SERVICE_CONFIG_DESCRIPTION 1
#define SERVICE_CONFIG_FAILURE_ACTIONS 2 #define SERVICE_CONFIG_FAILURE_ACTIONS 2
#define SERVICE_CONFIG_DELAYED_AUTO_START_INFO 3 #define SERVICE_CONFIG_DELAYED_AUTO_START_INFO 3
#define SERVICE_CONFIG_FAILURE_ACTIONS_FLAG 4 #define SERVICE_CONFIG_FAILURE_ACTIONS_FLAG 4
#define SERVICE_CONFIG_SERVICE_SID_INFO 5 #define SERVICE_CONFIG_SERVICE_SID_INFO 5
#define SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO 6 #define SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO 6
#define SERVICE_CONFIG_PRESHUTDOWN_INFO 7 #define SERVICE_CONFIG_PRESHUTDOWN_INFO 7
#define SERVICE_CONFIG_TRIGGER_INFO 8
#define SERVICE_CONFIG_PREFERRED_NODE 9
// //
// Info levels for NotifyServiceStatusChange // Info levels for NotifyServiceStatusChange
// //
#define SERVICE_NOTIFY_STATUS_CHANGE_1 1 #define SERVICE_NOTIFY_STATUS_CHANGE_1 1
#define SERVICE_NOTIFY_STATUS_CHANGE_2 2 #define SERVICE_NOTIFY_STATUS_CHANGE_2 2
#define SERVICE_NOTIFY_STATUS_CHANGE SERVICE_NOTIFY_STATUS_CHANGE_2 #define SERVICE_NOTIFY_STATUS_CHANGE SERVICE_NOTIFY_STATUS_CHANGE_2
// //
skipping to change at line 283 skipping to change at line 289
#define SERVICE_CONTROL_STATUS_REASON_INFO 1 #define SERVICE_CONTROL_STATUS_REASON_INFO 1
// //
// Service SID types supported // Service SID types supported
// //
#define SERVICE_SID_TYPE_NONE 0x00000000 #define SERVICE_SID_TYPE_NONE 0x00000000
#define SERVICE_SID_TYPE_UNRESTRICTED 0x00000001 #define SERVICE_SID_TYPE_UNRESTRICTED 0x00000001
#define SERVICE_SID_TYPE_RESTRICTED ( 0x00000002 | S ERVICE_SID_TYPE_UNRESTRICTED ) #define SERVICE_SID_TYPE_RESTRICTED ( 0x00000002 | S ERVICE_SID_TYPE_UNRESTRICTED )
// //
// Service trigger types
//
#define SERVICE_TRIGGER_TYPE_DEVICE_INTERFACE_ARRIVAL 1
#define SERVICE_TRIGGER_TYPE_IP_ADDRESS_AVAILABILITY 2
#define SERVICE_TRIGGER_TYPE_DOMAIN_JOIN 3
#define SERVICE_TRIGGER_TYPE_FIREWALL_PORT_EVENT 4
#define SERVICE_TRIGGER_TYPE_GROUP_POLICY 5
#define SERVICE_TRIGGER_TYPE_CUSTOM 20
//
// Service trigger data types
//
#define SERVICE_TRIGGER_DATA_TYPE_BINARY 1
#define SERVICE_TRIGGER_DATA_TYPE_STRING 2
//
// NETWORK_MANAGER_FIRST_IP_ADDRESS_ARRIVAL_GUID & NETWORK_MANAGER_LAST_IP_ADDR
ESS_REMOVAL_GUID are used with
// SERVICE_TRIGGER_TYPE_IP_ADDRESS_AVAILABILITY trigger.
//
DEFINE_GUID ( /* 4f27f2de-14e2-430b-a549-7cd48cbc8245 */
NETWORK_MANAGER_FIRST_IP_ADDRESS_ARRIVAL_GUID,
0x4f27f2de,
0x14e2,
0x430b,
0xa5, 0x49, 0x7c, 0xd4, 0x8c, 0xbc, 0x82, 0x45
);
DEFINE_GUID ( /* cc4ba62a-162e-4648-847a-b6bdf993e335 */
NETWORK_MANAGER_LAST_IP_ADDRESS_REMOVAL_GUID,
0xcc4ba62a,
0x162e,
0x4648,
0x84, 0x7a, 0xb6, 0xbd, 0xf9, 0x93, 0xe3, 0x35
);
//
// DOMAIN_JOIN_GUID & DOMAIN_LEAVE_GUID are used with SERVICE_TRIGGER_TYPE_DOMA
IN_JOIN trigger.
//
DEFINE_GUID ( /* 1ce20aba-9851-4421-9430-1ddeb766e809 */
DOMAIN_JOIN_GUID,
0x1ce20aba,
0x9851,
0x4421,
0x94, 0x30, 0x1d, 0xde, 0xb7, 0x66, 0xe8, 0x09
);
DEFINE_GUID ( /* ddaf516e-58c2-4866-9574-c3b615d42ea1 */
DOMAIN_LEAVE_GUID,
0xddaf516e,
0x58c2,
0x4866,
0x95, 0x74, 0xc3, 0xb6, 0x15, 0xd4, 0x2e, 0xa1
);
//
// FIREWALL_PORT_OPEN_GUID & FIREWALL_PORT_CLOSE_GUID are used with
// SERVICE_TRIGGER_TYPE_FIREWALL_PORT_EVENT trigger.
//
DEFINE_GUID ( /* b7569e07-8421-4ee0-ad10-86915afdad09 */
FIREWALL_PORT_OPEN_GUID,
0xb7569e07,
0x8421,
0x4ee0,
0xad, 0x10, 0x86, 0x91, 0x5a, 0xfd, 0xad, 0x09
);
DEFINE_GUID ( /* a144ed38-8e12-4de4-9d96-e64740b1a524 */
FIREWALL_PORT_CLOSE_GUID,
0xa144ed38,
0x8e12,
0x4de4,
0x9d, 0x96, 0xe6, 0x47, 0x40, 0xb1, 0xa5, 0x24
);
//
// MACHINE_POLICY_PRESENT_GUID & USER_POLICY_PRESENT_GUID are used with
// SERVICE_TRIGGER_TYPE_GROUP_POLICY trigger.
//
DEFINE_GUID ( /* 659FCAE6-5BDB-4DA9-B1FF-CA2A178D46E0 */
MACHINE_POLICY_PRESENT_GUID,
0x659FCAE6,
0x5BDB,
0x4DA9,
0xB1, 0xFF, 0xCA, 0x2A, 0x17, 0x8D, 0x46, 0xE0
);
DEFINE_GUID ( /* 54FB46C8-F089-464C-B1FD-59D1B62C3B50 */
USER_POLICY_PRESENT_GUID,
0x54FB46C8,
0xF089,
0x464C,
0xB1, 0xFD, 0x59, 0xD1, 0xB6, 0x2C, 0x3B, 0x50
);
//
// Service trigger actions
//
#define SERVICE_TRIGGER_ACTION_SERVICE_START 1
#define SERVICE_TRIGGER_ACTION_SERVICE_STOP 2
//
// argv[1] passed into ServiceMain of trigger started services
//
#define SERVICE_TRIGGER_STARTED_ARGUMENT L"TriggerStarted"
//
// Service description string // Service description string
// //
typedef struct _SERVICE_DESCRIPTIONA { typedef struct _SERVICE_DESCRIPTIONA {
LPSTR lpDescription; LPSTR lpDescription;
} SERVICE_DESCRIPTIONA, *LPSERVICE_DESCRIPTIONA; } SERVICE_DESCRIPTIONA, *LPSERVICE_DESCRIPTIONA;
// //
// Service description string // Service description string
// //
typedef struct _SERVICE_DESCRIPTIONW { typedef struct _SERVICE_DESCRIPTIONW {
LPWSTR lpDescription; LPWSTR lpDescription;
skipping to change at line 362 skipping to change at line 474
// Service delayed autostart info setting // Service delayed autostart info setting
// //
typedef struct _SERVICE_DELAYED_AUTO_START_INFO { typedef struct _SERVICE_DELAYED_AUTO_START_INFO {
BOOL fDelayedAutostart; // Delayed autostart flag BOOL fDelayedAutostart; // Delayed autostart flag
} SERVICE_DELAYED_AUTO_START_INFO, *LPSERVICE_DELAYED_AUTO_START_INFO; } SERVICE_DELAYED_AUTO_START_INFO, *LPSERVICE_DELAYED_AUTO_START_INFO;
// //
// Service failure actions flag setting // Service failure actions flag setting
// //
typedef struct _SERVICE_FAILURE_ACTIONS_FLAG { typedef struct _SERVICE_FAILURE_ACTIONS_FLAG {
BOOL fFailureActionsOnNonCrashFailures; // Failure actions flag BOOL fFailureActionsOnNonCrashFailures; // Failure actions flag
} SERVICE_FAILURE_ACTIONS_FLAG, *LPSERVICE_FAILURE_ACTIONS_FLAG; } SERVICE_FAILURE_ACTIONS_FLAG, *LPSERVICE_FAILURE_ACTIONS_FLAG;
// //
// Service SID info setting // Service SID info setting
// //
typedef struct _SERVICE_SID_INFO { typedef struct _SERVICE_SID_INFO {
DWORD dwServiceSidType; // Service SID type DWORD dwServiceSidType; // Service SID type
} SERVICE_SID_INFO, *LPSERVICE_SID_INFO; } SERVICE_SID_INFO, *LPSERVICE_SID_INFO;
// //
skipping to change at line 400 skipping to change at line 512
#endif // UNICODE #endif // UNICODE
// //
// Service preshutdown timeout setting // Service preshutdown timeout setting
// //
typedef struct _SERVICE_PRESHUTDOWN_INFO { typedef struct _SERVICE_PRESHUTDOWN_INFO {
DWORD dwPreshutdownTimeout; // Timeout in msecs DWORD dwPreshutdownTimeout; // Timeout in msecs
} SERVICE_PRESHUTDOWN_INFO, *LPSERVICE_PRESHUTDOWN_INFO; } SERVICE_PRESHUTDOWN_INFO, *LPSERVICE_PRESHUTDOWN_INFO;
// //
// Service trigger data item
//
typedef struct _SERVICE_TRIGGER_SPECIFIC_DATA_ITEM
{
DWORD dwDataType; // Data type -- one of SERVICE_TRIGGER_DATA_TYPE_* const
ants
#ifdef __midl
[range(0, 1024)]
#endif
DWORD cbData; // Size of trigger specific data
#ifdef __midl
[size_is(cbData)]
#endif
PBYTE pData; // Trigger specific data
} SERVICE_TRIGGER_SPECIFIC_DATA_ITEM, *PSERVICE_TRIGGER_SPECIFIC_DATA_ITEM;
//
// Trigger-specific information
//
typedef struct _SERVICE_TRIGGER
{
DWORD dwTriggerType; // One of SERVICE_TR
IGGER_TYPE_* constants
DWORD dwAction; // One of SERVICE_TR
IGGER_ACTION_* constants
GUID * pTriggerSubtype; // Provider GUID if
the trigger type is SERVICE_TRIGGER_TYPE_CUSTOM
// Device class inte
rface GUID if the trigger type is
// SERVICE_TRIGGER_T
YPE_DEVICE_INTERFACE_ARRIVAL
#ifdef __midl
[range(0, 64)]
#endif
DWORD cDataItems; // Number of data it
ems in pDataItems array
#ifdef __midl
[size_is(cDataItems)]
#endif
PSERVICE_TRIGGER_SPECIFIC_DATA_ITEM pDataItems; // Trigger specific d
ata
} SERVICE_TRIGGER, *PSERVICE_TRIGGER;
//
// Service trigger information
//
typedef struct _SERVICE_TRIGGER_INFO {
#ifdef __midl
[range(0, 64)]
#endif
DWORD cTriggers; // Number of triggers in the pTriggers a
rray
#ifdef __midl
[size_is(cTriggers)]
#endif
PSERVICE_TRIGGER pTriggers; // Array of triggers
PBYTE pReserved; // Reserved, must be NULL
} SERVICE_TRIGGER_INFO, *PSERVICE_TRIGGER_INFO;
//
// Preferred node information
//
typedef struct _SERVICE_PREFERRED_NODE_INFO {
USHORT usPreferredNode; // Preferred node
BOOLEAN fDelete; // Delete the preferred node set
ting
} SERVICE_PREFERRED_NODE_INFO, *LPSERVICE_PREFERRED_NODE_INFO;
//
// Time change information
//
typedef struct _SERVICE_TIMECHANGE_INFO {
LARGE_INTEGER liNewTime; // New time
LARGE_INTEGER liOldTime; // Old time
} SERVICE_TIMECHANGE_INFO, *PSERVICE_TIMECHANGE_INFO;
//
// Handle Types // Handle Types
// //
DECLARE_HANDLE(SC_HANDLE); DECLARE_HANDLE(SC_HANDLE);
typedef SC_HANDLE *LPSC_HANDLE; typedef SC_HANDLE *LPSC_HANDLE;
DECLARE_HANDLE(SERVICE_STATUS_HANDLE); DECLARE_HANDLE(SERVICE_STATUS_HANDLE);
// //
// Info levels for QueryServiceStatusEx // Info levels for QueryServiceStatusEx
skipping to change at line 608 skipping to change at line 787
LPVOID lpEventData, LPVOID lpEventData,
LPVOID lpContext LPVOID lpContext
); );
// //
// Service notification parameters // Service notification parameters
// //
typedef typedef
VOID VOID
( CALLBACK * PFN_SC_NOTIFY_CALLBACK ) ( ( CALLBACK * PFN_SC_NOTIFY_CALLBACK ) (
IN PVOID pParameter __in PVOID pParameter
); );
// //
// Each new notify structure is a superset of the older version // Each new notify structure is a superset of the older version
// //
typedef struct _SERVICE_NOTIFY_1 { typedef struct _SERVICE_NOTIFY_1 {
DWORD dwVersion; DWORD dwVersion;
PFN_SC_NOTIFY_CALLBACK pfnNotifyCallback; PFN_SC_NOTIFY_CALLBACK pfnNotifyCallback;
PVOID pContext; PVOID pContext;
DWORD dwNotificationStatus; DWORD dwNotificationStatus;
skipping to change at line 1276 skipping to change at line 1455
#define StartService StartServiceA #define StartService StartServiceA
#endif // !UNICODE #endif // !UNICODE
WINADVAPI WINADVAPI
BOOL BOOL
WINAPI WINAPI
UnlockServiceDatabase( UnlockServiceDatabase(
__in SC_LOCK ScLock __in SC_LOCK ScLock
); );
#if (NTDDI_VERSION >= NTDDI_VISTA)
WINADVAPI WINADVAPI
DWORD DWORD
WINAPI WINAPI
NotifyServiceStatusChangeA ( NotifyServiceStatusChangeA (
__in SC_HANDLE hService, __in SC_HANDLE hService,
__in DWORD dwNotifyMask, __in DWORD dwNotifyMask,
__in PSERVICE_NOTIFYA pNotifyBuffer __in PSERVICE_NOTIFYA pNotifyBuffer
); );
WINADVAPI WINADVAPI
DWORD DWORD
skipping to change at line 1322 skipping to change at line 1503
__in DWORD dwControl, __in DWORD dwControl,
__in DWORD dwInfoLevel, __in DWORD dwInfoLevel,
__inout PVOID pControlParams __inout PVOID pControlParams
); );
#ifdef UNICODE #ifdef UNICODE
#define ControlServiceEx ControlServiceExW #define ControlServiceEx ControlServiceExW
#else #else
#define ControlServiceEx ControlServiceExA #define ControlServiceEx ControlServiceExA
#endif // !UNICODE #endif // !UNICODE
#endif // NTDDI_VERSION >= NTDDI_VISTA
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif // _WINSVC_ #endif // _WINSVC_
 End of changes. 9 change blocks. 
2 lines changed or deleted 197 lines changed or added

This html diff was produced by rfcdiff 1.41.