Add the entirety of the Windows 7 SDK "include" section

This commit is contained in:
TheTank20 2023-08-05 17:57:57 -05:00
parent 2e0fad82db
commit 0e30eddc87
1889 changed files with 2535775 additions and 1 deletions

View File

@ -15,7 +15,10 @@ jobs:
uses: thepwrtank18/install-vs-components@v1.0.0 uses: thepwrtank18/install-vs-components@v1.0.0
with: with:
components: Microsoft.VisualStudio.Component.WinXP components: Microsoft.VisualStudio.Component.WinXP
- name: Fix Windows SDK
run: Remove-Item "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include" -Force -Recurse; Move-Item "D:\xpmgr\xpmgr\BuildTools\Include" "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include"
- name: Checkout Source Tree - name: Checkout Source Tree
uses: actions/checkout@v3 uses: actions/checkout@v3

147
BuildTools/Include/ADSIid.h Normal file
View File

@ -0,0 +1,147 @@
//+---------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1996-1999
//
// File: oledsiid.h
//
// Contents: extern references for ADs guids
//
//----------------------------------------------------------------------------
#ifndef __ADSIID_H__
#define __ADSIID_H__
#if _MSC_VER > 1000
#pragma once
#endif
#ifdef __cplusplus
extern "C" {
#endif
// uuids from oledsiid.lib
extern const GUID LIBID_ADs;
extern const GUID IID_IADs;
extern const GUID IID_IADsContainer;
extern const GUID IID_IADsNamespaces;
extern const GUID IID_IADsDomain;
extern const GUID IID_IADsUser;
extern const GUID IID_IADsComputerOperations;
extern const GUID IID_IADsComputer;
extern const GUID IID_IADsGroup;
extern const GUID IID_IADsMembers;
extern const GUID IID_IADsPrintQueue;
extern const GUID IID_IADsPrintQueueOperations;
extern const GUID IID_IADsPrintJobOperations;
extern const GUID IID_IADsPrintJob;
extern const GUID IID_IADsCollection;
extern const GUID IID_IADsServiceOperations;
extern const GUID IID_IADsService;
extern const GUID IID_IADsFileServiceOperations;
extern const GUID IID_IADsFileService;
extern const GUID IID_IADsResource;
extern const GUID IID_IADsSession;
extern const GUID IID_IADsFileShare;
extern const GUID IID_IADsSchema;
extern const GUID IID_IADsClass;
extern const GUID IID_IADsProperty;
extern const GUID IID_IADsSyntax;
extern const GUID IID_IADsLocality;
extern const GUID IID_IADsO;
extern const GUID IID_IADsOU;
extern const GUID IID_IADsOpenDSObject;
extern const GUID IID_IADsSearch;
extern const GUID IID_IADsPropertyList;
extern const GUID IID_IDSObject;
extern const GUID IID_IDSSearch;
extern const GUID IID_IDSAttrMgmt;
extern const GUID IID_IDirectorySearch;
extern const GUID IID_IDirectoryObject;
extern const GUID IID_IDirectoryAttrMgmt;
//
// Connection object GUIDs.
//
extern const GUID CLSID_LDAPConnectionObject;
//
// CLSID for owning LDAP objects interfaces
//
extern const GUID CLSID_LDAPObject;
//
// Query object for the LDAP Provider.
//
extern const GUID CLSID_UmiLDAPQueryObject;
extern const GUID CLSID_WinNTConnectionObject;
// Custom interface handling
extern const GUID CLSID_WinNTObject;
//
// OLE DB Provider Guids
//
extern const GUID CLSID_ADsDSOObject;
extern const GUID DBGUID_LDAPDialect;
extern const GUID DBPROPSET_ADSISEARCH;
extern const GUID DBPROPSET_ADSIBIND;
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,220 @@
//
// Winsock1.1, IrDA1.1, WindowsNT5.0, Windows98 and WindowsCE1.0.
// Define one of _WIN32_WINNT, _WIN32_WINDOWS, _WIN32_WCE.
// Copyright (C) Microsoft Corporation, 1994-1999.
//
#ifndef __AFIRDA__
#define __AFIRDA__
#if _MSC_VER > 1000
#pragma once
#endif
#if (NTDDI_VERSION >= NTDDI_WIN2K)
#ifndef _WINSOCKAPI_
typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;
#endif
#define WINDOWS_AF_IRDA 26
#define WINDOWS_PF_IRDA WINDOWS_AF_IRDA
#define WCE_AF_IRDA 22
#define WCE_PF_IRDA WCE_AF_IRDA
#ifndef AF_IRDA
#define AF_IRDA WINDOWS_AF_IRDA
#endif
#define IRDA_PROTO_SOCK_STREAM 1
#define PF_IRDA AF_IRDA
// WINNT, WIN98, WINCE
#define SOL_IRLMP 0x00FF
#define IRLMP_ENUMDEVICES 0x00000010
#define IRLMP_IAS_SET 0x00000011
#define IRLMP_IAS_QUERY 0x00000012
// WINNT, WINCE
#define IRLMP_SEND_PDU_LEN 0x00000013
#define IRLMP_EXCLUSIVE_MODE 0x00000014
#define IRLMP_IRLPT_MODE 0x00000015
#define IRLMP_9WIRE_MODE 0x00000016
// WIN98
#define IRLMP_TINYTP_MODE 0x00000017
#define IRLMP_PARAMETERS 0x00000018
#define IRLMP_DISCOVERY_MODE 0x00000019
// WINCE
#define IRLMP_SHARP_MODE 0x00000020
#define SIO_LAZY_DISCOVERY _IOR('t', 127, u_long)
#define IAS_ATTRIB_NO_CLASS 0x00000010
#define IAS_ATTRIB_NO_ATTRIB 0x00000000
#define IAS_ATTRIB_INT 0x00000001
#define IAS_ATTRIB_OCTETSEQ 0x00000002
#define IAS_ATTRIB_STR 0x00000003
#define IAS_MAX_USER_STRING 256
#define IAS_MAX_OCTET_STRING 1024
#define IAS_MAX_CLASSNAME 64
#define IAS_MAX_ATTRIBNAME 256
// WINNT, WIN98
enum
{
LM_HB_Extension = 128, // Any hint byte
LM_HB1_PnP = 1, // First hint byte
LM_HB1_PDA_Palmtop = 2,
LM_HB1_Computer = 4,
LM_HB1_Printer = 8,
LM_HB1_Modem = 16,
LM_HB1_Fax = 32,
LM_HB1_LANAccess = 64,
LM_HB2_Telephony = 1, // Second hint byte
LM_HB2_FileServer = 2,
};
#define LmCharSetASCII 0
#define LmCharSetISO_8859_1 1
#define LmCharSetISO_8859_2 2
#define LmCharSetISO_8859_3 3
#define LmCharSetISO_8859_4 4
#define LmCharSetISO_8859_5 5
#define LmCharSetISO_8859_6 6
#define LmCharSetISO_8859_7 7
#define LmCharSetISO_8859_8 8
#define LmCharSetISO_8859_9 9
#define LmCharSetUNICODE 0xff
// WIN98
typedef u_long LM_BAUD_RATE;
#define LM_BAUD_1200 1200
#define LM_BAUD_2400 2400
#define LM_BAUD_9600 9600
#define LM_BAUD_19200 19200
#define LM_BAUD_38400 38400
#define LM_BAUD_57600 57600
#define LM_BAUD_115200 115200
#define LM_BAUD_576K 576000
#define LM_BAUD_1152K 1152000
#define LM_BAUD_4M 4000000
#define LM_BAUD_16M 16000000
typedef struct
{
u_long nTXDataBytes; // Max tx data bytes per packet
u_long nRXDataBytes; // Max rx data bytes per packet
LM_BAUD_RATE nBaudRate; // Negotiated baud rate
u_long thresholdTime; // Threshold (ms)
u_long discTime; // Disconnect (ms)
u_short nMSLinkTurn; // Link turn around (ms)
u_char nTXPackets; // Number packets in transmit window
u_char nRXPackets; // Number packets in receive window
} LM_IRPARMS,*PLM_IRPARMS;
typedef struct _SOCKADDR_IRDA
{
u_short irdaAddressFamily;
u_char irdaDeviceID[4];
char irdaServiceName[25];
} SOCKADDR_IRDA, *PSOCKADDR_IRDA, FAR *LPSOCKADDR_IRDA;
typedef struct _WINDOWS_IRDA_DEVICE_INFO
{
u_char irdaDeviceID[4];
char irdaDeviceName[22];
u_char irdaDeviceHints1;
u_char irdaDeviceHints2;
u_char irdaCharSet;
} WINDOWS_IRDA_DEVICE_INFO, *PWINDOWS_IRDA_DEVICE_INFO, FAR *LPWINDOWS_IRDA_DEVICE_INFO;
typedef struct _WCE_IRDA_DEVICE_INFO
{
u_char irdaDeviceID[4];
char irdaDeviceName[22];
u_char Reserved[2];
} WCE_IRDA_DEVICE_INFO, *PWCE_IRDA_DEVICE_INFO;
typedef WINDOWS_IRDA_DEVICE_INFO IRDA_DEVICE_INFO, *PIRDA_DEVICE_INFO, FAR *LPIRDA_DEVICE_INFO;
typedef struct _WINDOWS_DEVICELIST
{
ULONG numDevice;
WINDOWS_IRDA_DEVICE_INFO Device[1];
} WINDOWS_DEVICELIST, *PWINDOWS_DEVICELIST, FAR *LPWINDOWS_DEVICELIST;
typedef struct _WCE_DEVICELIST
{
ULONG numDevice;
WCE_IRDA_DEVICE_INFO Device[1];
} WCE_DEVICELIST, *PWCE_DEVICELIST;
typedef WINDOWS_DEVICELIST DEVICELIST, *PDEVICELIST, FAR *LPDEVICELIST;
typedef struct _WINDOWS_IAS_SET
{
char irdaClassName[IAS_MAX_CLASSNAME];
char irdaAttribName[IAS_MAX_ATTRIBNAME];
u_long irdaAttribType;
union
{
LONG irdaAttribInt;
struct
{
u_short Len;
u_char OctetSeq[IAS_MAX_OCTET_STRING];
} irdaAttribOctetSeq;
struct
{
u_char Len;
u_char CharSet;
u_char UsrStr[IAS_MAX_USER_STRING];
} irdaAttribUsrStr;
} irdaAttribute;
} WINDOWS_IAS_SET, *PWINDOWS_IAS_SET, FAR *LPWINDOWS_IAS_SET;
typedef struct _WINDOWS_IAS_QUERY
{
u_char irdaDeviceID[4];
char irdaClassName[IAS_MAX_CLASSNAME];
char irdaAttribName[IAS_MAX_ATTRIBNAME];
u_long irdaAttribType;
union
{
LONG irdaAttribInt;
struct
{
u_long Len;
u_char OctetSeq[IAS_MAX_OCTET_STRING];
} irdaAttribOctetSeq;
struct
{
u_long Len;
u_long CharSet;
u_char UsrStr[IAS_MAX_USER_STRING];
} irdaAttribUsrStr;
} irdaAttribute;
} WINDOWS_IAS_QUERY, *PWINDOWS_IAS_QUERY, FAR *LPWINDOWS_IAS_QUERY;
typedef WINDOWS_IAS_SET IAS_SET, *PIAS_SET, FAR *LPIASSET;
typedef WINDOWS_IAS_QUERY IAS_QUERY, *PIAS_QUERY, FAR *LPIASQUERY;
#endif //ntddi version
#endif // __AFIRDA__

View File

@ -0,0 +1,802 @@
/*+-------------------------------------------------------------------
Microsoft Windows
Copyright (C) Microsoft Corporation, 1993-1998.
File: accctrl.h
Contents: common includes for new style Win32 Access Control
APIs
--------------------------------------------------------------------*/
#ifndef __ACCESS_CONTROL__
#define __ACCESS_CONTROL__
#ifndef __midl
#include <wtypes.h>
#endif
#if (_MSC_VER >= 800)
#if (_MSC_VER >= 1200)
#pragma warning(push)
#endif
#pragma warning(disable:4001) /* nonstandard extension : single line comment */
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define AccFree LocalFree
//
// Definition:
// This enumerated type defines the objects supported by the get/set API within
// this document. See section 3.1, Object Types for a detailed definition of the
// supported object types, and their name formats.
//
typedef enum _SE_OBJECT_TYPE
{
SE_UNKNOWN_OBJECT_TYPE = 0,
SE_FILE_OBJECT,
SE_SERVICE,
SE_PRINTER,
SE_REGISTRY_KEY,
SE_LMSHARE,
SE_KERNEL_OBJECT,
SE_WINDOW_OBJECT,
SE_DS_OBJECT,
SE_DS_OBJECT_ALL,
SE_PROVIDER_DEFINED_OBJECT,
SE_WMIGUID_OBJECT,
SE_REGISTRY_WOW64_32KEY,
} SE_OBJECT_TYPE;
//
// Definition: TRUSTEE_TYPE
// This enumerated type specifies the type of trustee account for the trustee
// returned by the API described in this document.
// TRUSTEE_IS_UNKNOWN - The trustee is an unknown, but not necessarily invalid
// type. This field is not validated on input to the APIs
// that take Trustees.
// TRUSTEE_IS_USER The trustee account is a user account.
// TRUSTEE_IS_GROUP The trustee account is a group account.
//
typedef enum _TRUSTEE_TYPE
{
TRUSTEE_IS_UNKNOWN,
TRUSTEE_IS_USER,
TRUSTEE_IS_GROUP,
TRUSTEE_IS_DOMAIN,
TRUSTEE_IS_ALIAS,
TRUSTEE_IS_WELL_KNOWN_GROUP,
TRUSTEE_IS_DELETED,
TRUSTEE_IS_INVALID,
TRUSTEE_IS_COMPUTER
} TRUSTEE_TYPE;
//
// Definition: TRUSTEE_FORM
// This enumerated type specifies the form the trustee identifier is in for a
// particular trustee.
// TRUSTEE_IS_SID The trustee is identified with a SID rather than with a name.
// TRUSTEE_IS_NAME The trustee is identified with a name.
//
typedef enum _TRUSTEE_FORM
{
TRUSTEE_IS_SID,
TRUSTEE_IS_NAME,
TRUSTEE_BAD_FORM,
TRUSTEE_IS_OBJECTS_AND_SID,
TRUSTEE_IS_OBJECTS_AND_NAME
} TRUSTEE_FORM;
//
// Definition: MULTIPLE_TRUSTEE_OPERATION
// If the trustee is a multiple trustee, this enumerated type specifies the type.
// TRUSTEE_IS_IMPERSONATE The trustee is an impersonate trustee and the multiple
// trustee field in the trustee points to another trustee
// that is a trustee for the server that will be doing the
// impersonation.
//
typedef enum _MULTIPLE_TRUSTEE_OPERATION
{
NO_MULTIPLE_TRUSTEE,
TRUSTEE_IS_IMPERSONATE,
} MULTIPLE_TRUSTEE_OPERATION;
typedef struct _OBJECTS_AND_SID
{
DWORD ObjectsPresent;
GUID ObjectTypeGuid;
GUID InheritedObjectTypeGuid;
SID * pSid;
} OBJECTS_AND_SID, *POBJECTS_AND_SID;
typedef struct _OBJECTS_AND_NAME_A
{
DWORD ObjectsPresent;
SE_OBJECT_TYPE ObjectType;
LPSTR ObjectTypeName;
LPSTR InheritedObjectTypeName;
LPSTR ptstrName;
} OBJECTS_AND_NAME_A, *POBJECTS_AND_NAME_A;
typedef struct _OBJECTS_AND_NAME_W
{
DWORD ObjectsPresent;
SE_OBJECT_TYPE ObjectType;
LPWSTR ObjectTypeName;
LPWSTR InheritedObjectTypeName;
LPWSTR ptstrName;
} OBJECTS_AND_NAME_W, *POBJECTS_AND_NAME_W;
#ifdef UNICODE
typedef OBJECTS_AND_NAME_W OBJECTS_AND_NAME_;
typedef POBJECTS_AND_NAME_W POBJECTS_AND_NAME_;
#else
typedef OBJECTS_AND_NAME_A OBJECTS_AND_NAME_;
typedef POBJECTS_AND_NAME_A POBJECTS_AND_NAME_;
#endif // UNICODE
//
// Definition: TRUSTEE
// This structure is used to pass account information into and out of the system
// using the API defined in this document.
// PMultipleTrustee - if NON-NULL, points to another trustee structure, as
// defined by the multiple trustee operation field.
// MultipleTrusteeOperation - Defines the multiple trustee operation/type.
// TrusteeForm - defines if the trustee is defined by name or SID.
// TrusteeType - defines if the trustee type is unknown, a user or a group.
// PwcsName - points to the trustee name or the trustee SID.
//
typedef struct _TRUSTEE_A
{
struct _TRUSTEE_A *pMultipleTrustee;
MULTIPLE_TRUSTEE_OPERATION MultipleTrusteeOperation;
TRUSTEE_FORM TrusteeForm;
TRUSTEE_TYPE TrusteeType;
#ifdef __midl
[switch_is(TrusteeForm)]
union
{
[case(TRUSTEE_IS_NAME)]
LPSTR ptstrName;
[case(TRUSTEE_IS_SID)]
SID *pSid;
[case(TRUSTEE_IS_OBJECTS_AND_SID)]
OBJECTS_AND_SID *pObjectsAndSid;
[case(TRUSTEE_IS_OBJECTS_AND_NAME)]
OBJECTS_AND_NAME_A *pObjectsAndName;
};
#else
LPSTR ptstrName;
#endif
} TRUSTEE_A, *PTRUSTEE_A, TRUSTEEA, *PTRUSTEEA;
typedef struct _TRUSTEE_W
{
struct _TRUSTEE_W *pMultipleTrustee;
MULTIPLE_TRUSTEE_OPERATION MultipleTrusteeOperation;
TRUSTEE_FORM TrusteeForm;
TRUSTEE_TYPE TrusteeType;
#ifdef __midl
[switch_is(TrusteeForm)]
union
{
[case(TRUSTEE_IS_NAME)]
LPWSTR ptstrName;
[case(TRUSTEE_IS_SID)]
SID *pSid;
[case(TRUSTEE_IS_OBJECTS_AND_SID)]
OBJECTS_AND_SID *pObjectsAndSid;
[case(TRUSTEE_IS_OBJECTS_AND_NAME)]
OBJECTS_AND_NAME_W *pObjectsAndName;
};
#else
LPWSTR ptstrName;
#endif
} TRUSTEE_W, *PTRUSTEE_W, TRUSTEEW, *PTRUSTEEW;
#ifdef UNICODE
typedef TRUSTEE_W TRUSTEE_;
typedef PTRUSTEE_W PTRUSTEE_;
typedef TRUSTEEW TRUSTEE;
typedef PTRUSTEEW PTRUSTEE;
#else
typedef TRUSTEE_A TRUSTEE_;
typedef PTRUSTEE_A PTRUSTEE_;
typedef TRUSTEEA TRUSTEE;
typedef PTRUSTEEA PTRUSTEE;
#endif // UNICODE
//
// Definition: ACCESS_MODE
// This enumerated type specifies how permissions are (requested)/to be applied
// for the trustee by the access control entry. On input this field can by any
// of the values, although it is not meaningful to mix access control and audit
// control entries. On output this field will be either SET_ACCESS, DENY_ACCESS,
// SET_AUDIT_SUCCESS, SET_AUDIT_FAILURE.
// The following descriptions define how this type effects an explicit access
// request to apply access permissions to an object.
// GRANT_ACCESS - The trustee will have at least the requested permissions upon
// successful completion of the command. (If the trustee has
// additional permissions they will not be removed).
// SET_ACCESS - The trustee will have exactly the requested permissions upon
// successful completion of the command.
// DENY_ACCESS - The trustee will be denied the specified permissions.
// REVOKE_ACCESS - Any explicit access rights the trustee has will be revoked.
// SET_AUDIT_SUCCESS - The trustee will be audited for successful opens of the
// object using the requested permissions.
// SET_AUDIT_FAILURE - The trustee will be audited for failed opens of the object
// using the requested permissions.
//
typedef enum _ACCESS_MODE
{
NOT_USED_ACCESS = 0,
GRANT_ACCESS,
SET_ACCESS,
DENY_ACCESS,
REVOKE_ACCESS,
SET_AUDIT_SUCCESS,
SET_AUDIT_FAILURE
} ACCESS_MODE;
//
// Definition: Inheritance flags
// These bit masks are provided to allow simple application of inheritance in
// explicit access requests on containers.
// NO_INHERITANCE The specific access permissions will only be applied to
// the container, and will not be inherited by objects created
// within the container.
// SUB_CONTAINERS_ONLY_INHERIT The specific access permissions will be inherited
// and applied to sub containers created within the
// container, and will be applied to the container
// itself.
// SUB_OBJECTS_ONLY_INHERIT The specific access permissions will only be inherited
// by objects created within the specific container.
// The access permissions will not be applied to the
// container itself.
// SUB_CONTAINERS_AND_OBJECTS_INHERIT The specific access permissions will be
// inherited by containers created within the
// specific container, will be applied to
// objects created within the container, but
// will not be applied to the container itself.
//
#define NO_INHERITANCE 0x0
#define SUB_OBJECTS_ONLY_INHERIT 0x1
#define SUB_CONTAINERS_ONLY_INHERIT 0x2
#define SUB_CONTAINERS_AND_OBJECTS_INHERIT 0x3
#define INHERIT_NO_PROPAGATE 0x4
#define INHERIT_ONLY 0x8
//
// Informational bit that is returned
//
#define INHERITED_ACCESS_ENTRY 0x10
//
// Informational bit that tells where a node was inherited from. Valid only
// for NT 5 APIs
//
#define INHERITED_PARENT 0x10000000
#define INHERITED_GRANDPARENT 0x20000000
//
// Definition: EXPLICIT_ACCESS
// This structure is used to pass access control entry information into and out
// of the system using the API defined in this document.
// grfAccessPermissions - This contains the access permissions to assign for the
// trustee. It is in the form of an NT access mask.
// grfAccessMode - This field defines how the permissions are to be applied for
// the trustee.
// grfInheritance - For containers, this field defines how the access control
// entry is/(is requested) to be inherited on
// objects/sub-containers created within the container.
// Trustee - This field contains the definition of the trustee account the
// explicit access applies to.
//
typedef struct _EXPLICIT_ACCESS_A
{
DWORD grfAccessPermissions;
ACCESS_MODE grfAccessMode;
DWORD grfInheritance;
TRUSTEE_A Trustee;
} EXPLICIT_ACCESS_A, *PEXPLICIT_ACCESS_A, EXPLICIT_ACCESSA, *PEXPLICIT_ACCESSA;
typedef struct _EXPLICIT_ACCESS_W
{
DWORD grfAccessPermissions;
ACCESS_MODE grfAccessMode;
DWORD grfInheritance;
TRUSTEE_W Trustee;
} EXPLICIT_ACCESS_W, *PEXPLICIT_ACCESS_W, EXPLICIT_ACCESSW, *PEXPLICIT_ACCESSW;
#ifdef UNICODE
typedef EXPLICIT_ACCESS_W EXPLICIT_ACCESS_;
typedef PEXPLICIT_ACCESS_W PEXPLICIT_ACCESS_;
typedef EXPLICIT_ACCESSW EXPLICIT_ACCESS;
typedef PEXPLICIT_ACCESSW PEXPLICIT_ACCESS;
#else
typedef EXPLICIT_ACCESS_A EXPLICIT_ACCESS_;
typedef PEXPLICIT_ACCESS_A PEXPLICIT_ACCESS_;
typedef EXPLICIT_ACCESSA EXPLICIT_ACCESS;
typedef PEXPLICIT_ACCESSA PEXPLICIT_ACCESS;
#endif // UNICODE
//----------------------------------------------------------------------------
//
// NT5 APIs
//
//----------------------------------------------------------------------------
//
// Default provider
//
#define ACCCTRL_DEFAULT_PROVIDERA "Windows NT Access Provider"
#define ACCCTRL_DEFAULT_PROVIDERW L"Windows NT Access Provider"
#ifdef UNICODE
#define ACCCTRL_DEFAULT_PROVIDER ACCCTRL_DEFAULT_PROVIDERW
#else
#define ACCCTRL_DEFAULT_PROVIDER ACCCTRL_DEFAULT_PROVIDERA
#endif
//
/// Access rights
//
typedef ULONG ACCESS_RIGHTS, *PACCESS_RIGHTS;
//
// Inheritance flags
//
typedef ULONG INHERIT_FLAGS, *PINHERIT_FLAGS;
//
// Access / Audit structures
//
typedef struct _ACTRL_ACCESS_ENTRYA
{
TRUSTEE_A Trustee;
ULONG fAccessFlags;
ACCESS_RIGHTS Access;
ACCESS_RIGHTS ProvSpecificAccess;
INHERIT_FLAGS Inheritance;
LPSTR lpInheritProperty;
} ACTRL_ACCESS_ENTRYA, *PACTRL_ACCESS_ENTRYA;
//
// Access / Audit structures
//
typedef struct _ACTRL_ACCESS_ENTRYW
{
TRUSTEE_W Trustee;
ULONG fAccessFlags;
ACCESS_RIGHTS Access;
ACCESS_RIGHTS ProvSpecificAccess;
INHERIT_FLAGS Inheritance;
LPWSTR lpInheritProperty;
} ACTRL_ACCESS_ENTRYW, *PACTRL_ACCESS_ENTRYW;
#ifdef UNICODE
typedef ACTRL_ACCESS_ENTRYW ACTRL_ACCESS_ENTRY;
typedef PACTRL_ACCESS_ENTRYW PACTRL_ACCESS_ENTRY;
#else
typedef ACTRL_ACCESS_ENTRYA ACTRL_ACCESS_ENTRY;
typedef PACTRL_ACCESS_ENTRYA PACTRL_ACCESS_ENTRY;
#endif // UNICODE
typedef struct _ACTRL_ACCESS_ENTRY_LISTA
{
ULONG cEntries;
#ifdef __midl
[size_is(cEntries)]
#endif
ACTRL_ACCESS_ENTRYA *pAccessList;
} ACTRL_ACCESS_ENTRY_LISTA, *PACTRL_ACCESS_ENTRY_LISTA;
typedef struct _ACTRL_ACCESS_ENTRY_LISTW
{
ULONG cEntries;
#ifdef __midl
[size_is(cEntries)]
#endif
ACTRL_ACCESS_ENTRYW *pAccessList;
} ACTRL_ACCESS_ENTRY_LISTW, *PACTRL_ACCESS_ENTRY_LISTW;
#ifdef UNICODE
typedef ACTRL_ACCESS_ENTRY_LISTW ACTRL_ACCESS_ENTRY_LIST;
typedef PACTRL_ACCESS_ENTRY_LISTW PACTRL_ACCESS_ENTRY_LIST;
#else
typedef ACTRL_ACCESS_ENTRY_LISTA ACTRL_ACCESS_ENTRY_LIST;
typedef PACTRL_ACCESS_ENTRY_LISTA PACTRL_ACCESS_ENTRY_LIST;
#endif // UNICODE
typedef struct _ACTRL_PROPERTY_ENTRYA
{
LPSTR lpProperty;
PACTRL_ACCESS_ENTRY_LISTA pAccessEntryList;
ULONG fListFlags;
} ACTRL_PROPERTY_ENTRYA, *PACTRL_PROPERTY_ENTRYA;
typedef struct _ACTRL_PROPERTY_ENTRYW
{
LPWSTR lpProperty;
PACTRL_ACCESS_ENTRY_LISTW pAccessEntryList;
ULONG fListFlags;
} ACTRL_PROPERTY_ENTRYW, *PACTRL_PROPERTY_ENTRYW;
#ifdef UNICODE
typedef ACTRL_PROPERTY_ENTRYW ACTRL_PROPERTY_ENTRY;
typedef PACTRL_PROPERTY_ENTRYW PACTRL_PROPERTY_ENTRY;
#else
typedef ACTRL_PROPERTY_ENTRYA ACTRL_PROPERTY_ENTRY;
typedef PACTRL_PROPERTY_ENTRYA PACTRL_PROPERTY_ENTRY;
#endif // UNICODE
typedef struct _ACTRL_ALISTA
{
ULONG cEntries;
#ifdef __midl
[size_is(cEntries)]
#endif
PACTRL_PROPERTY_ENTRYA pPropertyAccessList;
} ACTRL_ACCESSA, *PACTRL_ACCESSA, ACTRL_AUDITA, *PACTRL_AUDITA;
typedef struct _ACTRL_ALISTW
{
ULONG cEntries;
#ifdef __midl
[size_is(cEntries)]
#endif
PACTRL_PROPERTY_ENTRYW pPropertyAccessList;
} ACTRL_ACCESSW, *PACTRL_ACCESSW, ACTRL_AUDITW, *PACTRL_AUDITW;
#ifdef UNICODE
typedef ACTRL_ACCESSW ACTRL_ACCESS;
typedef PACTRL_ACCESSW PACTRL_ACCESS;
typedef ACTRL_AUDITW ACTRL_AUDIT;
typedef PACTRL_AUDITW PACTRL_AUDIT;
#else
typedef ACTRL_ACCESSA ACTRL_ACCESS;
typedef PACTRL_ACCESSA PACTRL_ACCESS;
typedef ACTRL_AUDITA ACTRL_AUDIT;
typedef PACTRL_AUDITA PACTRL_AUDIT;
#endif // UNICODE
//
// TRUSTEE_ACCESS flags
//
#define TRUSTEE_ACCESS_ALLOWED 0x00000001L
#define TRUSTEE_ACCESS_READ 0x00000002L
#define TRUSTEE_ACCESS_WRITE 0x00000004L
#define TRUSTEE_ACCESS_EXPLICIT 0x00000001L
#define TRUSTEE_ACCESS_READ_WRITE (TRUSTEE_ACCESS_READ | \
TRUSTEE_ACCESS_WRITE)
#define TRUSTEE_ACCESS_ALL 0xFFFFFFFFL
typedef struct _TRUSTEE_ACCESSA
{
LPSTR lpProperty;
ACCESS_RIGHTS Access;
ULONG fAccessFlags;
ULONG fReturnedAccess;
} TRUSTEE_ACCESSA, *PTRUSTEE_ACCESSA;
typedef struct _TRUSTEE_ACCESSW
{
LPWSTR lpProperty;
ACCESS_RIGHTS Access;
ULONG fAccessFlags;
ULONG fReturnedAccess;
} TRUSTEE_ACCESSW, *PTRUSTEE_ACCESSW;
#ifdef UNICODE
typedef TRUSTEE_ACCESSW TRUSTEE_ACCESS;
typedef PTRUSTEE_ACCESSW PTRUSTEE_ACCESS;
#else
typedef TRUSTEE_ACCESSA TRUSTEE_ACCESS;
typedef PTRUSTEE_ACCESSA PTRUSTEE_ACCESS;
#endif // UNICODE
//
// Generic permission values
//
#define ACTRL_RESERVED 0x00000000
#define ACTRL_PERM_1 0x00000001
#define ACTRL_PERM_2 0x00000002
#define ACTRL_PERM_3 0x00000004
#define ACTRL_PERM_4 0x00000008
#define ACTRL_PERM_5 0x00000010
#define ACTRL_PERM_6 0x00000020
#define ACTRL_PERM_7 0x00000040
#define ACTRL_PERM_8 0x00000080
#define ACTRL_PERM_9 0x00000100
#define ACTRL_PERM_10 0x00000200
#define ACTRL_PERM_11 0x00000400
#define ACTRL_PERM_12 0x00000800
#define ACTRL_PERM_13 0x00001000
#define ACTRL_PERM_14 0x00002000
#define ACTRL_PERM_15 0x00004000
#define ACTRL_PERM_16 0x00008000
#define ACTRL_PERM_17 0x00010000
#define ACTRL_PERM_18 0x00020000
#define ACTRL_PERM_19 0x00040000
#define ACTRL_PERM_20 0x00080000
//
// Access permissions
//
#define ACTRL_ACCESS_ALLOWED 0x00000001
#define ACTRL_ACCESS_DENIED 0x00000002
#define ACTRL_AUDIT_SUCCESS 0x00000004
#define ACTRL_AUDIT_FAILURE 0x00000008
//
// Property list flags
//
#define ACTRL_ACCESS_PROTECTED 0x00000001
//
// Standard and object rights
//
#define ACTRL_SYSTEM_ACCESS 0x04000000
#define ACTRL_DELETE 0x08000000
#define ACTRL_READ_CONTROL 0x10000000
#define ACTRL_CHANGE_ACCESS 0x20000000
#define ACTRL_CHANGE_OWNER 0x40000000
#define ACTRL_SYNCHRONIZE 0x80000000
#define ACTRL_STD_RIGHTS_ALL 0xf8000000
#define ACTRL_STD_RIGHT_REQUIRED ( ACTRL_STD_RIGHTS_ALL & ~ACTRL_SYNCHRONIZE )
#ifndef _DS_CONTROL_BITS_DEFINED_
#define _DS_CONTROL_BITS_DEFINED_
#define ACTRL_DS_OPEN ACTRL_RESERVED
#define ACTRL_DS_CREATE_CHILD ACTRL_PERM_1
#define ACTRL_DS_DELETE_CHILD ACTRL_PERM_2
#define ACTRL_DS_LIST ACTRL_PERM_3
#define ACTRL_DS_SELF ACTRL_PERM_4
#define ACTRL_DS_READ_PROP ACTRL_PERM_5
#define ACTRL_DS_WRITE_PROP ACTRL_PERM_6
#define ACTRL_DS_DELETE_TREE ACTRL_PERM_7
#define ACTRL_DS_LIST_OBJECT ACTRL_PERM_8
#define ACTRL_DS_CONTROL_ACCESS ACTRL_PERM_9
#endif
#define ACTRL_FILE_READ ACTRL_PERM_1
#define ACTRL_FILE_WRITE ACTRL_PERM_2
#define ACTRL_FILE_APPEND ACTRL_PERM_3
#define ACTRL_FILE_READ_PROP ACTRL_PERM_4
#define ACTRL_FILE_WRITE_PROP ACTRL_PERM_5
#define ACTRL_FILE_EXECUTE ACTRL_PERM_6
#define ACTRL_FILE_READ_ATTRIB ACTRL_PERM_8
#define ACTRL_FILE_WRITE_ATTRIB ACTRL_PERM_9
#define ACTRL_FILE_CREATE_PIPE ACTRL_PERM_10
#define ACTRL_DIR_LIST ACTRL_PERM_1
#define ACTRL_DIR_CREATE_OBJECT ACTRL_PERM_2
#define ACTRL_DIR_CREATE_CHILD ACTRL_PERM_3
#define ACTRL_DIR_DELETE_CHILD ACTRL_PERM_7
#define ACTRL_DIR_TRAVERSE ACTRL_PERM_6
#define ACTRL_KERNEL_TERMINATE ACTRL_PERM_1
#define ACTRL_KERNEL_THREAD ACTRL_PERM_2
#define ACTRL_KERNEL_VM ACTRL_PERM_3
#define ACTRL_KERNEL_VM_READ ACTRL_PERM_4
#define ACTRL_KERNEL_VM_WRITE ACTRL_PERM_5
#define ACTRL_KERNEL_DUP_HANDLE ACTRL_PERM_6
#define ACTRL_KERNEL_PROCESS ACTRL_PERM_7
#define ACTRL_KERNEL_SET_INFO ACTRL_PERM_8
#define ACTRL_KERNEL_GET_INFO ACTRL_PERM_9
#define ACTRL_KERNEL_CONTROL ACTRL_PERM_10
#define ACTRL_KERNEL_ALERT ACTRL_PERM_11
#define ACTRL_KERNEL_GET_CONTEXT ACTRL_PERM_12
#define ACTRL_KERNEL_SET_CONTEXT ACTRL_PERM_13
#define ACTRL_KERNEL_TOKEN ACTRL_PERM_14
#define ACTRL_KERNEL_IMPERSONATE ACTRL_PERM_15
#define ACTRL_KERNEL_DIMPERSONATE ACTRL_PERM_16
#define ACTRL_PRINT_SADMIN ACTRL_PERM_1
#define ACTRL_PRINT_SLIST ACTRL_PERM_2
#define ACTRL_PRINT_PADMIN ACTRL_PERM_3
#define ACTRL_PRINT_PUSE ACTRL_PERM_4
#define ACTRL_PRINT_JADMIN ACTRL_PERM_5
#define ACTRL_SVC_GET_INFO ACTRL_PERM_1
#define ACTRL_SVC_SET_INFO ACTRL_PERM_2
#define ACTRL_SVC_STATUS ACTRL_PERM_3
#define ACTRL_SVC_LIST ACTRL_PERM_4
#define ACTRL_SVC_START ACTRL_PERM_5
#define ACTRL_SVC_STOP ACTRL_PERM_6
#define ACTRL_SVC_PAUSE ACTRL_PERM_7
#define ACTRL_SVC_INTERROGATE ACTRL_PERM_8
#define ACTRL_SVC_UCONTROL ACTRL_PERM_9
#define ACTRL_REG_QUERY ACTRL_PERM_1
#define ACTRL_REG_SET ACTRL_PERM_2
#define ACTRL_REG_CREATE_CHILD ACTRL_PERM_3
#define ACTRL_REG_LIST ACTRL_PERM_4
#define ACTRL_REG_NOTIFY ACTRL_PERM_5
#define ACTRL_REG_LINK ACTRL_PERM_6
#define ACTRL_WIN_CLIPBRD ACTRL_PERM_1
#define ACTRL_WIN_GLOBAL_ATOMS ACTRL_PERM_2
#define ACTRL_WIN_CREATE ACTRL_PERM_3
#define ACTRL_WIN_LIST_DESK ACTRL_PERM_4
#define ACTRL_WIN_LIST ACTRL_PERM_5
#define ACTRL_WIN_READ_ATTRIBS ACTRL_PERM_6
#define ACTRL_WIN_WRITE_ATTRIBS ACTRL_PERM_7
#define ACTRL_WIN_SCREEN ACTRL_PERM_8
#define ACTRL_WIN_EXIT ACTRL_PERM_9
#pragma warning (push)
#pragma warning (disable: 4201)
typedef struct _ACTRL_OVERLAPPED
{
union {
PVOID Provider;
ULONG Reserved1;
} DUMMYUNIONNAME;
ULONG Reserved2;
HANDLE hEvent;
} ACTRL_OVERLAPPED, *PACTRL_OVERLAPPED;
#pragma warning(pop)
typedef struct _ACTRL_ACCESS_INFOA
{
ULONG fAccessPermission;
LPSTR lpAccessPermissionName;
} ACTRL_ACCESS_INFOA, *PACTRL_ACCESS_INFOA;
typedef struct _ACTRL_ACCESS_INFOW
{
ULONG fAccessPermission;
LPWSTR lpAccessPermissionName;
} ACTRL_ACCESS_INFOW, *PACTRL_ACCESS_INFOW;
#ifdef UNICODE
typedef ACTRL_ACCESS_INFOW ACTRL_ACCESS_INFO;
typedef PACTRL_ACCESS_INFOW PACTRL_ACCESS_INFO;
#else
typedef ACTRL_ACCESS_INFOA ACTRL_ACCESS_INFO;
typedef PACTRL_ACCESS_INFOA PACTRL_ACCESS_INFO;
#endif // UNICODE
typedef struct _ACTRL_CONTROL_INFOA
{
LPSTR lpControlId;
LPSTR lpControlName;
} ACTRL_CONTROL_INFOA, *PACTRL_CONTROL_INFOA;
typedef struct _ACTRL_CONTROL_INFOW
{
LPWSTR lpControlId;
LPWSTR lpControlName;
} ACTRL_CONTROL_INFOW, *PACTRL_CONTROL_INFOW;
#ifdef UNICODE
typedef ACTRL_CONTROL_INFOW ACTRL_CONTROL_INFO;
typedef PACTRL_CONTROL_INFOW PACTRL_CONTROL_INFO;
#else
typedef ACTRL_CONTROL_INFOA ACTRL_CONTROL_INFO;
typedef PACTRL_CONTROL_INFOA PACTRL_CONTROL_INFO;
#endif // UNICODE
#define ACTRL_ACCESS_NO_OPTIONS 0x00000000
#define ACTRL_ACCESS_SUPPORTS_OBJECT_ENTRIES 0x00000001
#if (NTDDI_VERSION >= NTDDI_VISTA)
#define TREE_SEC_INFO_SET 0x00000001
#define TREE_SEC_INFO_RESET 0x00000002
#define TREE_SEC_INFO_RESET_KEEP_EXPLICIT 0x00000003
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
typedef enum _PROGRESS_INVOKE_SETTING {
ProgressInvokeNever = 1, // Never invoke the progress function
ProgressInvokeEveryObject, // Invoke for each object
ProgressInvokeOnError, // Invoke only for each error case
ProgressCancelOperation, // Stop propagation and return
ProgressRetryOperation, // Retry operation on subtree
#if (NTDDI_VERSION >= NTDDI_VISTA)
ProgressInvokePrePostError, // Invoke Pre, Post, Error
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
} PROG_INVOKE_SETTING, *PPROG_INVOKE_SETTING;
//
// Progress Function:
// Caller of tree operation implements this Progress function, then
// passes its function pointer to tree operation.
// Tree operation invokes Progress function to provide progress and error
// information to the caller during the potentially long execution
// of the tree operation. Tree operation provides the name of the object
// last processed and the error status of the operation on that object.
// Tree operation also passes the current InvokeSetting value.
// Caller may change the InvokeSetting value, for example, from "Always"
// to "Only On Error."
//
/*
typedef VOID (*FN_PROGRESS) (
IN LPWSTR pObjectName, // name of object just processed
IN DWORD Status, // status of operation on object
IN OUT PPROG_INVOKE_SETTING pInvokeSetting, // Never, always,
IN PVOID Args, // Caller specific data
IN BOOL SecuritySet // Whether security was set
);
*/
//
// New Object Type function pointers. TBD.
// To support additional object resource managers generically, the
// resource manager must provide it's own functions for operations
// like:
// GetAncestorAcl(IN ObjName, IN GenerationGap, IN DaclOrSacl?, ...)
// GetAncestorName(...)
// FreeNameStructure(...)
//
typedef struct _FN_OBJECT_MGR_FUNCTIONS
{
ULONG Placeholder;
} FN_OBJECT_MGR_FUNCTS, *PFN_OBJECT_MGR_FUNCTS;
//
// Name of ancestor and number of generations between
// ancestor and inheriting object.
//
// GenerationGap:
// Name of ancestor from which ACE was inherited.
// NULL for explicit ACE.
//
// AncestorName:
// Number of levels (or generations) between the object and the ancestor.
// Parent, gap=1.
// Grandparent, gap=2.
// Set to 0 for explicit ACE on object.
//
typedef struct _INHERITED_FROMA
{
LONG GenerationGap;
LPSTR AncestorName;
} INHERITED_FROMA, *PINHERITED_FROMA;
typedef struct _INHERITED_FROMW
{
LONG GenerationGap;
LPWSTR AncestorName;
} INHERITED_FROMW, *PINHERITED_FROMW;
#ifdef UNICODE
typedef INHERITED_FROMW INHERITED_FROM;
typedef PINHERITED_FROMW PINHERITED_FROM;
#else
typedef INHERITED_FROMA INHERITED_FROM;
typedef PINHERITED_FROMA PINHERITED_FROM;
#endif // UNICODE
#ifdef __cplusplus
}
#endif
#if (_MSC_VER >= 800)
#if (_MSC_VER >= 1200)
#pragma warning(pop)
#else
#pragma warning(default:4001)
#endif
#endif
#endif /* __ACCESS_CONTROL__ */

702
BuildTools/Include/AclAPI.h Normal file
View File

@ -0,0 +1,702 @@
/*++ BUILD Version: 0001 // Increment this if a change has global effects
Copyright (c) 1993-1999, Microsoft Corporation
Module Name:
aclapi.h
Abstract:
Public
Structure/constant definitions and typedefines for the Win32 Access
Control APIs
--*/
#ifndef __ACCESS_CONTROL_API__
#define __ACCESS_CONTROL_API__
#include <windows.h>
#include <accctrl.h>
#ifdef __cplusplus
extern "C" {
#endif
//
// Progress Function:
// Caller of tree operation implements this Progress function, then
// passes its function pointer to tree operation.
// Tree operation invokes Progress function to provide progress and error
// information to the caller during the potentially long execution
// of the tree operation. Tree operation provides the name of the object
// last processed and the error status of the operation on that object.
// Tree operation also passes the current InvokeSetting value.
// Caller may change the InvokeSetting value, for example, from "Always"
// to "Only On Error."
//
typedef VOID (*FN_PROGRESS) (
__in LPWSTR pObjectName, // name of object just processed
__in DWORD Status, // status of operation on object
__inout PPROG_INVOKE_SETTING pInvokeSetting, // Never, always,
__in PVOID Args, // Caller specific data
__in BOOL SecuritySet // Whether security was set
);
WINADVAPI
DWORD
WINAPI
SetEntriesInAclA(
__in ULONG cCountOfExplicitEntries,
__in_ecount_opt(cCountOfExplicitEntries) PEXPLICIT_ACCESS_A pListOfExplicitEntries,
__in_opt PACL OldAcl,
__out PACL * NewAcl
);
WINADVAPI
DWORD
WINAPI
SetEntriesInAclW(
__in ULONG cCountOfExplicitEntries,
__in_ecount_opt(cCountOfExplicitEntries) PEXPLICIT_ACCESS_W pListOfExplicitEntries,
__in_opt PACL OldAcl,
__out PACL * NewAcl
);
#ifdef UNICODE
#define SetEntriesInAcl SetEntriesInAclW
#else
#define SetEntriesInAcl SetEntriesInAclA
#endif // !UNICODE
WINADVAPI
DWORD
WINAPI
GetExplicitEntriesFromAclA(
__in PACL pacl,
__out PULONG pcCountOfExplicitEntries,
__deref_out_ecount(*pcCountOfExplicitEntries) PEXPLICIT_ACCESS_A * pListOfExplicitEntries
);
WINADVAPI
DWORD
WINAPI
GetExplicitEntriesFromAclW(
__in PACL pacl,
__out PULONG pcCountOfExplicitEntries,
__deref_out_ecount(*pcCountOfExplicitEntries) PEXPLICIT_ACCESS_W * pListOfExplicitEntries
);
#ifdef UNICODE
#define GetExplicitEntriesFromAcl GetExplicitEntriesFromAclW
#else
#define GetExplicitEntriesFromAcl GetExplicitEntriesFromAclA
#endif // !UNICODE
WINADVAPI
DWORD
WINAPI
GetEffectiveRightsFromAclA(
__in PACL pacl,
__in PTRUSTEE_A pTrustee,
__out PACCESS_MASK pAccessRights
);
WINADVAPI
DWORD
WINAPI
GetEffectiveRightsFromAclW(
__in PACL pacl,
__in PTRUSTEE_W pTrustee,
__out PACCESS_MASK pAccessRights
);
#ifdef UNICODE
#define GetEffectiveRightsFromAcl GetEffectiveRightsFromAclW
#else
#define GetEffectiveRightsFromAcl GetEffectiveRightsFromAclA
#endif // !UNICODE
WINADVAPI
DWORD
WINAPI
GetAuditedPermissionsFromAclA(
__in PACL pacl,
__in PTRUSTEE_A pTrustee,
__out PACCESS_MASK pSuccessfulAuditedRights,
__out PACCESS_MASK pFailedAuditRights
);
WINADVAPI
DWORD
WINAPI
GetAuditedPermissionsFromAclW(
__in PACL pacl,
__in PTRUSTEE_W pTrustee,
__out PACCESS_MASK pSuccessfulAuditedRights,
__out PACCESS_MASK pFailedAuditRights
);
#ifdef UNICODE
#define GetAuditedPermissionsFromAcl GetAuditedPermissionsFromAclW
#else
#define GetAuditedPermissionsFromAcl GetAuditedPermissionsFromAclA
#endif // !UNICODE
WINADVAPI
DWORD
WINAPI
GetNamedSecurityInfoA(
__in LPCSTR pObjectName,
__in SE_OBJECT_TYPE ObjectType,
__in SECURITY_INFORMATION SecurityInfo,
__out_opt const PSID * ppsidOwner,
__out_opt const PSID * ppsidGroup,
__out_opt const PACL * ppDacl,
__out_opt const PACL * ppSacl,
__out PSECURITY_DESCRIPTOR * ppSecurityDescriptor
);
WINADVAPI
DWORD
WINAPI
GetNamedSecurityInfoW(
__in LPCWSTR pObjectName,
__in SE_OBJECT_TYPE ObjectType,
__in SECURITY_INFORMATION SecurityInfo,
__out_opt const PSID * ppsidOwner,
__out_opt const PSID * ppsidGroup,
__out_opt const PACL * ppDacl,
__out_opt const PACL * ppSacl,
__out PSECURITY_DESCRIPTOR * ppSecurityDescriptor
);
#ifdef UNICODE
#define GetNamedSecurityInfo GetNamedSecurityInfoW
#else
#define GetNamedSecurityInfo GetNamedSecurityInfoA
#endif // !UNICODE
WINADVAPI
DWORD
WINAPI
GetSecurityInfo(
__in HANDLE handle,
__in SE_OBJECT_TYPE ObjectType,
__in SECURITY_INFORMATION SecurityInfo,
__out_opt PSID * ppsidOwner,
__out_opt PSID * ppsidGroup,
__out_opt PACL * ppDacl,
__out_opt PACL * ppSacl,
__out_opt PSECURITY_DESCRIPTOR * ppSecurityDescriptor
);
WINADVAPI
DWORD
WINAPI
SetNamedSecurityInfoA(
__in LPSTR pObjectName,
__in SE_OBJECT_TYPE ObjectType,
__in SECURITY_INFORMATION SecurityInfo,
__in_opt PSID psidOwner,
__in_opt PSID psidGroup,
__in_opt PACL pDacl,
__in_opt PACL pSacl
);
WINADVAPI
DWORD
WINAPI
SetNamedSecurityInfoW(
__in LPWSTR pObjectName,
__in SE_OBJECT_TYPE ObjectType,
__in SECURITY_INFORMATION SecurityInfo,
__in_opt PSID psidOwner,
__in_opt PSID psidGroup,
__in_opt PACL pDacl,
__in_opt PACL pSacl
);
#ifdef UNICODE
#define SetNamedSecurityInfo SetNamedSecurityInfoW
#else
#define SetNamedSecurityInfo SetNamedSecurityInfoA
#endif // !UNICODE
WINADVAPI
DWORD
WINAPI
SetSecurityInfo(
__in HANDLE handle,
__in SE_OBJECT_TYPE ObjectType,
__in SECURITY_INFORMATION SecurityInfo,
__in_opt PSID psidOwner,
__in_opt PSID psidGroup,
__in_opt PACL pDacl,
__in_opt PACL pSacl
);
WINADVAPI
DWORD
WINAPI
GetInheritanceSourceA(
__in LPSTR pObjectName,
__in SE_OBJECT_TYPE ObjectType,
__in SECURITY_INFORMATION SecurityInfo,
__in BOOL Container,
__in_ecount_opt(GuidCount) GUID ** pObjectClassGuids,
__in DWORD GuidCount,
__in PACL pAcl,
__in_opt PFN_OBJECT_MGR_FUNCTS pfnArray,
__in PGENERIC_MAPPING pGenericMapping,
__out PINHERITED_FROMA pInheritArray
);
WINADVAPI
DWORD
WINAPI
GetInheritanceSourceW(
__in LPWSTR pObjectName,
__in SE_OBJECT_TYPE ObjectType,
__in SECURITY_INFORMATION SecurityInfo,
__in BOOL Container,
__in_ecount_opt(GuidCount) GUID ** pObjectClassGuids,
__in DWORD GuidCount,
__in PACL pAcl,
__in_opt PFN_OBJECT_MGR_FUNCTS pfnArray,
__in PGENERIC_MAPPING pGenericMapping,
__out PINHERITED_FROMW pInheritArray
);
#ifdef UNICODE
#define GetInheritanceSource GetInheritanceSourceW
#else
#define GetInheritanceSource GetInheritanceSourceA
#endif // !UNICODE
WINADVAPI
DWORD
WINAPI
FreeInheritedFromArray(
__in_ecount(AceCnt) PINHERITED_FROMW pInheritArray,
__in USHORT AceCnt,
__in_opt PFN_OBJECT_MGR_FUNCTS pfnArray OPTIONAL
);
WINADVAPI
DWORD
WINAPI
TreeResetNamedSecurityInfoA(
__in LPSTR pObjectName,
__in SE_OBJECT_TYPE ObjectType,
__in SECURITY_INFORMATION SecurityInfo,
__in_opt PSID pOwner,
__in_opt PSID pGroup,
__in_opt PACL pDacl,
__in_opt PACL pSacl,
__in BOOL KeepExplicit,
__in_opt FN_PROGRESS fnProgress,
__in PROG_INVOKE_SETTING ProgressInvokeSetting,
__in_opt PVOID Args
);
WINADVAPI
DWORD
WINAPI
TreeResetNamedSecurityInfoW(
__in LPWSTR pObjectName,
__in SE_OBJECT_TYPE ObjectType,
__in SECURITY_INFORMATION SecurityInfo,
__in_opt PSID pOwner,
__in_opt PSID pGroup,
__in_opt PACL pDacl,
__in_opt PACL pSacl,
__in BOOL KeepExplicit,
__in_opt FN_PROGRESS fnProgress,
__in PROG_INVOKE_SETTING ProgressInvokeSetting,
__in_opt PVOID Args
);
#ifdef UNICODE
#define TreeResetNamedSecurityInfo TreeResetNamedSecurityInfoW
#else
#define TreeResetNamedSecurityInfo TreeResetNamedSecurityInfoA
#endif // !UNICODE
#if (NTDDI_VERSION >= NTDDI_VISTA)
WINADVAPI
DWORD
WINAPI
TreeSetNamedSecurityInfoA(
__in LPSTR pObjectName,
__in SE_OBJECT_TYPE ObjectType,
__in SECURITY_INFORMATION SecurityInfo,
__in_opt PSID pOwner,
__in_opt PSID pGroup,
__in_opt PACL pDacl,
__in_opt PACL pSacl,
__in DWORD dwAction,
__in_opt FN_PROGRESS fnProgress,
__in PROG_INVOKE_SETTING ProgressInvokeSetting,
__in_opt PVOID Args
);
WINADVAPI
DWORD
WINAPI
TreeSetNamedSecurityInfoW(
__in LPWSTR pObjectName,
__in SE_OBJECT_TYPE ObjectType,
__in SECURITY_INFORMATION SecurityInfo,
__in_opt PSID pOwner,
__in_opt PSID pGroup,
__in_opt PACL pDacl,
__in_opt PACL pSacl,
__in DWORD dwAction,
__in_opt FN_PROGRESS fnProgress,
__in PROG_INVOKE_SETTING ProgressInvokeSetting,
__in_opt PVOID Args
);
#ifdef UNICODE
#define TreeSetNamedSecurityInfo TreeSetNamedSecurityInfoW
#else
#define TreeSetNamedSecurityInfo TreeSetNamedSecurityInfoA
#endif // !UNICODE
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
//----------------------------------------------------------------------------
// The following API are provided for trusted servers to use to
// implement access control on their own objects.
//----------------------------------------------------------------------------
WINADVAPI
DWORD
WINAPI
BuildSecurityDescriptorA(
__in_opt PTRUSTEE_A pOwner,
__in_opt PTRUSTEE_A pGroup,
__in ULONG cCountOfAccessEntries,
__in_ecount_opt(cCountOfAccessEntries) PEXPLICIT_ACCESS_A pListOfAccessEntries,
__in ULONG cCountOfAuditEntries,
__in_ecount_opt(cCountOfAuditEntries) PEXPLICIT_ACCESS_A pListOfAuditEntries,
__in_opt PSECURITY_DESCRIPTOR pOldSD,
__out PULONG pSizeNewSD,
__deref_out_bcount(*pSizeNewSD) PSECURITY_DESCRIPTOR * pNewSD
);
WINADVAPI
DWORD
WINAPI
BuildSecurityDescriptorW(
__in_opt PTRUSTEE_W pOwner,
__in_opt PTRUSTEE_W pGroup,
__in ULONG cCountOfAccessEntries,
__in_ecount_opt(cCountOfAccessEntries) PEXPLICIT_ACCESS_W pListOfAccessEntries,
__in ULONG cCountOfAuditEntries,
__in_ecount_opt(cCountOfAuditEntries) PEXPLICIT_ACCESS_W pListOfAuditEntries,
__in_opt PSECURITY_DESCRIPTOR pOldSD,
__out PULONG pSizeNewSD,
__deref_out_bcount(*pSizeNewSD) PSECURITY_DESCRIPTOR * pNewSD
);
#ifdef UNICODE
#define BuildSecurityDescriptor BuildSecurityDescriptorW
#else
#define BuildSecurityDescriptor BuildSecurityDescriptorA
#endif // !UNICODE
WINADVAPI
DWORD
WINAPI
LookupSecurityDescriptorPartsA(
__out_opt PTRUSTEE_A * ppOwner,
__out_opt PTRUSTEE_A * ppGroup,
__out_opt PULONG pcCountOfAccessEntries,
__deref_out_ecount_opt(*pcCountOfAccessEntries) PEXPLICIT_ACCESS_A * ppListOfAccessEntries,
__out_opt PULONG pcCountOfAuditEntries,
__deref_out_ecount_opt(*pcCountOfAuditEntries) PEXPLICIT_ACCESS_A * ppListOfAuditEntries,
__in PSECURITY_DESCRIPTOR pSD
);
WINADVAPI
DWORD
WINAPI
LookupSecurityDescriptorPartsW(
__out_opt PTRUSTEE_W * ppOwner,
__out_opt PTRUSTEE_W * ppGroup,
__out_opt PULONG pcCountOfAccessEntries,
__deref_out_ecount_opt(*pcCountOfAccessEntries) PEXPLICIT_ACCESS_W * ppListOfAccessEntries,
__out_opt PULONG pcCountOfAuditEntries,
__deref_out_ecount_opt(*pcCountOfAuditEntries) PEXPLICIT_ACCESS_W * ppListOfAuditEntries,
__in PSECURITY_DESCRIPTOR pSD
);
#ifdef UNICODE
#define LookupSecurityDescriptorParts LookupSecurityDescriptorPartsW
#else
#define LookupSecurityDescriptorParts LookupSecurityDescriptorPartsA
#endif // !UNICODE
//----------------------------------------------------------------------------
// The following helper API are provided for building
// access control structures.
//----------------------------------------------------------------------------
WINADVAPI
VOID
WINAPI
BuildExplicitAccessWithNameA(
__inout PEXPLICIT_ACCESS_A pExplicitAccess,
__in_opt LPSTR pTrusteeName,
__in DWORD AccessPermissions,
__in ACCESS_MODE AccessMode,
__in DWORD Inheritance
);
WINADVAPI
VOID
WINAPI
BuildExplicitAccessWithNameW(
__inout PEXPLICIT_ACCESS_W pExplicitAccess,
__in_opt LPWSTR pTrusteeName,
__in DWORD AccessPermissions,
__in ACCESS_MODE AccessMode,
__in DWORD Inheritance
);
#ifdef UNICODE
#define BuildExplicitAccessWithName BuildExplicitAccessWithNameW
#else
#define BuildExplicitAccessWithName BuildExplicitAccessWithNameA
#endif // !UNICODE
WINADVAPI
VOID
WINAPI
BuildImpersonateExplicitAccessWithNameA(
__inout PEXPLICIT_ACCESS_A pExplicitAccess,
__in_opt LPSTR pTrusteeName,
__in_opt PTRUSTEE_A pTrustee,
__in DWORD AccessPermissions,
__in ACCESS_MODE AccessMode,
__in DWORD Inheritance
);
WINADVAPI
VOID
WINAPI
BuildImpersonateExplicitAccessWithNameW(
__inout PEXPLICIT_ACCESS_W pExplicitAccess,
__in_opt LPWSTR pTrusteeName,
__in_opt PTRUSTEE_W pTrustee,
__in DWORD AccessPermissions,
__in ACCESS_MODE AccessMode,
__in DWORD Inheritance
);
#ifdef UNICODE
#define BuildImpersonateExplicitAccessWithName BuildImpersonateExplicitAccessWithNameW
#else
#define BuildImpersonateExplicitAccessWithName BuildImpersonateExplicitAccessWithNameA
#endif // !UNICODE
WINADVAPI
VOID
WINAPI
BuildTrusteeWithNameA(
__inout PTRUSTEE_A pTrustee,
__in_opt LPSTR pName
);
WINADVAPI
VOID
WINAPI
BuildTrusteeWithNameW(
__inout PTRUSTEE_W pTrustee,
__in_opt LPWSTR pName
);
#ifdef UNICODE
#define BuildTrusteeWithName BuildTrusteeWithNameW
#else
#define BuildTrusteeWithName BuildTrusteeWithNameA
#endif // !UNICODE
WINADVAPI
VOID
WINAPI
BuildImpersonateTrusteeA(
__inout PTRUSTEE_A pTrustee,
__in_opt PTRUSTEE_A pImpersonateTrustee
);
WINADVAPI
VOID
WINAPI
BuildImpersonateTrusteeW(
__inout PTRUSTEE_W pTrustee,
__in_opt PTRUSTEE_W pImpersonateTrustee
);
#ifdef UNICODE
#define BuildImpersonateTrustee BuildImpersonateTrusteeW
#else
#define BuildImpersonateTrustee BuildImpersonateTrusteeA
#endif // !UNICODE
WINADVAPI
VOID
WINAPI
BuildTrusteeWithSidA(
__inout PTRUSTEE_A pTrustee,
__in_opt PSID pSid
);
WINADVAPI
VOID
WINAPI
BuildTrusteeWithSidW(
__inout PTRUSTEE_W pTrustee,
__in_opt PSID pSid
);
#ifdef UNICODE
#define BuildTrusteeWithSid BuildTrusteeWithSidW
#else
#define BuildTrusteeWithSid BuildTrusteeWithSidA
#endif // !UNICODE
WINADVAPI
VOID
WINAPI
BuildTrusteeWithObjectsAndSidA(
__inout PTRUSTEE_A pTrustee,
__in_opt POBJECTS_AND_SID pObjSid,
__in_opt GUID * pObjectGuid,
__in_opt GUID * pInheritedObjectGuid,
__in_opt PSID pSid
);
WINADVAPI
VOID
WINAPI
BuildTrusteeWithObjectsAndSidW(
__inout PTRUSTEE_W pTrustee,
__in_opt POBJECTS_AND_SID pObjSid,
__in_opt GUID * pObjectGuid,
__in_opt GUID * pInheritedObjectGuid,
__in_opt PSID pSid
);
#ifdef UNICODE
#define BuildTrusteeWithObjectsAndSid BuildTrusteeWithObjectsAndSidW
#else
#define BuildTrusteeWithObjectsAndSid BuildTrusteeWithObjectsAndSidA
#endif // !UNICODE
WINADVAPI
VOID
WINAPI
BuildTrusteeWithObjectsAndNameA(
__inout PTRUSTEE_A pTrustee,
__in_opt POBJECTS_AND_NAME_A pObjName,
__in_opt SE_OBJECT_TYPE ObjectType,
__in_opt LPSTR ObjectTypeName,
__in_opt LPSTR InheritedObjectTypeName,
__in_opt LPSTR Name
);
WINADVAPI
VOID
WINAPI
BuildTrusteeWithObjectsAndNameW(
__inout PTRUSTEE_W pTrustee,
__in_opt POBJECTS_AND_NAME_W pObjName,
__in_opt SE_OBJECT_TYPE ObjectType,
__in_opt LPWSTR ObjectTypeName,
__in_opt LPWSTR InheritedObjectTypeName,
__in_opt LPWSTR Name
);
#ifdef UNICODE
#define BuildTrusteeWithObjectsAndName BuildTrusteeWithObjectsAndNameW
#else
#define BuildTrusteeWithObjectsAndName BuildTrusteeWithObjectsAndNameA
#endif // !UNICODE
WINADVAPI
LPSTR
WINAPI
GetTrusteeNameA(
__in PTRUSTEE_A pTrustee
);
WINADVAPI
LPWSTR
WINAPI
GetTrusteeNameW(
__in PTRUSTEE_W pTrustee
);
#ifdef UNICODE
#define GetTrusteeName GetTrusteeNameW
#else
#define GetTrusteeName GetTrusteeNameA
#endif // !UNICODE
WINADVAPI
TRUSTEE_TYPE
WINAPI
GetTrusteeTypeA(
__in_opt PTRUSTEE_A pTrustee
);
WINADVAPI
TRUSTEE_TYPE
WINAPI
GetTrusteeTypeW(
__in_opt PTRUSTEE_W pTrustee
);
#ifdef UNICODE
#define GetTrusteeType GetTrusteeTypeW
#else
#define GetTrusteeType GetTrusteeTypeA
#endif // !UNICODE
WINADVAPI
TRUSTEE_FORM
WINAPI
GetTrusteeFormA(
__in PTRUSTEE_A pTrustee
);
WINADVAPI
TRUSTEE_FORM
WINAPI
GetTrusteeFormW(
__in PTRUSTEE_W pTrustee
);
#ifdef UNICODE
#define GetTrusteeForm GetTrusteeFormW
#else
#define GetTrusteeForm GetTrusteeFormA
#endif // !UNICODE
WINADVAPI
MULTIPLE_TRUSTEE_OPERATION
WINAPI
GetMultipleTrusteeOperationA(
__in_opt PTRUSTEE_A pTrustee
);
WINADVAPI
MULTIPLE_TRUSTEE_OPERATION
WINAPI
GetMultipleTrusteeOperationW(
__in_opt PTRUSTEE_W pTrustee
);
#ifdef UNICODE
#define GetMultipleTrusteeOperation GetMultipleTrusteeOperationW
#else
#define GetMultipleTrusteeOperation GetMultipleTrusteeOperationA
#endif // !UNICODE
WINADVAPI
PTRUSTEE_A
WINAPI
GetMultipleTrusteeA(
__in_opt PTRUSTEE_A pTrustee
);
WINADVAPI
PTRUSTEE_W
WINAPI
GetMultipleTrusteeW(
__in_opt PTRUSTEE_W pTrustee
);
#ifdef UNICODE
#define GetMultipleTrustee GetMultipleTrusteeW
#else
#define GetMultipleTrustee GetMultipleTrusteeA
#endif // !UNICODE
//
// Temporary requirement for the technology preview, no longer required
//
#define AccProvInit(err)
#ifdef __cplusplus
}
#endif
#endif // __ACCESS_CONTROL_API__

310
BuildTools/Include/AclUI.h Normal file
View File

@ -0,0 +1,310 @@
/*+--------------------------------------------------------------------------
Microsoft Windows
Copyright (c) Microsoft Corporation. All rights reserved.
File: aclui.h
Contents: Definitions and prototypes for the ACLUI.DLL
---------------------------------------------------------------------------*/
#ifndef _ACLUI_H_
#define _ACLUI_H_
#if _MSC_VER > 1000
#pragma once
#endif
#include <objbase.h>
#include <commctrl.h> /* for HPROPSHEETPAGE */
#include <accctrl.h> /* for SE_OBJECT_TYPE */
#if (_MSC_VER >= 800)
#if (_MSC_VER >= 1200)
#pragma warning(push)
#endif
#pragma warning(disable:4001) /* nonstandard extension : single line comment */
#endif
#if !defined(_ACLUI_)
#define ACLUIAPI DECLSPEC_IMPORT WINAPI
#else
#define ACLUIAPI WINAPI
#endif
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
//
// ISecurityInformation interface
//
// Methods:
//
// GetObjectInformation - Allows UI to determine type of object being
// edited. Also allows determining if object is a container.
//
// GetSecurity - Allows retrieving of ACLs from the original object
// NOTE: ACLUI will LocalFree the security descriptor
// returned by GetSecurity.
// SetSecurity - Allows setting of the ACLs on the original object
//
// GetAccessRights - For retrieving the list of rights allowed
// on this object.
//
// MapGeneric - For mapping generic rights to standard & specific rights
//
// GetInheritTypes - For retrieving the list of possible sub-object types
// for a container.
//
// PropertySheetCallback - A method which is called back during the various
// security UI property pages so that specialized work can be
// done. Similar to PropSheetPageProc. If uMsg == PSPCB_CREATE,
// then any error return value other than E_NOTIMPL will abort
// the creation of that page. The type of page being created or
// destroyed is indicated by the uPage parameter.
//
typedef struct _SI_OBJECT_INFO
{
DWORD dwFlags;
HINSTANCE hInstance; // resources (e.g. strings) reside here
LPWSTR pszServerName; // must be present
LPWSTR pszObjectName; // must be present
LPWSTR pszPageTitle; // only valid if SI_PAGE_TITLE is set
GUID guidObjectType; // only valid if SI_OBJECT_GUID is set
} SI_OBJECT_INFO, *PSI_OBJECT_INFO;
// SI_OBJECT_INFO flags
#define SI_EDIT_PERMS 0x00000000L // always implied
#define SI_EDIT_OWNER 0x00000001L
#define SI_EDIT_AUDITS 0x00000002L
#define SI_CONTAINER 0x00000004L
#define SI_READONLY 0x00000008L
#define SI_ADVANCED 0x00000010L
#define SI_RESET 0x00000020L //equals to SI_RESET_DACL|SI_RESET_SACL|SI_RESET_OWNER
#define SI_OWNER_READONLY 0x00000040L
#define SI_EDIT_PROPERTIES 0x00000080L
#define SI_OWNER_RECURSE 0x00000100L
#define SI_NO_ACL_PROTECT 0x00000200L
#define SI_NO_TREE_APPLY 0x00000400L
#define SI_PAGE_TITLE 0x00000800L
#define SI_SERVER_IS_DC 0x00001000L
#define SI_RESET_DACL_TREE 0x00004000L
#define SI_RESET_SACL_TREE 0x00008000L
#define SI_OBJECT_GUID 0x00010000L
#define SI_EDIT_EFFECTIVE 0x00020000L
#define SI_RESET_DACL 0x00040000L
#define SI_RESET_SACL 0x00080000L
#define SI_RESET_OWNER 0x00100000L
#define SI_NO_ADDITIONAL_PERMISSION 0x00200000L
#if (NTDDI_VERSION >= NTDDI_VISTA)
#define SI_VIEW_ONLY 0x00400000L
#define SI_PERMS_ELEVATION_REQUIRED 0x01000000L
#define SI_AUDITS_ELEVATION_REQUIRED 0x02000000L
#define SI_OWNER_ELEVATION_REQUIRED 0x04000000L
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
#define SI_MAY_WRITE 0x10000000L //not sure if user can write permission
#define SI_EDIT_ALL (SI_EDIT_PERMS | SI_EDIT_OWNER | SI_EDIT_AUDITS)
typedef struct _SI_ACCESS
{
const GUID *pguid;
ACCESS_MASK mask;
LPCWSTR pszName; // may be resource ID
DWORD dwFlags;
} SI_ACCESS, *PSI_ACCESS;
// SI_ACCESS flags
#define SI_ACCESS_SPECIFIC 0x00010000L
#define SI_ACCESS_GENERAL 0x00020000L
#define SI_ACCESS_CONTAINER 0x00040000L // general access, container-only
#define SI_ACCESS_PROPERTY 0x00080000L
// ACE inheritance flags (CONTAINER_INHERIT_ACE, etc.) may also be set.
// They will be used as the inheritance when an access is turned on.
typedef struct _SI_INHERIT_TYPE
{
const GUID *pguid;
ULONG dwFlags;
LPCWSTR pszName; // may be resource ID
} SI_INHERIT_TYPE, *PSI_INHERIT_TYPE;
// SI_INHERIT_TYPE flags are a combination of INHERIT_ONLY_ACE,
// CONTAINER_INHERIT_ACE, and OBJECT_INHERIT_ACE.
typedef enum _SI_PAGE_TYPE
{
SI_PAGE_PERM=0,
SI_PAGE_ADVPERM,
SI_PAGE_AUDIT,
SI_PAGE_OWNER,
SI_PAGE_EFFECTIVE,
#if (NTDDI_VERSION >= NTDDI_VISTA)
SI_PAGE_TAKEOWNERSHIP,
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
} SI_PAGE_TYPE;
// Message to PropertySheetPageCallback (in addition to
// PSPCB_CREATE and PSPCB_RELEASE)
#define PSPCB_SI_INITDIALOG (WM_USER + 1)
#undef INTERFACE
#define INTERFACE ISecurityInformation
DECLARE_INTERFACE_IID_(ISecurityInformation, IUnknown, "965FC360-16FF-11d0-91CB-00AA00BBB723")
{
// *** IUnknown methods ***
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// *** ISecurityInformation methods ***
STDMETHOD(GetObjectInformation) (THIS_ PSI_OBJECT_INFO pObjectInfo ) PURE;
STDMETHOD(GetSecurity) (THIS_ SECURITY_INFORMATION RequestedInformation,
PSECURITY_DESCRIPTOR *ppSecurityDescriptor,
BOOL fDefault ) PURE;
STDMETHOD(SetSecurity) (THIS_ SECURITY_INFORMATION SecurityInformation,
PSECURITY_DESCRIPTOR pSecurityDescriptor ) PURE;
STDMETHOD(GetAccessRights) (THIS_ const GUID* pguidObjectType,
DWORD dwFlags, // SI_EDIT_AUDITS, SI_EDIT_PROPERTIES
PSI_ACCESS *ppAccess,
ULONG *pcAccesses,
ULONG *piDefaultAccess ) PURE;
STDMETHOD(MapGeneric) (THIS_ const GUID *pguidObjectType,
UCHAR *pAceFlags,
ACCESS_MASK *pMask) PURE;
STDMETHOD(GetInheritTypes) (THIS_ PSI_INHERIT_TYPE *ppInheritTypes,
ULONG *pcInheritTypes ) PURE;
STDMETHOD(PropertySheetPageCallback)(THIS_ HWND hwnd, UINT uMsg, SI_PAGE_TYPE uPage ) PURE;
};
typedef ISecurityInformation *LPSECURITYINFO;
#undef INTERFACE
#define INTERFACE ISecurityInformation2
DECLARE_INTERFACE_IID_(ISecurityInformation2, IUnknown, "c3ccfdb4-6f88-11d2-a3ce-00c04fb1782a")
{
// *** IUnknown methods ***
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// *** ISecurityInformation2 methods ***
STDMETHOD_(BOOL,IsDaclCanonical) (THIS_ IN PACL pDacl) PURE;
STDMETHOD(LookupSids) (THIS_ IN ULONG cSids, IN PSID *rgpSids, OUT LPDATAOBJECT *ppdo) PURE;
};
typedef ISecurityInformation2 *LPSECURITYINFO2;
// HGLOBAL containing SID_INFO_LIST returned by ISecurityInformation2::LookupSids
#define CFSTR_ACLUI_SID_INFO_LIST TEXT("CFSTR_ACLUI_SID_INFO_LIST")
// Data structures corresponding to CFSTR_ACLUI_SID_INFO_LIST
typedef struct _SID_INFO
{
PSID pSid;
PWSTR pwzCommonName;
PWSTR pwzClass; // Used for selecting icon, e.g. "User" or "Group"
PWSTR pwzUPN; // Optional, may be NULL
} SID_INFO, *PSID_INFO;
typedef struct _SID_INFO_LIST
{
ULONG cItems;
SID_INFO aSidInfo[ANYSIZE_ARRAY];
} SID_INFO_LIST, *PSID_INFO_LIST;
#undef INTERFACE
#define INTERFACE IEffectivePermission
DECLARE_INTERFACE_IID_(IEffectivePermission, IUnknown, "3853DC76-9F35-407c-88A1-D19344365FBC")
{
// *** IUnknown methods ***
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// *** ISecurityInformation methods ***
STDMETHOD(GetEffectivePermission) ( THIS_ const GUID* pguidObjectType,
PSID pUserSid,
LPCWSTR pszServerName,
PSECURITY_DESCRIPTOR pSD,
POBJECT_TYPE_LIST *ppObjectTypeList,
ULONG *pcObjectTypeListLength,
PACCESS_MASK *ppGrantedAccessList,
ULONG *pcGrantedAccessListLength) PURE;
};
typedef IEffectivePermission *LPEFFECTIVEPERMISSION;
#undef INTERFACE
#define INTERFACE ISecurityObjectTypeInfo
DECLARE_INTERFACE_IID_(ISecurityObjectTypeInfo, IUnknown, "FC3066EB-79EF-444b-9111-D18A75EBF2FA")
{
// *** IUnknown methods ***
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// *** ISecurityInformation methods ***
STDMETHOD(GetInheritSource)(SECURITY_INFORMATION si,
PACL pACL,
PINHERITED_FROM *ppInheritArray) PURE;
};
typedef ISecurityObjectTypeInfo *LPSecurityObjectTypeInfo;
#if (NTDDI_VERSION >= NTDDI_VISTA)
// Support for separation or read-only ACL viewer and elevated ACL editor
#undef INTERFACE
#define INTERFACE ISecurityInformation3
DECLARE_INTERFACE_IID_(ISecurityInformation3, IUnknown, "E2CDC9CC-31BD-4f8f-8C8B-B641AF516A1A")
{
// *** IUnknown methods ***
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// *** ISecurityInformation3 methods ***
STDMETHOD(GetFullResourceName) (THIS_ __out LPWSTR *ppszResourceName) PURE;
STDMETHOD(OpenElevatedEditor) (THIS_ IN HWND hWnd, IN SI_PAGE_TYPE uPage) PURE;
};
typedef ISecurityInformation3 *LPSECURITYINFO3;
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
// {965FC360-16FF-11d0-91CB-00AA00BBB723}
EXTERN_GUID(IID_ISecurityInformation, 0x965fc360, 0x16ff, 0x11d0, 0x91, 0xcb, 0x0, 0xaa, 0x0, 0xbb, 0xb7, 0x23);
// {c3ccfdb4-6f88-11d2-a3ce-00c04fb1782a}
EXTERN_GUID(IID_ISecurityInformation2, 0xc3ccfdb4, 0x6f88, 0x11d2, 0xa3, 0xce, 0x0, 0xc0, 0x4f, 0xb1, 0x78, 0x2a);
// {3853DC76-9F35-407c-88A1-D19344365FBC}
EXTERN_GUID(IID_IEffectivePermission, 0x3853dc76, 0x9f35, 0x407c, 0x88, 0xa1, 0xd1, 0x93, 0x44, 0x36, 0x5f, 0xbc);
// {FC3066EB-79EF-444b-9111-D18A75EBF2FA}
EXTERN_GUID(IID_ISecurityObjectTypeInfo, 0xfc3066eb, 0x79ef, 0x444b, 0x91, 0x11, 0xd1, 0x8a, 0x75, 0xeb, 0xf2, 0xfa);
#if (NTDDI_VERSION >= NTDDI_VISTA)
// {E2CDC9CC-31BD-4f8f-8C8B-B641AF516A1A}
EXTERN_GUID(IID_ISecurityInformation3, 0xe2cdc9cc, 0x31bd, 0x4f8f, 0x8c, 0x8b, 0xb6, 0x41, 0xaf, 0x51, 0x6a, 0x1a);
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
HPROPSHEETPAGE ACLUIAPI CreateSecurityPage(__in LPSECURITYINFO psi );
BOOL ACLUIAPI EditSecurity(__in HWND hwndOwner,
__in LPSECURITYINFO psi );
#if (NTDDI_VERSION >= NTDDI_VISTA)
HRESULT ACLUIAPI EditSecurityAdvanced(__in HWND hwndOwner,
__in LPSECURITYINFO psi,
__in SI_PAGE_TYPE uSIPage );
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
#ifdef __cplusplus
}
#endif /* __cplusplus */
#if (_MSC_VER >= 800)
#if (_MSC_VER >= 1200)
#pragma warning(pop)
#else
#pragma warning(default:4001)
#endif
#endif
#endif /* _ACLUI_H_ */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,63 @@
//+---------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1996-1999
//
// File: ads.h
//
// Contents: Master include file for Ole Ds
//
// Notes: All Ole Ds client applications must include this file. This
// provides access to the primary Ole Ds interfaces, the error
// codes, and function prototypes for the Ole Ds helper apis.
//
//----------------------------------------------------------------------------
#if _MSC_VER > 1000
#pragma once
#endif
//
// Interface definitions and well known GUIDS for Ole Ds
//
#include "iads.h"
//
// Helper function prototypes for Ole Ds
//
#include "adshlp.h"
//
// Error codes for Ole Ds - generated from ..\..\errmsg
//
#include "adserr.h"
//
// Globally accessible GUIDS
//
#include "adsiid.h"
//
// Status codes for ads objects
//
#include "adssts.h"
//
// Schema class names and other schema related definitions
//
#include "adsnms.h"
//
// Definitions in the OLE DB provider for ADSI
//
#include "adsdb.h"

528
BuildTools/Include/Admex.h Normal file
View File

@ -0,0 +1,528 @@
#pragma warning( disable: 4049 ) /* more than 64k source lines */
#pragma warning( disable: 4100 ) /* unreferenced arguments in x86 call */
#pragma warning( disable: 4211 ) /* redefine extent to static */
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 6.00.0358 */
/* Compiler settings for admex.idl:
Oicf, W1, Zp8, env=Win32 (32b run)
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
//@@MIDL_FILE_HEADING( )
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 475
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#ifndef __admex_h__
#define __admex_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifndef __IMSAdminReplication_FWD_DEFINED__
#define __IMSAdminReplication_FWD_DEFINED__
typedef interface IMSAdminReplication IMSAdminReplication;
#endif /* __IMSAdminReplication_FWD_DEFINED__ */
#ifndef __IMSAdminCryptoCapabilities_FWD_DEFINED__
#define __IMSAdminCryptoCapabilities_FWD_DEFINED__
typedef interface IMSAdminCryptoCapabilities IMSAdminCryptoCapabilities;
#endif /* __IMSAdminCryptoCapabilities_FWD_DEFINED__ */
/* header files for imported files */
#include "unknwn.h"
#include "objidl.h"
#include "ocidl.h"
#ifdef __cplusplus
extern "C"{
#endif
void * __RPC_USER MIDL_user_allocate(size_t);
void __RPC_USER MIDL_user_free( void * );
/* interface __MIDL_itf_admex_0000 */
/* [local] */
/*++
Copyright (c) 1997-1999 Microsoft Corporation
Module Name: admex.h
Admin Extension Objects Interfaces
--*/
#ifndef _ADMEX_IADM_
#define _ADMEX_IADM_
DEFINE_GUID(IID_IMSAdminReplication, 0xc804d980, 0xebec, 0x11d0, 0xa6, 0xa0, 0x0,0xa0, 0xc9, 0x22, 0xe7, 0x52);
DEFINE_GUID(IID_IMSAdminCryptoCapabilities, 0x78b64540, 0xf26d, 0x11d0, 0xa6, 0xa3, 0x0,0xa0, 0xc9, 0x22, 0xe7, 0x52);
DEFINE_GUID(CLSID_MSCryptoAdmEx, 0x9f0bd3a0, 0xec01, 0x11d0, 0xa6, 0xa0, 0x0,0xa0, 0xc9, 0x22, 0xe7, 0x52);
/*
The Replication Interface
*/
extern RPC_IF_HANDLE __MIDL_itf_admex_0000_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_admex_0000_v0_0_s_ifspec;
#ifndef __IMSAdminReplication_INTERFACE_DEFINED__
#define __IMSAdminReplication_INTERFACE_DEFINED__
/* interface IMSAdminReplication */
/* [unique][uuid][object] */
EXTERN_C const IID IID_IMSAdminReplication;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("c804d980-ebec-11d0-a6a0-00a0c922e752")
IMSAdminReplication : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE GetSignature(
/* [in] */ DWORD dwBufferSize,
/* [size_is][out] */ unsigned char *pbBuffer,
/* [out] */ DWORD *pdwMDRequiredBufferSize) = 0;
virtual HRESULT STDMETHODCALLTYPE Propagate(
/* [in] */ DWORD dwBufferSize,
/* [size_is][in] */ unsigned char *pszBuffer) = 0;
virtual HRESULT STDMETHODCALLTYPE Propagate2(
/* [in] */ DWORD dwBufferSize,
/* [size_is][in] */ unsigned char *pszBuffer,
/* [in] */ DWORD dwSignatureMismatch) = 0;
virtual HRESULT STDMETHODCALLTYPE Serialize(
/* [in] */ DWORD dwBufferSize,
/* [size_is][out] */ unsigned char *pbBuffer,
/* [out] */ DWORD *pdwMDRequiredBufferSize) = 0;
virtual HRESULT STDMETHODCALLTYPE DeSerialize(
/* [in] */ DWORD dwBufferSize,
/* [size_is][in] */ unsigned char *pbBuffer) = 0;
};
#else /* C style interface */
typedef struct IMSAdminReplicationVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IMSAdminReplication * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IMSAdminReplication * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IMSAdminReplication * This);
HRESULT ( STDMETHODCALLTYPE *GetSignature )(
IMSAdminReplication * This,
/* [in] */ DWORD dwBufferSize,
/* [size_is][out] */ unsigned char *pbBuffer,
/* [out] */ DWORD *pdwMDRequiredBufferSize);
HRESULT ( STDMETHODCALLTYPE *Propagate )(
IMSAdminReplication * This,
/* [in] */ DWORD dwBufferSize,
/* [size_is][in] */ unsigned char *pszBuffer);
HRESULT ( STDMETHODCALLTYPE *Propagate2 )(
IMSAdminReplication * This,
/* [in] */ DWORD dwBufferSize,
/* [size_is][in] */ unsigned char *pszBuffer,
/* [in] */ DWORD dwSignatureMismatch);
HRESULT ( STDMETHODCALLTYPE *Serialize )(
IMSAdminReplication * This,
/* [in] */ DWORD dwBufferSize,
/* [size_is][out] */ unsigned char *pbBuffer,
/* [out] */ DWORD *pdwMDRequiredBufferSize);
HRESULT ( STDMETHODCALLTYPE *DeSerialize )(
IMSAdminReplication * This,
/* [in] */ DWORD dwBufferSize,
/* [size_is][in] */ unsigned char *pbBuffer);
END_INTERFACE
} IMSAdminReplicationVtbl;
interface IMSAdminReplication
{
CONST_VTBL struct IMSAdminReplicationVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IMSAdminReplication_QueryInterface(This,riid,ppvObject) \
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
#define IMSAdminReplication_AddRef(This) \
(This)->lpVtbl -> AddRef(This)
#define IMSAdminReplication_Release(This) \
(This)->lpVtbl -> Release(This)
#define IMSAdminReplication_GetSignature(This,dwBufferSize,pbBuffer,pdwMDRequiredBufferSize) \
(This)->lpVtbl -> GetSignature(This,dwBufferSize,pbBuffer,pdwMDRequiredBufferSize)
#define IMSAdminReplication_Propagate(This,dwBufferSize,pszBuffer) \
(This)->lpVtbl -> Propagate(This,dwBufferSize,pszBuffer)
#define IMSAdminReplication_Propagate2(This,dwBufferSize,pszBuffer,dwSignatureMismatch) \
(This)->lpVtbl -> Propagate2(This,dwBufferSize,pszBuffer,dwSignatureMismatch)
#define IMSAdminReplication_Serialize(This,dwBufferSize,pbBuffer,pdwMDRequiredBufferSize) \
(This)->lpVtbl -> Serialize(This,dwBufferSize,pbBuffer,pdwMDRequiredBufferSize)
#define IMSAdminReplication_DeSerialize(This,dwBufferSize,pbBuffer) \
(This)->lpVtbl -> DeSerialize(This,dwBufferSize,pbBuffer)
#endif /* COBJMACROS */
#endif /* C style interface */
HRESULT STDMETHODCALLTYPE IMSAdminReplication_GetSignature_Proxy(
IMSAdminReplication * This,
/* [in] */ DWORD dwBufferSize,
/* [size_is][out] */ unsigned char *pbBuffer,
/* [out] */ DWORD *pdwMDRequiredBufferSize);
void __RPC_STUB IMSAdminReplication_GetSignature_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMSAdminReplication_Propagate_Proxy(
IMSAdminReplication * This,
/* [in] */ DWORD dwBufferSize,
/* [size_is][in] */ unsigned char *pszBuffer);
void __RPC_STUB IMSAdminReplication_Propagate_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMSAdminReplication_Propagate2_Proxy(
IMSAdminReplication * This,
/* [in] */ DWORD dwBufferSize,
/* [size_is][in] */ unsigned char *pszBuffer,
/* [in] */ DWORD dwSignatureMismatch);
void __RPC_STUB IMSAdminReplication_Propagate2_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMSAdminReplication_Serialize_Proxy(
IMSAdminReplication * This,
/* [in] */ DWORD dwBufferSize,
/* [size_is][out] */ unsigned char *pbBuffer,
/* [out] */ DWORD *pdwMDRequiredBufferSize);
void __RPC_STUB IMSAdminReplication_Serialize_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMSAdminReplication_DeSerialize_Proxy(
IMSAdminReplication * This,
/* [in] */ DWORD dwBufferSize,
/* [size_is][in] */ unsigned char *pbBuffer);
void __RPC_STUB IMSAdminReplication_DeSerialize_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IMSAdminReplication_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_admex_0255 */
/* [local] */
/*
The Crypto capabilities Interface
*/
extern RPC_IF_HANDLE __MIDL_itf_admex_0255_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_admex_0255_v0_0_s_ifspec;
#ifndef __IMSAdminCryptoCapabilities_INTERFACE_DEFINED__
#define __IMSAdminCryptoCapabilities_INTERFACE_DEFINED__
/* interface IMSAdminCryptoCapabilities */
/* [unique][uuid][object] */
EXTERN_C const IID IID_IMSAdminCryptoCapabilities;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("78b64540-f26d-11d0-a6a3-00a0c922e752")
IMSAdminCryptoCapabilities : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE GetProtocols(
/* [in] */ DWORD dwBufferSize,
/* [size_is][out] */ unsigned char *pbBuffer,
/* [out] */ DWORD *pdwMDRequiredBufferSize) = 0;
virtual HRESULT STDMETHODCALLTYPE GetMaximumCipherStrength(
/* [out] */ LPDWORD pdwMaximumCipherStrength) = 0;
virtual HRESULT STDMETHODCALLTYPE GetRootCertificates(
/* [in] */ DWORD dwBufferSize,
/* [size_is][out] */ unsigned char *pbBuffer,
/* [out] */ DWORD *pdwMDRequiredBufferSize) = 0;
virtual HRESULT STDMETHODCALLTYPE GetSupportedAlgs(
/* [in] */ DWORD dwBufferSize,
/* [size_is][out] */ DWORD *pbBuffer,
/* [out] */ DWORD *pdwMDRequiredBufferSize) = 0;
virtual HRESULT STDMETHODCALLTYPE SetCAList(
/* [in] */ DWORD dwBufferSize,
/* [size_is][in] */ unsigned char *pbBuffer) = 0;
};
#else /* C style interface */
typedef struct IMSAdminCryptoCapabilitiesVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IMSAdminCryptoCapabilities * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IMSAdminCryptoCapabilities * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IMSAdminCryptoCapabilities * This);
HRESULT ( STDMETHODCALLTYPE *GetProtocols )(
IMSAdminCryptoCapabilities * This,
/* [in] */ DWORD dwBufferSize,
/* [size_is][out] */ unsigned char *pbBuffer,
/* [out] */ DWORD *pdwMDRequiredBufferSize);
HRESULT ( STDMETHODCALLTYPE *GetMaximumCipherStrength )(
IMSAdminCryptoCapabilities * This,
/* [out] */ LPDWORD pdwMaximumCipherStrength);
HRESULT ( STDMETHODCALLTYPE *GetRootCertificates )(
IMSAdminCryptoCapabilities * This,
/* [in] */ DWORD dwBufferSize,
/* [size_is][out] */ unsigned char *pbBuffer,
/* [out] */ DWORD *pdwMDRequiredBufferSize);
HRESULT ( STDMETHODCALLTYPE *GetSupportedAlgs )(
IMSAdminCryptoCapabilities * This,
/* [in] */ DWORD dwBufferSize,
/* [size_is][out] */ DWORD *pbBuffer,
/* [out] */ DWORD *pdwMDRequiredBufferSize);
HRESULT ( STDMETHODCALLTYPE *SetCAList )(
IMSAdminCryptoCapabilities * This,
/* [in] */ DWORD dwBufferSize,
/* [size_is][in] */ unsigned char *pbBuffer);
END_INTERFACE
} IMSAdminCryptoCapabilitiesVtbl;
interface IMSAdminCryptoCapabilities
{
CONST_VTBL struct IMSAdminCryptoCapabilitiesVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IMSAdminCryptoCapabilities_QueryInterface(This,riid,ppvObject) \
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
#define IMSAdminCryptoCapabilities_AddRef(This) \
(This)->lpVtbl -> AddRef(This)
#define IMSAdminCryptoCapabilities_Release(This) \
(This)->lpVtbl -> Release(This)
#define IMSAdminCryptoCapabilities_GetProtocols(This,dwBufferSize,pbBuffer,pdwMDRequiredBufferSize) \
(This)->lpVtbl -> GetProtocols(This,dwBufferSize,pbBuffer,pdwMDRequiredBufferSize)
#define IMSAdminCryptoCapabilities_GetMaximumCipherStrength(This,pdwMaximumCipherStrength) \
(This)->lpVtbl -> GetMaximumCipherStrength(This,pdwMaximumCipherStrength)
#define IMSAdminCryptoCapabilities_GetRootCertificates(This,dwBufferSize,pbBuffer,pdwMDRequiredBufferSize) \
(This)->lpVtbl -> GetRootCertificates(This,dwBufferSize,pbBuffer,pdwMDRequiredBufferSize)
#define IMSAdminCryptoCapabilities_GetSupportedAlgs(This,dwBufferSize,pbBuffer,pdwMDRequiredBufferSize) \
(This)->lpVtbl -> GetSupportedAlgs(This,dwBufferSize,pbBuffer,pdwMDRequiredBufferSize)
#define IMSAdminCryptoCapabilities_SetCAList(This,dwBufferSize,pbBuffer) \
(This)->lpVtbl -> SetCAList(This,dwBufferSize,pbBuffer)
#endif /* COBJMACROS */
#endif /* C style interface */
HRESULT STDMETHODCALLTYPE IMSAdminCryptoCapabilities_GetProtocols_Proxy(
IMSAdminCryptoCapabilities * This,
/* [in] */ DWORD dwBufferSize,
/* [size_is][out] */ unsigned char *pbBuffer,
/* [out] */ DWORD *pdwMDRequiredBufferSize);
void __RPC_STUB IMSAdminCryptoCapabilities_GetProtocols_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMSAdminCryptoCapabilities_GetMaximumCipherStrength_Proxy(
IMSAdminCryptoCapabilities * This,
/* [out] */ LPDWORD pdwMaximumCipherStrength);
void __RPC_STUB IMSAdminCryptoCapabilities_GetMaximumCipherStrength_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMSAdminCryptoCapabilities_GetRootCertificates_Proxy(
IMSAdminCryptoCapabilities * This,
/* [in] */ DWORD dwBufferSize,
/* [size_is][out] */ unsigned char *pbBuffer,
/* [out] */ DWORD *pdwMDRequiredBufferSize);
void __RPC_STUB IMSAdminCryptoCapabilities_GetRootCertificates_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMSAdminCryptoCapabilities_GetSupportedAlgs_Proxy(
IMSAdminCryptoCapabilities * This,
/* [in] */ DWORD dwBufferSize,
/* [size_is][out] */ DWORD *pbBuffer,
/* [out] */ DWORD *pdwMDRequiredBufferSize);
void __RPC_STUB IMSAdminCryptoCapabilities_GetSupportedAlgs_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IMSAdminCryptoCapabilities_SetCAList_Proxy(
IMSAdminCryptoCapabilities * This,
/* [in] */ DWORD dwBufferSize,
/* [size_is][in] */ unsigned char *pbBuffer);
void __RPC_STUB IMSAdminCryptoCapabilities_SetCAList_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IMSAdminCryptoCapabilities_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_admex_0256 */
/* [local] */
#endif
extern RPC_IF_HANDLE __MIDL_itf_admex_0256_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_admex_0256_v0_0_s_ifspec;
/* Additional Prototypes for ALL interfaces */
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,31 @@
//+---------------------------------------------------------------------------
// Copyright (C) 1996-1999, Microsoft Corporation.
//
// File: adsdb.h
//
// Contents: Definitions for the OLE DB provider for ADSI
//
//----------------------------------------------------------------------------
#if _MSC_VER > 1000
#pragma once
#endif
//
// printer status values
//
#ifdef __cplusplus
extern "C" {
#endif
// Most of the constants have been moved into an enum in adstype.h and
// are available publicly in iads.h. This file has been left here so that
// old references to adsdb.h do not break compiles.
#define DBPROPFLAGS_ADSISEARCH 0x0000C000
#ifdef __cplusplus
}
#endif

267
BuildTools/Include/AdsErr.h Normal file
View File

@ -0,0 +1,267 @@
/*++ BUILD Version: 0001 // Increment this if a change has global effects
Copyright (c) 1991-1999 Microsoft Corporation
Module Name:
oledserr.mc
Abstract:
Error codes for ADs
Revision History:
--*/
#if _MSC_VER > 1000
#pragma once
#endif
// ---------------------- HRESULT value definitions -----------------
//
// HRESULT definitions
//
#ifdef RC_INVOKED
#define _HRESULT_TYPEDEF_(_sc) _sc
#else // RC_INVOKED
#define _HRESULT_TYPEDEF_(_sc) ((HRESULT)_sc)
#endif // RC_INVOKED
//
// Values are 32 bit values layed out as follows:
//
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
// +---+-+-+-----------------------+-------------------------------+
// |Sev|C|R| Facility | Code |
// +---+-+-+-----------------------+-------------------------------+
//
// where
//
// Sev - is the severity code
//
// 00 - Success
// 01 - Informational
// 10 - Warning
// 11 - Error
//
// C - is the Customer code flag
//
// R - is a reserved bit
//
// Facility - is the facility code
//
// Code - is the facility's status code
//
//
// Define the facility codes
//
#define FACILITY_WINDOWS 8
#define FACILITY_STORAGE 3
#define FACILITY_RPC 1
#define FACILITY_SSPI 9
#define FACILITY_WIN32 7
#define FACILITY_CONTROL 10
#define FACILITY_NULL 0
#define FACILITY_ITF 4
#define FACILITY_DISPATCH 2
//
// Define the severity codes
//
//
// MessageId: E_ADS_BAD_PATHNAME
//
// MessageText:
//
// An invalid directory pathname was passed
//
#define E_ADS_BAD_PATHNAME _HRESULT_TYPEDEF_(0x80005000L)
//
// MessageId: E_ADS_INVALID_DOMAIN_OBJECT
//
// MessageText:
//
// An unknown directory domain object was requested
//
#define E_ADS_INVALID_DOMAIN_OBJECT _HRESULT_TYPEDEF_(0x80005001L)
//
// MessageId: E_ADS_INVALID_USER_OBJECT
//
// MessageText:
//
// An unknown directory user object was requested
//
#define E_ADS_INVALID_USER_OBJECT _HRESULT_TYPEDEF_(0x80005002L)
//
// MessageId: E_ADS_INVALID_COMPUTER_OBJECT
//
// MessageText:
//
// An unknown directory computer object was requested
//
#define E_ADS_INVALID_COMPUTER_OBJECT _HRESULT_TYPEDEF_(0x80005003L)
//
// MessageId: E_ADS_UNKNOWN_OBJECT
//
// MessageText:
//
// An unknown directory object was requested
//
#define E_ADS_UNKNOWN_OBJECT _HRESULT_TYPEDEF_(0x80005004L)
//
// MessageId: E_ADS_PROPERTY_NOT_SET
//
// MessageText:
//
// The specified directory property was not set
//
#define E_ADS_PROPERTY_NOT_SET _HRESULT_TYPEDEF_(0x80005005L)
//
// MessageId: E_ADS_PROPERTY_NOT_SUPPORTED
//
// MessageText:
//
// The specified directory property is not supported
//
#define E_ADS_PROPERTY_NOT_SUPPORTED _HRESULT_TYPEDEF_(0x80005006L)
//
// MessageId: E_ADS_PROPERTY_INVALID
//
// MessageText:
//
// The specified directory property is invalid
//
#define E_ADS_PROPERTY_INVALID _HRESULT_TYPEDEF_(0x80005007L)
//
// MessageId: E_ADS_BAD_PARAMETER
//
// MessageText:
//
// One or more input parameters are invalid
//
#define E_ADS_BAD_PARAMETER _HRESULT_TYPEDEF_(0x80005008L)
//
// MessageId: E_ADS_OBJECT_UNBOUND
//
// MessageText:
//
// The specified directory object is not bound to a remote resource
//
#define E_ADS_OBJECT_UNBOUND _HRESULT_TYPEDEF_(0x80005009L)
//
// MessageId: E_ADS_PROPERTY_NOT_MODIFIED
//
// MessageText:
//
// The specified directory object has not been modified
//
#define E_ADS_PROPERTY_NOT_MODIFIED _HRESULT_TYPEDEF_(0x8000500AL)
//
// MessageId: E_ADS_PROPERTY_MODIFIED
//
// MessageText:
//
// The specified directory object has been modified
//
#define E_ADS_PROPERTY_MODIFIED _HRESULT_TYPEDEF_(0x8000500BL)
//
// MessageId: E_ADS_CANT_CONVERT_DATATYPE
//
// MessageText:
//
// The directory datatype cannot be converted to/from a native DS datatype
//
#define E_ADS_CANT_CONVERT_DATATYPE _HRESULT_TYPEDEF_(0x8000500CL)
//
// MessageId: E_ADS_PROPERTY_NOT_FOUND
//
// MessageText:
//
// The directory property cannot be found in the cache.
//
#define E_ADS_PROPERTY_NOT_FOUND _HRESULT_TYPEDEF_(0x8000500DL)
//
// MessageId: E_ADS_OBJECT_EXISTS
//
// MessageText:
//
// The directory object exists.
//
#define E_ADS_OBJECT_EXISTS _HRESULT_TYPEDEF_(0x8000500EL)
//
// MessageId: E_ADS_SCHEMA_VIOLATION
//
// MessageText:
//
// The attempted action violates the DS schema rules.
//
#define E_ADS_SCHEMA_VIOLATION _HRESULT_TYPEDEF_(0x8000500FL)
//
// MessageId: E_ADS_COLUMN_NOT_SET
//
// MessageText:
//
// The specified column in the directory was not set.
//
#define E_ADS_COLUMN_NOT_SET _HRESULT_TYPEDEF_(0x80005010L)
//
// MessageId: S_ADS_ERRORSOCCURRED
//
// MessageText:
//
// One or more errors occurred
//
#define S_ADS_ERRORSOCCURRED _HRESULT_TYPEDEF_(0x00005011L)
//
// MessageId: S_ADS_NOMORE_ROWS
//
// MessageText:
//
// No more rows to be obatained by the search result.
//
#define S_ADS_NOMORE_ROWS _HRESULT_TYPEDEF_(0x00005012L)
//
// MessageId: S_ADS_NOMORE_COLUMNS
//
// MessageText:
//
// No more columns to be obatained for the current row.
//
#define S_ADS_NOMORE_COLUMNS _HRESULT_TYPEDEF_(0x00005013L)
//
// MessageId: E_ADS_INVALID_FILTER
//
// MessageText:
//
// The search filter specified is invalid
//
#define E_ADS_INVALID_FILTER _HRESULT_TYPEDEF_(0x80005014L)

233
BuildTools/Include/AdsHlp.h Normal file
View File

@ -0,0 +1,233 @@
//+---------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1996-1999
//
// File: oleds.h
//
// Contents: Public header file for all oleds client code
//
//----------------------------------------------------------------------------
#ifndef _ADSHLP_
#define _ADSHLP_
#if _MSC_VER > 1000
#pragma once
#endif
#ifdef __cplusplus
extern "C" {
#endif
HRESULT WINAPI
ADsGetObject(
LPCWSTR lpszPathName,
REFIID riid,
VOID * * ppObject
);
HRESULT WINAPI
ADsBuildEnumerator(
IADsContainer *pADsContainer,
IEnumVARIANT **ppEnumVariant
);
HRESULT WINAPI
ADsFreeEnumerator(
IEnumVARIANT *pEnumVariant
);
HRESULT WINAPI
ADsEnumerateNext(
IEnumVARIANT *pEnumVariant,
ULONG cElements,
VARIANT FAR *pvar,
ULONG FAR *pcElementsFetched
);
HRESULT WINAPI
ADsBuildVarArrayStr(
__in_ecount(dwPathNames) LPWSTR * lppPathNames,
DWORD dwPathNames,
VARIANT * pVar
);
HRESULT WINAPI
ADsBuildVarArrayInt(
LPDWORD lpdwObjectTypes,
DWORD dwObjectTypes,
VARIANT * pVar
);
HRESULT WINAPI
ADsOpenObject(
LPCWSTR lpszPathName,
LPCWSTR lpszUserName,
LPCWSTR lpszPassword,
DWORD dwReserved,
REFIID riid,
void FAR * FAR * ppObject
);
//
// Helper functions for extended error support
//
HRESULT WINAPI
ADsGetLastError(
OUT LPDWORD lpError,
__out_ecount(dwErrorBufLen) LPWSTR lpErrorBuf,
IN DWORD dwErrorBufLen,
__out_ecount(dwNameBufLen) LPWSTR lpNameBuf,
IN DWORD dwNameBufLen
);
VOID WINAPI
ADsSetLastError(
IN DWORD dwErr,
IN LPCWSTR pszError,
IN LPCWSTR pszProvider
);
VOID WINAPI
ADsFreeAllErrorRecords(
VOID);
LPVOID WINAPI
AllocADsMem(
DWORD cb
);
BOOL WINAPI
FreeADsMem(
LPVOID pMem
);
LPVOID WINAPI
ReallocADsMem(
LPVOID pOldMem,
DWORD cbOld,
DWORD cbNew
);
LPWSTR WINAPI
AllocADsStr(
LPCWSTR pStr
);
BOOL WINAPI
FreeADsStr(
__in LPWSTR pStr
);
BOOL WINAPI
ReallocADsStr(
__deref_inout LPWSTR *ppStr,
__in LPWSTR pStr
);
HRESULT WINAPI
ADsEncodeBinaryData (
PBYTE pbSrcData,
DWORD dwSrcLen,
__deref_out LPWSTR * ppszDestData
);
HRESULT WINAPI
ADsDecodeBinaryData (
LPCWSTR szSrcData,
PBYTE *ppbDestData,
ULONG *pdwDestLen
);
HRESULT WINAPI
PropVariantToAdsType(
VARIANT * pVariant,
DWORD dwNumVariant,
PADSVALUE *ppAdsValues,
PDWORD pdwNumValues
);
HRESULT WINAPI
AdsTypeToPropVariant(
PADSVALUE pAdsValues,
DWORD dwNumValues,
VARIANT * pVariant
);
void WINAPI
AdsFreeAdsValues(
PADSVALUE pAdsValues,
DWORD dwNumValues
);
//
// Helper routines to convert IADsSecurityDescriptor to a binary
// security descriptor and also to convert a binary SD to
// IADsSecurityDescriptor.
//
HRESULT WINAPI
BinarySDToSecurityDescriptor(
PSECURITY_DESCRIPTOR pSecurityDescriptor,
VARIANT *pVarsec,
LPCWSTR pszServerName,
LPCWSTR userName,
LPCWSTR passWord,
DWORD dwFlags
);
HRESULT WINAPI
SecurityDescriptorToBinarySD(
VARIANT vVarSecDes,
PSECURITY_DESCRIPTOR * ppSecurityDescriptor,
PDWORD pdwSDLength,
LPCWSTR pszServerName,
LPCWSTR userName,
LPCWSTR passWord,
DWORD dwFlags
);
#if DBG
extern LIST_ENTRY ADsMemList ;
extern CRITICAL_SECTION ADsMemCritSect ;
VOID InitADsMem(
VOID
) ;
VOID AssertADsMemLeaks(
VOID
) ;
VOID
DumpMemoryTracker();
#else
#define InitADsMem()
#define AssertADsMemLeaks()
#define DumpMemoryTracker()
#endif
#ifdef __cplusplus
}
#endif
#endif // _ADSHLP_

View File

@ -0,0 +1,205 @@
//+----------------------------------------------------------------------------
//
// Windows NT Active Directory Service Property Pages
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1992-1999.
//
// File: adsprop.h
//
// Contents: Functions and definitions used in the creation of AD property
// sheets.
//
// History: 28-Sept-98 Eric Brown created.
//
//-----------------------------------------------------------------------------
#ifndef _ADSPROP_H_
#define _ADSPROP_H_
#if _MSC_VER > 1000
#pragma once
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define WM_ADSPROP_NOTIFY_PAGEINIT (WM_USER + 1101) // where LPARAM is the PADSPROPINITPARAMS pointer.
#define WM_ADSPROP_NOTIFY_PAGEHWND (WM_USER + 1102) // where WPARAM => page's HWND and LPARAM => page's Title
#define WM_ADSPROP_NOTIFY_CHANGE (WM_USER + 1103) // used to send a change notification to a parent sheet
#define WM_ADSPROP_NOTIFY_APPLY (WM_USER + 1104) // pages send this to the notification object.
#define WM_ADSPROP_NOTIFY_SETFOCUS (WM_USER + 1105) // used internally by the notification object.
#define WM_ADSPROP_NOTIFY_FOREGROUND (WM_USER + 1106) // used internally by the notification object.
#define WM_ADSPROP_NOTIFY_EXIT (WM_USER + 1107) // sent on page release
#define WM_ADSPROP_NOTIFY_ERROR (WM_USER + 1110) // used to send the notification object an error message
//+----------------------------------------------------------------------------
//
// Structure: ADSPROPINITPARAMS
//
// Usage: Used to pass page initialization information to new pages from
// the notify object.
//
//-----------------------------------------------------------------------------
typedef struct _ADSPROPINITPARAMS {
DWORD dwSize; // Set this to the size of the struct.
DWORD dwFlags; // Reserved for future use.
HRESULT hr; // If this is non-zero, then the others
IDirectoryObject * pDsObj; // should be ignored.
LPWSTR pwzCN;
PADS_ATTR_INFO pWritableAttrs;
} ADSPROPINITPARAMS, * PADSPROPINITPARAMS;
//+----------------------------------------------------------------------------
//
// Structure: ADSPROPERROR
//
// Usage: Used to pass page error information to the notify object
//
//-----------------------------------------------------------------------------
typedef struct _ADSPROPERROR {
HWND hwndPage; // The HWND of the page that had the error
PWSTR pszPageTitle; // The title of the page that had the error
PWSTR pszObjPath; // Path to the object that the error occurred on
PWSTR pszObjClass; // Class of the object that the error occurred on
HRESULT hr; // If this is non-zero, then the others
// pszError will be ignored
PWSTR pszError; // An error message. Used only if hr is zero
} ADSPROPERROR, * PADSPROPERROR;
//+----------------------------------------------------------------------------
//
// Function: ADsPropCreateNotifyObj
//
// Synopsis: Checks to see if the notification window/object exists for this
// sheet instance and if not creates it.
//
// Arguments: [pAppThdDataObj] - the unmarshalled data object pointer.
// [pwzADsObjName] - object path name.
// [phNotifyObj] - to return the notificion window handle.
//
// Returns: HRESULTs.
//
//-----------------------------------------------------------------------------
STDAPI
ADsPropCreateNotifyObj(LPDATAOBJECT pAppThdDataObj, __in PWSTR pwzADsObjName,
HWND * phNotifyObj);
//+----------------------------------------------------------------------------
//
// Function: ADsPropGetInitInfo
//
// Synopsis: Pages call this at their init time to retreive DS object info.
//
// Arguments: [hNotifyObj] - the notificion window handle.
// [pInitParams] - struct filled in with DS object info. This
// struct must be allocated by the caller before
// the call.
//
// Returns: FALSE if the notify window has gone away for some reason or
// if the parameters are invalid.
//
// Notes: This call results in the sending of the
// WM_ADSPROP_NOTIFY_PAGEINIT message to the notify window.
// pInitParams->pWritableAttrs can be NULL if there are no
// writable attributes.
//
//-----------------------------------------------------------------------------
STDAPI_(BOOL)
ADsPropGetInitInfo(HWND hNotifyObj, PADSPROPINITPARAMS pInitParams);
//+----------------------------------------------------------------------------
//
// Function: ADsPropSetHwndWithTitle
//
// Synopsis: Pages call this at their dialog init time to send their hwnd
// to the Notify object.
//
// Arguments: [hNotifyObj] - the notificion window handle.
// [hPage] - the page's window handle.
// [ptzTitle] - the page's title
//
// Returns: FALSE if the notify window has gone away for some reason.
//
// Notes: Sends the WM_ADSPROP_NOTIFY_PAGEHWND message to the notify
// window. Use this function instead of ADsPropSetHwnd for
// multi-select property pages
//
//-----------------------------------------------------------------------------
STDAPI_(BOOL)
ADsPropSetHwndWithTitle(HWND hNotifyObj, HWND hPage, __in PTSTR ptzTitle);
//+----------------------------------------------------------------------------
//
// Function: ADsPropSetHwnd
//
// Synopsis: Pages call this at their dialog init time to send their hwnd
// to the Notify object.
//
// Arguments: [hNotifyObj] - the notificion window handle.
// [hPage] - the page's window handle.
//
// Returns: FALSE if the notify window has gone away for some reason.
//
// Notes: Sends the WM_ADSPROP_NOTIFY_PAGEHWND message to the notify
// window.
//
//-----------------------------------------------------------------------------
STDAPI_(BOOL)
ADsPropSetHwnd(HWND hNotifyObj, HWND hPage);
//+----------------------------------------------------------------------------
//
// function: ADsPropCheckIfWritable
//
// Synopsis: See if the attribute is writable by checking if it is in
// the allowedAttributesEffective array.
//
// Arguments: [pwzAttr] - the attribute name.
// [pWritableAttrs] - the array of writable attributes.
//
// Returns: FALSE if the attribute name is not found in the writable-attrs
// array or if the array pointer is NULL.
//
//-----------------------------------------------------------------------------
STDAPI_(BOOL)
ADsPropCheckIfWritable(__in const PWSTR pwzAttr, const PADS_ATTR_INFO pWritableAttrs);
//+----------------------------------------------------------------------------
//
// function: ADsPropSendErrorMessage
//
// Synopsis: Adds an error message to a list which is presented when
// ADsPropShowErrorDialog is called
//
// Arguments: [hNotifyObj] - the notificion window handle.
// [pError] - the error structure
//
// Returns: FALSE if the notify window has gone away for some reason.
//
//-----------------------------------------------------------------------------
STDAPI_(BOOL)
ADsPropSendErrorMessage(HWND hNotifyObj, PADSPROPERROR pError);
//+----------------------------------------------------------------------------
//
// function: ADsPropShowErrorDialog
//
// Synopsis: Presents an error dialog with the error messages accumulated
// through calls to ADsPropSendErrorMessage
//
// Arguments: [hNotifyObj] - the notificion window handle.
// [hPage] - the property page window handle.
//
// Returns: FALSE if the notify window has gone away for some reason.
//
//-----------------------------------------------------------------------------
STDAPI_(BOOL)
ADsPropShowErrorDialog(HWND hNotifyObj, HWND hPage);
#ifdef __cplusplus
}
#endif // __cplusplus
#endif // _ADSPROP_H_

View File

@ -0,0 +1,64 @@
//+---------------------------------------------------------------------------
// Copyright (C) 1996-1999, Microsoft Corporation.
//
// File: oledsnms.h
//
// Contents: Class Names and schema definitions for ADS objects
//
//----------------------------------------------------------------------------
#if _MSC_VER > 1000
#pragma once
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define NAMESPACE_CLASS_NAME TEXT("Namespace")
#define COUNTRY_CLASS_NAME TEXT("Country")
#define LOCALITY_CLASS_NAME TEXT("Locality")
#define ORGANIZATION_CLASS_NAME TEXT("Organization")
#define ORGANIZATIONUNIT_CLASS_NAME TEXT("Organizational Unit")
#define DOMAIN_CLASS_NAME TEXT("Domain")
#define COMPUTER_CLASS_NAME TEXT("Computer")
#define USER_CLASS_NAME TEXT("User")
#define GROUP_CLASS_NAME TEXT("Group")
#define GLOBALGROUP_CLASS_NAME TEXT("GlobalGroup")
#define LOCALGROUP_CLASS_NAME TEXT("LocalGroup")
#define SERVICE_CLASS_NAME TEXT("Service")
#define FILESERVICE_CLASS_NAME TEXT("FileService")
#define SESSION_CLASS_NAME TEXT("Session")
#define RESOURCE_CLASS_NAME TEXT("Resource")
#define FILESHARE_CLASS_NAME TEXT("FileShare")
#define PRINTER_CLASS_NAME TEXT("PrintQueue")
#define PRINTJOB_CLASS_NAME TEXT("PrintJob")
#define SCHEMA_CLASS_NAME TEXT("Schema")
#define CLASS_CLASS_NAME TEXT("Class")
#define PROPERTY_CLASS_NAME TEXT("Property")
#define SYNTAX_CLASS_NAME TEXT("Syntax")
#define ROOTDSE_CLASS_NAME TEXT("RootDSE")
#define NO_SCHEMA TEXT("")
#define DOMAIN_SCHEMA_NAME TEXT("Domain")
#define COMPUTER_SCHEMA_NAME TEXT("Computer")
#define USER_SCHEMA_NAME TEXT("User")
#define GROUP_SCHEMA_NAME TEXT("Group")
#define GLOBALGROUP_SCHEMA_NAME TEXT("GlobalGroup")
#define LOCALGROUP_SCHEMA_NAME TEXT("LocalGroup")
#define SERVICE_SCHEMA_NAME TEXT("Service")
#define PRINTER_SCHEMA_NAME TEXT("PrintQueue")
#define PRINTJOB_SCHEMA_NAME TEXT("PrintJob")
#define FILESERVICE_SCHEMA_NAME TEXT("FileService")
#define SESSION_SCHEMA_NAME TEXT("Session")
#define RESOURCE_SCHEMA_NAME TEXT("Resource")
#define FILESHARE_SCHEMA_NAME TEXT("FileShare")
#define FPNW_FILESERVICE_SCHEMA_NAME TEXT("FPNWFileService")
#define FPNW_SESSION_SCHEMA_NAME TEXT("FPNWSession")
#define FPNW_RESOURCE_SCHEMA_NAME TEXT("FPNWResource")
#define FPNW_FILESHARE_SCHEMA_NAME TEXT("FPNWFileShare")
#ifdef __cplusplus
}
#endif

109
BuildTools/Include/Adssts.h Normal file
View File

@ -0,0 +1,109 @@
//+---------------------------------------------------------------------------
// Copyright (C) 1996-1999, Microsoft Corporation.
//
// File: status.h
//
// Contents: Status Codes for ADS objects
//
//----------------------------------------------------------------------------
//
// printer status values
//
#ifdef __cplusplus
extern "C" {
#endif
#if _MSC_VER > 1000
#pragma once
#endif
#define ADS_PRINTER_PAUSED 0x00000001
#define ADS_PRINTER_PENDING_DELETION 0x00000002
#define ADS_PRINTER_ERROR 0x00000003
#define ADS_PRINTER_PAPER_JAM 0x00000004
#define ADS_PRINTER_PAPER_OUT 0x00000005
#define ADS_PRINTER_MANUAL_FEED 0x00000006
#define ADS_PRINTER_PAPER_PROBLEM 0x00000007
#define ADS_PRINTER_OFFLINE 0x00000008
#define ADS_PRINTER_IO_ACTIVE 0x00000100
#define ADS_PRINTER_BUSY 0x00000200
#define ADS_PRINTER_PRINTING 0x00000400
#define ADS_PRINTER_OUTPUT_BIN_FULL 0x00000800
#define ADS_PRINTER_NOT_AVAILABLE 0x00001000
#define ADS_PRINTER_WAITING 0x00002000
#define ADS_PRINTER_PROCESSING 0x00004000
#define ADS_PRINTER_INITIALIZING 0x00008000
#define ADS_PRINTER_WARMING_UP 0x00010000
#define ADS_PRINTER_TONER_LOW 0x00020000
#define ADS_PRINTER_NO_TONER 0x00040000
#define ADS_PRINTER_PAGE_PUNT 0x00080000
#define ADS_PRINTER_USER_INTERVENTION 0x00100000
#define ADS_PRINTER_OUT_OF_MEMORY 0x00200000
#define ADS_PRINTER_DOOR_OPEN 0x00400000
#define ADS_PRINTER_SERVER_UNKNOWN 0x00800000
#define ADS_PRINTER_POWER_SAVE 0x01000000
//
// job status values
//
#define ADS_JOB_PAUSED 0x00000001
#define ADS_JOB_ERROR 0x00000002
#define ADS_JOB_DELETING 0x00000004
#define ADS_JOB_SPOOLING 0x00000008
#define ADS_JOB_PRINTING 0x00000010
#define ADS_JOB_OFFLINE 0x00000020
#define ADS_JOB_PAPEROUT 0x00000040
#define ADS_JOB_PRINTED 0x00000080
#define ADS_JOB_DELETED 0x00000100
//
// service status values
//
#define ADS_SERVICE_STOPPED 0x00000001
#define ADS_SERVICE_START_PENDING 0x00000002
#define ADS_SERVICE_STOP_PENDING 0x00000003
#define ADS_SERVICE_RUNNING 0x00000004
#define ADS_SERVICE_CONTINUE_PENDING 0x00000005
#define ADS_SERVICE_PAUSE_PENDING 0x00000006
#define ADS_SERVICE_PAUSED 0x00000007
#define ADS_SERVICE_ERROR 0x00000008
//---------------------------------------------------------------------
//
// Service Type Valid Values
//
#define ADS_SERVICE_OWN_PROCESS 0x00000010
#define ADS_SERVICE_SHARE_PROCESS 0x00000020
#define ADS_SERVICE_KERNEL_DRIVER 0x00000001
#define ADS_SERVICE_FILE_SYSTEM_DRIVER 0x00000002
//
// Start Type Valid Values
//
#define ADS_SERVICE_BOOT_START SERVICE_BOOT_START
#define ADS_SERVICE_SYSTEM_START SERVICE_SYSTEM_START
#define ADS_SERVICE_AUTO_START SERVICE_AUTO_START
#define ADS_SERVICE_DEMAND_START SERVICE_DEMAND_START
#define ADS_SERVICE_DISABLED SERVICE_DISABLED
//
// Error Control Values
//
#define ADS_SERVICE_ERROR_IGNORE 0
#define ADS_SERVICE_ERROR_NORMAL 1
#define ADS_SERVICE_ERROR_SEVERE 2
#define ADS_SERVICE_ERROR_CRITICAL 3
#ifdef __cplusplus
}
#endif

447
BuildTools/Include/AdtGen.h Normal file
View File

@ -0,0 +1,447 @@
//+-----------------------------------------------------------------------
//
// Microsoft Windows
//
// Copyright (c) Microsoft Corporation 2000
//
// File: A D T G E N . H
//
// Contents: definitions of types/functions required for
// generating generic audits.
//
// !!!WARNING!!!
// This file is included by lsarpc.idl, therefore, if you
// change it, make sure to clean build the entire DS depot.
//
//
// History:
// 07-January-2000 kumarp created
//
//------------------------------------------------------------------------
#ifndef _ADTGEN_H
#define _ADTGEN_H
//
// type of audit
//
// AUDIT_TYPE_LEGACY
// In this case the audit event schema is stored in a .mc file.
//
// AUDIT_TYPE_WMI
// The schema is stored in WMI. (currently not supported)
//
#define AUDIT_TYPE_LEGACY 1
#define AUDIT_TYPE_WMI 2
//
// Type of parameters passed in the AUDIT_PARAMS.Parameters array
//
// Use the AdtInitParams function to initialize and prepare
// an array of audit parameters.
//
typedef enum _AUDIT_PARAM_TYPE
{
//
// do we need this?
//
APT_None = 1,
//
// NULL terminated string
//
APT_String,
//
// unsigned long
//
APT_Ulong,
//
// a pointer. use for specifying handles/pointers
// (32 bit on 32 bit systems and 64 bit on 64 bit systems)
// Note that the memory to which the pointer points to
// is not marshalled when using this type. Use this when you
// are interested in the absolute value of the pointer.
// A good example of this is when specifying HANDLE values.
//
APT_Pointer,
//
// SID
//
APT_Sid,
//
// Logon ID (LUID), this results in 3 output parameters.
// 1. Account Name 2. Authority Name 3. LogonID
//
APT_LogonId,
//
// Object Type List
//
APT_ObjectTypeList,
//
// Luid (not translated to LogonId)
//
APT_Luid,
//
// Guid
//
APT_Guid,
//
// Time (FILETIME)
//
APT_Time,
//
// ULONGLONG
//
APT_Int64,
//
// IP Addess (IPv4 and IPv6). This logs the address as the
// first parameter and the port as the second. So ensure
// that 2 entries are added in the event message file, one
// for the address and the immediate next entry as the port
//
APT_IpAddress,
//
// Logon ID with SID (LUID) results in 4 output parameters.
// 1. SID 2. Account Name 3. Authority Name 4. LogonID
//
APT_LogonIdWithSid
} AUDIT_PARAM_TYPE;
//
// There are two types of flags that can be used with a parameter.
//
// - formatting flag
// This defines the appearance of a parameter when
// written to the eventlog. Such flags may become obsolete
// when we move to WMI auditing.
//
// - control flag
// This causes a specified action to be taken that affects
// a parameter value.
//
// For example:
// If you use the AP_PrimaryLogonId/AP_ClientLogonId flag,
// the system will capture the logon-id from the process/thread token.
//
#define AP_ParamTypeBits 8
#define AP_ParamTypeMask 0x000000ffL
//
// the flags values below have overlapping values. this is ok since
// the scope of each flag is limited to the type to which it applies.
//
//
// APT_Ulong : format flag : causes a number to appear in hex
//
#define AP_FormatHex (0x0001L << AP_ParamTypeBits)
//
// APT_Ulong : format flag : causes a number to be treated as access-mask.
// The meaning of each bit depends on the associated
// object type.
//
#define AP_AccessMask (0x0002L << AP_ParamTypeBits)
//
// APT_String : format flag : causes a string to be treated as a file-path
//
#define AP_Filespec (0x0001L << AP_ParamTypeBits)
//
// APT_LogonId : control flag : logon-id is captured from the process token
//
#define AP_PrimaryLogonId (0x0001L << AP_ParamTypeBits)
//
// APT_LogonId : control flag : logon-id is captured from the thread token
//
#define AP_ClientLogonId (0x0002L << AP_ParamTypeBits)
//
// internal helper macros
//
#define ApExtractType(TypeFlags) ((AUDIT_PARAM_TYPE)(TypeFlags & AP_ParamTypeMask))
#define ApExtractFlags(TypeFlags) ((TypeFlags & ~AP_ParamTypeMask))
//
// Element of an object-type-list
//
// The AUDIT_OBJECT_TYPES structure identifies an object type element
// in a hierarchy of object types. The AccessCheckByType functions use
// an array of such structures to define a hierarchy of an object and
// its subobjects, such as property sets and properties.
//
typedef struct _AUDIT_OBJECT_TYPE
{
GUID ObjectType; // guid of the (sub)object
USHORT Flags; // currently not defined
USHORT Level; // level within the hierarchy.
// 0 is the root level
ACCESS_MASK AccessMask; // access-mask for this (sub)object
} AUDIT_OBJECT_TYPE, *PAUDIT_OBJECT_TYPE;
typedef struct _AUDIT_OBJECT_TYPES
{
USHORT Count; // number of object-types in pObjectTypes
USHORT Flags; // currently not defined
#ifdef MIDL_PASS
[size_is(Count)]
#endif
AUDIT_OBJECT_TYPE* pObjectTypes; // array of object-types
} AUDIT_OBJECT_TYPES, *PAUDIT_OBJECT_TYPES;
//
// Maximum size of the SOCKADDR_STORAGE structure
//
#define _AUTHZ_SS_MAXSIZE 128 // Maximum size
typedef struct _AUDIT_IP_ADDRESS
{
BYTE pIpAddress[_AUTHZ_SS_MAXSIZE];
} AUDIT_IP_ADDRESS, *PAUDIT_IP_ADDRESS;
//
// Structure that defines a single audit parameter.
//
// LsaGenAuditEvent accepts an array of such elements to
// represent the parameters of the audit to be generated.
//
// It is best to initialize this structure using AdtInitParams function.
// This will ensure compatibility with any future changes to this
// structure.
//
typedef struct _AUDIT_PARAM
{
AUDIT_PARAM_TYPE Type; // type
ULONG Length; // currently unused
DWORD Flags; // currently unused
#ifdef MIDL_PASS
[switch_type(AUDIT_PARAM_TYPE),switch_is(Type)]
#endif
union
{
#ifdef MIDL_PASS
[default]
#endif
ULONG_PTR Data0;
#ifdef MIDL_PASS
[case(APT_String)]
[string]
#endif
PWSTR String;
#ifdef MIDL_PASS
[case(APT_Ulong,
APT_Pointer)]
#endif
ULONG_PTR u;
#ifdef MIDL_PASS
[case(APT_Sid)]
#endif
SID* psid;
#ifdef MIDL_PASS
[case(APT_Guid)]
#endif
GUID* pguid;
#ifdef MIDL_PASS
[case(APT_LogonId)]
#endif
ULONG LogonId_LowPart;
#ifdef MIDL_PASS
[case(APT_ObjectTypeList)]
#endif
AUDIT_OBJECT_TYPES* pObjectTypes;
#ifdef MIDL_PASS
[case(APT_IpAddress)]
#endif
AUDIT_IP_ADDRESS* pIpAddress;
};
#ifdef MIDL_PASS
[switch_type(AUDIT_PARAM_TYPE),switch_is(Type)]
#endif
union
{
#ifdef MIDL_PASS
[default]
#endif
ULONG_PTR Data1;
#ifdef MIDL_PASS
[case(APT_LogonId)]
#endif
LONG LogonId_HighPart;
};
} AUDIT_PARAM, *PAUDIT_PARAM;
//
// Audit control flags. To be used with AUDIT_PARAMS.Flags
//
#define APF_AuditFailure 0x00000000 // generate a failure audit
#define APF_AuditSuccess 0x00000001 // generate a success audit when set,
// a failure audit otherwise.
//
// set of valid audit control flags
//
#define APF_ValidFlags (APF_AuditSuccess)
//
// Audit parameters passed to LsaGenAuditEvent
//
typedef struct _AUDIT_PARAMS
{
ULONG Length; // size in bytes
DWORD Flags; // currently unused
USHORT Count; // number of parameters
#ifdef MIDL_PASS
[size_is(Count)]
#endif
AUDIT_PARAM* Parameters; // array of parameters
} AUDIT_PARAMS, *PAUDIT_PARAMS;
//
// Defines the elements of a legacy audit event.
//
typedef struct _AUTHZ_AUDIT_EVENT_TYPE_LEGACY
{
//
// Audit category ID
//
USHORT CategoryId;
//
// Audit event ID
//
USHORT AuditId;
//
// Parameter count
//
USHORT ParameterCount;
} AUTHZ_AUDIT_EVENT_TYPE_LEGACY, *PAUTHZ_AUDIT_EVENT_TYPE_LEGACY;
typedef
#ifdef MIDL_PASS
[switch_type(BYTE)]
#endif
union _AUTHZ_AUDIT_EVENT_TYPE_UNION
{
#ifdef MIDL_PASS
[case(AUDIT_TYPE_LEGACY)]
#endif
AUTHZ_AUDIT_EVENT_TYPE_LEGACY Legacy;
} AUTHZ_AUDIT_EVENT_TYPE_UNION, *PAUTHZ_AUDIT_EVENT_TYPE_UNION;
//
// description of an audit event
//
typedef
struct _AUTHZ_AUDIT_EVENT_TYPE_OLD
{
// version number
ULONG Version;
DWORD dwFlags;
LONG RefCount;
ULONG_PTR hAudit;
LUID LinkId;
#ifdef MIDL_PASS
[switch_is(Version)]
#endif
AUTHZ_AUDIT_EVENT_TYPE_UNION u;
} AUTHZ_AUDIT_EVENT_TYPE_OLD;
typedef
#ifdef MIDL_PASS
[handle]
#endif
AUTHZ_AUDIT_EVENT_TYPE_OLD* PAUTHZ_AUDIT_EVENT_TYPE_OLD;
typedef
#ifdef MIDL_PASS
[context_handle]
#endif
PVOID AUDIT_HANDLE, *PAUDIT_HANDLE;
//
// Begin support for extensible auditing.
//
//
// Registration Flags.
//
#define AUTHZ_ALLOW_MULTIPLE_SOURCE_INSTANCES 0x1
#define AUTHZ_MIGRATED_LEGACY_PUBLISHER 0x2
//
// Audit Generation Flags.
//
#define AUTHZ_AUDIT_INSTANCE_INFORMATION 0x2
#endif //_ADTGEN_H

File diff suppressed because it is too large Load Diff

14703
BuildTools/Include/AgtCtl.h Normal file

File diff suppressed because it is too large Load Diff

137
BuildTools/Include/AgtErr.h Normal file
View File

@ -0,0 +1,137 @@
/**************************************************************************
* *
* AgtErr.h - Error code definitions for Microsoft Agent *
* *
* Copyright (c) 1996-1999, Microsoft Corp. All rights reserved. *
* *
**************************************************************************/
#ifndef _AgentError_h_
#define _AgentError_h_
// Microsoft Agent Error Macros
#define AGENTERROR(x) MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, (x)+0x2000)
#define AGENTWARNING(x) MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, (x)+0x2000)
#define AGENTREQERROR(x) MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, (x)+0x2100)
#define AGENTPROVIDERERROR(x) MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, (x)+0x2200)
#define AGENTVOICEERROR(x) MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, (x)+0x2300)
#define AGENTAUDIOERROR(x) MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, (x)+0x2400)
#define AGENTCTLERROR(x) MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, (x)+0x2500)
#define AGENTEXTERROR(x) MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, (x)+0x2600)
// Agent Errors
#define AGENTERR_CLIENTINVALID AGENTERROR(1)
#define AGENTERR_CHARACTERINVALID AGENTERROR(2)
#define AGENTERR_ANIMATIONNOTFOUND AGENTERROR(3)
#define AGENTERR_STATENOTFOUND AGENTERROR(4)
#define AGENTERR_AUDIONOTFOUND AGENTERROR(5) // No longer used
#define AGENTERR_COMMANDNOTFOUND AGENTERROR(6)
#define AGENTERR_COMMANDALREADYINUSE AGENTERROR(7)
#define AGENTERR_MENUNOTFOUND AGENTERROR(8)
#define AGENTERR_LOSTCONNECTION AGENTERROR(9)
#define AGENTERR_CHARACTERNOTVISIBLE AGENTERROR(10)
#define AGENTERR_CHARACTERALREADYLOADED AGENTERROR(11)
#define AGENTERR_NOBALLOON AGENTERROR(12)
#define AGENTERR_NOCOMMANDSWINDOW AGENTERROR(13)
#define AGENTERR_INVALIDPREPARETYPE AGENTERROR(14)
#define AGENTERR_INVALIDANIMATION AGENTERROR(15)
#define AGENTERR_CANTMOVEDURINGDRAG AGENTERROR(16)
#define AGENTERR_CHARACTERNOTACTIVE AGENTERROR(17)
#define AGENTERR_LANGUAGENOTFOUND AGENTERROR(18)
#define AGENTERR_TTSLANGUAGENOTFOUND AGENTERROR(19)
#define AGENTERR_SRLANGUAGENOTFOUND AGENTERROR(20)
#define AGENTERR_LANGUAGEMISMATCH AGENTERROR(21)
#define AGENTERR_SPEAKINGDISABLED AGENTERROR(22)
#define AGENTERR_NOCHARACTERS AGENTERROR(23)
#define AGENTERR_DEFAULTCHARACTER AGENTERROR(24)
// Warnings
#define AGENTWARNING_TTSENGINENOTFOUND AGENTWARNING(1)
#define AGENTWARNING_ONLYCLIENT AGENTWARNING(2)
// Request Errors
#define AGENTREQERR_OBJECTNOTFOUND AGENTREQERROR(1)
#define AGENTREQERR_OBJECTINVALID AGENTREQERROR(2)
#define AGENTREQERR_CANTSTOPOTHERS AGENTREQERROR(3)
#define AGENTREQERR_CANTINTERRUPTSELF AGENTREQERROR(4)
#define AGENTREQERR_CANTWAITONSELF AGENTREQERROR(5)
#define AGENTREQERR_INVALIDBOOKMARK AGENTREQERROR(6)
#define AGENTREQERR_SUSPENDED AGENTREQERROR(7) // No longer used
#define AGENTREQERR_REMOVED AGENTREQERROR(8)
#define IS_INTERRUPT_ERROR(hRes) ((hRes >= AGENTREQERR_INTERRUPTEDLISTENKEY) && \
(hRes <= AGENTREQERR_INTERRUPTEDUSER))
#define AGENTREQERR_INTERRUPTEDLISTENKEY AGENTREQERROR(10)
#define AGENTREQERR_INTERRUPTEDHEARING AGENTREQERROR(11)
#define AGENTREQERR_INTERRUPTEDCODE AGENTREQERROR(12)
#define AGENTREQERR_INTERRUPTEDUSER AGENTREQERROR(13)
#define AGENTREQERR_INVALIDLASTTAG AGENTREQERROR(14)
// Data Provider Errors
#define AGENTPROVERROR_INIT AGENTPROVIDERERROR(1)
#define AGENTPROVERROR_CHARACTERVERSION AGENTPROVIDERERROR(2)
#define AGENTPROVERROR_VERSION AGENTPROVIDERERROR(3)
#define AGENTPROVERROR_MAGIC AGENTPROVIDERERROR(4)
#define AGENTPROVERROR_CHARACTERINVALID AGENTPROVIDERERROR(5)
#define AGENTPROVERROR_WAVEINVALID AGENTPROVIDERERROR(6)
#define AGENTPROVERROR_WAVECORRUPT AGENTPROVIDERERROR(7)
#define AGENTPROVERROR_MMIO AGENTPROVIDERERROR(8)
#define AGENTPROVERROR_PROTOCOL AGENTPROVIDERERROR(9)
// Audio Errors
#define AGENTAUDIOERROR_DEVICE AGENTAUDIOERROR(1)
#define AGENTAUDIOERROR_TTSENUMERATOR AGENTAUDIOERROR(2)
#define AGENTAUDIOERROR_TTSSELECT AGENTAUDIOERROR(3)
#define AGENTAUDIOERROR_TTSREGISTER AGENTAUDIOERROR(4)
#define AGENTAUDIOERROR_TTSUNEXPECTED AGENTAUDIOERROR(5)
#define AGENTAUDIOERROR_LWVINIT AGENTAUDIOERROR(6)
#define AGENTAUDIOERROR_LWVREGISTER AGENTAUDIOERROR(7)
#define AGENTAUDIOERROR_LWVUNEXPECTED AGENTAUDIOERROR(8)
// Agent Control Errors
#define AGENTCTLERROR_NOEVENTSAVAILABLE AGENTCTLERROR(1) // No longer used
#define AGENTCTLERROR_SERVERINIT AGENTCTLERROR(2)
#define AGENTCTLERROR_LANGUAGE AGENTCTLERROR(3) // No longer used
// Speech Recognition Errors
#define AGENTVOICEERROR_COULDNTSTARTDEVICE AGENTVOICEERROR(1)
#define AGENTVOICEERROR_NOTINSTALLED AGENTVOICEERROR(2)
#define AGENTVOICEERROR_NOTINITIALIZED AGENTVOICEERROR(3)
#define AGENTVOICEERROR_INVALIDMENU AGENTVOICEERROR(4)
#define AGENTVOICEERROR_UNCLOSEDALTERNATIVE AGENTVOICEERROR(5)
#define AGENTVOICEERROR_UNCLOSEDOPTIONAL AGENTVOICEERROR(6)
#define AGENTVOICEERROR_UNEXPECTEDENDOFALTERNATIVE AGENTVOICEERROR(7)
#define AGENTVOICEERROR_UNEXPECTEDENDOFOPTIONAL AGENTVOICEERROR(8)
#define AGENTVOICEERROR_UNEXPECTEDALTERNATIVE AGENTVOICEERROR(9)
#define AGENTVOICEERROR_NOSRMODE AGENTVOICEERROR(10) // No longer used
#define AGENTVOICEERROR_SRMODENOTFOUND AGENTVOICEERROR(11)
#define AGENTVOICEERROR_SPEECHDISABLED AGENTVOICEERROR(12)
#define AGENTVOICEERROR_UNEXPECTEDENDOFREPEAT AGENTVOICEERROR(13) // No longer used
#define AGENTVOICEERROR_UNCLOSEDREPEAT AGENTVOICEERROR(14) // No longer used
#define AGENTVOICEERROR_UNEXPECTEDREPEAT AGENTVOICEERROR(15)
// Agent Extension Manager Errors
#define AGENTEXTERROR_EXTNOTFOUND AGENTEXTERROR(1)
#define AGENTEXTERROR_INVALIDCLIENT AGENTEXTERROR(2)
#endif

15440
BuildTools/Include/AgtSvr.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,336 @@
/*
@doc ADVANCED QUEUEING DATA TYPES
@module aqadmtyp.h | Data types used in advanced queueing interfaces
*/
/*++/
Copyright (c) 1999 Microsoft Corporation
Module Name:
aqadmtyp.h
Abstract:
This module defines data types used in advanced queueing interfaces
--*/
#ifndef __AQADMTYP_H__
#define __AQADMTYP_H__
#ifdef __midl
#define MIDL(x) x
#else
#define MIDL(x)
#endif
// max *required* size of buffer returned by implementor of QAPI
// If the size of the requested information exceeds this constant,
// then QAPI *may* truncate the buffer.
#define QUEUE_ADMIN_MAX_BUFFER_REQUIRED 200
// @enum QUEUE_ADMIN_VERSIONS | Enum specify current and supported
// queue admin versions.
// @emem CURRENT_QUEUE_ADMIN_VERSION | The current queue admin version
// that all structures should have this value in their dwVersion field.
typedef enum tagQUEUE_ADMIN_VERSIONS {
CURRENT_QUEUE_ADMIN_VERSION = 4,
} QUEUE_ADMIN_VERSIONS;
//
// @struct MESSAGE_FILTER | Structure describing criteria for selecting
// messages
// @field DWORD | dwVersion | Version of MESSAGE_FILTER struct - must be CURRENT_QUEUE_ADMIN_VERSION
// @field DWORD | fFlags | <t MESSAGE_FILTER_FLAGS> indicating which
// fields of filter are specified
// @field LPCWSTR | szMessageId | Message ID, as returned in a MESSAGE_INFO
// struct
// @field LPCWSTR | szMessageSender | Messages sent by this sender match
// @field LPCWSTR | szMessageRecipient | Messages sent to this recipient match
// @field DWORD | dwLargerThanSize | Messages larger than this value match
// @field SYSTEMTIME | stOlderThan | Messages older than this value match
//
typedef struct tagMESSAGE_FILTER {
DWORD dwVersion;
DWORD fFlags;
MIDL([string]) LPCWSTR szMessageId;
MIDL([string]) LPCWSTR szMessageSender;
MIDL([string]) LPCWSTR szMessageRecipient;
DWORD dwLargerThanSize;
SYSTEMTIME stOlderThan;
} MESSAGE_FILTER, *PMESSAGE_FILTER;
// @enum MESSAGE_FILTER_FLAGS | Type specifying the type of filter
// requested. These are bitflags and can be OR'd together.
// @emem MF_MESSAGEID | The <e MESSAGE_FILTER.szMessageId> is specified
// @emem MF_SENDER | The <e MESSAGE_FILTER.szMessageSender> is specified
// @emem MF_RECIPIENT | The <e MESSAGE_FILTER.szMessageRecipient> is specified
// @emem MF_SIZE | The <e MESSAGE_FILTER.dwLargerThanSize> is specified
// @emem MF_TIME | The <e MESSAGE_FILTER.stOlderThan> is specified
// @emem MF_FROZEN | The <e MESSAGE_FILTER.fFrozen> is specified
// @emem MF_FAILED | Selects messages that have had a failed delivery attempt
// @emem MF_INVERTSENSE | If set, indicates that the negation of the filter
// @emem MF_ALL | Select all messages
typedef enum tagMESSAGE_FILTER_FLAGS {
MF_MESSAGEID = 0x00000001,
MF_SENDER = 0x00000002,
MF_RECIPIENT = 0x00000004,
MF_SIZE = 0x00000008,
MF_TIME = 0x00000010,
MF_FROZEN = 0x00000020,
MF_FAILED = 0x00000100,
MF_ALL = 0x40000000,
MF_INVERTSENSE = 0x80000000
} MESSAGE_FILTER_FLAGS;
// @enum MESSAGE_ACTION | Type specifying possible administrative actions
// that may be applied to messages in a virtual server, link, or queue
// @emem MA_DELETE | Remove message from the virtual server, link, or queue
// @emem MA_DELETE_SILENT | Remove message without generating an NDR
// @emem MA_FREEZE | Freeze the message in the virtual server, link, or queue
// @emem MA_THAW | Un-freeze the message in the virtual server, link, or queue
// @emem MA_COUNT | Null operation, does not affect messages, but does return count.
typedef enum tagMESSAGE_ACTION {
MA_THAW_GLOBAL = 0x00000001,
MA_COUNT = 0x00000002,
MA_FREEZE_GLOBAL = 0x00000004,
MA_DELETE = 0x00000008,
MA_DELETE_SILENT = 0x00000010
} MESSAGE_ACTION;
// @enum MESSAGE_ENUM_FILTER_TYPE | Type specifying the type of filter
// requested. These are bitflags and can be OR'd together.
// @emem MEF_FIRST_N_MESSAGES | Return the first
// <e MESSAGE_ENUM_FILTER.cMessages> messages
// @emem MEF_N_LARGEST_MESSAGES | Return the largest
// <e MESSAGE_ENUM_FILTER.cMessages> messages
// @emem MEF_N_OLDEST_MESSAGES | Return the oldest
// <e MESSAGE_ENUM_FILTER.cMessages> messages
// @emem MF_SENDER | The <e MESSAGE_ENUM_FILTER.szMessageSender> is specified
// @emem MF_RECIPIENT | The <e MESSAGE_ENUM_FILTER.szMessageRecipient> is specified
// @emem MEF_OLDER_THAN | Return messages older than
// <e MESSAGE_ENUM_FILTER.stDate>
// @emem MEF_LARGER_THAN | Return messages larger than
// <e MESSAGE_ENUM_FILTER.cbSize> bytes
// @emem MEF_FROZEN | Return messages that are frozen
// @emem MEF_INVERTSENSE | Invert the meaning of the filter
// @emem MEF_ALL | Select all messages
// @emem MEF_FAILED | Return only messages that have had failed delivery
// attempts.
typedef enum tagMESSAGE_ENUM_FILTER_TYPE {
MEF_FIRST_N_MESSAGES = 0x00000001,
MEF_SENDER = 0x00000002,
MEF_RECIPIENT = 0x00000004,
MEF_LARGER_THAN = 0x00000008,
MEF_OLDER_THAN = 0x00000010,
MEF_FROZEN = 0x00000020,
MEF_N_LARGEST_MESSAGES = 0x00000040,
MEF_N_OLDEST_MESSAGES = 0x00000080,
MEF_FAILED = 0x00000100,
MEF_ALL = 0x40000000,
MEF_INVERTSENSE = 0x80000000,
} MESSAGE_ENUM_FILTER_TYPE;
// @struct MESSAGE_ENUM_FILTER | Structure describing criteria for enumerating
// messages
// @field DWORD | dwVersion | Version of filter - must be CURRENT_QUEUE_ADMIN_VERSION
// @field MESSAGE_ENUM_FILTER_TYPE | mefType | <t MESSAGE_ENUM_FILTER_TYPE> Flags for filter.
// @field DWORD | cMessages | Number of messages to return
// @field DWORD | cbSize | Size parameter of messages
// @field DWORD | cSkipMessages | Number of messages at front of queue to skip.
// This is provided to allow "paged" queries to the server.
// @field SYSTEMTIME | stDate | Date/Time parameter of messages
typedef struct tagMESSAGE_ENUM_FILTER {
DWORD dwVersion;
DWORD mefType;
DWORD cMessages;
DWORD cbSize;
DWORD cSkipMessages;
SYSTEMTIME stDate;
MIDL([string]) LPCWSTR szMessageSender;
MIDL([string]) LPCWSTR szMessageRecipient;
} MESSAGE_ENUM_FILTER, *PMESSAGE_ENUM_FILTER;
// @enum LINK_INFO_FLAGS | Type specifying the state of the link
// @emem LI_ACTIVE | Link has an active connection transferring mail
// @emem LI_READY | Link is ready for a connection, but there are no connections
// @emem LI_RETRY | Link is waiting for the retry interval to elapse
// @emem LI_SCHEDULED | Link is waiting for the next scheduled time
// @emem LI_REMOTE | Link is to be activated by remote server. A connection
// will not be made unless requested by a remote server.
// @emem LI_FROZEN | Link was frozen by administrative action
// @emem LI_TYPE_REMOTE_DELIVERY | Messages on link are being delivered
// remotely. This is the default type of link.
// @emem LI_TYPE_LOCAL_DELIVERY | Messages on this link are being delivered
// locally.
// @emem LI_TYPE_PENDING_CAT | Messages on this link are pending message
// categorization.
// @emem LI_TYPE_PENDING_ROUTING | Messages on this link have not been routed
// to their next hop.
// @emem LI_TYPE_CURRENTLY_UNREACHABLE | Messages on this link do not have an
// available route to their final destination. This is due to transient
// network or server errors. These messages will be retried when a route
// becomes available.
// @emem LI_TYPE_INTERNAL | This link is an internal link not described
// by the above.
typedef enum tagLINK_INFO_FLAGS {
LI_ACTIVE = 0x00000001,
LI_READY = 0x00000002,
LI_RETRY = 0x00000004,
LI_SCHEDULED = 0x00000008,
LI_REMOTE = 0x00000010,
LI_FROZEN = 0x00000020,
LI_TYPE_REMOTE_DELIVERY = 0x00000100,
LI_TYPE_LOCAL_DELIVERY = 0x00000200,
LI_TYPE_PENDING_ROUTING = 0x00000400,
LI_TYPE_PENDING_CAT = 0x00000800,
LI_TYPE_CURRENTLY_UNREACHABLE = 0x00001000,
LI_TYPE_DEFERRED_DELIVERY = 0x00002000,
LI_TYPE_INTERNAL = 0x00004000,
LI_TYPE_PENDING_SUBMIT = 0x00008000,
} LINK_INFO_FLAGS;
// @enum LINK_ACTION | Actions that can be applied to a link
// @emem LA_KICK | Force a connection to be made for this link.
// This will even work for connections pending retry or a scheduled connection.
// @emem LA_FREEZE | Prevent outbound connections from being made for a link
// @emem LA_THAW | Undo a previous admin freeze action.
typedef enum tagLINK_ACTION {
LA_INTERNAL = 0x00000000,
LA_KICK = 0x00000001,
LA_FREEZE = 0x00000020,
LA_THAW = 0x00000040,
} LINK_ACTION;
//
// @struct LINK_INFO | Structure describing state of a virtual server AQ link
// @field DWORD | dwVersion | Version of LINK_INFO structure - will be CURRENT_QUEUE_ADMIN_VERSION
// @field LPWSTR | szLinkName | Name of next-hop
// @field DWORD | cMessages | Number of messages queued up for this link
// @field DWORD | fStateFlags | <t LINK_INFO_FLAGS> indicating Link State
// @field SYSTEMTIME | stNextScheduledConnection | The time at which the next
// connection will be attempted.
// @field SYSTEMTIME | stOldestMessage | The oldest message on this link
// @field ULARGE_INTEGER | cbLinkVolume | Total number of bytes on link
// @field LPWSTR | szLinkDN | DN associated with this link by routing. Can be NULL.
// @field LPWSTR | szExtendedStateInfo | If present, this provides additional state
// information about why a link is in <t LI_RETRY> state.
// @field DWORD | dwSupportedLinkActions | Tells which <t LINK_ACTIONS> are supported
// by this link.
typedef struct tagLINK_INFO {
DWORD dwVersion;
MIDL([string]) LPWSTR szLinkName;
DWORD cMessages;
DWORD fStateFlags;
SYSTEMTIME stNextScheduledConnection;
SYSTEMTIME stOldestMessage;
ULARGE_INTEGER cbLinkVolume;
MIDL([string]) LPWSTR szLinkDN;
MIDL([string]) LPWSTR szExtendedStateInfo;
DWORD dwSupportedLinkActions;
} LINK_INFO, *PLINK_INFO;
//
// @struct QUEUE_INFO | Structure describing state of a virtual server link
// queue
// @field DWORD | dwVersion | Version of LINK_INFO structure - will be CURRENT_QUEUE_ADMIN_VERSION
// @field LPWSTR | szQueueName | Name of queue
// @field LPWSTR | szLinkName | Name of link that is servicing this queue
// @field DWORD | cMessages | Number of messages on this queue
// @field ULARGE_INTEGER | cbQueueVolume | Total number of bytes on queue
// @field DWORD | dwMsgEnumFlagsSupported | The types of message enumeration supported
typedef struct tagQUEUE_INFO {
DWORD dwVersion;
MIDL([string]) LPWSTR szQueueName;
MIDL([string]) LPWSTR szLinkName;
DWORD cMessages;
ULARGE_INTEGER cbQueueVolume;
DWORD dwMsgEnumFlagsSupported;
} QUEUE_INFO, *PQUEUE_INFO;
//
// @enum AQ_MESSAGE_FLAGS | Flags describing message properties
// @flag MP_HIGH | High Priority Message
// @flag MP_NORMAL | Normal Priority Message
// @flag MP_LOW | Low Priority Message
// @flag MP_MSG_FROZEN | Message has been frozen by admin.
// @flag MP_MSG_RETRY | Delivery has been attempted and failed at least once
// for this message.
// @flag MP_MSG_CONTENT_AVAILABLE | The content for this message can be
// accessed through the QAPI.
typedef enum tagAQ_MESSAGE_FLAGS {
MP_HIGH = 0x00000001,
MP_NORMAL = 0x00000002,
MP_LOW = 0x00000004,
MP_MSG_FROZEN = 0x00000008,
MP_MSG_RETRY = 0x00000010,
MP_MSG_CONTENT_AVAILABLE = 0x00000020,
} AQ_MESSAGE_FLAGS;
// @struct MESSAGE_INFO | Structure describing a single mail message
// @field DWORD | dwVersion | Version of LINK_INFO structure - will be CURRENT_QUEUE_ADMIN_VERSION
// @field LPWSTR | szMessageId | Message ID
// @field LPWSTR | szSender | Sender Address, from "From:" header
// @field LPWSTR | szSubject | Message Subject
// @field DWORD | cRecipients | Number of recipients
// @field LPWSTR | szRecipients | Recipient Addresses, from "To:" header
// @field DWORD | cCCRecipients | Number of CC recipients
// @field LPWSTR | szCCRecipients | CC Recipient Addresses, from "CC:" header
// @field DWORD | cBCCRecipients | Number of BCC recipients
// @field LPWSTR | szBCCRecipients | BCC Recipient Addresses, from "BCC:" header
// @field DWORD | cbMessageSize | size of message in bytes
// @field DWORD | fMsgFlags | <t AQ_MESSAGE_FLAGS> describing message properties.
// @field SYSTEMTIME | stSubmission | Time of message submission
// @field SYSTEMTIME | stReceived | Time message was received by this server
// @field SYSTEMTIME | stExpiry | Time message will expire by if not delivered
// to all recipients, thus generating an NDR
// @field DWORD | cFailures | The number of failured delivery attempts for
// this message
// @field DWORD | cEnvRecipients | The number of envelope recipeints
// @field DWORD | cbEnvRecipients | The size in bytes of the envelope recipients
// @field WCHAR * | mszEnvRecipients | A multi-string UNICODE buffer containing
// a NULL-terminated string for each recipient. The buffer itself is terminated
// by an additional NULL. Each recipient string will be formatted in the proxy
// address format of 'addr-type ":" address'. The addr-type should match
// the address type found in the DS (ie SMTP). The address should be returned
// in it's native format.
typedef struct tagMESSAGE_INFO {
DWORD dwVersion;
MIDL([string]) LPWSTR szMessageId;
MIDL([string]) LPWSTR szSender;
MIDL([string]) LPWSTR szSubject;
DWORD cRecipients;
MIDL([string]) LPWSTR szRecipients;
DWORD cCCRecipients;
MIDL([string]) LPWSTR szCCRecipients;
DWORD cBCCRecipients;
MIDL([string]) LPWSTR szBCCRecipients;
DWORD fMsgFlags;
DWORD cbMessageSize;
SYSTEMTIME stSubmission;
SYSTEMTIME stReceived;
SYSTEMTIME stExpiry;
DWORD cFailures;
DWORD cEnvRecipients;
DWORD cbEnvRecipients;
MIDL([size_is(cbEnvRecipients/sizeof(WCHAR))]) WCHAR *mszEnvRecipients;
} MESSAGE_INFO, *PMESSAGE_INFO;
typedef enum tagQUEUELINK_TYPE {
QLT_QUEUE,
QLT_LINK,
QLT_NONE
} QUEUELINK_TYPE;
typedef struct tagQUEUELINK_ID {
GUID uuid;
MIDL([string]) LPWSTR szName;
DWORD dwId;
QUEUELINK_TYPE qltType;
} QUEUELINK_ID;
#endif

View File

@ -0,0 +1,561 @@
/*
@doc AQADMIN EXTERNAL
@module AQADMIN.IDL - IDL for Advanced Queue Admin Object. | This module
declares the various interfaces exported for access to the Advanced Queue
administration object
*/
cpp_quote("/*++")
cpp_quote("")
cpp_quote("Copyright (c) 1998 Microsoft Corporation")
cpp_quote("")
cpp_quote("Module Name:")
cpp_quote("")
cpp_quote(" aqadmin.idl / aqadmin.h")
cpp_quote("")
cpp_quote("Abstract:")
cpp_quote("")
cpp_quote(" This module contains definitions for the COM interfaces for")
cpp_quote(" the Advanced Queue administration object.")
cpp_quote("")
cpp_quote("--*/")
import "oaidl.idl";
import "ocidl.idl";
//
// @doc AQADMIN EXTERNAL
//
interface IVSAQAdmin;
interface IEnumVSAQLinks;
interface IAQEnumMessages;
interface IEnumLinkQueues;
interface IAQMessage;
interface IVSAQLink;
interface ILinkQueue;
cpp_quote("#ifndef __AQADMTYP_H__")
cpp_quote("#define __AQADMTYP_H__")
#include "aqadmtyp.h"
cpp_quote("#endif")
/*
@interface IAQAdmin | Primary interface to Advanced Queue admin objects
@meth HRESULT | GetVirtualServerAdminITF | Get admin interface to a
SMTP or MTA virtual server's queues
*/
[
helpstring("Advanced Queue Administration Object"),
object,
pointer_default(unique),
uuid(476D70A6-1A90-11d3-BFCB-00C04FA3490A)
]
interface IAQAdmin : IUnknown
{
// @method HRESULT | IAQAdmin | GetVirtualServerAdminITF | Get admin
// interface to a SMTP or MTA virtual server's queues
// @rvalue S_OK | Success
// @rvalue E_OUTOFMEMORY | Out of resources
// @rvalue E_ACCESSDENIED | Logged on principal not authorized to view
// queues on specified virtual server
// @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
//connect to specified virtual server
HRESULT GetVirtualServerAdminITF(
// @parm hostname of the computer
[in] LPCWSTR wszComputer,
// @parm virtual server number
[in] LPCWSTR wszVirtualServer,
// @parm Interface to Virtual Server admin object is
// returned here
[out] IVSAQAdmin **ppivsaqadmin
);
}
/*
@interface IAQMessageAction | Interface used to apply actions
to messages on this virtual server. This interface is
implemented at the server, link and queue level
@meth HRESULT | ApplyActionToMessages | Apply specified action to
messages on this Virtual Server that match the specified message
filter criteria.
@meth HRESULT | QuerySupportedActions | Describes
which actions/filters of <t ApplyActionToMessages> is supported.
*/
[
helpstring("Advanced Queue Message Action Interface"),
object,
pointer_default(unique),
uuid(1EB44A71-1E95-11d3-BFCC-00C04FA3490A)
]
interface IAQMessageAction : IUnknown
{
// @method HRESULT | IAQMessageAction | ApplyActionToMessages | Apply
// specified action to messages on this Virtual Server that match the
// specified message filter criteria. The actions will only be applied
// to messages that belong to the object implmenting this interface.
// For example, on messages that match the filter on a given queue will
// be affected if this method is called on an ILinkQueue object.
// @rvalue S_OK | Success
// @rvalue E_OUTOFMEMORY | Insufficient resources
// @rvalue E_POINTER | Null pointer parameter
// @rvalue E_INVALIDARG | Invalid parameter
// @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
// connect to specified virtual server
HRESULT ApplyActionToMessages(
// @parm The <t MESSAGE_FILTER> to use to select messages
[in] PMESSAGE_FILTER Filter,
// @parm The <t MESSAGE_ACTION> to apply to matching messages
[in] MESSAGE_ACTION Action,
// @parm The number of messages affected by the action
[out] DWORD *pcMsgs
);
// @method HRESULT | IAQMessageAction | QuerySupportedActions | Describes
// which actions/filters of <t ApplyActionToMessages> is supported.
// @rvalue S_OK | Success
// @rvalue E_OUTOFMEMORY | Insufficient resources
// @rvalue E_POINTER | Null pointer parameter
// @rvalue E_INVALIDARG | Invalid parameter
// @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
// connect to specified virtual server
HRESULT QuerySupportedActions(
[out] DWORD *pdwSupportedActions,
// @parm The <t MESSAGE_ACTION> flags supported by this interface.
[out] DWORD *pdwSupportedFilterFlags);
// @parm The <t MESSAGE_FILTER_FLAGS> supported by this interface.
}
/*
@interface IVSAQAdmin | Interface to per-virtual-server AQ
Administration
@meth HRESULT | GetLinkEnum | Get an enumerator over all links on
this VS
@meth HRESULT | StopAllLinks | Stop all active outbound links
@meth HRESULT | StartAllLinks | Start all eligible outbound links
*/
[
helpstring("Advanced Queue Administration Object"),
object,
pointer_default(unique),
uuid(E2ED3340-1E96-11d3-BFCC-00C04FA3490A)
]
interface IVSAQAdmin : IUnknown
{
// @method HRESULT | IVSAQAdmin | GetLinkEnum | Get an enumerator over
// all links on this VS
// @rvalue S_OK | Success
// @rvalue E_OUTOFMEMORY | Insufficient resources
// @rvalue E_POINTER | Null pointer parameter
// @rvalue E_INVALIDARG | Invalid parameter
// @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
// connect to specified virtual server
HRESULT GetLinkEnum(
// @parm Interface to link enumerator is returned here.
[out] IEnumVSAQLinks **ppenum
);
// @method HRESULT | IVSAQAdmin | StopAllLinks | Stop all active
// outbound links
// @rvalue S_OK | Success
// @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
// connect to specified virtual server
HRESULT StopAllLinks();
// @method HRESULT | IVSAQAdmin | StartAllLinks | Start all active
// outbound links
// @rvalue S_OK | Success
// @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
// connect to specified virtual server
HRESULT StartAllLinks();
// @method HRESULT | IVSAQAdmin | GetGlobalLinkState | Checks the
// global state of the links as set by StopAllLinks/StartAllLinks.
// @rvalue S_OK | Links are started
// @rvalue S_FALSE | Link have been stopped (by a previous call
// to StopAllLinks.
// @rvalue E_NOTIMPL | This provider does not support getting or
// setting the global link state.
// @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
// connect to specified virtual server
HRESULT GetGlobalLinkState();
}
/*
@interface IEnumVSAQLinks | Enumerator for a Virtual Server's AQ Links
@meth HRESULT | Next | Returns the sequentially consequetive specified
number of IVSAQLink objects.
@meth HRESULT | Skip | Advances current element cursor by specified
number of elements
@meth HRESULT | Reset | Resets current element cursor to start of list
@meth HRESULT | Clone | Creates a copy of this enumerator object
*/
[
helpstring("Advanced Queue Administration Object"),
object,
pointer_default(unique),
uuid(ba7af300-7373-11d2-94e4-00c04fa379f1)
]
interface IEnumVSAQLinks : IUnknown
{
// @method HRESULT | IEnumVSAQLinks | Next | Returns the sequentially
// consequetive specified number of IVSAQLink objects.
// @rvalue S_OK | Success
// @rvalue S_FALSE | Fewer than requested number of object returned
HRESULT Next(
// @parm Number of elements requested
[in] ULONG cElt,
// @parm Array in which to return IVSAQLink objects. Must be
// atleast <p cElt> long.
[out] IVSAQLink **rgelt,
// @parm Number of elements actually returned.
[out] ULONG *pcFetched
);
// @method HRESULT | IEnumVSAQLinks | Skip | Advances current element
// cursor by specified number of elements
// @rvalue S_OK | Success
// @rvalue S_FALSE | Too few elements in enumerator to successfully
// advance cursor. Cursor positioned to last element
HRESULT Skip(
// @parm Number of elements to advance cursor by.
[in] ULONG cElt
);
// @method HRESULT | IEnumVSAQLinks | Reset | Resets current element
// cursor to start of list
// @rvalue S_OK | Success
HRESULT Reset();
// @method HRESULT | IEnumVSAQLinks | Clone | Creates a clone of the
// this enumerator object.
// @rvalue S_OK | Success
// @rvalue E_POINTER | Null pointer parameter
// @rvalue E_OUTOFMEMORY | Out of memory creating clone.
HRESULT Clone(
// @parm Interface to cloned IEnumVSAQLinks is returned here.
[out] IEnumVSAQLinks **ppenum
);
}
/*
@interface IVSAQLink | Interface to a single virtual server AQ Link. A
link represents a connectable entity. Another way to think of a link
is that it represents the next-hop to which mail messages on this
link will be delivered to.
@meth HRESULT | GetInfo | Returns information about the link
@meth HRESULT | SetLinkState | Sets the links state.
@meth HRESULT | GetQueueEnum | Returns an enumerator for msg queues
on this link
*/
[
helpstring("Advanced Queue Administration Object"),
object,
pointer_default(unique),
uuid(3F962F94-1ECD-11d3-BFCC-00C04FA3490A)
]
interface IVSAQLink : IUnknown
{
// @method HRESULT | IVSAQLink | GetInfo | Returns information about
// the link
// @rvalue S_OK | Success
// @rvalue E_OUTOFMEMORY | Insufficient resources
// @rvalue E_POINTER | Null pointer parameter
// @rvalue E_INVALIDARG | Invalid parameter
// @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
// connect to specified virtual server
HRESULT GetInfo(
// @parm Pointer to <t LINK_INFO> structure to fill.
[in, out] PLINK_INFO pli
);
// @method HRESULT | IVSAQLink | SetLinkState | Changes the state of the link
// @rvalue S_OK | Success
// @rvalue E_OUTOFMEMORY | Insufficient resources
// @rvalue E_POINTER | Null pointer parameter
// @rvalue E_INVALIDARG | Invalid parameter
// @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
// connect to specified virtual server
HRESULT SetLinkState(
// @parm <t LINK_ACTION> describing new state of link.
[in] LINK_ACTION la
);
// @method HRESULT | IVSAQLink | GetQueueEnum | Get an enumerator for
// message queues on this link
// @rvalue S_OK | Success
// @rvalue E_OUTOFMEMORY | Insufficient resources
// @rvalue E_POINTER | Null pointer parameter
// @rvalue E_INVALIDARG | Invalid parameter
// @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
// connect to specified virtual server
HRESULT GetQueueEnum(
// @parm Interface to IEnumLinkQueues is returned here.
[out] IEnumLinkQueues **ppenum
);
}
/*
@interface IAQEnumMessages | Enumerator for a AQ Link's messages
@meth HRESULT | Next | Returns the sequentially consequetive specified
number of IAQMessage objects.
@meth HRESULT | Skip | Advances current element cursor by specified
number of elements
@meth HRESULT | Reset | Resets current element cursor to start of list
@meth HRESULT | Clone | Creates a copy of this enumerator object
*/
[
helpstring("Advanced Queue Administration Object"),
object,
pointer_default(unique),
uuid(ba7af302-7373-11d2-94e4-00c04fa379f1)
]
interface IAQEnumMessages : IUnknown
{
// @method HRESULT | IAQEnumMessages | Next | Returns the
// sequentially consequetive specified number of IAQMessage objects.
// @rvalue S_OK | Success
// @rvalue S_FALSE | Fewer than requested number of object returned
HRESULT Next(
// @parm Number of elements requested
[in] ULONG cElt,
// @parm Array in which to return IAQMessage objects. Must be
// atleast <p cElt> long.
[out] IAQMessage **rgelt,
// @parm Number of elements actually returned.
[out] ULONG *pcFetched
);
// @method HRESULT | IAQEnumMessages | Skip | Advances current
// element cursor by specified number of elements
// @rvalue S_OK | Success
// @rvalue S_FALSE | Too few elements in enumerator to successfully
// advance cursor. Cursor positioned to last element
HRESULT Skip(
// @parm Number of elements to advance cursor by.
[in] ULONG cElt
);
// @method HRESULT | IAQEnumMessages | Reset | Resets current element
// cursor to start of list
// @rvalue S_OK | Success
HRESULT Reset();
// @method HRESULT | IAQEnumMessages | Clone | Creates a clone of the
// this enumerator object.
// @rvalue S_OK | Success
// @rvalue E_POINTER | Null pointer parameter
// @rvalue E_OUTOFMEMORY | Out of memory creating clone.
HRESULT Clone(
// @parm Interface to cloned IAQEnumMessages is returned here.
[out] IAQEnumMessages **ppenum
);
}
/*
@interface IEnumLinkQueues | Enumerator for a AQ Link's messages
@meth HRESULT | Next | Returns the sequentially consequetive specified
number of ILinkQueue objects.
@meth HRESULT | Skip | Advances current element cursor by specified
number of elements
@meth HRESULT | Reset | Resets current element cursor to start of list
@meth HRESULT | Clone | Creates a copy of this enumerator object
*/
[
helpstring("Advanced Queue Administration Object"),
object,
pointer_default(unique),
uuid(ba7af303-7373-11d2-94e4-00c04fa379f1)
]
interface IEnumLinkQueues : IUnknown
{
// @method HRESULT | IEnumLinkQueues | Next | Returns the sequentially
// consequetive specified number of ILinkQueue objects.
// @rvalue S_OK | Success
// @rvalue S_FALSE | Fewer than requested number of object returned
HRESULT Next(
// @parm Number of elements requested
[in] ULONG cElt,
// @parm Array in which to return ILinkQueue objects. Must
// be atleast <p cElt> long.
[out] ILinkQueue **rgelt,
// @parm Number of elements actually returned.
[out] ULONG *pcFetched
);
// @method HRESULT | IEnumLinkQueues | Skip | Advances current element
// cursor by specified number of elements
// @rvalue S_OK | Success
// @rvalue S_FALSE | Too few elements in enumerator to successfully
// advance cursor. Cursor positioned to last element
HRESULT Skip(
// @parm Number of elements to advance cursor by.
[in] ULONG cElt
);
// @method HRESULT | IEnumLinkQueues | Reset | Resets current element
// cursor to start of list
// @rvalue S_OK | Success
HRESULT Reset();
// @method HRESULT | IEnumLinkQueues | Clone | Creates a clone of
// the this enumerator object.
// @rvalue S_OK | Success
// @rvalue E_POINTER | Null pointer parameter
// @rvalue E_OUTOFMEMORY | Out of memory creating clone.
HRESULT Clone(
// @parm Interface to cloned IEnumLinkQueues is returned here.
[out] IEnumLinkQueues **ppenum
);
}
/*
@interface ILinkQueue | Interface to a single queue of messages that
will be serviced by a link. A link may be servicing 0 to many queues.
For example, if the server GW1 has a SMTP connector for *.com, then
on server MB1, there may be a link for GW1 servicing the queues for
IBM.COM and MSFT.COM
@meth HRESULT | GetInfo | Returns information about the Queue
@meth HRESULT | GetMessageEnum | Returns an enumerator for messages
on this link
*/
[
helpstring("Advanced Queue Administration Object"),
object,
pointer_default(unique),
uuid(FF9A1BB6-1E96-11d3-BFCC-00C04FA3490A)
]
interface ILinkQueue : IUnknown
{
// @method HRESULT | ILinkQueue | GetInfo | Returns information about
// the link
// @rvalue S_OK | Success
// @rvalue E_OUTOFMEMORY | Insufficient resources
// @rvalue E_POINTER | Null pointer parameter
// @rvalue E_INVALIDARG | Invalid parameter
// @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
// connect to specified virtual server
HRESULT GetInfo(
// @parm Pointer to <t QUEUE_INFO> structure to fill.
[in, out] PQUEUE_INFO pqi
);
// @method HRESULT | ILinkQueue | GetMessageEnum | Get an enumerator for
// messages on this link
// @rvalue S_OK | Success
// @rvalue E_OUTOFMEMORY | Insufficient resources
// @rvalue E_POINTER | Null pointer parameter
// @rvalue E_INVALIDARG | Invalid parameter
// @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
// connect to specified virtual server
HRESULT GetMessageEnum(
// @parm Filter specifying messages to return
[in] PMESSAGE_ENUM_FILTER pFilter,
// @parm Interface to IAQEnumMessages is returned here.
[out] IAQEnumMessages **ppenum
);
}
/*
@interface IAQMessage | Interface representing a single message
@meth HRESULT | GetInfo | Returns information about the Queue
@meth HRESULT | GetContentStream | Returns a stream for the message content
*/
[
helpstring("Advanced Queue Administration Object"),
object,
pointer_default(unique),
uuid(ba7af305-7373-11d2-94e4-00c04fa379f1)
]
interface IAQMessage : IUnknown
{
// @method HRESULT | IAQMessage | GetInfo | Returns information about
// the message
// @rvalue S_OK | Success
// @rvalue E_OUTOFMEMORY | Insufficient resources
// @rvalue E_POINTER | Null pointer parameter
// @rvalue E_INVALIDARG | Invalid parameter
// @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
// connect to specified virtual server
HRESULT GetInfo(
// @parm Pointer to <t MESSAGE_INFO> structure to fill
[in, out] PMESSAGE_INFO pmi
);
// @method HRESULT | IAQMessage | GetContentStream | Returns
// a Stream of the message content
// @rvalue S_OK | Success
// @rvalue E_NOTIMPL | This queue provider does not support
// this functionality
// @rvalue E_OUTOFMEMORY | Insufficient resources
// @rvalue E_POINTER | Null pointer parameter
// @rvalue E_INVALIDARG | Invalid parameter
// @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
// connect to specified virtual server
HRESULT GetContentStream(
// @parm Pointer to IStream interface for message content
[out] IStream **ppIStream,
// @parm String describing the content type (if known) of the message
[out] LPWSTR *pwszContentType);
}
/*
@interface IUniqueId | Interface to get canonical name of queue/link
@meth HRESULT | GetUniqueId | Return QUEUELINK_ID for queue/link
*/
[
helpstring("Queue/Link Id Object"),
object,
pointer_default(unique),
uuid(EA4DFDF2-9E87-4c57-B845-123872C5649F)
]
interface IUniqueId : IUnknown
{
// @method HRESULT | IUniqueId | GetUniqueId | Returns
// a QUEUELINK_ID for this queue or link. This is the canonical
// representation of the queue. The QAPI guarantees that there is
// no more than one queue or link with the same QUEUELINKID at a
// given point in time. The memory associated with the out parameter
// is guaranteed good until the underlying QAPI object is released
// @rvalue S_OK | Success
// @rvalue E_NOTIMPL | This queue provider does not support
// this functionality
HRESULT GetUniqueId(
[out] QUEUELINK_ID **ppqlid);
}
[
helpstring("Advanced Queueing Admin 1.0 Type Library"),
uuid(83866cac-740d-11d2-94e4-00c04fa379f1),
version(1.0)
]
library AQAdmin
{
importlib("stdole2.tlb");
interface IAQAdmin;
[
helpstring("Advanced Queueuing Administration Class"),
uuid(83866cad-740d-11d2-94e4-00c04fa379f1)
]
coclass AQAdmin {
[default] interface IAQAdmin;
}
};

271
BuildTools/Include/AqErr.mc Normal file
View File

@ -0,0 +1,271 @@
;//+----------------------------------------------------------------------------
;//
;// Copyright (C) 1997, Microsoft Corporation
;//
;// File: aqerr.mc
;//
;// Contents: Events and Errors for Advanced Queuing
;//
;//-----------------------------------------------------------------------------
;#ifndef _AQERR_H_
;#define _AQERR_H_
;
SeverityNames=(Success=0x0
Informational=0x1
Warning=0x2
Error=0x3
)
FacilityNames=(Interface=0x4)
Messageid=701 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_SHUTDOWN
Language=English
Advanced Queuing service is shutting down.
.
Messageid=702 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_INVALID_DOMAIN
Language=English
The given domain name is not valid.
.
Messageid=703 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_LINK_INVALID
Language=English
The requested link is not valid.
.
Messageid=704 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_QUEUE_EMPTY
Language=English
The requested message queue is empty on hold until other queues are serviced.
.
Messageid=705 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_PRIORITY_EMPTY
Language=English
There are no messages of the requested priority (or higher) in the queue.
.
Messageid=706 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_NOT_INITIALIZED
Language=English
Advanced Queuing was not properly initialized.
.
Messageid=707 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_INVALID_MSG
Language=English
Message submitted is malformed or does not have all of the required properties.
.
Messageid=709 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_INVALID_ADDRESS
Language=English
E-Mail Address is not valid or has an invalid type.
.
Messageid=710 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_MESSAGE_HANDLED
Language=English
Each recipient on the message has already been handled (delivery or non-delivery notification).
.
Messageid=711 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_NDR_OF_DSN
Language=English
This message is a delivery status notification that cannot be delivered.
.
Messageid=712 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_NO_RECIPIENTS
Language=English
This message does not have any recipients.
.
Messageid=713 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_DSN_FAILURE
Language=English
Unable to generate a delivery status notification for this message.
.
Messageid=714 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_NO_RESOURCES
Language=English
Unable to deliver this message due to lack of system resources.
.
Messageid=715 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_NO_BADMAIL_DIR
Language=English
Unable to handle badmail because no badmail directory is configured.
.
Messageid=716 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_BADMAIL
Language=English
Unable to handle badmail due to lack of system resources.
.
Messageid=717 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_MAX_HOP_COUNT_EXCEEDED
Language=English
Unable to deliver message because the maximum hop count was exceeded. This is a potential message routing loop.
.
Messageid=718 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_PICKUP_DIR
Language=English
Error is processing file in pickup directory.
.
Messageid=719 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_LOOPBACK_DETECTED
Language=English
Unable to deliver the message because the destination address was misconfigured as a mail loop.
.
Messageid=720 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_UNREACHABLE_DESTINATION
Language=English
Unable to deliver the message because the final destination is unreachable.
.
Messageid=721 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_MSG_EXPIRED
Language=English
Unable to deliver the message because the message has expired.
.
Messageid=722 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_HOST_NOT_RESPONDING
Language=English
The remote server did not respond to a connection attempt.
.
Messageid=723 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_CONNECTION_DROPPED
Language=English
The connection was dropped by the remote host.
.
Messageid=724 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_NDR_ALL
Language=English
Unable to deliver any messages for this destination.
.
Messageid=725 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_HOST_NOT_FOUND
Language=English
Unable to bind to the destination server in DNS.
.
Messageid=726 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_AUTHORITATIVE_HOST_NOT_FOUND
Language=English
Destination server does not exist.
.
Messageid=727 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_SMTP_PROTOCOL_ERROR
Language=English
An SMTP protocol error occurred.
.
Messageid=728 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_CONNECTION_FAILED
Language=English
Unable to make a connection to the destination server.
.
Messageid=729 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_MESSAGE_PENDING
Language=English
The Message is currently pending delivery for the requested recipients.
.
Messageid=730 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_TOO_MANY_RECIPIENTS
Language=English
The Message has too many recipients to deliver.
.
Messageid=731 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_LOCAL_MAIL_REFUSED
Language=English
The Message has been refused for local delivery.
.
Messageid=732 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_MESSAGE_TOO_LARGE
Language=English
The Message is too large to deliver.
.
Messageid=733 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_LOCAL_QUOTA_EXCEEDED
Language=English
A recipient of this message does not have sufficient space to receive it.
.
Messageid=734 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_ACCESS_DENIED
Language=English
The sender does not have the permissions required to send this message to it the intended recipients.
.
Messageid=735 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_SENDER_ACCESS_DENIED
Language=English
The sender is not allowed to send this message.
.
Messageid=736 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_BIND_ERROR
Language=English
Unable to open the message for delivery.
.
Messageid=737 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_SSL_ERROR
Language=English
An SSL error occurred.
.
Messageid=738 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_SSL_CERT_EXPIRED
Language=English
The remote SMTP service rejected the SSL handshake because the certificate has expired.
.
Messageid=739 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_SASL_REJECTED
Language=English
The remote SMTP service rejected AUTH negotiation.
.
Messageid=740 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_SASL_LOGON_FAILURE
Language=English
Failed to logon using AUTH.
.
Messageid=741 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_TLS_NOT_SUPPORTED_ERROR
Language=English
The remote SMTP service does not support TLS.
.
Messageid=742 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_TLS_ERROR
Language=English
The remote SMTP server responded with an error during the STARTTLS command.
.
Messageid=743 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_DNS_FAILURE
Language=English
An internal DNS error caused a failure to find the remote server.
.
;//HRESULTS used for aqueue/smtp TURN/ETRN functionality
Messageid=744 Facility=Interface Severity=Success SymbolicName=AQ_S_SMTP_WILD_CARD_NODE
Language=English
The domain specified for ETRN exists as a wild card domain.
.
Messageid=745 Facility=Interface Severity=Success SymbolicName=AQ_S_SMTP_VALID_ETRN_DOMAIN
Language=English
The domain specified for ETRN exists as a valid configured domain.
.
Messageid=746 Facility=Interface Severity=Error SymbolicName=AQ_E_SMTP_ETRN_NODE_INVALID
Language=English
The domain specified for ETRN is not configured as an ETRN domain.
.
Messageid=747 Facility=Interface Severity=Error SymbolicName=AQ_E_SMTP_ETRN_INTERNAL_ERROR
Language=English
An internal error occurred while processing the ETRN request.
.
Messageid=748 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_ETRN_TOO_MANY_DOMAINS
Language=English
The domain specified for ETRN has too many subdomains associated with it.
.
Messageid=749 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_SSL_CERT_ISSUER_UNTRUSTED
Language=English
The TLS session failed. The issuer of the destination server's certificate is untrusted.
.
Messageid=750 Facility=Interface Severity=Error SymbolicName=AQUEUE_E_SSL_CERT_SUBJECT_MISMATCH
Language=English
The TLS session failed. The e-mail domain name used to reach the destination server differs from the name on its certificate.
.
;
;#endif //_AQERR_H_
;

View File

@ -0,0 +1,202 @@
/*++
Copyright (c) 1992-1999 Microsoft Corporation
Module Name:
wshatalk.h
Abstract:
This is the header file for application using Windows Sockets for
Appletalk.
Revision History:
10 Jul 1992 Initial Version
--*/
#ifndef _ATALKWSH_
#define _ATALKWSH_
#if _MSC_VER > 1000
#pragma once
#endif
//
// All protocol types should be specified in the Decimal base
//
#define DECIMAL_BASE 10
//
// Protocol number 0 is invalid in the Appletalk case
//
#define ATPROTO_BASE (1000 * AF_APPLETALK)
#define SOL_APPLETALK (ATPROTO_BASE)
#define DDPPROTO_RTMP (ATPROTO_BASE + 1)
#define DDPPROTO_NBP (ATPROTO_BASE + 2)
#define DDPPROTO_ATP (ATPROTO_BASE + 3)
#define DDPPROTO_AEP (ATPROTO_BASE + 4)
#define DDPPROTO_RTMPRQ (ATPROTO_BASE + 5)
#define DDPPROTO_ZIP (ATPROTO_BASE + 6)
#define DDPPROTO_ADSP (ATPROTO_BASE + 7)
#define DDPPROTO_MAX (ATPROTO_BASE + 255)
//
// Define the higher layer appletalk protocol types
//
#define ATPROTO_ADSP (DDPPROTO_MAX + 1)
#define ATPROTO_ATP (DDPPROTO_MAX + 2)
#define ATPROTO_ASP (DDPPROTO_MAX + 3)
#define ATPROTO_PAP (DDPPROTO_MAX + 4)
#define SO_REGISTER_NAME 0xA000
#define SO_DEREGISTER_NAME 0xA001
#define SO_REMOVE_NAME SO_DEREGISTER_NAME
#define SO_LOOKUP_NAME 0xA002
#define SO_CONFIRM_NAME 0xA003
#define SO_LOOKUP_MYZONE 0xA004
#define SO_GETMYZONE SO_LOOKUP_MYZONE
#define SO_LOOKUP_ZONES 0xA005
#define SO_GETZONELIST SO_LOOKUP_ZONES
#define SO_LOOKUP_ZONES_ON_ADAPTER 0xA006
#define SO_GETLOCALZONES SO_LOOKUP_ZONES_ON_ADAPTER
#define SO_LOOKUP_NETDEF_ON_ADAPTER 0xA007
#define SO_GETNETINFO SO_LOOKUP_NETDEF_ON_ADAPTER
//
// PAP-specific options
//
#define SO_PAP_SET_SERVER_STATUS 0xA007
#define SO_PAP_GET_SERVER_STATUS 0xA008
#define SO_PAP_PRIME_READ 0xA009
#define ATADDR_ANY 0 // Dynamic socket (=0)
#define ATADDR_BROADCAST 0xFF // Broadcast node id (=ff)
//
// Define flags/error codes peculiar to Appletalk
//
#define WSAEMSGPARTIAL (WSABASEERR+100)
// Maximum pap status size
#define MAX_PAP_STATUS_SIZE 255
#define MIN_PAP_READ_BUF_SIZE 4096
// These are the unused 4 bytes returned in the PAP status packet. If ever
// they are to be interpreted, they will be available.
#define PAP_UNUSED_STATUS_BYTES 4
//
// SOCKADDR_AT structure
//
typedef struct sockaddr_at
{
USHORT sat_family;
USHORT sat_net;
UCHAR sat_node;
UCHAR sat_socket;
} SOCKADDR_AT, *PSOCKADDR_AT;
//
// ***WARNING***
// This is defined to be the same as the ATALK ADDRESS defined in atalktdi.h
// Change this if the other changes.
//
typedef union
{
struct
{
USHORT Network;
UCHAR Node;
UCHAR Socket;
};
ULONG Address;
} WSH_ATALK_ADDRESS, *PWSH_ATALK_ADDRESS;
//
// Typedefs for the various options
//
//
// ***WARNING***:
// This should be exactly the same as NBP_NAME defined in atalktdi.h
//
#define MAX_ENTITY 32
typedef struct
{
CHAR ObjectNameLen;
CHAR ObjectName[MAX_ENTITY];
CHAR TypeNameLen;
CHAR TypeName[MAX_ENTITY];
CHAR ZoneNameLen;
CHAR ZoneName[MAX_ENTITY];
} WSH_NBP_NAME, *PWSH_NBP_NAME;
typedef struct
{
WSH_ATALK_ADDRESS Address;
USHORT Enumerator;
WSH_NBP_NAME NbpName;
} WSH_NBP_TUPLE, *PWSH_NBP_TUPLE;
typedef WSH_NBP_NAME WSH_REGISTER_NAME, *PWSH_REGISTER_NAME;
typedef WSH_NBP_NAME WSH_DEREGISTER_NAME, *PWSH_DEREGISTER_NAME;
typedef WSH_NBP_NAME WSH_REMOVE_NAME, *PWSH_REMOVE_NAME;
typedef struct _WSH_LOOKUP_ZONES
{
ULONG NoZones;
//
// CHAR Zones[] - null separated zones
//
} WSH_LOOKUP_ZONES, *PWSH_LOOKUP_ZONES;
typedef struct _WSH_LOOKUP_NETDEF_ON_ADAPTER
{
USHORT NetworkRangeLowerEnd;
USHORT NetworkRangeUpperEnd;
// This will be followed by a null terminated ansi default zone.
// PUCHAR DefaultZone[]
} WSH_LOOKUP_NETDEF_ON_ADAPTER , *PWSH_LOOKUP_NETDEF_ON_ADAPTER;
typedef struct _WSH_LOOKUP_NAME
{
WSH_NBP_TUPLE LookupTuple;
ULONG NoTuples;
//
// Array of NoTuple WSH_NBP_TUPLEs
//
} WSH_LOOKUP_NAME, *PWSH_LOOKUP_NAME;
typedef struct _WSH_PAP_GET_SERVER_STATUS
{
SOCKADDR_AT ServerAddr;
UCHAR Reserved[PAP_UNUSED_STATUS_BYTES];
UCHAR ServerStatus[MAX_PAP_STATUS_SIZE+1];
} WSH_PAP_GET_SERVER_STATUS, *PWSH_PAP_GET_SERVER_STATUS;
#endif // _ATALKWSH_

View File

@ -0,0 +1,85 @@
// Microsoft Windows
// Copyright (C) Microsoft Corporation. All rights reserved.
//
#pragma once
typedef LONGLONG HNSTIME; // hundred nanosecond unit
typedef LONGLONG MFTIME; // hundred nanosecond unit
typedef float FLOAT32; // float
typedef double FLOAT64; // double
// Validation flags for APO_CONNECTION_PROPERTY. Each APO connection has
// an APO_CONNECTION_PROPERTY structure associated with it. The buffer
// for each connection may be either invalid, valid, or silent.
typedef enum APO_BUFFER_FLAGS
{
// BUFFER_INVALID means that there is no valid data in the connection
// buffer. The buffer pointer will still be valid and capable of holding
// the amount of valid audio data specified in the APO_CONNECTION_PROPERTY.
// The processor will mark every connection BUFFER_INVALID before running
// the IAudioOutputEndpoint::GetOutputDataPointer,
// IAudioInputEndpointRT::GetInputDataPointer, or
// IAudioProcessingObjectRT::APOProcess each time its IAudioProcess::Process
// routine is called.
BUFFER_INVALID = 0,
// Connection buffer has valid data. This is the "normal" operational
// state of the connection buffer. An APO will set this flag once it
// writes valid data into a buffer.
BUFFER_VALID = 1,
// The connection buffer should be treated as if it contains silence.
// APOs will mark their output connection buffers as silent (instead
// of writing silence into the buffer) if they generate a buffer of
// silence. This typically only happens when the buffer(s) going in
// are marked BUFFER_SILENT.
BUFFER_SILENT = 2
} APO_BUFFER_FLAGS;
// This structure contains the dynamically changing connection properties.
// The connection between APOs ends up resolving to the APO_CONNECTION_PROPERTY
// structure for the IAudioProcessingObjectRT::APOProcess call. This structure
// is passed in IAudioInputEndpointRT::GetInputDataPointer and
// IAudioOutputEndpointRT::ReleaseOutputDataPointer.
typedef struct APO_CONNECTION_PROPERTY
{
// The connection buffer. APOs use this buffer to read and write
// audio data.
//
// Alignment required
// (128 bit or frame aligned)
// |
// +-----+
// V
// +-------------------------------------------------------------+
// | |
// | |
// | audio buffer |
// | |
// | |
// +-------------------------------------------------------------+
// ^
// |
// pBuffer
//
UINT_PTR pBuffer;
// Number of valid frames in the connection buffer. This must
// be less than or equal to APO_CONNECTION_DESCRIPTOR.u32MaxFrameCount.
// An APO will use the valid frame count to determine how much data to
// process on an input buffer. An APO will set the valid frame count
// upon writing data into its output connection(s).
UINT32 u32ValidFrameCount;
// Connection flags for this buffer. Tells APOs if the buffer is valid,
// in valid, or silent. See APO_BUFFER_FLAGS.
APO_BUFFER_FLAGS u32BufferFlags;
// A tag identifying a valid APO_CONNECTION_PROPERTY structure.
UINT32 u32Signature;
} APO_CONNECTION_PROPERTY;

View File

@ -0,0 +1,798 @@
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 7.00.0555 */
/* Compiler settings for audioengineendpoint.idl:
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING( ) */
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 500
#endif
/* verify that the <rpcsal.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCSAL_H_VERSION__
#define __REQUIRED_RPCSAL_H_VERSION__ 100
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#ifndef __audioengineendpoint_h__
#define __audioengineendpoint_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifndef __IAudioEndpoint_FWD_DEFINED__
#define __IAudioEndpoint_FWD_DEFINED__
typedef interface IAudioEndpoint IAudioEndpoint;
#endif /* __IAudioEndpoint_FWD_DEFINED__ */
#ifndef __IAudioEndpointRT_FWD_DEFINED__
#define __IAudioEndpointRT_FWD_DEFINED__
typedef interface IAudioEndpointRT IAudioEndpointRT;
#endif /* __IAudioEndpointRT_FWD_DEFINED__ */
#ifndef __IAudioInputEndpointRT_FWD_DEFINED__
#define __IAudioInputEndpointRT_FWD_DEFINED__
typedef interface IAudioInputEndpointRT IAudioInputEndpointRT;
#endif /* __IAudioInputEndpointRT_FWD_DEFINED__ */
#ifndef __IAudioOutputEndpointRT_FWD_DEFINED__
#define __IAudioOutputEndpointRT_FWD_DEFINED__
typedef interface IAudioOutputEndpointRT IAudioOutputEndpointRT;
#endif /* __IAudioOutputEndpointRT_FWD_DEFINED__ */
#ifndef __IAudioDeviceEndpoint_FWD_DEFINED__
#define __IAudioDeviceEndpoint_FWD_DEFINED__
typedef interface IAudioDeviceEndpoint IAudioDeviceEndpoint;
#endif /* __IAudioDeviceEndpoint_FWD_DEFINED__ */
#ifndef __IAudioEndpointControl_FWD_DEFINED__
#define __IAudioEndpointControl_FWD_DEFINED__
typedef interface IAudioEndpointControl IAudioEndpointControl;
#endif /* __IAudioEndpointControl_FWD_DEFINED__ */
/* header files for imported files */
#include "oaidl.h"
#include "ocidl.h"
#include "propidl.h"
#include "audioapotypes.h"
#include "mmreg.h"
#ifdef __cplusplus
extern "C"{
#endif
/* interface __MIDL_itf_audioengineendpoint_0000_0000 */
/* [local] */
typedef struct AUDIO_ENDPOINT_EXCLUSIVE_CREATE_PARAMS
{
UINT32 u32Size;
LONGLONG hConnection;
BOOL bIsRtCapable;
HNSTIME hnsBufferDuration;
HNSTIME hnsPeriod;
UINT32 u32LatencyCoefficient;
WAVEFORMATEX wfxDeviceFormat;
} AUDIO_ENDPOINT_EXCLUSIVE_CREATE_PARAMS;
typedef struct AUDIO_ENDPOINT_EXCLUSIVE_CREATE_PARAMS *PAUDIO_ENDPOINT_EXCLUSIVE_CREATE_PARAMS;
typedef struct AUDIO_ENDPOINT_SHARED_CREATE_PARAMS
{
UINT32 u32Size;
UINT32 u32TSSessionId;
WAVEFORMATEX wfxDeviceFormat;
} AUDIO_ENDPOINT_SHARED_CREATE_PARAMS;
typedef struct AUDIO_ENDPOINT_SHARED_CREATE_PARAMS *PAUDIO_ENDPOINT_SHARED_CREATE_PARAMS;
typedef
enum AE_POSITION_FLAGS
{ POSITION_INVALID = 0,
POSITION_DISCONTINUOUS = 1,
POSITION_CONTINUOUS = 2,
POSITION_QPC_ERROR = 4
} AE_POSITION_FLAGS;
typedef struct AE_CURRENT_POSITION
{
UINT64 u64DevicePosition;
UINT64 u64StreamPosition;
UINT64 u64PaddingFrames;
HNSTIME hnsQPCPosition;
FLOAT32 f32FramesPerSecond;
AE_POSITION_FLAGS Flag;
} AE_CURRENT_POSITION;
typedef struct AE_CURRENT_POSITION *PAE_CURRENT_POSITION;
extern RPC_IF_HANDLE __MIDL_itf_audioengineendpoint_0000_0000_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_audioengineendpoint_0000_0000_v0_0_s_ifspec;
#ifndef __IAudioEndpoint_INTERFACE_DEFINED__
#define __IAudioEndpoint_INTERFACE_DEFINED__
/* interface IAudioEndpoint */
/* [local][unique][uuid][object] */
EXTERN_C const IID IID_IAudioEndpoint;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("30A99515-1527-4451-AF9F-00C5F0234DAF")
IAudioEndpoint : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE GetFrameFormat(
/* [out] */ WAVEFORMATEX **ppFormat) = 0;
virtual HRESULT STDMETHODCALLTYPE GetFramesPerPacket(
/* [out] */ UINT32 *pFramesPerPacket) = 0;
virtual HRESULT STDMETHODCALLTYPE GetLatency(
/* [out] */ HNSTIME *pLatency) = 0;
virtual HRESULT STDMETHODCALLTYPE SetStreamFlags(
/* [in] */ DWORD streamFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE SetEventHandle(
/* [in] */ HANDLE eventHandle) = 0;
};
#else /* C style interface */
typedef struct IAudioEndpointVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IAudioEndpoint * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
__RPC__deref_out void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IAudioEndpoint * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IAudioEndpoint * This);
HRESULT ( STDMETHODCALLTYPE *GetFrameFormat )(
IAudioEndpoint * This,
/* [out] */ WAVEFORMATEX **ppFormat);
HRESULT ( STDMETHODCALLTYPE *GetFramesPerPacket )(
IAudioEndpoint * This,
/* [out] */ UINT32 *pFramesPerPacket);
HRESULT ( STDMETHODCALLTYPE *GetLatency )(
IAudioEndpoint * This,
/* [out] */ HNSTIME *pLatency);
HRESULT ( STDMETHODCALLTYPE *SetStreamFlags )(
IAudioEndpoint * This,
/* [in] */ DWORD streamFlags);
HRESULT ( STDMETHODCALLTYPE *SetEventHandle )(
IAudioEndpoint * This,
/* [in] */ HANDLE eventHandle);
END_INTERFACE
} IAudioEndpointVtbl;
interface IAudioEndpoint
{
CONST_VTBL struct IAudioEndpointVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IAudioEndpoint_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IAudioEndpoint_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IAudioEndpoint_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IAudioEndpoint_GetFrameFormat(This,ppFormat) \
( (This)->lpVtbl -> GetFrameFormat(This,ppFormat) )
#define IAudioEndpoint_GetFramesPerPacket(This,pFramesPerPacket) \
( (This)->lpVtbl -> GetFramesPerPacket(This,pFramesPerPacket) )
#define IAudioEndpoint_GetLatency(This,pLatency) \
( (This)->lpVtbl -> GetLatency(This,pLatency) )
#define IAudioEndpoint_SetStreamFlags(This,streamFlags) \
( (This)->lpVtbl -> SetStreamFlags(This,streamFlags) )
#define IAudioEndpoint_SetEventHandle(This,eventHandle) \
( (This)->lpVtbl -> SetEventHandle(This,eventHandle) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IAudioEndpoint_INTERFACE_DEFINED__ */
#ifndef __IAudioEndpointRT_INTERFACE_DEFINED__
#define __IAudioEndpointRT_INTERFACE_DEFINED__
/* interface IAudioEndpointRT */
/* [local][unique][uuid][object] */
EXTERN_C const IID IID_IAudioEndpointRT;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("DFD2005F-A6E5-4d39-A265-939ADA9FBB4D")
IAudioEndpointRT : public IUnknown
{
public:
virtual void STDMETHODCALLTYPE GetCurrentPadding(
/* [out] */ HNSTIME *pPadding,
/* [out] */ AE_CURRENT_POSITION *pAeCurrentPosition) = 0;
virtual void STDMETHODCALLTYPE ProcessingComplete( void) = 0;
virtual HRESULT STDMETHODCALLTYPE SetPinInactive( void) = 0;
virtual HRESULT STDMETHODCALLTYPE SetPinActive( void) = 0;
};
#else /* C style interface */
typedef struct IAudioEndpointRTVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IAudioEndpointRT * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
__RPC__deref_out void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IAudioEndpointRT * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IAudioEndpointRT * This);
void ( STDMETHODCALLTYPE *GetCurrentPadding )(
IAudioEndpointRT * This,
/* [out] */ HNSTIME *pPadding,
/* [out] */ AE_CURRENT_POSITION *pAeCurrentPosition);
void ( STDMETHODCALLTYPE *ProcessingComplete )(
IAudioEndpointRT * This);
HRESULT ( STDMETHODCALLTYPE *SetPinInactive )(
IAudioEndpointRT * This);
HRESULT ( STDMETHODCALLTYPE *SetPinActive )(
IAudioEndpointRT * This);
END_INTERFACE
} IAudioEndpointRTVtbl;
interface IAudioEndpointRT
{
CONST_VTBL struct IAudioEndpointRTVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IAudioEndpointRT_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IAudioEndpointRT_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IAudioEndpointRT_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IAudioEndpointRT_GetCurrentPadding(This,pPadding,pAeCurrentPosition) \
( (This)->lpVtbl -> GetCurrentPadding(This,pPadding,pAeCurrentPosition) )
#define IAudioEndpointRT_ProcessingComplete(This) \
( (This)->lpVtbl -> ProcessingComplete(This) )
#define IAudioEndpointRT_SetPinInactive(This) \
( (This)->lpVtbl -> SetPinInactive(This) )
#define IAudioEndpointRT_SetPinActive(This) \
( (This)->lpVtbl -> SetPinActive(This) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IAudioEndpointRT_INTERFACE_DEFINED__ */
#ifndef __IAudioInputEndpointRT_INTERFACE_DEFINED__
#define __IAudioInputEndpointRT_INTERFACE_DEFINED__
/* interface IAudioInputEndpointRT */
/* [local][unique][uuid][object] */
EXTERN_C const IID IID_IAudioInputEndpointRT;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("8026AB61-92B2-43c1-A1DF-5C37EBD08D82")
IAudioInputEndpointRT : public IUnknown
{
public:
virtual void STDMETHODCALLTYPE GetInputDataPointer(
/* [out][in] */ APO_CONNECTION_PROPERTY *pConnectionProperty,
/* [out][in] */ AE_CURRENT_POSITION *pAeTimeStamp) = 0;
virtual void STDMETHODCALLTYPE ReleaseInputDataPointer(
/* [in] */ UINT32 u32FrameCount,
/* [in] */ UINT_PTR pDataPointer) = 0;
virtual void STDMETHODCALLTYPE PulseEndpoint( void) = 0;
};
#else /* C style interface */
typedef struct IAudioInputEndpointRTVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IAudioInputEndpointRT * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
__RPC__deref_out void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IAudioInputEndpointRT * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IAudioInputEndpointRT * This);
void ( STDMETHODCALLTYPE *GetInputDataPointer )(
IAudioInputEndpointRT * This,
/* [out][in] */ APO_CONNECTION_PROPERTY *pConnectionProperty,
/* [out][in] */ AE_CURRENT_POSITION *pAeTimeStamp);
void ( STDMETHODCALLTYPE *ReleaseInputDataPointer )(
IAudioInputEndpointRT * This,
/* [in] */ UINT32 u32FrameCount,
/* [in] */ UINT_PTR pDataPointer);
void ( STDMETHODCALLTYPE *PulseEndpoint )(
IAudioInputEndpointRT * This);
END_INTERFACE
} IAudioInputEndpointRTVtbl;
interface IAudioInputEndpointRT
{
CONST_VTBL struct IAudioInputEndpointRTVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IAudioInputEndpointRT_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IAudioInputEndpointRT_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IAudioInputEndpointRT_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IAudioInputEndpointRT_GetInputDataPointer(This,pConnectionProperty,pAeTimeStamp) \
( (This)->lpVtbl -> GetInputDataPointer(This,pConnectionProperty,pAeTimeStamp) )
#define IAudioInputEndpointRT_ReleaseInputDataPointer(This,u32FrameCount,pDataPointer) \
( (This)->lpVtbl -> ReleaseInputDataPointer(This,u32FrameCount,pDataPointer) )
#define IAudioInputEndpointRT_PulseEndpoint(This) \
( (This)->lpVtbl -> PulseEndpoint(This) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IAudioInputEndpointRT_INTERFACE_DEFINED__ */
#ifndef __IAudioOutputEndpointRT_INTERFACE_DEFINED__
#define __IAudioOutputEndpointRT_INTERFACE_DEFINED__
/* interface IAudioOutputEndpointRT */
/* [local][unique][uuid][object] */
EXTERN_C const IID IID_IAudioOutputEndpointRT;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("8FA906E4-C31C-4e31-932E-19A66385E9AA")
IAudioOutputEndpointRT : public IUnknown
{
public:
virtual UINT_PTR STDMETHODCALLTYPE GetOutputDataPointer(
/* [in] */ UINT32 u32FrameCount,
/* [in] */ AE_CURRENT_POSITION *pAeTimeStamp) = 0;
virtual void STDMETHODCALLTYPE ReleaseOutputDataPointer(
/* [in] */ const APO_CONNECTION_PROPERTY *pConnectionProperty) = 0;
virtual void STDMETHODCALLTYPE PulseEndpoint( void) = 0;
};
#else /* C style interface */
typedef struct IAudioOutputEndpointRTVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IAudioOutputEndpointRT * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
__RPC__deref_out void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IAudioOutputEndpointRT * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IAudioOutputEndpointRT * This);
UINT_PTR ( STDMETHODCALLTYPE *GetOutputDataPointer )(
IAudioOutputEndpointRT * This,
/* [in] */ UINT32 u32FrameCount,
/* [in] */ AE_CURRENT_POSITION *pAeTimeStamp);
void ( STDMETHODCALLTYPE *ReleaseOutputDataPointer )(
IAudioOutputEndpointRT * This,
/* [in] */ const APO_CONNECTION_PROPERTY *pConnectionProperty);
void ( STDMETHODCALLTYPE *PulseEndpoint )(
IAudioOutputEndpointRT * This);
END_INTERFACE
} IAudioOutputEndpointRTVtbl;
interface IAudioOutputEndpointRT
{
CONST_VTBL struct IAudioOutputEndpointRTVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IAudioOutputEndpointRT_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IAudioOutputEndpointRT_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IAudioOutputEndpointRT_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IAudioOutputEndpointRT_GetOutputDataPointer(This,u32FrameCount,pAeTimeStamp) \
( (This)->lpVtbl -> GetOutputDataPointer(This,u32FrameCount,pAeTimeStamp) )
#define IAudioOutputEndpointRT_ReleaseOutputDataPointer(This,pConnectionProperty) \
( (This)->lpVtbl -> ReleaseOutputDataPointer(This,pConnectionProperty) )
#define IAudioOutputEndpointRT_PulseEndpoint(This) \
( (This)->lpVtbl -> PulseEndpoint(This) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IAudioOutputEndpointRT_INTERFACE_DEFINED__ */
#ifndef __IAudioDeviceEndpoint_INTERFACE_DEFINED__
#define __IAudioDeviceEndpoint_INTERFACE_DEFINED__
/* interface IAudioDeviceEndpoint */
/* [local][unique][uuid][object] */
EXTERN_C const IID IID_IAudioDeviceEndpoint;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("D4952F5A-A0B2-4cc4-8B82-9358488DD8AC")
IAudioDeviceEndpoint : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE SetBuffer(
/* [in] */ HNSTIME MaxPeriod,
/* [in] */ UINT32 u32LatencyCoefficient) = 0;
virtual HRESULT STDMETHODCALLTYPE GetRTCaps(
/* [out] */ BOOL *pbIsRTCapable) = 0;
virtual HRESULT STDMETHODCALLTYPE GetEventDrivenCapable(
/* [out] */ BOOL *pbisEventCapable) = 0;
virtual HRESULT STDMETHODCALLTYPE WriteExclusiveModeParametersToSharedMemory(
/* [in] */ UINT_PTR hTargetProcess,
/* [in] */ HNSTIME hnsPeriod,
/* [in] */ HNSTIME hnsBufferDuration,
/* [in] */ UINT32 u32LatencyCoefficient,
/* [out] */ UINT32 *pu32SharedMemorySize,
/* [out] */ UINT_PTR *phSharedMemory) = 0;
};
#else /* C style interface */
typedef struct IAudioDeviceEndpointVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IAudioDeviceEndpoint * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
__RPC__deref_out void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IAudioDeviceEndpoint * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IAudioDeviceEndpoint * This);
HRESULT ( STDMETHODCALLTYPE *SetBuffer )(
IAudioDeviceEndpoint * This,
/* [in] */ HNSTIME MaxPeriod,
/* [in] */ UINT32 u32LatencyCoefficient);
HRESULT ( STDMETHODCALLTYPE *GetRTCaps )(
IAudioDeviceEndpoint * This,
/* [out] */ BOOL *pbIsRTCapable);
HRESULT ( STDMETHODCALLTYPE *GetEventDrivenCapable )(
IAudioDeviceEndpoint * This,
/* [out] */ BOOL *pbisEventCapable);
HRESULT ( STDMETHODCALLTYPE *WriteExclusiveModeParametersToSharedMemory )(
IAudioDeviceEndpoint * This,
/* [in] */ UINT_PTR hTargetProcess,
/* [in] */ HNSTIME hnsPeriod,
/* [in] */ HNSTIME hnsBufferDuration,
/* [in] */ UINT32 u32LatencyCoefficient,
/* [out] */ UINT32 *pu32SharedMemorySize,
/* [out] */ UINT_PTR *phSharedMemory);
END_INTERFACE
} IAudioDeviceEndpointVtbl;
interface IAudioDeviceEndpoint
{
CONST_VTBL struct IAudioDeviceEndpointVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IAudioDeviceEndpoint_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IAudioDeviceEndpoint_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IAudioDeviceEndpoint_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IAudioDeviceEndpoint_SetBuffer(This,MaxPeriod,u32LatencyCoefficient) \
( (This)->lpVtbl -> SetBuffer(This,MaxPeriod,u32LatencyCoefficient) )
#define IAudioDeviceEndpoint_GetRTCaps(This,pbIsRTCapable) \
( (This)->lpVtbl -> GetRTCaps(This,pbIsRTCapable) )
#define IAudioDeviceEndpoint_GetEventDrivenCapable(This,pbisEventCapable) \
( (This)->lpVtbl -> GetEventDrivenCapable(This,pbisEventCapable) )
#define IAudioDeviceEndpoint_WriteExclusiveModeParametersToSharedMemory(This,hTargetProcess,hnsPeriod,hnsBufferDuration,u32LatencyCoefficient,pu32SharedMemorySize,phSharedMemory) \
( (This)->lpVtbl -> WriteExclusiveModeParametersToSharedMemory(This,hTargetProcess,hnsPeriod,hnsBufferDuration,u32LatencyCoefficient,pu32SharedMemorySize,phSharedMemory) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IAudioDeviceEndpoint_INTERFACE_DEFINED__ */
#ifndef __IAudioEndpointControl_INTERFACE_DEFINED__
#define __IAudioEndpointControl_INTERFACE_DEFINED__
/* interface IAudioEndpointControl */
/* [unique][uuid][object] */
EXTERN_C const IID IID_IAudioEndpointControl;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("C684B72A-6DF4-4774-BDF9-76B77509B653")
IAudioEndpointControl : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE Start( void) = 0;
virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0;
virtual HRESULT STDMETHODCALLTYPE Stop( void) = 0;
};
#else /* C style interface */
typedef struct IAudioEndpointControlVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IAudioEndpointControl * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
__RPC__deref_out void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IAudioEndpointControl * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IAudioEndpointControl * This);
HRESULT ( STDMETHODCALLTYPE *Start )(
__RPC__in IAudioEndpointControl * This);
HRESULT ( STDMETHODCALLTYPE *Reset )(
__RPC__in IAudioEndpointControl * This);
HRESULT ( STDMETHODCALLTYPE *Stop )(
__RPC__in IAudioEndpointControl * This);
END_INTERFACE
} IAudioEndpointControlVtbl;
interface IAudioEndpointControl
{
CONST_VTBL struct IAudioEndpointControlVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IAudioEndpointControl_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IAudioEndpointControl_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IAudioEndpointControl_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IAudioEndpointControl_Start(This) \
( (This)->lpVtbl -> Start(This) )
#define IAudioEndpointControl_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
#define IAudioEndpointControl_Stop(This) \
( (This)->lpVtbl -> Stop(This) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IAudioEndpointControl_INTERFACE_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,898 @@
//
// audioengineendpoint.idl -- Copyright (c) 2003 Microsoft Corporation
//
// Description:
//
// The interface and type definitions for audio engine endpoints.
//
import "oaidl.idl";
import "ocidl.idl";
import "propidl.idl";
import "audioapotypes.h";
import "mmreg.h";
//-----------------------------------------------------------------------------
// Description:
//
// Creation parameters for exclusive mode.
//
typedef struct AUDIO_ENDPOINT_EXCLUSIVE_CREATE_PARAMS
{
// The size of the structure.
UINT32 u32Size;
// The handle to the pin.
LONGLONG hConnection;
// If TRUE, the endpoint is RT capable.
BOOL bIsRtCapable;
// The requested buffer looped buffer duration in hns units.
HNSTIME hnsBufferDuration;
// Endpoint period.
HNSTIME hnsPeriod;
// Latency coefficient.
UINT32 u32LatencyCoefficient;
// The format of the endpoint.
WAVEFORMATEX wfxDeviceFormat;
} AUDIO_ENDPOINT_EXCLUSIVE_CREATE_PARAMS, *PAUDIO_ENDPOINT_EXCLUSIVE_CREATE_PARAMS;
//-----------------------------------------------------------------------------
// Description:
//
// Creation parameters for shared mode.
//
typedef struct AUDIO_ENDPOINT_SHARED_CREATE_PARAMS
{
// The size of the structure.
UINT32 u32Size;
// SessionId
UINT32 u32TSSessionId;
// The format of the endpoint.
WAVEFORMATEX wfxDeviceFormat;
} AUDIO_ENDPOINT_SHARED_CREATE_PARAMS, *PAUDIO_ENDPOINT_SHARED_CREATE_PARAMS;
//-----------------------------------------------------------------------------
// Description:
//
// Each AE_CURRENT_POSITION structure has a flag associated with it.
// The flag for each structure may be either invalid, valid, or
// discontinuous...
//
typedef enum AE_POSITION_FLAGS
{
// POSITION_INVALID means that the position is invalid
// and should not be used.
POSITION_INVALID = 0,
// Position is valid. However there has been
// a disruption such as a glitch or state transition.
// This position is not correlated with the previous one.
POSITION_DISCONTINUOUS = 1,
// Position is valid. The previous packet
// and this packet aligns perfectly on the timeline.
POSITION_CONTINUOUS = 2,
// The QPC value associated with this position is not accurate
// within 300 Microseconds.
POSITION_QPC_ERROR = 4
} AE_POSITION_FLAGS;
//-----------------------------------------------------------------------------
// Description:
//
// Structure used to report the current frame position from the device to the clients.
//
typedef struct AE_CURRENT_POSITION
{
// Device position in frames.
UINT64 u64DevicePosition;
// Stream position in frames used for capture to determine starting point.
UINT64 u64StreamPosition;
// Current amount of padding (in frames) between the current position and the stream fill point.
UINT64 u64PaddingFrames;
// Translated QPC Timer value taken at the time the frame position was checked.
HNSTIME hnsQPCPosition;
// Calculated value of the data rate at the point when position was set.
FLOAT32 f32FramesPerSecond;
// Indicates the validity of the position information.
AE_POSITION_FLAGS Flag;
} AE_CURRENT_POSITION, *PAE_CURRENT_POSITION;
//-------------------------------------------------------------------------------------
// An Audio Endpoint object abstracts the audio device, audio API and any other
// data source/sink from the AudioProcessor. An Audio Endpoint must implement the
// IAudioEndpoint, IAudioEndpointRT, and one or both of IAudioInputEndpointRT and
// IAudioOutputEndpointRT interfaces. The clients of the processor must attach at least
// two Audio Endpoint objects to the Audio Processor, one for input and one for output
// for useful work to occur. An endpoint may only be connected to one connection, and
// each connection may only have one endpoint connected to it.
//
// The audio endpoint object is designed to be a client-extendable object that is used
// to get data into or out of an audio engine instance. Data transfer is handled by
// connecting an audio endpoint to an audio connection. See
// IAudioProcessor::AttachInputEndpointToConnection
// and IAudioProcessor::AttachOutputEndpointToConnection for more information on attaching
// endpoints to connections, and the sections on IAudioEndpoint, IAudioEndpointRT,
// IAudioInputEndpointRT, and IAudioOutputEndpointRT interfaces for info on the audio
// engine side of the endpoint interfaces.
//
// The client-facing side of the endpoint objects is unspecified and may be written in any
// fashion convenient to the needs of the client of the endpoint. The specified interfaces
// must be implemented as stated above. If the endpoint is not being used to drive a graph,
// skip to the next paragraph. Otherwise, if the endpoint is being used to drive a processing
// graph, the processor will call the GetCurrentPadding interface before every processing
// pass. At that time, the endpoint should return the amount of data that is held in the
// endpoint. For an output endpoint, that would be the amount of data queued on the device.
// For an input endpoint, that would be the amount of data captured from the device but not
// yet delivered to the engine.
//
// The processor will call either IAudioInputEndpointRT::GetInputDataPointer or
// IAudioOutputEndpointRT::GetOutputDataPointer (depending on
// whether the endpoint is input or output to the engine), at which time the endpoint should
// return a data pointer of the requested size. After processing occurs, the processor will
// call IAudioInputEndpointRT::ReleaseInputDataPointer or
// IAudioOutputEndpointRT::ReleaseOutputDataPointer, at which time the endpoint can
// handle the data appropriately. See the various interface calls given above for more
// detailed information.
//
// On the client-facing side of the endpoint object, data just must be capable of being
// delivered to or gotten from the endpoint as appropriate. If that means that the client
// wants to use an interface called WriteData to write data on the endpoint, that is fine.
// The client side could use a callback mechanism, such that there is a method called
// RegisterCallback(myFuncPtr) that causes myFuncPtr to be called each time
// GetInputDataPointer is called (however, the myFuncPtr would have to conform to the
// realtime requirements if that were the case).
//
// This is what is meant by a client-extendable object: the interface used by the client
// can be anything, as long as the interfaces required by the engine are present and operate
// to deliver or consume data to or from the engine as specified in the required interfaces.
// The "interface" to the client side doesn't even need to be a COM interface: it could be a
// simple set of C calls or C++ object methods.
//
// The AudioProcessor uses this interface to get information about the endpoint(s)
// attached to it.
[
object,
uuid(30A99515-1527-4451-AF9F-00C5F0234DAF),
pointer_default(unique),
local
]
interface IAudioEndpoint : IUnknown{
//-------------------------------------------------------------------------
// Description:
//
// Returns the format of the endpoint.
//
// Parameters:
//
// ppFormat - [out] If S_OK, returns the format of the AudioEndpoint.
//
// Return values:
//
// S_OK Successful completion.
//
// Remarks:
//
// For example, an AudioEndpoint that is abstracting an audio device
// should return the device format. An AudioEndpoint that is abstracting a
// file should return the file format.
//
// Clients must release ppFormat by calling CoTaskMemFree.
//
// This method may not be called from a real-time processing thread.
//
HRESULT GetFrameFormat([out] WAVEFORMATEX** ppFormat);
//-------------------------------------------------------------------------
// Description:
//
// Returns the maximum frame count of the endpoint.
//
// Parameters:
//
// pFramesPerPacket - [out] If S_OK, returns the maximum number of frames
// that may be requested in GetInputDataPointer
// or GetOutputDataPointer.
//
// Return values:
//
// S_OK Successful completion.
//
// Remarks:
//
// This method returns the maximum frame count that the endpoint in question
// is capable of supporting. The endpoint must accept any request for input
// or output data pointers as long as the requested number of frames is less
// than or equal to the value returned by this function. Requesting a frame
// count from IAudioInputEndpointRT::GetInputDataPointer or
// IAudioOutputEndpointRT::GetOutputDataPointer that is greater than
// the value returned by this function will result in undefined behavior (in
// the debug build, an assert is likely; in retail, the audio data may glitch).
//
// This is often referred to as the "periodicity" of the engine or pump.
//
// Note: This method may be not be called from a real-time processing thread.
//
HRESULT GetFramesPerPacket([out] UINT32 *pFramesPerPacket);
//-------------------------------------------------------------------------
// Description:
//
// Returns the latency of the endpoint.
//
// Parameters:
//
// pLatency - [out] If S_OK, returns the latency introduced by the endpoint.
//
// Return values:
//
// S_OK Successful completion.
//
// Remarks:
//
// This method returns the latency that the endpoint inserts into the stream.
// The latency for a typical buffer endpoint will be zero (i.e. there is no
// latency writing data to a RAM buffer). The latency for a typical hardware
// endpoint will be how ever much buffer latency the endpoint is using to stay
// ahead of the hardware. As an example, if an endpoint is double buffering on
// top of hardware using 5 ms buffers, the latency reported by the endpoint would
// be 5 ms.
//
// Note: This method may not be called from a real-time processing thread.
//
HRESULT GetLatency([out] HNSTIME *pLatency);
//-------------------------------------------------------------------------
// Description:
//
// Pass the IAudioClient::Initialize streamFlags to the endpoint
//
// Parameters:
//
// streamFlags - the stream flags passed to IAudioClient::Initialize
//
// Return values:
//
// S_OK Successful completion.
//
// Remarks:
//
// Note: This method may not be called from a real-time processing thread.
//
HRESULT SetStreamFlags([in] DWORD streamFlags);
//-------------------------------------------------------------------------
// Description:
//
// A WASAPI client supplies this event handle for a buffer completion
// callback
//
// Parameters:
//
// eventHandle - event handle to be signaled when a buffer completes
//
// Return values:
//
// S_OK Successful completion.
// E_INVALIDARG eventHandle is NULL or invalid
//
// Remarks:
//
// This is the event handle passed in IAudioClient::SetEventHandle
//
// Note: This method may not be called from a real-time processing thread.
//
HRESULT SetEventHandle([in] HANDLE eventHandle);
}; // IAudioEndpoint
// The AudioProcessor uses this interface to discover the current padding between read
// and write positions.
[
object,
uuid(DFD2005F-A6E5-4d39-A265-939ADA9FBB4D),
pointer_default(unique),
local
]
interface IAudioEndpointRT : IUnknown{
//-------------------------------------------------------------------------
// Description:
//
// Returns the amount of data queued up in the endpoint.
//
// Parameters:
//
// pPadding - [out] Returns the current difference between
// the read and write pointers.
//
// pAeCurrentPosition - [out] Returns the current position information
// for the endpoint.
//
// Return values:
//
// S_OK Successful completion.
//
// Remarks:
//
// This method returns the difference between the read and write positions.
// The Audio Pump will use this information to decide how much more processing
// is required.
//
// Different AudioEndpoints will calculate this differently.
// For example an AudioEndpoint that is abstracting a looped-render buffer
// on a HW device will return the difference between the read and write
// offsets.
//
// Note: This method may be called from a real-time processing thread. The
// implementation of this method does not and should not block, touch
// paged memory, or call any blocking system routines.
//
void GetCurrentPadding([out] HNSTIME *pPadding, [out] AE_CURRENT_POSITION *pAeCurrentPosition);
//-------------------------------------------------------------------------
// Description:
//
// Calls into the endpoint to indicate that a processing pass has been completed
//
// Parameters:
//
// none
//
// Return values:
//
// none
//
// Remarks:
//
// This method allows the Audio Pump to call into the Endpoint to set an event indicating
// that a processing pass had been completed and that there is audio data to be passed to/from
// the endpoint device. This is necessary for Standard streaming on a multiprocessor
// system to ensure that the sequence of events prevents glitching. It may be ignored by an
// RT thread.
//
// Note: This method may be called from a real-time processing thread. The
// implementation of this method does not and should not block, touch
// paged memory, or call any blocking system routines.
//
void ProcessingComplete(void);
//-------------------------------------------------------------------------
// Description:
//
// Calls into the endpoint to tell it to change the state of the underlying KS
// pin to inactive
//
// Parameters:
//
// none
//
// Return values:
//
// S_OK
// FAILURECODE
//
// Remarks:
//
// This method allows the Audio Pump to call into the Endpoint to tell it to set the state
// of the underlying KS pin to "pause" or "not running". If the endpoint is virtual or does not
// otherwise sit on top of physical hardware, this method may simply return S_OK
//
// Note: This method may be called from a real-time processing thread. The
// implementation of this method does not and should not block, touch
// paged memory, or call any blocking system routines.
//
HRESULT SetPinInactive(void);
//-------------------------------------------------------------------------
// Description:
//
// Calls into the endpoint to tell it to change the state of the underlying KS
// pin to active
//
// Parameters:
//
// none
//
// Return values:
//
// S_OK
// FAILURECODE
//
// Remarks:
//
// This method allows the Audio Pump to call into the Endpoint to tell it to set the state
// of the underlying KS pin to "running". If the endpoint is virtual or does not
// otherwise sit on top of physical hardware, this method may simply return S_OK
//
// Note: This method may be called from a real-time processing thread. The
// implementation of this method does not and should not block, touch
// paged memory, or call any blocking system routines.
//
HRESULT SetPinActive(void);
}; // IAudioEndpointRT
// The AudioProcessor uses this interface to get appropriate input buffers for
// each processing pass.
[
object,
uuid(8026AB61-92B2-43c1-A1DF-5C37EBD08D82),
pointer_default(unique),
local
]
interface IAudioInputEndpointRT : IUnknown{
//-------------------------------------------------------------------------
// Description:
//
// Returns pointer to the data that will be read.
//
// Parameters:
//
// pConnectionProperty - [in,out] A pointer to an APO_CONNECTION_PROPERTY
// structure. Upon entry, the fields are set as follows:
//
// pBuffer - NULL.
//
// u32ValidFrameCount - Used to determine how many frames need to be
// in the returned data pointer. AudioEndpoint should not cache this
// information. AudioProcessor can change this number depending on
// its processing needs.
//
// u32BufferFlags - BUFFER_INVALID.
//
// Upon exit, the endpoint should set the fields as follows:
//
// pBuffer - pointer to valid memory where either real data is or
// silence could be placed, depending on the value of u32BufferFlags.
//
// u32ValidFrameCount - remains unchanged.
//
// u32BufferFlags - set to BUFFER_VALID if data pointer contains
// valid audio data that is not silent; BUFFER_SILENT if the data
// pointer would contain only silent data. The data in the buffer does
// not actually need to be silence, but the buffer given in pBuffer
// must be capable of holding the u32ValidFrameCount frames worth of
// silence.
//
// pAeTimeStamp - [in] The time-stamp of the data that is captured.
// This parameter is optional.
//
// Remarks:
//
// This method returns a pointer to the data (in pConnectionProperty->pBuffer) that
// needs to be input into the engine.
//
// The data should be valid in the buffer until the
// ReleaseInputDataPointer method is called. The object should return
// the requested amount of information, inserting silence if there is no
// valid data.
//
// The returned buffer pointer pConnectionProperty->pBuffer must be frame-aligned.
//
// Endpoints do not support the 'extraBuffer' space which may be available in
// the APO_CONNECTION_DESCRIPTOR associated with the Connection Properties
// passed to it.
//
// A pConnectionBuffer->u32ValidFrameCount of 0 is a valid request. In this case,
// the input pointer should be valid but will not be read from. u32ValidFrameCount
// must be <= to the frame count returned in IAudioEndpoint::GetFramesPerPacket.
//
// In the case where there is no or not enough valid data to satisfy the
// u32ValidFrameCount request, a glitch should be logged with the wmi services
// available and silence should be returned.
//
// Note: This method may be called from a real-time processing thread. The
// implementation of this method does not and should not block, touch
// paged memory, or call any blocking system routines.
//
void GetInputDataPointer([in, out] APO_CONNECTION_PROPERTY *pConnectionProperty,
[in, out] AE_CURRENT_POSITION *pAeTimeStamp);
//-------------------------------------------------------------------------
// Description:
//
// Releases the acquired data pointer.
//
// Parameters:
//
// u32FrameCount - [in] Used to determine how many frames have been
// consumed by the AudioProcessor. This count might not
// be the same as GetInputDataPointer
//
// pDataPointer - [in] The pointer that has been returned from
// GetInputDataPointer.
//
// Return values:
//
// S_OK Successful completion.
//
// Remarks:
//
// This method tells the AudioEndpoint that the AudioProcessor is done
// with the input data pointer and also tells how many frames have been
// consumed.
//
// For example, an AudioEndpoint that is attached to the input of the
// AudioProcessor and that abstracts a looped buffer can advance its read
// cursor.
//
// An u32FrameCount of 0 means that the client did not utilize any data
// from the given input buffer. The u32FrameCount must be <= to the request
// size from GetInputDataPointer.
//
// Note: This method may be called from a real-time processing thread. The
// implementation of this method does not and should not block, touch
// paged memory, or call any blocking system routines.
//
void ReleaseInputDataPointer([in] UINT32 u32FrameCount, [in] UINT_PTR pDataPointer);
//-------------------------------------------------------------------------
// Description:
//
// "Pulses" the endpoint, normally by signaling a client-supplied event handle
//
// Parameters:
//
//
// Return values:
//
// S_OK Successful completion.
//
// Remarks:
//
// This method is normally called at the end of a pump pass and signals
// a client event handle
//
// Note: This method may be called from a real-time processing thread. The
// implementation of this method does not and should not block, touch
// paged memory, or call any blocking system routines.
//
// See Also:
// IAudioProcessor::EndProcess
//
void PulseEndpoint(void);
}; // IAudioInputEndpointRT
// The AudioProcessor uses this interface to get appropriate output buffers
// for each processing pass.
[
object,
uuid(8FA906E4-C31C-4e31-932E-19A66385E9AA),
pointer_default(unique),
local
]
interface IAudioOutputEndpointRT : IUnknown{
//-------------------------------------------------------------------------
// Description:
//
// Returns pointer to a buffer that will be written to.
//
// Parameters:
//
// u32FrameCount - [in] Used to determine how many frames need to be
// in the returned data pointer. AudioEndpoint should not
// cache this information. AudioProcessor can change this
// number depending on its processing needs
// pAeTimeStamp - [in] The time-stamp of the data that is rendered.
// This parameter is optional.
//
// Return values:
//
// The data pointer that needs to be played/recorded.
//
// Remarks:
//
// This method returns a pointer to a buffer into which to place the data
// that is output from the engine.
//
// The data wont be valid except during the duration of the
// ReleaseOutputDataPointer method.
//
// The returned pointer must be frame-aligned.
//
// A u32FrameCount of 0 is a valid request. In this case, the output pointer
// will not be written into, but it should be a valid pointer. u32FrameCount
// must be <= to the frame count returned in IAudioEndpoint::GetFramesPerPacket.
//
// In the case where there is internally not enough
// room to satisfy the clients request for a buffer pointer, a glitch may
// occur. In this case, the endpoint should still return an address which can
// be written to, however, when ReleaseOutputDataPointer is called this
// data will be lost. The glitch should be logged with the wmi logging
// services available.
//
// Note: This method may be called from a real-time processing thread. The
// implementation of this method does not and should not block, touch
// paged memory, or call any blocking system routines.
//
UINT_PTR GetOutputDataPointer( [in] UINT32 u32FrameCount,
[in] AE_CURRENT_POSITION *pAeTimeStamp);
//-------------------------------------------------------------------------
// Description:
//
// Releases the acquired data pointer.
//
// Parameters:
//
// pConnectionProperty - [in] A pointer to an APO_CONNECTION_PROPERTY
// structure. This structure is only an input parameter and cannot be
// changed. The fields are set as follows:
//
// pBuffer - The pointer that has been returned from GetOutputDataPointer.
//
// u32ValidFrameCount - Used to determine how many frames have been
// generated by the AudioProcessor. This count might not be the same
// as GetOutputDataPointer.
//
// u32BufferFlags - BUFFER_VALID or BUFFER_SILENT. If the flags are
// BUFFER_VALID, the pBuffer pointer contains valid audio data. If the
// flags are BUFFER_SILENT, the endpoint should write silence into the
// destination buffer where the audio data is to end up.
//
// Remarks:
//
// This method tells the AudioEndpoint that the AudioProcessor is done
// with the data pointer, what time corresponds to the samples in the
// data pointer, how many frames have been generated, and if the buffer
// is full of valid data or silent.
//
// For example, an AudioEndpoint that is attached to the output of the
// AudioProcessor and that abstracts a looped buffer can advance its
// write cursor.
//
// An u32FrameCount of 0 means that the client did not generate any
// valid data into the buffer. The u32FrameCount must be <= to the frame
// count requested in GetOutputDataPointer. Note that the only valid data
// in the buffer is denoted by the u32FrameCount. The endpoint should not
// assume that all data requested was written.
//
// Note: This method may be called from a real-time processing thread. The
// implementation of this method does not and should not block, touch
// paged memory, or call any blocking system routines.
//
void ReleaseOutputDataPointer([in] const APO_CONNECTION_PROPERTY *pConnectionProperty );
//-------------------------------------------------------------------------
// Description:
//
// "Pulses" the endpoint, normally by signaling a client-supplied event handle
//
// Parameters:
//
//
// Return values:
//
// S_OK Successful completion.
//
// Remarks:
//
// This method is normally called at the end of a pump pass and signals
// a client event handle
//
// Note: This method may be called from a real-time processing thread. The
// implementation of this method does not and should not block, touch
// paged memory, or call any blocking system routines.
//
// See Also:
// IAudioProcessor::EndProcess
//
void PulseEndpoint(void);
}; // IAudioOutputEndpointRT
//-------------------------------------------------------------------------
// IAudioDeviceEndpoint
//
// This interface is used to initialize a Device Endpoint.
//
[
object,
uuid(D4952F5A-A0B2-4cc4-8B82-9358488DD8AC),
pointer_default(unique),
local
]
interface IAudioDeviceEndpoint: IUnknown
{
//-------------------------------------------------------------------------
// Description:
//
// Allocates data buffers internally.
//
// Parameters:
//
// MaxPeriod - [in] Processing period of the device in
// HNSTIME units.
//
// u32LatencyCoefficient - [in] The latency coefficient for this
// device. This coefficient will be multiplied with MaxPeriod to
// calculate latency. Note that each device has a minimum latency
// and if the coefficient is less than the minimum latency, the
// endpoint will apply minimum latency. Clients can obtain the
// actual latency using the IAudioEndpoint interface.
// 0 as the coefficient, applies the minimum latency coefficient.
//
// Return values:
//
// S_OK Successful completion.
//
// Remarks:
//
// Clients should not call SetBuffer when the endpoint is utilized
// in exclusive mode.
//
HRESULT SetBuffer(
[in] HNSTIME MaxPeriod,
[in] UINT32 u32LatencyCoefficient);
//-------------------------------------------------------------------------
// Description:
//
// Returns the RT capabilities of the device endpoints.
//
// Parameters:
//
// pbIsRTCapable - [out] TRUE, if the device is an RT capable device.
//
// Return values:
//
// S_OK Successful completion.
//
HRESULT GetRTCaps( [out] BOOL* pbIsRTCapable);
//-------------------------------------------------------------------------
// Description:
//
// Determine the endpoint's capability to be event driven.
//
// Parameters:
//
// pbisEventCapable - pointer to a boolean value which indicates if the
// endpoint can be event driven. TRUE means it can.
//
// Return values:
//
// S_OK Successful completion.
//
// Remarks:
//
// Note: This method may not be called from a real-time processing thread.
//
HRESULT GetEventDrivenCapable( [out] BOOL *pbisEventCapable);
//-------------------------------------------------------------------------
// Description:
//
// Creates and writes the exclusive mode parameters to shared memory
//
// Parameters:
//
// hTargetProcess - [in] Handle of the process for which the handles
// will be duplicated.
//
// hnsPeriod - [in] period (packet size) to use in 100-ns units, taking into
// account device min period and client requested periodicity
//
// hnsBufferDuration - [in] client requested buffer duration in 100-ns units
//
// u32LatencyCoefficient - [in] device latency coefficient
//
// pu32SharedMemorySize - [out] The size of the shared memory region.
//
// phSharedMemory - [out] The handle to the shared memory region between
// the service and the process.
//
// Return values:
//
// S_OK Successful completion.
//
// Remarks:
//
// This method is used in exlusive mode to extract endpoint properties.
// It will fail if the endpoint is fully initialized with SetBuffer.
//
// The shared memory region has a
// AUDIO_ENDPOINT_EXCLUSIVE_CREATE_PARAMS structure in it. The handles
// in the structure are duplicated for the calling process.
//
// Note that the shared region and handles are owned by the endpoint
// and will be released when the endpoint is released.
//
HRESULT WriteExclusiveModeParametersToSharedMemory(
[in] UINT_PTR hTargetProcess,
[in] HNSTIME hnsPeriod,
[in] HNSTIME hnsBufferDuration,
[in] UINT32 u32LatencyCoefficient,
[out] UINT32* pu32SharedMemorySize,
[out] UINT_PTR* phSharedMemory);
};
//-----------------------------------------------------------------------------
// This interface is used to control an endpoint.
[
object,
uuid(C684B72A-6DF4-4774-BDF9-76B77509B653),
pointer_default(unique)
]
interface IAudioEndpointControl : IUnknown{
//-------------------------------------------------------------------------
// Description:
//
// Starts an endpoint immediately
//
// Return values:
//
// S_OK Successful completion.
//
// Remarks:
//
// The implementation of this method may differ for various endpoints.
// For example a RenderDevice endpoint will put the underlying pin to
// RUN state or a Client-Side crossprocess endpoint will set the Start
// bit in the shared memory region.
//
// Note: This method may not be called from a real-time processing thread.
//
HRESULT Start(void);
//-------------------------------------------------------------------------
// Description:
//
// Resets an endpoint immediately.
//
// Return values:
//
// S_OK Successful completion.
//
// Remarks:
//
// Reset discards all data that has not been processed yet.
//
// The implementation of this method may differ for various endpoints.
// For example an Output-Client-Side crossprocess endpoint will set the
// write cursor to the beginning of the buffer and queue a reset
// request for the Input-Server-Side crossprocess endpoint.
//
// Note: This method may not be called from a real-time processing thread.
//
HRESULT Reset(void);
//-------------------------------------------------------------------------
// Description:
//
// Stops an endpoint immediately.
//
// Return values:
//
// S_OK Successful completion.
//
// Remarks:
//
// The implementation of this method may differ for various endpoints.
//
// Note: This method may not be called from a real-time processing thread.
//
HRESULT Stop(void);
};

File diff suppressed because it is too large Load Diff

808
BuildTools/Include/AuthZ.h Normal file
View File

@ -0,0 +1,808 @@
/*++
Copyright (c) 2000 Microsoft Corporation
Module Name:
authz.h
Abstract:
This module contains the authorization framework APIs and any public data
structures needed to call these APIs.
Revision History:
Created - March 2000
--*/
#ifndef __AUTHZ_H__
#define __AUTHZ_H__
#ifdef __cplusplus
extern "C" {
#endif
#if !defined(_AUTHZ_)
#define AUTHZAPI DECLSPEC_IMPORT
#else
#define AUTHZAPI
#endif
#include <windows.h>
#include <adtgen.h>
//
// Flags which may be used at the time of client context creation using a sid.
//
#define AUTHZ_SKIP_TOKEN_GROUPS 0x2
#define AUTHZ_REQUIRE_S4U_LOGON 0x4
#define AUTHZ_COMPUTE_PRIVILEGES 0x8
DECLARE_HANDLE(AUTHZ_ACCESS_CHECK_RESULTS_HANDLE);
DECLARE_HANDLE(AUTHZ_CLIENT_CONTEXT_HANDLE);
DECLARE_HANDLE(AUTHZ_RESOURCE_MANAGER_HANDLE);
DECLARE_HANDLE(AUTHZ_AUDIT_EVENT_HANDLE);
DECLARE_HANDLE(AUTHZ_AUDIT_EVENT_TYPE_HANDLE);
DECLARE_HANDLE(AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE);
typedef AUTHZ_ACCESS_CHECK_RESULTS_HANDLE *PAUTHZ_ACCESS_CHECK_RESULTS_HANDLE;
typedef AUTHZ_CLIENT_CONTEXT_HANDLE *PAUTHZ_CLIENT_CONTEXT_HANDLE;
typedef AUTHZ_RESOURCE_MANAGER_HANDLE *PAUTHZ_RESOURCE_MANAGER_HANDLE;
typedef AUTHZ_AUDIT_EVENT_HANDLE *PAUTHZ_AUDIT_EVENT_HANDLE;
typedef AUTHZ_AUDIT_EVENT_TYPE_HANDLE *PAUTHZ_AUDIT_EVENT_TYPE_HANDLE;
typedef AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE *PAUTHZ_SECURITY_EVENT_PROVIDER_HANDLE;
//
// Structure defining the access check request.
//
typedef struct _AUTHZ_ACCESS_REQUEST
{
ACCESS_MASK DesiredAccess;
//
// To replace the principal self sid in the acl.
//
PSID PrincipalSelfSid;
//
// Object type list represented by an array of (level, guid) pair and the
// number of elements in the array. This is a post-fix representation of the
// object tree.
// These fields should be set to NULL and 0 respectively except when per
// property access is desired.
//
POBJECT_TYPE_LIST ObjectTypeList;
DWORD ObjectTypeListLength;
//
// To support completely business rules based access. This will be passed as
// input to the callback access check function. Access check algorithm does
// not interpret these.
//
PVOID OptionalArguments;
} AUTHZ_ACCESS_REQUEST, *PAUTHZ_ACCESS_REQUEST;
//
// Structure to return the results of the access check call.
//
typedef struct _AUTHZ_ACCESS_REPLY
{
//
// The length of the array representing the object type list structure. If
// no object type is used to represent the object, then the length must be
// set to 1.
//
// Note: This parameter must be filled!
//
DWORD ResultListLength;
//
// Array of granted access masks. This memory is allocated by the RM. Access
// check routines just fill in the values.
//
PACCESS_MASK GrantedAccessMask;
//
// Array of SACL evaluation results. This memory is allocated by the RM, if SACL
// evaluation results are desired. Access check routines just fill in the values.
// Sacl evaluation will only be performed if auditing is requested.
//
#define AUTHZ_GENERATE_SUCCESS_AUDIT 0x1
#define AUTHZ_GENERATE_FAILURE_AUDIT 0x2
PDWORD SaclEvaluationResults OPTIONAL;
//
// Array of results for each element of the array. This memory is allocated
// by the RM. Access check routines just fill in the values.
//
PDWORD Error;
} AUTHZ_ACCESS_REPLY, *PAUTHZ_ACCESS_REPLY;
//
// Typedefs for callback functions to be provided by the resource manager.
//
//
// Callback access check function takes in
// AuthzClientContext - a client context
// pAce - pointer to a callback ace
// pArgs - Optional arguments that were passed to AuthzAccessCheck thru
// AuthzAccessRequest->OptionalArguments are passed back here.
// pbAceApplicable - The resource manager must supply whether the ace should
// be used in the computation of access evaluation
//
// Returns
// TRUE if the API succeeded.
// FALSE on any intermediate errors (like failed memory allocation)
// In case of failure, the caller must use SetLastError(ErrorValue).
//
typedef BOOL (CALLBACK *PFN_AUTHZ_DYNAMIC_ACCESS_CHECK) (
IN AUTHZ_CLIENT_CONTEXT_HANDLE hAuthzClientContext,
IN PACE_HEADER pAce,
IN PVOID pArgs OPTIONAL,
IN OUT PBOOL pbAceApplicable
);
//
// Callback compute dynamic groups function takes in
// AuthzClientContext - a client context
// pArgs - Optional arguments that supplied to AuthzInitializeClientContext*
// thru DynamicGroupArgs are passed back here..
// pSidAttrArray - To allocate and return an array of (sids, attribute)
// pairs to be added to the normal part of the client context.
// pSidCount - Number of elements in pSidAttrArray
// pRestrictedSidAttrArray - To allocate and return an array of (sids, attribute)
// pairs to be added to the restricted part of the client context.
// pRestrictedSidCount - Number of elements in pRestrictedSidAttrArray
//
// Note:
// Memory returned thru both these array will be freed by the callback
// free function defined by the resource manager.
//
// Returns
// TRUE if the API succeeded.
// FALSE on any intermediate errors (like failed memory allocation)
// In case of failure, the caller must use SetLastError(ErrorValue).
//
typedef BOOL (CALLBACK *PFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS) (
IN AUTHZ_CLIENT_CONTEXT_HANDLE hAuthzClientContext,
IN PVOID Args,
OUT PSID_AND_ATTRIBUTES *pSidAttrArray,
OUT PDWORD pSidCount,
OUT PSID_AND_ATTRIBUTES *pRestrictedSidAttrArray,
OUT PDWORD pRestrictedSidCount
);
//
// Callback free function takes in
// pSidAttrArray - To be freed. This has been allocated by the compute
// dynamic groups function.
//
typedef VOID (CALLBACK *PFN_AUTHZ_FREE_DYNAMIC_GROUPS) (
IN PSID_AND_ATTRIBUTES pSidAttrArray
);
//
// BEGIN: *** (Subject) Security attributes ***
//
// WARNING!!!:
// These #defines and data structures exactly mirror
// the TOKEN_XXX definitions in ntseapi.w. Keep them
// in sync.
//
//
// Security attribute data types ...
//
#define AUTHZ_SECURITY_ATTRIBUTE_TYPE_INVALID 0x00
#define AUTHZ_SECURITY_ATTRIBUTE_TYPE_INT64 0x01
#define AUTHZ_SECURITY_ATTRIBUTE_TYPE_UINT64 0x02
//
// Case insensitive attribute value string by default.
// Unless the flag AUTHZ_SECURITY_ATTRIBUTE_VALUE_CASE_SENSITIVE
// is set indicating otherwise.
//
#define AUTHZ_SECURITY_ATTRIBUTE_TYPE_STRING 0x03
//
// Fully-qualified binary name.
//
typedef struct _AUTHZ_SECURITY_ATTRIBUTE_FQBN_VALUE {
ULONG64 Version;
PWSTR pName;
} AUTHZ_SECURITY_ATTRIBUTE_FQBN_VALUE, *PAUTHZ_SECURITY_ATTRIBUTE_FQBN_VALUE;
#define AUTHZ_SECURITY_ATTRIBUTE_TYPE_FQBN 0x04
//
// This is the 'catch all' type. The attribute manipulation
// code really doesn't care about the actual format of the
// value. Value subtypes are defined only for this type.
// Value subtypes permit easy addition of new subtypes
// without having to change the attribute manipulation
// (and WOW64 thunking!) code.
//
typedef struct _AUTHZ_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE {
PVOID pValue; // Pointer is BYTE aligned.
ULONG ValueLength; // In bytes
} AUTHZ_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE,
*PAUTHZ_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE;
#define AUTHZ_SECURITY_ATTRIBUTE_TYPE_OCTET_STRING 0x10
//
// Attribute operations that can be specified for a 'set' API:
//
typedef enum {
//
// No-op
//
AUTHZ_SECURITY_ATTRIBUTE_OPERATION_NONE = 0,
//
// Delete all existing security attributes and their values in
// the NT token and replace it with the specified attributes/values.
// If attributes to replace with are not specified, all existing
// attributes and values are deleted.
//
// This operation can be specified at most once and must be the
// only operation specified.
//
AUTHZ_SECURITY_ATTRIBUTE_OPERATION_REPLACE_ALL,
//
// Add a new attribute or a new value to an existing attribute.
// If the value specified for any attribute already exists for
// that attribute, the call fails.
//
AUTHZ_SECURITY_ATTRIBUTE_OPERATION_ADD,
//
// Delete the specified value(s) of the specified attribute(s).
// If the last value is deleted from an attribute, the attribute
// itself is removed. If no matching attribute name was found, no
// modifications are done and the call fails. If no value is specified
// for the attribute, the attribute itself will be deleted.
//
AUTHZ_SECURITY_ATTRIBUTE_OPERATION_DELETE,
//
// The value(s) of the specified security attribute(s) completely
// replace(s) the existing value(s) of the attribute(s). If the
// attribute does not already exist, it is added. When no value
// is specified, the attribute is deleted, if it exists; otherwise,
// the operation is simply ignored and no failure is reported.
//
AUTHZ_SECURITY_ATTRIBUTE_OPERATION_REPLACE
} AUTHZ_SECURITY_ATTRIBUTE_OPERATION, *PAUTHZ_SECURITY_ATTRIBUTE_OPERATION;
//
// An individual security attribute.
//
typedef struct _AUTHZ_SECURITY_ATTRIBUTE_V1 {
//
// Name of the attribute.
// Case insensitive Windows Unicode string.
//
PWSTR pName;
//
// Data type of attribute.
//
USHORT ValueType;
//
// Pass 0 in a set operation and check for 0 in
// a get operation.
//
USHORT Reserved;
//
// Attribute must not be inherited across process spawns.
//
#define AUTHZ_SECURITY_ATTRIBUTE_NON_INHERITABLE 0x0001
//
// Attribute value is compared in a case sensitive way. It is valid with string value
// or composite type containing string value. For other types of value, this flag
// will be ignored. Currently, it is valid with the two types:
// AUTHZ_SECURITY_ATTRIBUTE_TYPE_STRING and AUTHZ_SECURITY_ATTRIBUTE_TYPE_FQBN.
//
#define AUTHZ_SECURITY_ATTRIBUTE_VALUE_CASE_SENSITIVE 0x0002
#define AUTHZ_SECURITY_ATTRIBUTE_VALID_FLAGS ( \
AUTHZ_SECURITY_ATTRIBUTE_NON_INHERITABLE | \
AUTHZ_SECURITY_ATTRIBUTE_VALUE_CASE_SENSITIVE \
)
ULONG Flags;
//
// Number of values.
//
ULONG ValueCount;
//
// The actual value itself.
//
union {
PLONG64 pInt64;
PULONG64 pUint64;
PWSTR *ppString;
PAUTHZ_SECURITY_ATTRIBUTE_FQBN_VALUE pFqbn;
PAUTHZ_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE pOctetString;
} Values;
} AUTHZ_SECURITY_ATTRIBUTE_V1, *PAUTHZ_SECURITY_ATTRIBUTE_V1;
//
// Set of security attributes.
//
typedef struct _AUTHZ_SECURITY_ATTRIBUTES_INFORMATION {
//
// Versioning. The interpretation of the pointers in the
// Attribute field below is dependent on the version field.
//
// Get operations return the version while the set operation
// MUST specify the version of the data structure passed in.
//
#define AUTHZ_SECURITY_ATTRIBUTES_INFORMATION_VERSION_V1 1
#define AUTHZ_SECURITY_ATTRIBUTES_INFORMATION_VERSION \
AUTHZ_SECURITY_ATTRIBUTES_INFORMATION_VERSION_V1
//
// MUST BE first.
//
USHORT Version;
//
// Pass 0 in set operations and ignore on get operations.
//
USHORT Reserved;
ULONG AttributeCount;
union {
PAUTHZ_SECURITY_ATTRIBUTE_V1 pAttributeV1;
} Attribute;
} AUTHZ_SECURITY_ATTRIBUTES_INFORMATION,
*PAUTHZ_SECURITY_ATTRIBUTES_INFORMATION;
//
// Valid flags for AuthzAccessCheck
//
#define AUTHZ_ACCESS_CHECK_NO_DEEP_COPY_SD 0x00000001
AUTHZAPI
BOOL
WINAPI
AuthzAccessCheck(
IN DWORD Flags,
IN AUTHZ_CLIENT_CONTEXT_HANDLE hAuthzClientContext,
IN PAUTHZ_ACCESS_REQUEST pRequest,
IN AUTHZ_AUDIT_EVENT_HANDLE hAuditEvent OPTIONAL,
IN PSECURITY_DESCRIPTOR pSecurityDescriptor,
IN PSECURITY_DESCRIPTOR *OptionalSecurityDescriptorArray OPTIONAL,
IN DWORD OptionalSecurityDescriptorCount,
IN OUT PAUTHZ_ACCESS_REPLY pReply,
OUT PAUTHZ_ACCESS_CHECK_RESULTS_HANDLE phAccessCheckResults OPTIONAL
);
AUTHZAPI
BOOL
WINAPI
AuthzCachedAccessCheck(
IN DWORD Flags,
IN AUTHZ_ACCESS_CHECK_RESULTS_HANDLE hAccessCheckResults,
IN PAUTHZ_ACCESS_REQUEST pRequest,
IN AUTHZ_AUDIT_EVENT_HANDLE hAuditEvent OPTIONAL,
IN OUT PAUTHZ_ACCESS_REPLY pReply
);
AUTHZAPI
BOOL
WINAPI
AuthzOpenObjectAudit(
IN DWORD Flags,
IN AUTHZ_CLIENT_CONTEXT_HANDLE hAuthzClientContext,
IN PAUTHZ_ACCESS_REQUEST pRequest,
IN AUTHZ_AUDIT_EVENT_HANDLE hAuditEvent,
IN PSECURITY_DESCRIPTOR pSecurityDescriptor,
IN PSECURITY_DESCRIPTOR *OptionalSecurityDescriptorArray OPTIONAL,
IN DWORD OptionalSecurityDescriptorCount,
IN PAUTHZ_ACCESS_REPLY pReply
);
AUTHZAPI
BOOL
WINAPI
AuthzFreeHandle(
IN OUT AUTHZ_ACCESS_CHECK_RESULTS_HANDLE hAccessCheckResults
);
//
// Flags for AuthzInitializeResourceManager
//
#define AUTHZ_RM_FLAG_NO_AUDIT 0x1
#define AUTHZ_RM_FLAG_INITIALIZE_UNDER_IMPERSONATION 0x2
#define AUTHZ_VALID_RM_INIT_FLAGS (AUTHZ_RM_FLAG_NO_AUDIT | AUTHZ_RM_FLAG_INITIALIZE_UNDER_IMPERSONATION)
AUTHZAPI
BOOL
WINAPI
AuthzInitializeResourceManager(
IN DWORD Flags,
IN PFN_AUTHZ_DYNAMIC_ACCESS_CHECK pfnDynamicAccessCheck OPTIONAL,
IN PFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS pfnComputeDynamicGroups OPTIONAL,
IN PFN_AUTHZ_FREE_DYNAMIC_GROUPS pfnFreeDynamicGroups OPTIONAL,
IN PCWSTR szResourceManagerName,
OUT PAUTHZ_RESOURCE_MANAGER_HANDLE phAuthzResourceManager
);
AUTHZAPI
BOOL
WINAPI
AuthzFreeResourceManager(
IN AUTHZ_RESOURCE_MANAGER_HANDLE hAuthzResourceManager
);
AUTHZAPI
BOOL
WINAPI
AuthzInitializeContextFromToken(
IN DWORD Flags,
IN HANDLE TokenHandle,
IN AUTHZ_RESOURCE_MANAGER_HANDLE hAuthzResourceManager,
IN PLARGE_INTEGER pExpirationTime OPTIONAL,
IN LUID Identifier,
IN PVOID DynamicGroupArgs OPTIONAL,
OUT PAUTHZ_CLIENT_CONTEXT_HANDLE phAuthzClientContext
);
AUTHZAPI
BOOL
WINAPI
AuthzInitializeContextFromSid(
IN DWORD Flags,
IN PSID UserSid,
IN AUTHZ_RESOURCE_MANAGER_HANDLE hAuthzResourceManager,
IN PLARGE_INTEGER pExpirationTime OPTIONAL,
IN LUID Identifier,
IN PVOID DynamicGroupArgs OPTIONAL,
OUT PAUTHZ_CLIENT_CONTEXT_HANDLE phAuthzClientContext
);
AUTHZAPI
BOOL
WINAPI
AuthzInitializeContextFromAuthzContext(
IN DWORD Flags,
IN AUTHZ_CLIENT_CONTEXT_HANDLE hAuthzClientContext,
IN PLARGE_INTEGER pExpirationTime OPTIONAL,
IN LUID Identifier,
IN PVOID DynamicGroupArgs,
OUT PAUTHZ_CLIENT_CONTEXT_HANDLE phNewAuthzClientContext
);
AUTHZAPI
BOOL
WINAPI
AuthzAddSidsToContext(
IN AUTHZ_CLIENT_CONTEXT_HANDLE hAuthzClientContext,
IN PSID_AND_ATTRIBUTES Sids OPTIONAL,
IN DWORD SidCount,
IN PSID_AND_ATTRIBUTES RestrictedSids OPTIONAL,
IN DWORD RestrictedSidCount,
OUT PAUTHZ_CLIENT_CONTEXT_HANDLE phNewAuthzClientContext
);
//
// API to modify security attributes in AUTHZ client context.
//
AUTHZAPI
BOOL
WINAPI
AuthzModifySecurityAttributes(
__in AUTHZ_CLIENT_CONTEXT_HANDLE hAuthzClientContext,
__in PAUTHZ_SECURITY_ATTRIBUTE_OPERATION pOperations,
__in PAUTHZ_SECURITY_ATTRIBUTES_INFORMATION pAttributes
);
//
// Enumeration type to be used to specify the type of information to be
// retrieved from an existing AuthzClientContext.
//
typedef enum _AUTHZ_CONTEXT_INFORMATION_CLASS
{
AuthzContextInfoUserSid = 1,
AuthzContextInfoGroupsSids,
AuthzContextInfoRestrictedSids,
AuthzContextInfoPrivileges,
AuthzContextInfoExpirationTime,
AuthzContextInfoServerContext,
AuthzContextInfoIdentifier,
AuthzContextInfoSource,
AuthzContextInfoAll,
AuthzContextInfoAuthenticationId,
AuthzContextInfoSecurityAttributes
} AUTHZ_CONTEXT_INFORMATION_CLASS;
AUTHZAPI
BOOL
WINAPI
AuthzGetInformationFromContext(
IN AUTHZ_CLIENT_CONTEXT_HANDLE hAuthzClientContext,
IN AUTHZ_CONTEXT_INFORMATION_CLASS InfoClass,
IN DWORD BufferSize,
OUT PDWORD pSizeRequired,
OUT PVOID Buffer
);
AUTHZAPI
BOOL
WINAPI
AuthzFreeContext(
IN AUTHZ_CLIENT_CONTEXT_HANDLE hAuthzClientContext
);
//
// Valid flags that may be used in AuthzInitializeObjectAccessAuditEvent().
//
#define AUTHZ_NO_SUCCESS_AUDIT 0x00000001
#define AUTHZ_NO_FAILURE_AUDIT 0x00000002
#define AUTHZ_NO_ALLOC_STRINGS 0x00000004
#define AUTHZ_VALID_OBJECT_ACCESS_AUDIT_FLAGS (AUTHZ_NO_SUCCESS_AUDIT | \
AUTHZ_NO_FAILURE_AUDIT | \
AUTHZ_NO_ALLOC_STRINGS)
AUTHZAPI
BOOL
WINAPI
AuthzInitializeObjectAccessAuditEvent(
IN DWORD Flags,
IN AUTHZ_AUDIT_EVENT_TYPE_HANDLE hAuditEventType,
__in PWSTR szOperationType,
__in PWSTR szObjectType,
__in PWSTR szObjectName,
__in PWSTR szAdditionalInfo,
OUT PAUTHZ_AUDIT_EVENT_HANDLE phAuditEvent,
IN DWORD dwAdditionalParameterCount,
...
);
AUTHZAPI
BOOL
WINAPI
AuthzInitializeObjectAccessAuditEvent2(
IN DWORD Flags,
IN AUTHZ_AUDIT_EVENT_TYPE_HANDLE hAuditEventType,
__in PWSTR szOperationType,
__in PWSTR szObjectType,
__in PWSTR szObjectName,
__in PWSTR szAdditionalInfo,
__in PWSTR szAdditionalInfo2,
OUT PAUTHZ_AUDIT_EVENT_HANDLE phAuditEvent,
IN DWORD dwAdditionalParameterCount,
...
);
//
// Enumeration type to be used to specify the type of information to be
// retrieved from an existing AUTHZ_AUDIT_EVENT_HANDLE.
//
typedef enum _AUTHZ_AUDIT_EVENT_INFORMATION_CLASS
{
AuthzAuditEventInfoFlags = 1,
AuthzAuditEventInfoOperationType,
AuthzAuditEventInfoObjectType,
AuthzAuditEventInfoObjectName,
AuthzAuditEventInfoAdditionalInfo,
} AUTHZ_AUDIT_EVENT_INFORMATION_CLASS;
AUTHZAPI
BOOL
WINAPI
AuthzFreeAuditEvent(
IN AUTHZ_AUDIT_EVENT_HANDLE hAuditEvent
);
//
// Support for SACL evaluation
//
AUTHZAPI
BOOL
WINAPI
AuthzEvaluateSacl(
IN AUTHZ_CLIENT_CONTEXT_HANDLE AuthzClientContext,
IN PAUTHZ_ACCESS_REQUEST pRequest,
IN PACL Sacl,
IN ACCESS_MASK GrantedAccess,
IN BOOL AccessGranted,
OUT PBOOL pbGenerateAudit
);
//
// Support for generic auditing.
//
typedef struct _AUTHZ_REGISTRATION_OBJECT_TYPE_NAME_OFFSET
{
PWSTR szObjectTypeName;
DWORD dwOffset;
} AUTHZ_REGISTRATION_OBJECT_TYPE_NAME_OFFSET, *PAUTHZ_REGISTRATION_OBJECT_TYPE_NAME_OFFSET;
#if _MSC_VER >= 1200
#pragma warning(push)
#pragma warning(disable:4201) // nonstandard extension used : nameless struct/union
#endif
typedef struct _AUTHZ_SOURCE_SCHEMA_REGISTRATION
{
DWORD dwFlags;
PWSTR szEventSourceName;
PWSTR szEventMessageFile;
PWSTR szEventSourceXmlSchemaFile;
PWSTR szEventAccessStringsFile;
PWSTR szExecutableImagePath;
//
// The meaning of the data is defined by dwFlags. Make sure
// new types are pointers.
//
union
{
PVOID pReserved;
//
// Must be supplied when dwFlags contains AUTHZ_MIGRATED_LEGACY_PUBLISHER
//
GUID* pProviderGuid;
};
DWORD dwObjectTypeNameCount;
AUTHZ_REGISTRATION_OBJECT_TYPE_NAME_OFFSET ObjectTypeNames[ANYSIZE_ARRAY];
} AUTHZ_SOURCE_SCHEMA_REGISTRATION, *PAUTHZ_SOURCE_SCHEMA_REGISTRATION;
#if _MSC_VER >= 1200
#pragma warning(pop)
#endif
#define AUTHZ_FLAG_ALLOW_MULTIPLE_SOURCE_INSTANCES 0x1
AUTHZAPI
BOOL
WINAPI
AuthzInstallSecurityEventSource(
IN DWORD dwFlags,
IN PAUTHZ_SOURCE_SCHEMA_REGISTRATION pRegistration
);
AUTHZAPI
BOOL
WINAPI
AuthzUninstallSecurityEventSource(
IN DWORD dwFlags,
IN PCWSTR szEventSourceName
);
AUTHZAPI
BOOL
WINAPI
AuthzEnumerateSecurityEventSources(
IN DWORD dwFlags,
OUT PAUTHZ_SOURCE_SCHEMA_REGISTRATION Buffer,
OUT PDWORD pdwCount,
IN OUT PDWORD pdwLength
);
AUTHZAPI
BOOL
WINAPI
AuthzRegisterSecurityEventSource(
IN DWORD dwFlags,
IN PCWSTR szEventSourceName,
OUT PAUTHZ_SECURITY_EVENT_PROVIDER_HANDLE phEventProvider
);
AUTHZAPI
BOOL
WINAPI
AuthzUnregisterSecurityEventSource(
IN DWORD dwFlags,
IN OUT PAUTHZ_SECURITY_EVENT_PROVIDER_HANDLE phEventProvider
);
AUTHZAPI
BOOL
WINAPI
AuthzReportSecurityEvent(
IN DWORD dwFlags,
IN OUT AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE hEventProvider,
IN DWORD dwAuditId,
IN PSID pUserSid OPTIONAL,
IN DWORD dwCount,
...
);
AUTHZAPI
BOOL
WINAPI
AuthzReportSecurityEventFromParams(
IN DWORD dwFlags,
IN OUT AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE hEventProvider,
IN DWORD dwAuditId,
IN PSID pUserSid OPTIONAL,
IN PAUDIT_PARAMS pParams
);
#ifdef __cplusplus
}
#endif
#endif

482
BuildTools/Include/Authif.h Normal file
View File

@ -0,0 +1,482 @@
/*/////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// FILE
//
// authif.h
//
// SYNOPSIS
//
// Declares the interface for extensions to the Internet Authentication
// Service.
//
/////////////////////////////////////////////////////////////////////////////*/
#ifndef _AUTHIF_H_
#define _AUTHIF_H_
#if _MSC_VER >= 1000
#pragma once
#endif
/*
* Enumerates the attribute types that are passed to the extension DLL. The
* RADIUS standard attributes are included for convenience and should not be
* considered exhaustive.
*/
typedef enum _RADIUS_ATTRIBUTE_TYPE {
/* Used to terminate attribute arrays. */
ratMinimum = 0,
/* RADIUS standard attributes. */
ratUserName = 1,
ratUserPassword = 2,
ratCHAPPassword = 3,
ratNASIPAddress = 4,
ratNASPort = 5,
ratServiceType = 6,
ratFramedProtocol = 7,
ratFramedIPAddress = 8,
ratFramedIPNetmask = 9,
ratFramedRouting = 10,
ratFilterId = 11,
ratFramedMTU = 12,
ratFramedCompression = 13,
ratLoginIPHost = 14,
ratLoginService = 15,
ratLoginPort = 16,
ratReplyMessage = 18,
ratCallbackNumber = 19,
ratCallbackId = 20,
ratFramedRoute = 22,
ratFramedIPXNetwork = 23,
ratState = 24,
ratClass = 25,
ratVendorSpecific = 26,
ratSessionTimeout = 27,
ratIdleTimeout = 28,
ratTerminationAction = 29,
ratCalledStationId = 30,
ratCallingStationId = 31,
ratNASIdentifier = 32,
ratProxyState = 33,
ratLoginLATService = 34,
ratLoginLATNode = 35,
ratLoginLATGroup = 36,
ratFramedAppleTalkLink = 37,
ratFramedAppleTalkNetwork = 38,
ratFramedAppleTalkZone = 39,
ratAcctStatusType = 40,
ratAcctDelayTime = 41,
ratAcctInputOctets = 42,
ratAcctOutputOctets = 43,
ratAcctSessionId = 44,
ratAcctAuthentic = 45,
ratAcctSessionTime = 46,
ratAcctInputPackets = 47,
ratAcctOutputPackets = 48,
ratAcctTerminationCause = 49,
ratCHAPChallenge = 60,
ratNASPortType = 61,
ratPortLimit = 62,
ratTunnelType = 64,
ratMediumType = 65,
ratTunnelPassword = 69,
ratTunnelPrivateGroupID = 81,
ratNASIPv6Address = 95,
ratFramedInterfaceId,
ratFramedIPv6Prefix,
ratLoginIPv6Host,
ratFramedIPv6Route,
ratFramedIPv6Pool,
/* Extended attribute types used to pass additional information. */
ratCode = 262, /* Request type code. */
ratIdentifier = 263, /* Request identifier. */
ratAuthenticator = 264, /* Request authenticator. */
ratSrcIPAddress = 265, /* Source IP address. */
ratSrcPort = 266, /* Source IP port. */
ratProvider = 267, /* Authentication provider. */
ratStrippedUserName = 268, /* User-Name with realm stripped. */
ratFQUserName = 269, /* Fully-Qualified-User-Name. */
ratPolicyName = 270, /* Remote Access Policy name. */
ratUniqueId = 271, /* Unique ID identifying the request. */
ratExtensionState = 272, /* Used to pass state between extensions. */
ratEAPTLV = 273, /* EAP-TLV packet */
ratRejectReasonCode = 274, /* The reason code for radius reject */
ratCRPPolicyName = 275, /* CRP Policy Name */
ratProviderName = 276, /* Remote RADIUS server group name */
ratClearTextPassword = 277, /* The user password in clear text */
ratSrcIPv6Address = 278, /* Source IPv6 address */
} RADIUS_ATTRIBUTE_TYPE;
/*
* Enumerates the different RADIUS packet codes. Used for the ratCode extended
* attribute.
*/
typedef enum _RADIUS_CODE {
rcUnknown = 0,
rcAccessRequest = 1,
rcAccessAccept = 2,
rcAccessReject = 3,
rcAccountingRequest = 4,
rcAccountingResponse = 5,
rcAccessChallenge = 11,
rcDiscard = 256
} RADIUS_CODE;
/*
* Enumerates the different authentication providers used for processing a
* request. Used for the ratProvider extended attribute.
*/
typedef enum _RADIUS_AUTHENTICATION_PROVIDER {
rapUnknown,
rapUsersFile,
rapProxy,
rapWindowsNT,
rapMCIS,
rapODBC,
rapNone
} RADIUS_AUTHENTICATION_PROVIDER;
/*
* Enumerates a subset of reason codes for radius reject.
* Used for the ratReasonCode extended attribute.
*/
typedef enum _RADIUS_REJECT_REASON_CODE {
rrrcUndefined = 0,
rrrcAccountUnknown = 1,
rrrcAccountDisabled = 2,
rrrcAccountExpired = 3,
rrrcAuthenticationFailure = 4,
} RADIUS_REJECT_REASON_CODE;
/*
* Enumerates the different RADIUS data types. A type of 'rdtUnknown' means
* the attribute was not recognized by the dictionary.
*/
typedef enum _RADIUS_DATA_TYPE {
rdtUnknown,
rdtString,
rdtAddress,
rdtInteger,
rdtTime,
rdtIpv6Address
} RADIUS_DATA_TYPE;
/*
* Struct representing a RADIUS or extended attribute.
*/
typedef struct _RADIUS_ATTRIBUTE {
DWORD dwAttrType; /* Attribute type */
RADIUS_DATA_TYPE fDataType; /* RADIUS_DATA_TYPE of the value */
DWORD cbDataLength; /* Length of the value (in bytes) */
union {
DWORD dwValue; /* For rdtAddress, rdtInteger, and rdtTime */
CONST BYTE* lpValue; /* For rdtUnknown, rdtIpv6Address and rdtString */
};
} RADIUS_ATTRIBUTE, *PRADIUS_ATTRIBUTE;
/*
* Struct representing the layout of a RADIUS Vendor-Specific attribute. This
* is useful when interpreting the RADIUS_ATTRIBUTE lpValue field when
* dwAttrType is ratVendorSpecific.
*/
typedef struct _RADIUS_VSA_FORMAT {
BYTE VendorId[4];
BYTE VendorType;
BYTE VendorLength;
BYTE AttributeSpecific[1];
} RADIUS_VSA_FORMAT;
/*
* Enumerates the different actions an extension DLL can generate in
* response to an Access-Request.
*/
typedef enum _RADIUS_ACTION {
raContinue,
raReject,
raAccept
} RADIUS_ACTION, *PRADIUS_ACTION;
/*
* Routines exported by a RADIUS extension DLL.
*/
/*
* RadiusExtensionInit is optional. If it exists, it will be invoked prior to
* the service coming on-line. A return value other than NO_ERROR prevents the
* service from initializing.
*/
#define RADIUS_EXTENSION_INIT "RadiusExtensionInit"
typedef DWORD (WINAPI *PRADIUS_EXTENSION_INIT)( VOID );
/*
* RadiusExtensionTerm is optional. If it exists, it will be invoked prior to
* unloading the DLL to give the extension a chance to clean-up.
*/
#define RADIUS_EXTENSION_TERM "RadiusExtensionTerm"
typedef VOID (WINAPI *PRADIUS_EXTENSION_TERM)( VOID );
/*
* RadiusExtensionProcess is mandatory for NT4. For Windows 2000, an
* extension may export RadiusExtensionProcessEx (q.v.) instead.
*
* Parameters:
* pAttrs Array of attributes from the request. It is terminated by an
* attribute with dwAttrType set to ratMinimum. These attributes
* should be treated as read-only and must not be referenced
* after the function returns.
* pfAction For Access-Requests, this parameter will be non-NULL with
* *pfAction == raContinue. The extension DLL can set *pfAction
* to abort further processing and force an Access-Accept or
* Access-Reject. For all other request types, this parameter
* will be NULL.
*
* Return Value:
* A return value other than NO_ERROR causes the request to be discarded.
*/
#define RADIUS_EXTENSION_PROCESS "RadiusExtensionProcess"
typedef DWORD (WINAPI *PRADIUS_EXTENSION_PROCESS)(
IN const RADIUS_ATTRIBUTE *pAttrs,
OUT OPTIONAL PRADIUS_ACTION pfAction
);
/*
* RadiusExtensionProcessEx is only supported on Windows 2000. If it exits,
* RadiusExtensionProcess is ignored.
*
* Parameters:
* pInAttrs Array of attributes from the request. It is terminated by an
* attribute with dwAttrType set to ratMinimum. These attributes
* should be treated as read-only and must not be referenced
* after the function returns.
* pOutAttrs Array of attributes to add to the response. It is terminated
* by an attribute with dwAttrType set to ratMinimum.
* *pOutAttrs may be set to NULL if no attributes are returned.
* pfAction For Access-Requests, this parameter will be non-NULL with
* *pfAction == raContinue. The extension DLL can set *pfAction
* to abort further processing and force an Access-Accept or
* Access-Reject. For all other request types, this parameter
* will be NULL.
*
* Return Value:
* A return value other than NO_ERROR causes the request to be discarded.
*/
#define RADIUS_EXTENSION_PROCESS_EX "RadiusExtensionProcessEx"
typedef DWORD (WINAPI *PRADIUS_EXTENSION_PROCESS_EX)(
IN const RADIUS_ATTRIBUTE *pInAttrs,
OUT PRADIUS_ATTRIBUTE *pOutAttrs,
OUT OPTIONAL PRADIUS_ACTION pfAction
);
/*
* RadiusExtensionFreeAttributes must be defined if RadiusExtensionProcessEx
* is defined. It is used to free the attributes returned by
* RadiusExtensionProcessEx
*
* Parameters:
* pAttrs Array of attributes to be freed.
*/
#define RADIUS_EXTENSION_FREE_ATTRIBUTES "RadiusExtensionFreeAttributes"
typedef VOID (WINAPI *PRADIUS_EXTENSION_FREE_ATTRIBUTES)(
IN PRADIUS_ATTRIBUTE pAttrs
);
/*
* Defines used for installation of an extension DLL.
* The following registry values are used for loading extensions:
*
* HKLM\System\CurrentControlSet\Services\AuthSrv\Parameters
* ExtensionDLLs (REG_MULTI_SZ) <list of DLL paths>
* AuthorizationDLLs (REG_MULTI_SZ) <list of DLL paths>
*
* ExtensionDLLs are invoked before any of the built-in authentication
* providers. They receive all the attributes from the request plus all
* the extended attribute types.
*
* AuthorizationDLLs are invoked after the built-in authentication and
* authorization providers. They receive all the attributes from the
* response plus all the extended attributes types. AuthorizationDLLs may
* not return an action of raAccept.
*/
#define AUTHSRV_PARAMETERS_KEY_W \
L"System\\CurrentControlSet\\Services\\AuthSrv\\Parameters"
#define AUTHSRV_EXTENSIONS_VALUE_W \
L"ExtensionDLLs"
#define AUTHSRV_AUTHORIZATION_VALUE_W \
L"AuthorizationDLLs"
#if _WIN32_WINNT >= 0x0501
/* Version of this spec. */
#define RADIUS_EXTENSION_VERSION (1)
/*
* Enumerates the different points during request processing where an
* extension can be invoked.
*/
typedef enum _RADIUS_EXTENSION_POINT {
repAuthentication, /* ExtensionDLLs */
repAuthorization /* AuthorizationDLLs */
} RADIUS_EXTENSION_POINT;
/*
* Struct representing an array of RADIUS_ATTRIBUTE structs. All the functions
* for adding attributes to a request copy the supplied memory, so there is no
* need for the extension to export RadiusExtensionFreeAttributes. The
* extension must not modify this struct. All changes must be made by using the
* supplied callback functions.
*/
typedef struct _RADIUS_ATTRIBUTE_ARRAY {
/* Size of this structure in bytes. */
DWORD cbSize;
/* Adds a new attribute to the end of the array. */
DWORD (WINAPI *Add)(
IN struct _RADIUS_ATTRIBUTE_ARRAY *This,
IN const RADIUS_ATTRIBUTE *pAttr
);
/*
* Returns a const pointer to the specified attribute within the array or
* NULL if the index is out of range.
*/
const RADIUS_ATTRIBUTE * (WINAPI *AttributeAt)(
IN const struct _RADIUS_ATTRIBUTE_ARRAY *This,
IN DWORD dwIndex
);
/*
* Returns the size of the array. Since indexes are zero-based, the size is
* 1 greater than the largest index.
*/
DWORD (WINAPI *GetSize)(
IN const struct _RADIUS_ATTRIBUTE_ARRAY *This
);
/*
* Inserts a new attribute at a specified index in the array. In the
* process, it shifts up (by incrementing the index) the existing attribute
* at this index, and it shifts up all the attributes above it. Returns
* ERROR_INVALID_PARAMETER if the index is out of range.
*/
DWORD (WINAPI *InsertAt)(
IN struct _RADIUS_ATTRIBUTE_ARRAY *This,
IN DWORD dwIndex,
IN const RADIUS_ATTRIBUTE *pAttr
);
/*
* Removes the attribute at the specified index in the array. In the
* process, it shifts down all the attributes above the removed attribute.
* Returns ERROR_ACCESS_DENIED if the specified attribute is read-only.
* Returns ERROR_INVALID_PARAMETER if the index is out of range.
*/
DWORD (WINAPI *RemoveAt)(
IN struct _RADIUS_ATTRIBUTE_ARRAY *This,
IN DWORD dwIndex
);
/*
* Sets the array element at the specified index, replacing the existing
* attribute. Returns ERROR_INVALID_PARAMETER if the index is out of range.
*/
DWORD (WINAPI *SetAt)(
IN struct _RADIUS_ATTRIBUTE_ARRAY *This,
IN DWORD dwIndex,
IN const RADIUS_ATTRIBUTE *pAttr
);
} RADIUS_ATTRIBUTE_ARRAY, *PRADIUS_ATTRIBUTE_ARRAY;
/*
* Struct used to exchange information with the extension during request
* processing. The extension must not modify this struct. All changes must be
* made by using the supplied callback functions.
*/
typedef struct _RADIUS_EXTENSION_CONTROL_BLOCK {
/* Size of this structure. */
DWORD cbSize;
/* Version info of this specification. */
DWORD dwVersion;
/* Point during request processing where the extension is being invoked. */
RADIUS_EXTENSION_POINT repPoint;
/* Type of RADIUS request being processed. */
RADIUS_CODE rcRequestType;
/*
* Final disposition of the request. This field must not be modified
* directly; use the SetResponseType callback function instead. At the
* repAuthentication point, this may be set to rcUnknown to indicate that no
* decision has been made yet.
*/
RADIUS_CODE rcResponseType;
/*
* Returns the attributes received in the RADIUS request and any internal
* attributes describing the request state. The extenstion can modify the
* request attributes. For example, when IAS is acting as a RADIUS proxy, an
* extension could filter which attributes are forwarded to a remote RADIUS
* server.
*/
PRADIUS_ATTRIBUTE_ARRAY (WINAPI *GetRequest)(
IN struct _RADIUS_EXTENSION_CONTROL_BLOCK *This
);
/*
* Returns the attributes that will be sent in the response if the final
* outcome of request processing matches the specified response type.
* Returns NULL if rcResponseType is invalid. Note that an extension may
* retrieve and modify the attributes for any valid response type regardless
* of the request's current disposition. For example, an extension can set
* the response type to rcAccessAccept, but still add attributes to the
* Access-Reject in case the response type is overridden during further
* processing.
*/
PRADIUS_ATTRIBUTE_ARRAY (WINAPI *GetResponse)(
IN struct _RADIUS_EXTENSION_CONTROL_BLOCK *This,
IN RADIUS_CODE rcResponseType
);
/*
* Sets the final disposition of the request.
* Returns ERROR_INVALID_PARAMETER if the specified response type is invalid
* for the request type.
*/
DWORD (WINAPI *SetResponseType)(
IN struct _RADIUS_EXTENSION_CONTROL_BLOCK *This,
IN RADIUS_CODE rcResponseType
);
} RADIUS_EXTENSION_CONTROL_BLOCK, *PRADIUS_EXTENSION_CONTROL_BLOCK;
/*
* If RadiusExtensionProcess2 exists, RadiusExtensionProcess and
* RadiusExtensionProcessEx are ignored.
*
* Parameters:
* pECB Info exchanged with the extension.
*
* Return Value:
* A return value other than NO_ERROR causes the request to be discarded.
*/
#define RADIUS_EXTENSION_PROCESS2 "RadiusExtensionProcess2"
typedef DWORD (WINAPI *PRADIUS_EXTENSION_PROCESS_2)(
IN OUT PRADIUS_EXTENSION_CONTROL_BLOCK pECB
);
#endif // _WIN32_WINNT
#endif /* _AUTHIF_H_ */

252
BuildTools/Include/AviFmt.h Normal file
View File

@ -0,0 +1,252 @@
/****************************************************************************/
/* */
/* AVIFMT.H - Include file for working with AVI files */
/* */
/* Note: You must include WINDOWS.H and MMSYSTEM.H before */
/* including this file. */
/* */
/* Copyright (c) 1991-1998, Microsoft Corp. All rights reserved. */
/* */
/* */
/****************************************************************************/
#ifndef _INC_AVIFMT
#define _INC_AVIFMT 100 /* version number * 100 + revision */
#ifdef __cplusplus
extern "C" { /* Assume C declarations for C++ */
#endif /* __cplusplus */
// begin_vfw32
#ifdef _MSC_VER
#pragma warning(disable:4200)
#endif
/* The following is a short description of the AVI file format. Please
* see the accompanying documentation for a full explanation.
*
* An AVI file is the following RIFF form:
*
* RIFF('AVI'
* LIST('hdrl'
* avih(<MainAVIHeader>)
* LIST ('strl'
* strh(<Stream header>)
* strf(<Stream format>)
* ... additional header data
* LIST('movi'
* { LIST('rec'
* SubChunk...
* )
* | SubChunk } ....
* )
* [ <AVIIndex> ]
* )
*
* The main file header specifies how many streams are present. For
* each one, there must be a stream header chunk and a stream format
* chunk, enlosed in a 'strl' LIST chunk. The 'strf' chunk contains
* type-specific format information; for a video stream, this should
* be a BITMAPINFO structure, including palette. For an audio stream,
* this should be a WAVEFORMAT (or PCMWAVEFORMAT) structure.
*
* The actual data is contained in subchunks within the 'movi' LIST
* chunk. The first two characters of each data chunk are the
* stream number with which that data is associated.
*
* Some defined chunk types:
* Video Streams:
* ##db: RGB DIB bits
* ##dc: RLE8 compressed DIB bits
* ##pc: Palette Change
*
* Audio Streams:
* ##wb: waveform audio bytes
*
* The grouping into LIST 'rec' chunks implies only that the contents of
* the chunk should be read into memory at the same time. This
* grouping is used for files specifically intended to be played from
* CD-ROM.
*
* The index chunk at the end of the file should contain one entry for
* each data chunk in the file.
*
* Limitations for the current software:
* Only one video stream and one audio stream are allowed.
* The streams must start at the beginning of the file.
*
*
* To register codec types please obtain a copy of the Multimedia
* Developer Registration Kit from:
*
* Microsoft Corporation
* Multimedia Systems Group
* Product Marketing
* One Microsoft Way
* Redmond, WA 98052-6399
*
*/
#ifndef mmioFOURCC
#define mmioFOURCC( ch0, ch1, ch2, ch3 ) \
( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \
( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
#endif
/* Macro to make a TWOCC out of two characters */
#ifndef aviTWOCC
#define aviTWOCC(ch0, ch1) ((WORD)(BYTE)(ch0) | ((WORD)(BYTE)(ch1) << 8))
#endif
typedef WORD TWOCC;
/* form types, list types, and chunk types */
#define formtypeAVI mmioFOURCC('A', 'V', 'I', ' ')
#define listtypeAVIHEADER mmioFOURCC('h', 'd', 'r', 'l')
#define ckidAVIMAINHDR mmioFOURCC('a', 'v', 'i', 'h')
#define listtypeSTREAMHEADER mmioFOURCC('s', 't', 'r', 'l')
#define ckidSTREAMHEADER mmioFOURCC('s', 't', 'r', 'h')
#define ckidSTREAMFORMAT mmioFOURCC('s', 't', 'r', 'f')
#define ckidSTREAMHANDLERDATA mmioFOURCC('s', 't', 'r', 'd')
#define ckidSTREAMNAME mmioFOURCC('s', 't', 'r', 'n')
#define listtypeAVIMOVIE mmioFOURCC('m', 'o', 'v', 'i')
#define listtypeAVIRECORD mmioFOURCC('r', 'e', 'c', ' ')
#define ckidAVINEWINDEX mmioFOURCC('i', 'd', 'x', '1')
/*
** Stream types for the <fccType> field of the stream header.
*/
#define streamtypeVIDEO mmioFOURCC('v', 'i', 'd', 's')
#define streamtypeAUDIO mmioFOURCC('a', 'u', 'd', 's')
#define streamtypeMIDI mmioFOURCC('m', 'i', 'd', 's')
#define streamtypeTEXT mmioFOURCC('t', 'x', 't', 's')
/* Basic chunk types */
#define cktypeDIBbits aviTWOCC('d', 'b')
#define cktypeDIBcompressed aviTWOCC('d', 'c')
#define cktypePALchange aviTWOCC('p', 'c')
#define cktypeWAVEbytes aviTWOCC('w', 'b')
/* Chunk id to use for extra chunks for padding. */
#define ckidAVIPADDING mmioFOURCC('J', 'U', 'N', 'K')
/*
** Useful macros
**
** Warning: These are nasty macro, and MS C 6.0 compiles some of them
** incorrectly if optimizations are on. Ack.
*/
/* Macro to get stream number out of a FOURCC ckid */
#define FromHex(n) (((n) >= 'A') ? ((n) + 10 - 'A') : ((n) - '0'))
#define StreamFromFOURCC(fcc) ((WORD) ((FromHex(LOBYTE(LOWORD(fcc))) << 4) + \
(FromHex(HIBYTE(LOWORD(fcc))))))
/* Macro to get TWOCC chunk type out of a FOURCC ckid */
#define TWOCCFromFOURCC(fcc) HIWORD(fcc)
/* Macro to make a ckid for a chunk out of a TWOCC and a stream number
** from 0-255.
*/
#define ToHex(n) ((BYTE) (((n) > 9) ? ((n) - 10 + 'A') : ((n) + '0')))
#define MAKEAVICKID(tcc, stream) \
MAKELONG((ToHex((stream) & 0x0f) << 8) | \
(ToHex(((stream) & 0xf0) >> 4)), tcc)
/*
** Main AVI File Header
*/
/* flags for use in <dwFlags> in AVIFileHdr */
#define AVIF_HASINDEX 0x00000010 // Index at end of file
#define AVIF_MUSTUSEINDEX 0x00000020
#define AVIF_ISINTERLEAVED 0x00000100
#define AVIF_TRUSTCKTYPE 0x00000800 // Use CKType to find key frames
#define AVIF_WASCAPTUREFILE 0x00010000
#define AVIF_COPYRIGHTED 0x00020000
/* The AVI File Header LIST chunk should be padded to this size */
#define AVI_HEADERSIZE 2048 // size of AVI header list
typedef struct
{
DWORD dwMicroSecPerFrame; // frame display rate (or 0L)
DWORD dwMaxBytesPerSec; // max. transfer rate
DWORD dwPaddingGranularity; // pad to multiples of this
// size; normally 2K.
DWORD dwFlags; // the ever-present flags
DWORD dwTotalFrames; // # frames in file
DWORD dwInitialFrames;
DWORD dwStreams;
DWORD dwSuggestedBufferSize;
DWORD dwWidth;
DWORD dwHeight;
DWORD dwReserved[4];
} MainAVIHeader;
/*
** Stream header
*/
#define AVISF_DISABLED 0x00000001
#define AVISF_VIDEO_PALCHANGES 0x00010000
typedef struct {
FOURCC fccType;
FOURCC fccHandler;
DWORD dwFlags; /* Contains AVITF_* flags */
WORD wPriority;
WORD wLanguage;
DWORD dwInitialFrames;
DWORD dwScale;
DWORD dwRate; /* dwRate / dwScale == samples/second */
DWORD dwStart;
DWORD dwLength; /* In units above... */
DWORD dwSuggestedBufferSize;
DWORD dwQuality;
DWORD dwSampleSize;
RECT rcFrame;
} AVIStreamHeader;
/* Flags for index */
#define AVIIF_LIST 0x00000001L // chunk is a 'LIST'
#define AVIIF_KEYFRAME 0x00000010L // this frame is a key frame.
#define AVIIF_NOTIME 0x00000100L // this frame doesn't take any time
#define AVIIF_COMPUSE 0x0FFF0000L // these bits are for compressor use
typedef struct
{
DWORD ckid;
DWORD dwFlags;
DWORD dwChunkOffset; // Position of chunk
DWORD dwChunkLength; // Length of chunk
} AVIINDEXENTRY;
/*
** Palette change chunk
**
** Used in video streams.
*/
typedef struct
{
BYTE bFirstEntry; /* first entry to change */
BYTE bNumEntries; /* # entries to change (0 if 256) */
WORD wFlags; /* Mostly to preserve alignment... */
PALETTEENTRY peNew[]; /* New color specifications */
} AVIPALCHANGE;
// end_vfw32
#ifdef __cplusplus
} /* End of extern "C" { */
#endif /* __cplusplus */
#endif /* _INC_AVIFMT */

View File

@ -0,0 +1,498 @@
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
basetsd.h
Abstract:
Type definitions for the basic sized types.
Author:
Revision History:
--*/
#ifndef _BASETSD_H_
#define _BASETSD_H_
#if !defined(_MAC) && (defined(_M_MRX000) || defined(_M_AMD64) || defined(_M_IA64)) && (_MSC_VER >= 1100) && !(defined(MIDL_PASS) || defined(RC_INVOKED))
#define POINTER_64 __ptr64
typedef unsigned __int64 POINTER_64_INT;
#if defined(_WIN64)
#define POINTER_32 __ptr32
#else
#define POINTER_32
#endif
#else
#if defined(_MAC) && defined(_MAC_INT_64)
#define POINTER_64 __ptr64
typedef unsigned __int64 POINTER_64_INT;
#else
#if (_MSC_VER >= 1300) && !(defined(MIDL_PASS) || defined(RC_INVOKED))
#define POINTER_64 __ptr64
#else
#define POINTER_64
#endif
typedef unsigned long POINTER_64_INT;
#endif
#define POINTER_32
#endif
#if defined(_IA64_) || defined(_AMD64_)
#define FIRMWARE_PTR
#else
#define FIRMWARE_PTR POINTER_32
#endif
//
// A compiler with support for __sptr and __uptr is in qualification. To
// participate in qualification, remove the "0 &&" term below and also
// enable warning 4826 in warning.w
//
#if 0 && (_MSC_FULL_VER >= 140041204) && !defined(MIDL_PASS) && !defined(RC_INVOKED)
#define POINTER_SIGNED __sptr
#define POINTER_UNSIGNED __uptr
#else
#define POINTER_SIGNED
#define POINTER_UNSIGNED
#endif
#define SPOINTER_32 POINTER_SIGNED POINTER_32
#define UPOINTER_32 POINTER_UNSIGNED POINTER_32
#if _MSC_VER > 1000
#pragma once
#endif
#ifdef __cplusplus
extern "C" {
#endif
typedef signed char INT8, *PINT8;
typedef signed short INT16, *PINT16;
typedef signed int INT32, *PINT32;
typedef signed __int64 INT64, *PINT64;
typedef unsigned char UINT8, *PUINT8;
typedef unsigned short UINT16, *PUINT16;
typedef unsigned int UINT32, *PUINT32;
typedef unsigned __int64 UINT64, *PUINT64;
//
// The following types are guaranteed to be signed and 32 bits wide.
//
typedef signed int LONG32, *PLONG32;
//
// The following types are guaranteed to be unsigned and 32 bits wide.
//
typedef unsigned int ULONG32, *PULONG32;
typedef unsigned int DWORD32, *PDWORD32;
#if !defined(_W64)
#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
#define _W64 __w64
#else
#define _W64
#endif
#endif
//
// The INT_PTR is guaranteed to be the same size as a pointer. Its
// size with change with pointer size (32/64). It should be used
// anywhere that a pointer is cast to an integer type. UINT_PTR is
// the unsigned variation.
//
// __int3264 is intrinsic to 64b MIDL but not to old MIDL or to C compiler.
//
#if ( 501 < __midl )
typedef [public] __int3264 INT_PTR, *PINT_PTR;
typedef [public] unsigned __int3264 UINT_PTR, *PUINT_PTR;
typedef [public] __int3264 LONG_PTR, *PLONG_PTR;
typedef [public] unsigned __int3264 ULONG_PTR, *PULONG_PTR;
#else // midl64
// old midl and C++ compiler
#if defined(_WIN64)
typedef __int64 INT_PTR, *PINT_PTR;
typedef unsigned __int64 UINT_PTR, *PUINT_PTR;
typedef __int64 LONG_PTR, *PLONG_PTR;
typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
#define __int3264 __int64
#else
typedef _W64 int INT_PTR, *PINT_PTR;
typedef _W64 unsigned int UINT_PTR, *PUINT_PTR;
typedef _W64 long LONG_PTR, *PLONG_PTR;
typedef _W64 unsigned long ULONG_PTR, *PULONG_PTR;
#define __int3264 __int32
#endif
#endif // midl64
//
// HALF_PTR is half the size of a pointer it intended for use with
// within structures which contain a pointer and two small fields.
// UHALF_PTR is the unsigned variation.
//
#ifdef _WIN64
#define ADDRESS_TAG_BIT 0x40000000000UI64
typedef __int64 SHANDLE_PTR;
typedef unsigned __int64 HANDLE_PTR;
typedef unsigned int UHALF_PTR, *PUHALF_PTR;
typedef int HALF_PTR, *PHALF_PTR;
#if !defined(__midl)
__inline
unsigned long
HandleToULong(
const void *h
)
{
return((unsigned long) (ULONG_PTR) h );
}
__inline
long
HandleToLong(
const void *h
)
{
return((long) (LONG_PTR) h );
}
__inline
void *
ULongToHandle(
const unsigned long h
)
{
return((void *) (UINT_PTR) h );
}
__inline
void *
LongToHandle(
const long h
)
{
return((void *) (INT_PTR) h );
}
__inline
unsigned long
PtrToUlong(
const void *p
)
{
return((unsigned long) (ULONG_PTR) p );
}
__inline
unsigned int
PtrToUint(
const void *p
)
{
return((unsigned int) (UINT_PTR) p );
}
__inline
unsigned short
PtrToUshort(
const void *p
)
{
return((unsigned short) (unsigned long) (ULONG_PTR) p );
}
__inline
long
PtrToLong(
const void *p
)
{
return((long) (LONG_PTR) p );
}
__inline
int
PtrToInt(
const void *p
)
{
return((int) (INT_PTR) p );
}
__inline
short
PtrToShort(
const void *p
)
{
return((short) (long) (LONG_PTR) p );
}
__inline
void *
IntToPtr(
const int i
)
// Caution: IntToPtr() sign-extends the int value.
{
return( (void *)(INT_PTR)i );
}
__inline
void *
UIntToPtr(
const unsigned int ui
)
// Caution: UIntToPtr() zero-extends the unsigned int value.
{
return( (void *)(UINT_PTR)ui );
}
__inline
void *
LongToPtr(
const long l
)
// Caution: LongToPtr() sign-extends the long value.
{
return( (void *)(LONG_PTR)l );
}
__inline
void *
ULongToPtr(
const unsigned long ul
)
// Caution: ULongToPtr() zero-extends the unsigned long value.
{
return( (void *)(ULONG_PTR)ul );
}
#define PtrToPtr64( p ) ((void * POINTER_64) p)
#define Ptr64ToPtr( p ) ((void *) p)
#define HandleToHandle64( h ) (PtrToPtr64( h ))
#define Handle64ToHandle( h ) (Ptr64ToPtr( h ))
__inline
void *
Ptr32ToPtr(
const void * POINTER_32 p
)
{
return((void *) (ULONG_PTR) (unsigned long) p);
}
__inline
void *
Handle32ToHandle(
const void * POINTER_32 h
)
{
return((void *) (LONG_PTR) (long) h);
}
__inline
void * POINTER_32
PtrToPtr32(
const void *p
)
{
return((void * POINTER_32) (unsigned long) (ULONG_PTR) p);
}
#define HandleToHandle32( h ) (PtrToPtr32( h ))
#endif // !_midl
#else // !_WIN64
#define ADDRESS_TAG_BIT 0x80000000UL
typedef unsigned short UHALF_PTR, *PUHALF_PTR;
typedef short HALF_PTR, *PHALF_PTR;
typedef _W64 long SHANDLE_PTR;
typedef _W64 unsigned long HANDLE_PTR;
#define HandleToULong( h ) ((ULONG)(ULONG_PTR)(h) )
#define HandleToLong( h ) ((LONG)(LONG_PTR) (h) )
#define ULongToHandle( ul ) ((HANDLE)(ULONG_PTR) (ul) )
#define LongToHandle( h ) ((HANDLE)(LONG_PTR) (h) )
#define PtrToUlong( p ) ((ULONG)(ULONG_PTR) (p) )
#define PtrToLong( p ) ((LONG)(LONG_PTR) (p) )
#define PtrToUint( p ) ((UINT)(UINT_PTR) (p) )
#define PtrToInt( p ) ((INT)(INT_PTR) (p) )
#define PtrToUshort( p ) ((unsigned short)(ULONG_PTR)(p) )
#define PtrToShort( p ) ((short)(LONG_PTR)(p) )
#define IntToPtr( i ) ((VOID *)(INT_PTR)((int)i))
#define UIntToPtr( ui ) ((VOID *)(UINT_PTR)((unsigned int)ui))
#define LongToPtr( l ) ((VOID *)(LONG_PTR)((long)l))
#define ULongToPtr( ul ) ((VOID *)(ULONG_PTR)((unsigned long)ul))
#if !defined(__midl)
__inline
void * POINTER_64
PtrToPtr64(
const void *p
)
{
return((void * POINTER_64) (unsigned __int64) (ULONG_PTR)p );
}
__inline
void *
Ptr64ToPtr(
const void * POINTER_64 p
)
{
return((void *) (ULONG_PTR) (unsigned __int64) p);
}
__inline
void * POINTER_64
HandleToHandle64(
const void *h
)
{
return((void * POINTER_64)(__int64)(LONG_PTR)h );
}
__inline
void *
Handle64ToHandle(
const void * POINTER_64 h
)
{
return((void *) (ULONG_PTR) (unsigned __int64) h );
}
#endif
#define Ptr32ToPtr( p ) ((void *) p)
#define Handle32ToHandle( h ) (Ptr32ToPtr( h ))
#define PtrToPtr32( p ) ((void * POINTER_32) p)
#define HandleToHandle32( h ) (PtrToPtr32( h ))
#endif // !_WIN64
#define HandleToUlong(h) HandleToULong(h)
#define UlongToHandle(ul) ULongToHandle(ul)
#define UlongToPtr(ul) ULongToPtr(ul)
#define UintToPtr(ui) UIntToPtr(ui)
#define MAXUINT_PTR (~((UINT_PTR)0))
#define MAXINT_PTR ((INT_PTR)(MAXUINT_PTR >> 1))
#define MININT_PTR (~MAXINT_PTR)
#define MAXULONG_PTR (~((ULONG_PTR)0))
#define MAXLONG_PTR ((LONG_PTR)(MAXULONG_PTR >> 1))
#define MINLONG_PTR (~MAXLONG_PTR)
#define MAXUHALF_PTR ((UHALF_PTR)~0)
#define MAXHALF_PTR ((HALF_PTR)(MAXUHALF_PTR >> 1))
#define MINHALF_PTR (~MAXHALF_PTR)
//
// SIZE_T used for counts or ranges which need to span the range of
// of a pointer. SSIZE_T is the signed variation.
//
typedef ULONG_PTR SIZE_T, *PSIZE_T;
typedef LONG_PTR SSIZE_T, *PSSIZE_T;
#if _WIN32_WINNT >= 0x0600 || (defined(__cplusplus) && defined(WINDOWS_ENABLE_CPLUSPLUS))
#define MAXUINT8 ((UINT8)~((UINT8)0))
#define MAXINT8 ((INT8)(MAXUINT8 >> 1))
#define MININT8 ((INT8)~MAXINT8)
#define MAXUINT16 ((UINT16)~((UINT16)0))
#define MAXINT16 ((INT16)(MAXUINT16 >> 1))
#define MININT16 ((INT16)~MAXINT16)
#define MAXUINT32 ((UINT32)~((UINT32)0))
#define MAXINT32 ((INT32)(MAXUINT32 >> 1))
#define MININT32 ((INT32)~MAXINT32)
#define MAXUINT64 ((UINT64)~((UINT64)0))
#define MAXINT64 ((INT64)(MAXUINT64 >> 1))
#define MININT64 ((INT64)~MAXINT64)
#define MAXULONG32 ((ULONG32)~((ULONG32)0))
#define MAXLONG32 ((LONG32)(MAXULONG32 >> 1))
#define MINLONG32 ((LONG32)~MAXLONG32)
#define MAXULONG64 ((ULONG64)~((ULONG64)0))
#define MAXLONG64 ((LONG64)(MAXULONG64 >> 1))
#define MINLONG64 ((LONG64)~MAXLONG64)
#define MAXULONGLONG ((ULONGLONG)~((ULONGLONG)0))
#define MINLONGLONG ((LONGLONG)~MAXLONGLONG)
#define MAXSIZE_T ((SIZE_T)~((SIZE_T)0))
#define MAXSSIZE_T ((SSIZE_T)(MAXSIZE_T >> 1))
#define MINSSIZE_T ((SSIZE_T)~MAXSSIZE_T)
#define MAXUINT ((UINT)~((UINT)0))
#define MAXINT ((INT)(MAXUINT >> 1))
#define MININT ((INT)~MAXINT)
#define MAXDWORD32 ((DWORD32)~((DWORD32)0))
#define MAXDWORD64 ((DWORD64)~((DWORD64)0))
#endif // _WIN32_WINNT >= 0x0600
//
// Add Windows flavor DWORD_PTR types
//
typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
//
// The following types are guaranteed to be signed and 64 bits wide.
//
typedef __int64 LONG64, *PLONG64;
//
// The following types are guaranteed to be unsigned and 64 bits wide.
//
typedef unsigned __int64 ULONG64, *PULONG64;
typedef unsigned __int64 DWORD64, *PDWORD64;
//
// Legacy thread affinity.
//
typedef ULONG_PTR KAFFINITY;
typedef KAFFINITY *PKAFFINITY;
#ifdef __cplusplus
}
#endif
#endif // _BASETSD_H_

View File

@ -0,0 +1,227 @@
//+---------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// File: basetyps.h
//
//----------------------------------------------------------------------------
#if !defined( _BASETYPS_H_ )
#define _BASETYPS_H_
#if _MSC_VER > 1000
#pragma once
#endif
// Common macros gleamed from COMPOBJ.H
#ifdef __cplusplus
#define EXTERN_C extern "C"
#else
#define EXTERN_C extern
#endif
#ifdef _WIN32
// Win32 doesn't support __export
#define STDMETHODCALLTYPE __stdcall
#define STDMETHODVCALLTYPE __cdecl
#define STDAPICALLTYPE __stdcall
#define STDAPIVCALLTYPE __cdecl
#else
#define STDMETHODCALLTYPE __export __stdcall
#define STDMETHODVCALLTYPE __export __cdecl
#define STDAPICALLTYPE __export __stdcall
#define STDAPIVCALLTYPE __export __cdecl
#endif
#define STDAPI EXTERN_C HRESULT STDAPICALLTYPE
#define STDAPI_(type) EXTERN_C type STDAPICALLTYPE
#define STDMETHODIMP HRESULT STDMETHODCALLTYPE
#define STDMETHODIMP_(type) type STDMETHODCALLTYPE
// The 'V' versions allow Variable Argument lists.
#define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE
#define STDAPIV_(type) EXTERN_C type STDAPIVCALLTYPE
#define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE
#define STDMETHODIMPV_(type) type STDMETHODVCALLTYPE
/****** Interface Declaration ***********************************************/
/*
* These are macros for declaring interfaces. They exist so that
* a single definition of the interface is simulataneously a proper
* declaration of the interface structures (C++ abstract classes)
* for both C and C++.
*
* DECLARE_INTERFACE(iface) is used to declare an interface that does
* not derive from a base interface.
* DECLARE_INTERFACE_(iface, baseiface) is used to declare an interface
* that does derive from a base interface.
*
* By default if the source file has a .c extension the C version of
* the interface declaratations will be expanded; if it has a .cpp
* extension the C++ version will be expanded. if you want to force
* the C version expansion even though the source file has a .cpp
* extension, then define the macro "CINTERFACE".
* eg. cl -DCINTERFACE file.cpp
*
* Example Interface declaration:
*
* #undef INTERFACE
* #define INTERFACE IClassFactory
*
* DECLARE_INTERFACE_(IClassFactory, IUnknown)
* {
* // *** IUnknown methods ***
* STDMETHOD(QueryInterface) (THIS_
* REFIID riid,
* LPVOID FAR* ppvObj) PURE;
* STDMETHOD_(ULONG,AddRef) (THIS) PURE;
* STDMETHOD_(ULONG,Release) (THIS) PURE;
*
* // *** IClassFactory methods ***
* STDMETHOD(CreateInstance) (THIS_
* LPUNKNOWN pUnkOuter,
* REFIID riid,
* LPVOID FAR* ppvObject) PURE;
* };
*
* Example C++ expansion:
*
* struct FAR IClassFactory : public IUnknown
* {
* virtual HRESULT STDMETHODCALLTYPE QueryInterface(
* IID FAR& riid,
* LPVOID FAR* ppvObj) = 0;
* virtual HRESULT STDMETHODCALLTYPE AddRef(void) = 0;
* virtual HRESULT STDMETHODCALLTYPE Release(void) = 0;
* virtual HRESULT STDMETHODCALLTYPE CreateInstance(
* LPUNKNOWN pUnkOuter,
* IID FAR& riid,
* LPVOID FAR* ppvObject) = 0;
* };
*
* NOTE: Our documentation says '#define interface class' but we use
* 'struct' instead of 'class' to keep a lot of 'public:' lines
* out of the interfaces. The 'FAR' forces the 'this' pointers to
* be far, which is what we need.
*
* Example C expansion:
*
* typedef struct IClassFactory
* {
* const struct IClassFactoryVtbl FAR* lpVtbl;
* } IClassFactory;
*
* typedef struct IClassFactoryVtbl IClassFactoryVtbl;
*
* struct IClassFactoryVtbl
* {
* HRESULT (STDMETHODCALLTYPE * QueryInterface) (
* IClassFactory FAR* This,
* IID FAR* riid,
* LPVOID FAR* ppvObj) ;
* HRESULT (STDMETHODCALLTYPE * AddRef) (IClassFactory FAR* This) ;
* HRESULT (STDMETHODCALLTYPE * Release) (IClassFactory FAR* This) ;
* HRESULT (STDMETHODCALLTYPE * CreateInstance) (
* IClassFactory FAR* This,
* LPUNKNOWN pUnkOuter,
* IID FAR* riid,
* LPVOID FAR* ppvObject);
* HRESULT (STDMETHODCALLTYPE * LockServer) (
* IClassFactory FAR* This,
* BOOL fLock);
* };
*/
#if defined(__cplusplus) && !defined(CINTERFACE)
//#define interface struct FAR
#ifdef COM_STDMETHOD_CAN_THROW
#define COM_DECLSPEC_NOTHROW
#else
#define COM_DECLSPEC_NOTHROW DECLSPEC_NOTHROW
#endif
#define __STRUCT__ struct
#define interface __STRUCT__
#define STDMETHOD(method) virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE method
#define STDMETHOD_(type,method) virtual COM_DECLSPEC_NOTHROW type STDMETHODCALLTYPE method
#define STDMETHODV(method) virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODVCALLTYPE method
#define STDMETHODV_(type,method) virtual COM_DECLSPEC_NOTHROW type STDMETHODVCALLTYPE method
#define PURE = 0
#define THIS_
#define THIS void
#define DECLARE_INTERFACE(iface) interface DECLSPEC_NOVTABLE iface
#define DECLARE_INTERFACE_(iface, baseiface) interface DECLSPEC_NOVTABLE iface : public baseiface
#define IFACEMETHOD(method) __override STDMETHOD(method)
#define IFACEMETHOD_(type,method) __override STDMETHOD_(type,method)
#define IFACEMETHODV(method) __override STDMETHODV(method)
#define IFACEMETHODV_(type,method) __override STDMETHODV_(type,method)
#else
#define interface struct
#define STDMETHOD(method) HRESULT (STDMETHODCALLTYPE * method)
#define STDMETHOD_(type,method) type (STDMETHODCALLTYPE * method)
#define STDMETHODV(method) HRESULT (STDMETHODVCALLTYPE * method)
#define STDMETHODV_(type,method) type (STDMETHODVCALLTYPE * method)
#define IFACEMETHOD(method) __override STDMETHOD(method)
#define IFACEMETHOD_(type,method) __override STDMETHOD_(type,method)
#define IFACEMETHODV(method) __override STDMETHODV(method)
#define IFACEMETHODV_(type,method) __override STDMETHODV_(type,method)
#define PURE
#define THIS_ INTERFACE FAR* This,
#define THIS INTERFACE FAR* This
#ifdef CONST_VTABLE
#define DECLARE_INTERFACE(iface) typedef interface iface { \
const struct iface##Vtbl FAR* lpVtbl; \
} iface; \
typedef const struct iface##Vtbl iface##Vtbl; \
const struct iface##Vtbl
#else
#define DECLARE_INTERFACE(iface) typedef interface iface { \
struct iface##Vtbl FAR* lpVtbl; \
} iface; \
typedef struct iface##Vtbl iface##Vtbl; \
struct iface##Vtbl
#endif
#define DECLARE_INTERFACE_(iface, baseiface) DECLARE_INTERFACE(iface)
#endif
#include <guiddef.h>
#ifndef _ERROR_STATUS_T_DEFINED
typedef unsigned long error_status_t;
#define _ERROR_STATUS_T_DEFINED
#endif
#ifndef _WCHAR_T_DEFINED
typedef unsigned short wchar_t;
#define _WCHAR_T_DEFINED
#endif
#endif

View File

@ -0,0 +1,520 @@
/*++ BUILD Version: 0001 // Increment this if a change has global effects
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
batclass.h
Abstract:
Defines battery class driver interfaces.
--*/
//
// Battery device GUID
//
DEFINE_GUID( GUID_DEVICE_BATTERY, 0x72631e54L, 0x78A4, 0x11d0, 0xbc, 0xf7, 0x00, 0xaa, 0x00, 0xb7, 0xb3, 0x2a );
#if (NTDDI_VERSION >= NTDDI_WINXP)
DEFINE_GUID (BATTERY_STATUS_WMI_GUID,
0xfc4670d1, 0xebbf, 0x416e, 0x87, 0xce, 0x37, 0x4a, 0x4e, 0xbc, 0x11, 0x1a);
DEFINE_GUID (BATTERY_RUNTIME_WMI_GUID,
0x535a3767, 0x1ac2, 0x49bc, 0xa0, 0x77, 0x3f, 0x7a, 0x02, 0xe4, 0x0a, 0xec);
DEFINE_GUID (BATTERY_TEMPERATURE_WMI_GUID,
0x1a52a14d, 0xadce, 0x4a44, 0x9a, 0x3e, 0xc8, 0xd8, 0xf1, 0x5f, 0xf2, 0xc2);
DEFINE_GUID (BATTERY_FULL_CHARGED_CAPACITY_WMI_GUID,
0x40b40565, 0x96f7, 0x4435, 0x86, 0x94, 0x97, 0xe0, 0xe4, 0x39, 0x59, 0x05);
DEFINE_GUID (BATTERY_CYCLE_COUNT_WMI_GUID,
0xef98db24, 0x0014, 0x4c25, 0xa5, 0x0b, 0xc7, 0x24, 0xae, 0x5c, 0xd3, 0x71);
DEFINE_GUID (BATTERY_STATIC_DATA_WMI_GUID,
0x05e1e463, 0xe4e2, 0x4ea9, 0x80, 0xcb, 0x9b, 0xd4, 0xb3, 0xca, 0x06, 0x55);
DEFINE_GUID (BATTERY_STATUS_CHANGE_WMI_GUID,
0xcddfa0c3, 0x7c5b, 0x4e43, 0xa0, 0x34, 0x05, 0x9f, 0xa5, 0xb8, 0x43, 0x64);
DEFINE_GUID (BATTERY_TAG_CHANGE_WMI_GUID,
0x5e1f6e19, 0x8786, 0x4d23, 0x94, 0xfc, 0x9e, 0x74, 0x6b, 0xd5, 0xd8, 0x88);
#endif // (NTDDI_VERSION >= NTDDI_WINXP)
#ifndef _BATCLASS_
#define _BATCLASS_
//
// Battery driver interface
//
// IOCTL_BATTERY_QUERY_TAG
// IOCTL_BATTERY_QUERY_INFORMATION
// IOCTL_BATTERY_SET_INFORMATION
// IOCTL_BATTERY_QUERY_STATUS
//
//
// IOCTL_BATTERY_QUERY_TAG
//
#define IOCTL_BATTERY_QUERY_TAG \
CTL_CODE(FILE_DEVICE_BATTERY, 0x10, METHOD_BUFFERED, FILE_READ_ACCESS)
#define BATTERY_TAG_INVALID 0
//
// IOCTL_BATTERY_QUERY_INFORMATION
//
#define IOCTL_BATTERY_QUERY_INFORMATION \
CTL_CODE(FILE_DEVICE_BATTERY, 0x11, METHOD_BUFFERED, FILE_READ_ACCESS)
typedef enum {
BatteryInformation,
BatteryGranularityInformation,
BatteryTemperature,
BatteryEstimatedTime,
BatteryDeviceName,
BatteryManufactureDate,
BatteryManufactureName,
BatteryUniqueID,
BatterySerialNumber
} BATTERY_QUERY_INFORMATION_LEVEL;
typedef struct _BATTERY_QUERY_INFORMATION {
ULONG BatteryTag;
BATTERY_QUERY_INFORMATION_LEVEL InformationLevel;
LONG AtRate;
} BATTERY_QUERY_INFORMATION, *PBATTERY_QUERY_INFORMATION;
//
// Format of data returned when
// BATTERY_INFORMATION_LEVEL = BatteryInformation
//
typedef struct _BATTERY_INFORMATION {
ULONG Capabilities;
UCHAR Technology;
UCHAR Reserved[3];
UCHAR Chemistry[4];
ULONG DesignedCapacity;
ULONG FullChargedCapacity;
ULONG DefaultAlert1;
ULONG DefaultAlert2;
ULONG CriticalBias;
ULONG CycleCount;
} BATTERY_INFORMATION, *PBATTERY_INFORMATION;
//
// BATTERY_INFORMATION.Capabilities flags
//
#define BATTERY_SYSTEM_BATTERY 0x80000000
#define BATTERY_CAPACITY_RELATIVE 0x40000000
#define BATTERY_IS_SHORT_TERM 0x20000000
#define BATTERY_SET_CHARGE_SUPPORTED 0x00000001
#define BATTERY_SET_DISCHARGE_SUPPORTED 0x00000002
//
// BATTERY_INFORMATION.XXXCapacity constants
//
#define BATTERY_UNKNOWN_CAPACITY 0xFFFFFFFF
#if (NTDDI_VERSION < NTDDI_WINXP)
//
// Format of data returned when
// BATTERY_INFORMATION_LEVEL = BatteryGranularityInformation
// is an array of BATTERY_REPORTING_SCALE
//
#ifndef _NTPOAPI_
typedef struct {
ULONG Granularity;
ULONG Capacity;
} BATTERY_REPORTING_SCALE, *PBATTERY_REPORTING_SCALE;
#endif // _NTPOAPI_
#endif // (NTDDI_VERSION < NTDDI_WINXP)
//
// BatteryEstimatedTime constant
//
#define BATTERY_UNKNOWN_TIME 0xFFFFFFFF
//
// Max battery driver BATTERY_QUERY_INFORMATION_LEVEL string storage
// size in bytes.
//
#define MAX_BATTERY_STRING_SIZE 128
//
// Struct for accessing the packed date format in BatteryManufactureDate.
//
typedef struct _BATTERY_MANUFACTURE_DATE
{
UCHAR Day;
UCHAR Month;
USHORT Year;
} BATTERY_MANUFACTURE_DATE, *PBATTERY_MANUFACTURE_DATE;
//
// IOCTL_BATTERY_SET_INFORMATION
//
#define IOCTL_BATTERY_SET_INFORMATION \
CTL_CODE(FILE_DEVICE_BATTERY, 0x12, METHOD_BUFFERED, FILE_WRITE_ACCESS)
typedef enum {
BatteryCriticalBias,
BatteryCharge,
BatteryDischarge
} BATTERY_SET_INFORMATION_LEVEL;
typedef struct _BATTERY_SET_INFORMATION {
ULONG BatteryTag;
BATTERY_SET_INFORMATION_LEVEL InformationLevel;
UCHAR Buffer[1];
} BATTERY_SET_INFORMATION, *PBATTERY_SET_INFORMATION;
//
// IOCTL_BATTERY_QUERY_STATUS
//
#define IOCTL_BATTERY_QUERY_STATUS \
CTL_CODE(FILE_DEVICE_BATTERY, 0x13, METHOD_BUFFERED, FILE_READ_ACCESS)
//
// Structure of input buffer to IOCTL_BATTERY_QUERY_STATUS
//
typedef struct _BATTERY_WAIT_STATUS {
ULONG BatteryTag;
ULONG Timeout;
ULONG PowerState;
ULONG LowCapacity;
ULONG HighCapacity;
} BATTERY_WAIT_STATUS, *PBATTERY_WAIT_STATUS;
//
// Structure of output buffer from IOCTL_BATTERY_QUERY_STATUS
//
typedef struct _BATTERY_STATUS {
ULONG PowerState;
ULONG Capacity;
ULONG Voltage;
LONG Rate;
} BATTERY_STATUS, *PBATTERY_STATUS;
//
// BATTERY_STATUS.PowerState flags
//
#define BATTERY_POWER_ON_LINE 0x00000001
#define BATTERY_DISCHARGING 0x00000002
#define BATTERY_CHARGING 0x00000004
#define BATTERY_CRITICAL 0x00000008
//
// BATTERY_STATUS Constant
// BATTERY_UNKNOWN_CAPACITY defined above for IOCTL_BATTERY_QUERY_INFORMATION
//
#define BATTERY_UNKNOWN_VOLTAGE 0xFFFFFFFF
#define BATTERY_UNKNOWN_RATE 0x80000000
#ifndef _WINDOWS_
//
// Battery Class-Miniport device driver interfaces
//
__drv_functionClass(BCLASS_QUERY_TAG_CALLBACK)
__drv_sameIRQL
__drv_maxIRQL(PASSIVE_LEVEL)
__checkReturn
typedef
NTSTATUS
(BCLASS_QUERY_TAG_CALLBACK)(
__in PVOID Context,
__out PULONG BatteryTag
);
typedef BCLASS_QUERY_TAG_CALLBACK *PBCLASS_QUERY_TAG_CALLBACK;
__drv_functionClass(BCLASS_QUERY_INFORMATION_CALLBACK)
__drv_sameIRQL
__drv_maxIRQL(PASSIVE_LEVEL)
__checkReturn
typedef
NTSTATUS
(BCLASS_QUERY_INFORMATION_CALLBACK)(
__in PVOID Context,
__in ULONG BatteryTag,
__in BATTERY_QUERY_INFORMATION_LEVEL Level,
__in LONG AtRate,
__out_bcount_part(BufferLength, *ReturnedLength) PVOID Buffer,
__in ULONG BufferLength,
__out PULONG ReturnedLength
);
typedef BCLASS_QUERY_INFORMATION_CALLBACK *PBCLASS_QUERY_INFORMATION_CALLBACK;
__drv_functionClass(BCLASS_QUERY_STATUS_CALLBACK)
__drv_sameIRQL
__drv_maxIRQL(PASSIVE_LEVEL)
__checkReturn
typedef
NTSTATUS
(BCLASS_QUERY_STATUS_CALLBACK)(
__in PVOID Context,
__in ULONG BatteryTag,
__out PBATTERY_STATUS BatteryStatus
);
typedef BCLASS_QUERY_STATUS_CALLBACK *PBCLASS_QUERY_STATUS_CALLBACK;
typedef struct {
ULONG PowerState;
ULONG LowCapacity;
ULONG HighCapacity;
} BATTERY_NOTIFY, *PBATTERY_NOTIFY;
__drv_functionClass(BCLASS_SET_STATUS_NOTIFY_CALLBACK)
__drv_sameIRQL
__drv_maxIRQL(PASSIVE_LEVEL)
__checkReturn
typedef
NTSTATUS
(BCLASS_SET_STATUS_NOTIFY_CALLBACK)(
__in PVOID Context,
__in ULONG BatteryTag,
__in PBATTERY_NOTIFY BatteryNotify
);
typedef BCLASS_SET_STATUS_NOTIFY_CALLBACK *PBCLASS_SET_STATUS_NOTIFY_CALLBACK;
__drv_functionClass(BCLASS_SET_INFORMATION_CALLBACK)
__drv_sameIRQL
__drv_maxIRQL(PASSIVE_LEVEL)
__checkReturn
typedef
NTSTATUS
(BCLASS_SET_INFORMATION_CALLBACK)(
__in PVOID Context,
__in ULONG BatteryTag,
__in BATTERY_SET_INFORMATION_LEVEL Level,
__in_opt PVOID Buffer
);
typedef BCLASS_SET_INFORMATION_CALLBACK *PBCLASS_SET_INFORMATION_CALLBACK;
__drv_functionClass(BCLASS_DISABLE_STATUS_NOTIFY_CALLBACK)
__drv_sameIRQL
__drv_maxIRQL(PASSIVE_LEVEL)
__checkReturn
typedef
NTSTATUS
(BCLASS_DISABLE_STATUS_NOTIFY_CALLBACK)(
__in PVOID Context
);
typedef BCLASS_DISABLE_STATUS_NOTIFY_CALLBACK
*PBCLASS_DISABLE_STATUS_NOTIFY_CALLBACK;
typedef PBCLASS_QUERY_TAG_CALLBACK BCLASS_QUERY_TAG;
typedef PBCLASS_QUERY_INFORMATION_CALLBACK BCLASS_QUERY_INFORMATION;
typedef PBCLASS_QUERY_STATUS_CALLBACK BCLASS_QUERY_STATUS;
typedef PBCLASS_SET_STATUS_NOTIFY_CALLBACK BCLASS_SET_STATUS_NOTIFY;
typedef PBCLASS_SET_INFORMATION_CALLBACK BCLASS_SET_INFORMATION;
typedef PBCLASS_DISABLE_STATUS_NOTIFY_CALLBACK BCLASS_DISABLE_STATUS_NOTIFY;
typedef struct {
USHORT MajorVersion;
USHORT MinorVersion;
PVOID Context; // Miniport context
BCLASS_QUERY_TAG QueryTag;
BCLASS_QUERY_INFORMATION QueryInformation;
BCLASS_SET_INFORMATION SetInformation;
BCLASS_QUERY_STATUS QueryStatus;
BCLASS_SET_STATUS_NOTIFY SetStatusNotify;
BCLASS_DISABLE_STATUS_NOTIFY DisableStatusNotify;
PDEVICE_OBJECT Pdo;
PUNICODE_STRING DeviceName;
} BATTERY_MINIPORT_INFO, *PBATTERY_MINIPORT_INFO;
#define BATTERY_CLASS_MAJOR_VERSION 0x0001
#define BATTERY_CLASS_MINOR_VERSION 0x0000
#if (NTDDI_VERSION >= NTDDI_WINXP)
//
// WMI data block structures
//
typedef struct _BATTERY_WMI_STATUS {
ULONG Tag;
ULONG RemainingCapacity;
LONG ChargeRate;
LONG DischargeRate;
ULONG Voltage;
BOOLEAN PowerOnline;
BOOLEAN Charging;
BOOLEAN Discharging;
BOOLEAN Critical;
} BATTERY_WMI_STATUS, *PBATTERY_WMI_STATUS;
typedef struct _BATTERY_WMI_RUNTIME
{
ULONG Tag;
ULONG EstimatedRuntime;
} BATTERY_WMI_RUNTIME, *PBATTERY_WMI_RUNTIME;
typedef struct _BATTERY_WMI_TEMPERATURE
{
ULONG Tag;
ULONG Temperature;
} BATTERY_WMI_TEMPERATURE, *PBATTERY_WMI_TEMPERATURE;
typedef struct _BATTERY_WMI_FULL_CHARGED_CAPACITY
{
ULONG Tag;
ULONG FullChargedCapacity;
} BATTERY_WMI_FULL_CHARGED_CAPACITY, *PBATTERY_WMI_FULL_CHARGED_CAPACITY;
typedef struct _BATTERY_WMI_CYCLE_COUNT
{
ULONG Tag;
ULONG CycleCount;
} BATTERY_WMI_CYCLE_COUNT, *PBATTERY_WMI_CYCLE_COUNT;
typedef struct _BATTERY_WMI_STATIC_DATA
{
ULONG Tag;
WCHAR ManufactureDate[25];
BATTERY_REPORTING_SCALE Granularity [4];
ULONG Capabilities;
UCHAR Technology;
ULONG Chemistry;
ULONG DesignedCapacity;
ULONG DefaultAlert1;
ULONG DefaultAlert2;
ULONG CriticalBias;
WCHAR Strings[1];
// Four variable length string values are stored with the first USHORT
// value containing the length of the string in bytes.
//
// Device Name
// Manufacture Name
// Serial Number
// UniqueID
//
} BATTERY_WMI_STATIC_DATA, *PBATTERY_WMI_STATIC_DATA;
typedef struct _BATTERY_WMI_STATUS_CHANGE
{
ULONG Tag;
BOOLEAN PowerOnline;
BOOLEAN Charging;
BOOLEAN Discharging;
BOOLEAN Critical;
} BATTERY_WMI_STATUS_CHANGE, *PBATTERY_WMI_STATUS_CHANGE;
typedef struct _BATTERY_TAG_CHANGE
{
ULONG Tag;
} BATTERY_TAG_CHANGE, *PBATTERY_TAG_CHANGE;
#endif // (NTDDI_VERSION >= NTDDI_WINXP)
//
// Battery class driver functions
//
#if !defined(BATTERYCLASS)
#define BATTERYCLASSAPI DECLSPEC_IMPORT
#else
#define BATTERYCLASSAPI
#endif
__drv_maxIRQL(PASSIVE_LEVEL)
__checkReturn
NTSTATUS
BATTERYCLASSAPI
BatteryClassInitializeDevice (
__in PBATTERY_MINIPORT_INFO MiniportInfo,
__out PVOID *ClassData
);
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
BATTERYCLASSAPI
BatteryClassUnload (
__in PVOID ClassData
);
__drv_maxIRQL(PASSIVE_LEVEL)
__checkReturn
NTSTATUS
BATTERYCLASSAPI
BatteryClassIoctl (
__in PVOID ClassData,
__inout PIRP Irp
);
#if (NTDDI_VERSION >= NTDDI_WINXP)
__drv_maxIRQL(PASSIVE_LEVEL)
__checkReturn
NTSTATUS
BATTERYCLASSAPI
BatteryClassSystemControl (
__in PVOID ClassData,
__in PVOID WmiLibContext, //PWMILIB_CONTEXT
__in PDEVICE_OBJECT DeviceObject,
__inout PIRP Irp,
__out PVOID Disposition //PSYSCTL_IRP_DISPOSITION
);
__drv_maxIRQL(PASSIVE_LEVEL)
__checkReturn
NTSTATUS
BATTERYCLASSAPI
BatteryClassQueryWmiDataBlock(
__in PVOID ClassData,
__inout PDEVICE_OBJECT DeviceObject,
__inout PIRP Irp,
__in ULONG GuidIndex,
__out_ecount(1) PULONG InstanceLengthArray,
__in ULONG OutBufferSize,
__out_bcount_opt(OutBufferSize) PUCHAR Buffer
);
#endif // (NTDDI_VERSION >= NTDDI_WINXP)
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
BATTERYCLASSAPI
BatteryClassStatusNotify (
__in PVOID ClassData
);
#endif // _WINDOWS_
#endif // _BATCLASS_

View File

@ -0,0 +1,632 @@
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 7.00.0555 */
/* Compiler settings for bidispl.idl:
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING( ) */
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 500
#endif
/* verify that the <rpcsal.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCSAL_H_VERSION__
#define __REQUIRED_RPCSAL_H_VERSION__ 100
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#ifndef __bidispl_h__
#define __bidispl_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifndef __IBidiRequest_FWD_DEFINED__
#define __IBidiRequest_FWD_DEFINED__
typedef interface IBidiRequest IBidiRequest;
#endif /* __IBidiRequest_FWD_DEFINED__ */
#ifndef __IBidiRequestContainer_FWD_DEFINED__
#define __IBidiRequestContainer_FWD_DEFINED__
typedef interface IBidiRequestContainer IBidiRequestContainer;
#endif /* __IBidiRequestContainer_FWD_DEFINED__ */
#ifndef __IBidiSpl_FWD_DEFINED__
#define __IBidiSpl_FWD_DEFINED__
typedef interface IBidiSpl IBidiSpl;
#endif /* __IBidiSpl_FWD_DEFINED__ */
#ifndef __IBidiSpl2_FWD_DEFINED__
#define __IBidiSpl2_FWD_DEFINED__
typedef interface IBidiSpl2 IBidiSpl2;
#endif /* __IBidiSpl2_FWD_DEFINED__ */
#ifndef __BidiRequest_FWD_DEFINED__
#define __BidiRequest_FWD_DEFINED__
#ifdef __cplusplus
typedef class BidiRequest BidiRequest;
#else
typedef struct BidiRequest BidiRequest;
#endif /* __cplusplus */
#endif /* __BidiRequest_FWD_DEFINED__ */
#ifndef __BidiRequestContainer_FWD_DEFINED__
#define __BidiRequestContainer_FWD_DEFINED__
#ifdef __cplusplus
typedef class BidiRequestContainer BidiRequestContainer;
#else
typedef struct BidiRequestContainer BidiRequestContainer;
#endif /* __cplusplus */
#endif /* __BidiRequestContainer_FWD_DEFINED__ */
#ifndef __BidiSpl_FWD_DEFINED__
#define __BidiSpl_FWD_DEFINED__
#ifdef __cplusplus
typedef class BidiSpl BidiSpl;
#else
typedef struct BidiSpl BidiSpl;
#endif /* __cplusplus */
#endif /* __BidiSpl_FWD_DEFINED__ */
/* header files for imported files */
#include "oaidl.h"
#include "ocidl.h"
#ifdef __cplusplus
extern "C"{
#endif
#ifndef __IBidiRequest_INTERFACE_DEFINED__
#define __IBidiRequest_INTERFACE_DEFINED__
/* interface IBidiRequest */
/* [unique][helpstring][uuid][object] */
EXTERN_C const IID IID_IBidiRequest;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("8F348BD7-4B47-4755-8A9D-0F422DF3DC89")
IBidiRequest : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE SetSchema(
/* [in] */ __RPC__in const LPCWSTR pszSchema) = 0;
virtual HRESULT STDMETHODCALLTYPE SetInputData(
/* [in] */ const DWORD dwType,
/* [in] */ __RPC__in const BYTE *pData,
/* [in] */ const UINT uSize) = 0;
virtual HRESULT STDMETHODCALLTYPE GetResult(
/* [out] */ __RPC__out HRESULT *phr) = 0;
virtual HRESULT STDMETHODCALLTYPE GetOutputData(
/* [in] */ const DWORD dwIndex,
/* [out] */ __RPC__deref_out_opt LPWSTR *ppszSchema,
/* [out] */ __RPC__out DWORD *pdwType,
/* [out] */ __RPC__deref_out_opt BYTE **ppData,
/* [out] */ __RPC__out ULONG *uSize) = 0;
virtual HRESULT STDMETHODCALLTYPE GetEnumCount(
/* [out] */ __RPC__out DWORD *pdwTotal) = 0;
};
#else /* C style interface */
typedef struct IBidiRequestVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IBidiRequest * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
__RPC__deref_out void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IBidiRequest * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IBidiRequest * This);
HRESULT ( STDMETHODCALLTYPE *SetSchema )(
__RPC__in IBidiRequest * This,
/* [in] */ __RPC__in const LPCWSTR pszSchema);
HRESULT ( STDMETHODCALLTYPE *SetInputData )(
__RPC__in IBidiRequest * This,
/* [in] */ const DWORD dwType,
/* [in] */ __RPC__in const BYTE *pData,
/* [in] */ const UINT uSize);
HRESULT ( STDMETHODCALLTYPE *GetResult )(
__RPC__in IBidiRequest * This,
/* [out] */ __RPC__out HRESULT *phr);
HRESULT ( STDMETHODCALLTYPE *GetOutputData )(
__RPC__in IBidiRequest * This,
/* [in] */ const DWORD dwIndex,
/* [out] */ __RPC__deref_out_opt LPWSTR *ppszSchema,
/* [out] */ __RPC__out DWORD *pdwType,
/* [out] */ __RPC__deref_out_opt BYTE **ppData,
/* [out] */ __RPC__out ULONG *uSize);
HRESULT ( STDMETHODCALLTYPE *GetEnumCount )(
__RPC__in IBidiRequest * This,
/* [out] */ __RPC__out DWORD *pdwTotal);
END_INTERFACE
} IBidiRequestVtbl;
interface IBidiRequest
{
CONST_VTBL struct IBidiRequestVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IBidiRequest_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IBidiRequest_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IBidiRequest_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IBidiRequest_SetSchema(This,pszSchema) \
( (This)->lpVtbl -> SetSchema(This,pszSchema) )
#define IBidiRequest_SetInputData(This,dwType,pData,uSize) \
( (This)->lpVtbl -> SetInputData(This,dwType,pData,uSize) )
#define IBidiRequest_GetResult(This,phr) \
( (This)->lpVtbl -> GetResult(This,phr) )
#define IBidiRequest_GetOutputData(This,dwIndex,ppszSchema,pdwType,ppData,uSize) \
( (This)->lpVtbl -> GetOutputData(This,dwIndex,ppszSchema,pdwType,ppData,uSize) )
#define IBidiRequest_GetEnumCount(This,pdwTotal) \
( (This)->lpVtbl -> GetEnumCount(This,pdwTotal) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IBidiRequest_INTERFACE_DEFINED__ */
#ifndef __IBidiRequestContainer_INTERFACE_DEFINED__
#define __IBidiRequestContainer_INTERFACE_DEFINED__
/* interface IBidiRequestContainer */
/* [unique][helpstring][uuid][object] */
EXTERN_C const IID IID_IBidiRequestContainer;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("D752F6C0-94A8-4275-A77D-8F1D1A1121AE")
IBidiRequestContainer : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE AddRequest(
/* [in] */ __RPC__in_opt IBidiRequest *pRequest) = 0;
virtual HRESULT STDMETHODCALLTYPE GetEnumObject(
/* [out] */ __RPC__deref_out_opt IEnumUnknown **ppenum) = 0;
virtual HRESULT STDMETHODCALLTYPE GetRequestCount(
/* [out] */ __RPC__out ULONG *puCount) = 0;
};
#else /* C style interface */
typedef struct IBidiRequestContainerVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IBidiRequestContainer * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
__RPC__deref_out void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IBidiRequestContainer * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IBidiRequestContainer * This);
HRESULT ( STDMETHODCALLTYPE *AddRequest )(
__RPC__in IBidiRequestContainer * This,
/* [in] */ __RPC__in_opt IBidiRequest *pRequest);
HRESULT ( STDMETHODCALLTYPE *GetEnumObject )(
__RPC__in IBidiRequestContainer * This,
/* [out] */ __RPC__deref_out_opt IEnumUnknown **ppenum);
HRESULT ( STDMETHODCALLTYPE *GetRequestCount )(
__RPC__in IBidiRequestContainer * This,
/* [out] */ __RPC__out ULONG *puCount);
END_INTERFACE
} IBidiRequestContainerVtbl;
interface IBidiRequestContainer
{
CONST_VTBL struct IBidiRequestContainerVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IBidiRequestContainer_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IBidiRequestContainer_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IBidiRequestContainer_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IBidiRequestContainer_AddRequest(This,pRequest) \
( (This)->lpVtbl -> AddRequest(This,pRequest) )
#define IBidiRequestContainer_GetEnumObject(This,ppenum) \
( (This)->lpVtbl -> GetEnumObject(This,ppenum) )
#define IBidiRequestContainer_GetRequestCount(This,puCount) \
( (This)->lpVtbl -> GetRequestCount(This,puCount) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IBidiRequestContainer_INTERFACE_DEFINED__ */
#ifndef __IBidiSpl_INTERFACE_DEFINED__
#define __IBidiSpl_INTERFACE_DEFINED__
/* interface IBidiSpl */
/* [unique][helpstring][uuid][object] */
EXTERN_C const IID IID_IBidiSpl;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("D580DC0E-DE39-4649-BAA8-BF0B85A03A97")
IBidiSpl : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE BindDevice(
/* [in] */ __RPC__in const LPCWSTR pszDeviceName,
/* [in] */ const DWORD dwAccess) = 0;
virtual HRESULT STDMETHODCALLTYPE UnbindDevice( void) = 0;
virtual HRESULT STDMETHODCALLTYPE SendRecv(
/* [in] */ __RPC__in const LPCWSTR pszAction,
/* [in] */ __RPC__in_opt IBidiRequest *pRequest) = 0;
virtual HRESULT STDMETHODCALLTYPE MultiSendRecv(
/* [in] */ __RPC__in const LPCWSTR pszAction,
/* [in] */ __RPC__in_opt IBidiRequestContainer *pRequestContainer) = 0;
};
#else /* C style interface */
typedef struct IBidiSplVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IBidiSpl * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
__RPC__deref_out void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IBidiSpl * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IBidiSpl * This);
HRESULT ( STDMETHODCALLTYPE *BindDevice )(
__RPC__in IBidiSpl * This,
/* [in] */ __RPC__in const LPCWSTR pszDeviceName,
/* [in] */ const DWORD dwAccess);
HRESULT ( STDMETHODCALLTYPE *UnbindDevice )(
__RPC__in IBidiSpl * This);
HRESULT ( STDMETHODCALLTYPE *SendRecv )(
__RPC__in IBidiSpl * This,
/* [in] */ __RPC__in const LPCWSTR pszAction,
/* [in] */ __RPC__in_opt IBidiRequest *pRequest);
HRESULT ( STDMETHODCALLTYPE *MultiSendRecv )(
__RPC__in IBidiSpl * This,
/* [in] */ __RPC__in const LPCWSTR pszAction,
/* [in] */ __RPC__in_opt IBidiRequestContainer *pRequestContainer);
END_INTERFACE
} IBidiSplVtbl;
interface IBidiSpl
{
CONST_VTBL struct IBidiSplVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IBidiSpl_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IBidiSpl_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IBidiSpl_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IBidiSpl_BindDevice(This,pszDeviceName,dwAccess) \
( (This)->lpVtbl -> BindDevice(This,pszDeviceName,dwAccess) )
#define IBidiSpl_UnbindDevice(This) \
( (This)->lpVtbl -> UnbindDevice(This) )
#define IBidiSpl_SendRecv(This,pszAction,pRequest) \
( (This)->lpVtbl -> SendRecv(This,pszAction,pRequest) )
#define IBidiSpl_MultiSendRecv(This,pszAction,pRequestContainer) \
( (This)->lpVtbl -> MultiSendRecv(This,pszAction,pRequestContainer) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IBidiSpl_INTERFACE_DEFINED__ */
#ifndef __IBidiSpl2_INTERFACE_DEFINED__
#define __IBidiSpl2_INTERFACE_DEFINED__
/* interface IBidiSpl2 */
/* [unique][helpstring][uuid][object] */
EXTERN_C const IID IID_IBidiSpl2;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("0E8F51B8-8273-4906-8E7B-BE453FFD2E2B")
IBidiSpl2 : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE BindDevice(
/* [in] */ __RPC__in const LPCWSTR pszDeviceName,
/* [in] */ const DWORD dwAccess) = 0;
virtual HRESULT STDMETHODCALLTYPE UnbindDevice( void) = 0;
virtual HRESULT STDMETHODCALLTYPE SendRecvXMLString(
/* [in] */ __RPC__in BSTR bstrRequest,
/* [out] */ __RPC__deref_out_opt BSTR *pbstrResponse) = 0;
virtual HRESULT STDMETHODCALLTYPE SendRecvXMLStream(
/* [in] */ __RPC__in_opt IStream *pSRequest,
/* [out] */ __RPC__deref_out_opt IStream **ppSResponse) = 0;
};
#else /* C style interface */
typedef struct IBidiSpl2Vtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IBidiSpl2 * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
__RPC__deref_out void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IBidiSpl2 * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IBidiSpl2 * This);
HRESULT ( STDMETHODCALLTYPE *BindDevice )(
__RPC__in IBidiSpl2 * This,
/* [in] */ __RPC__in const LPCWSTR pszDeviceName,
/* [in] */ const DWORD dwAccess);
HRESULT ( STDMETHODCALLTYPE *UnbindDevice )(
__RPC__in IBidiSpl2 * This);
HRESULT ( STDMETHODCALLTYPE *SendRecvXMLString )(
__RPC__in IBidiSpl2 * This,
/* [in] */ __RPC__in BSTR bstrRequest,
/* [out] */ __RPC__deref_out_opt BSTR *pbstrResponse);
HRESULT ( STDMETHODCALLTYPE *SendRecvXMLStream )(
__RPC__in IBidiSpl2 * This,
/* [in] */ __RPC__in_opt IStream *pSRequest,
/* [out] */ __RPC__deref_out_opt IStream **ppSResponse);
END_INTERFACE
} IBidiSpl2Vtbl;
interface IBidiSpl2
{
CONST_VTBL struct IBidiSpl2Vtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IBidiSpl2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IBidiSpl2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IBidiSpl2_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IBidiSpl2_BindDevice(This,pszDeviceName,dwAccess) \
( (This)->lpVtbl -> BindDevice(This,pszDeviceName,dwAccess) )
#define IBidiSpl2_UnbindDevice(This) \
( (This)->lpVtbl -> UnbindDevice(This) )
#define IBidiSpl2_SendRecvXMLString(This,bstrRequest,pbstrResponse) \
( (This)->lpVtbl -> SendRecvXMLString(This,bstrRequest,pbstrResponse) )
#define IBidiSpl2_SendRecvXMLStream(This,pSRequest,ppSResponse) \
( (This)->lpVtbl -> SendRecvXMLStream(This,pSRequest,ppSResponse) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IBidiSpl2_INTERFACE_DEFINED__ */
#ifndef __IBidiSplLib_LIBRARY_DEFINED__
#define __IBidiSplLib_LIBRARY_DEFINED__
/* library IBidiSplLib */
/* [helpstring][version][uuid] */
EXTERN_C const IID LIBID_IBidiSplLib;
EXTERN_C const CLSID CLSID_BidiRequest;
#ifdef __cplusplus
class DECLSPEC_UUID("B9162A23-45F9-47cc-80F5-FE0FE9B9E1A2")
BidiRequest;
#endif
EXTERN_C const CLSID CLSID_BidiRequestContainer;
#ifdef __cplusplus
class DECLSPEC_UUID("FC5B8A24-DB05-4a01-8388-22EDF6C2BBBA")
BidiRequestContainer;
#endif
EXTERN_C const CLSID CLSID_BidiSpl;
#ifdef __cplusplus
class DECLSPEC_UUID("2A614240-A4C5-4c33-BD87-1BC709331639")
BidiSpl;
#endif
#endif /* __IBidiSplLib_LIBRARY_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
unsigned long __RPC_USER BSTR_UserSize( __RPC__in unsigned long *, unsigned long , __RPC__in BSTR * );
unsigned char * __RPC_USER BSTR_UserMarshal( __RPC__in unsigned long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in BSTR * );
unsigned char * __RPC_USER BSTR_UserUnmarshal(__RPC__in unsigned long *, __RPC__in_xcount(0) unsigned char *, __RPC__out BSTR * );
void __RPC_USER BSTR_UserFree( __RPC__in unsigned long *, __RPC__in BSTR * );
unsigned long __RPC_USER BSTR_UserSize64( __RPC__in unsigned long *, unsigned long , __RPC__in BSTR * );
unsigned char * __RPC_USER BSTR_UserMarshal64( __RPC__in unsigned long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in BSTR * );
unsigned char * __RPC_USER BSTR_UserUnmarshal64(__RPC__in unsigned long *, __RPC__in_xcount(0) unsigned char *, __RPC__out BSTR * );
void __RPC_USER BSTR_UserFree64( __RPC__in unsigned long *, __RPC__in BSTR * );
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif

446
BuildTools/Include/Bits.Idl Normal file
View File

@ -0,0 +1,446 @@
//=======================================================================
//
// Copyright (c) 2000 Microsoft Corporation. All Rights Reserved.
//
// File: bits.idl
//
// Description:
//
// Interface to the background file copier.
//
//=======================================================================
#ifndef DO_NO_IMPORTS
import "unknwn.idl";
#endif
cpp_quote("#include \"bitsmsg.h\"")
cpp_quote("#define BG_SIZE_UNKNOWN (UINT64)(-1)")
#define BG_ENUM_SIZEIS(maxcount) maxcount
#define BG_ENUM_LENGTHIS(maxcount,lengthptr) \
lengthptr ? *lengthptr : maxcount
//
// =============================
// Marshalled interfaces
// =============================
[
uuid(01b7bd23-fb88-4a77-8490-5891d3e4653a),
odl
]
interface IBackgroundCopyFile : IUnknown
{
typedef struct _BG_FILE_PROGRESS
{
UINT64 BytesTotal;
UINT64 BytesTransferred;
BOOL Completed;
}
BG_FILE_PROGRESS;
//--------------------------------------------------------------------
HRESULT GetRemoteName( [out] LPWSTR *pVal );
HRESULT GetLocalName( [out] LPWSTR *pVal );
HRESULT GetProgress( [out] BG_FILE_PROGRESS *pVal );
}
//--------------------------------------------------------------------
//
[
uuid(ca51e165-c365-424c-8d41-24aaa4ff3c40),
helpstring("IEnumBackgroundCopyFiles Interface"),
odl
]
interface IEnumBackgroundCopyFiles : IUnknown
{
HRESULT Next( [in] ULONG celt,
[out, size_is(BG_ENUM_SIZEIS(celt)), length_is(BG_ENUM_LENGTHIS(celt,pceltFetched))] IBackgroundCopyFile **rgelt,
[in,out,unique] ULONG *pceltFetched );
HRESULT Skip( [in] ULONG celt);
HRESULT Reset();
HRESULT Clone( [out] IEnumBackgroundCopyFiles **ppenum );
HRESULT GetCount( [out] ULONG *puCount );
}
//--------------------------------------------------------------------
//
[
uuid(19c613a0-fcb8-4f28-81ae-897c3d078f81),
helpstring("error object for IBackgroundCopyJob"),
odl
]
interface IBackgroundCopyError : IUnknown
{
typedef enum
{
BG_ERROR_CONTEXT_NONE = 0,
BG_ERROR_CONTEXT_UNKNOWN = 1,
BG_ERROR_CONTEXT_GENERAL_QUEUE_MANAGER = 2,
BG_ERROR_CONTEXT_QUEUE_MANAGER_NOTIFICATION = 3,
BG_ERROR_CONTEXT_LOCAL_FILE = 4,
BG_ERROR_CONTEXT_REMOTE_FILE = 5,
BG_ERROR_CONTEXT_GENERAL_TRANSPORT = 6,
BG_ERROR_CONTEXT_REMOTE_APPLICATION = 7
} BG_ERROR_CONTEXT;
HRESULT GetError( [out,ref] BG_ERROR_CONTEXT *pContext,
[out,ref] HRESULT *pCode );
// Returns BG_E_FILE_NOT_AVAILABLE if no file is available
HRESULT GetFile( [out] IBackgroundCopyFile ** pVal );
// Return a human readable description of the error.
// Use CoTaskMemFree to free the description.
HRESULT GetErrorDescription( [in] DWORD LanguageId,
[out,ref] LPWSTR *pErrorDescription );
// Return a human readable description of the error context.
// Use CoTaskMemFree to free the description.
HRESULT GetErrorContextDescription(
[in] DWORD LanguageId,
[out,ref] LPWSTR *pContextDescription );
// Returns BG_E_PROTOCOL_NOT_AVAILABLE if no protocol is available
HRESULT GetProtocol( [out,ref] LPWSTR *pProtocol );
}
// ==============================================
// Job Interface
[
uuid(37668d37-507e-4160-9316-26306d150b12),
helpstring("IBackgroundCopyJob Interface"),
odl
]
interface IBackgroundCopyJob : IUnknown
{
typedef struct _BG_FILE_INFO
{
LPWSTR RemoteName;
LPWSTR LocalName;
}
BG_FILE_INFO;
typedef struct _BG_JOB_PROGRESS
{
UINT64 BytesTotal;
UINT64 BytesTransferred;
ULONG FilesTotal;
ULONG FilesTransferred;
}
BG_JOB_PROGRESS;
typedef struct _BG_JOB_TIMES
{
FILETIME CreationTime;
FILETIME ModificationTime;
FILETIME TransferCompletionTime;
}
BG_JOB_TIMES;
typedef enum
{
BG_JOB_PRIORITY_FOREGROUND,
BG_JOB_PRIORITY_HIGH,
BG_JOB_PRIORITY_NORMAL,
BG_JOB_PRIORITY_LOW,
} BG_JOB_PRIORITY;
typedef enum
{
BG_JOB_STATE_QUEUED,
BG_JOB_STATE_CONNECTING,
BG_JOB_STATE_TRANSFERRING,
BG_JOB_STATE_SUSPENDED,
BG_JOB_STATE_ERROR,
BG_JOB_STATE_TRANSIENT_ERROR,
BG_JOB_STATE_TRANSFERRED,
BG_JOB_STATE_ACKNOWLEDGED,
BG_JOB_STATE_CANCELLED
} BG_JOB_STATE;
typedef enum
{
BG_JOB_TYPE_DOWNLOAD,
BG_JOB_TYPE_UPLOAD,
BG_JOB_TYPE_UPLOAD_REPLY
} BG_JOB_TYPE;
typedef enum
{
BG_JOB_PROXY_USAGE_PRECONFIG,
BG_JOB_PROXY_USAGE_NO_PROXY,
BG_JOB_PROXY_USAGE_OVERRIDE,
BG_JOB_PROXY_USAGE_AUTODETECT
} BG_JOB_PROXY_USAGE;
//--------------------------------------------------------------------
//
// Returns E_INVALIDARG if one of the filesets has
// - local name is blank
// - local name contains invalid characters
// - remote name is blank
// - remote name has invalid format
//
// Returns CO_E_NOT_SUPPORTED if
// - remote URL contains unsupported protocol
//
HRESULT
AddFileSet(
[in] ULONG cFileCount,
[in, size_is(cFileCount)] BG_FILE_INFO *pFileSet
);
HRESULT
AddFile(
[in] LPCWSTR RemoteUrl,
[in] LPCWSTR LocalName
);
//
// Gets an enumerator object for all files in the job.
//
HRESULT
EnumFiles(
[out] IEnumBackgroundCopyFiles ** pEnum
);
//
// Pause all activity on the job. The service will take no action until one of
// Resume(), Cancel(), Complete() is called.
//
// if already suspended, just returns S_OK.
//
HRESULT Suspend();
//
// Enable downloading for this job. Job properties cannot be modified
// after Resume() until the app calls Suspend().
//
// if already running, just returns S_OK.
//
HRESULT Resume();
//
// Permanently stop the job. The service will delete the job metadata and downloaded files.
//
// If already cancelled or resumed, returns ???
//
HRESULT Cancel();
//
// Acknowledges receipt of the job-complete notification. The service will delete
// the job metadata and leave the downloaded files.
//
HRESULT Complete();
//--------------------------------------------------------------------
HRESULT GetId( [out] GUID *pVal );
HRESULT GetType( [out] BG_JOB_TYPE * pVal );
HRESULT GetProgress( [out] BG_JOB_PROGRESS *pVal );
HRESULT GetTimes( [out] BG_JOB_TIMES * pVal );
HRESULT GetState( [out] BG_JOB_STATE *pVal );
HRESULT GetError( [out] IBackgroundCopyError ** ppError );
//
// The owner of the job, represented as a string.
// Only the owner and admins are allowed to see or change the job.
//
HRESULT GetOwner( [out] LPWSTR *pVal );
//
// name of the job, suitable for display in UI
//
HRESULT SetDisplayName( [in] LPCWSTR Val );
HRESULT GetDisplayName( [out] LPWSTR *pVal );
//
// a field for use by the app
//
HRESULT SetDescription( [in] LPCWSTR Val );
HRESULT GetDescription( [out] LPWSTR *pVal );
//
// the priority of the job in the queue.
// default = PRIORITY_NORMAL
// values not in BG_JOB_PRIORITY return E_NOTIMPL.
//
HRESULT SetPriority( [in] BG_JOB_PRIORITY Val );
HRESULT GetPriority( [out] BG_JOB_PRIORITY *pVal );
//
// ignores extra flags?
//
HRESULT SetNotifyFlags( [in] ULONG Val );
HRESULT GetNotifyFlags( [out] ULONG *pVal );
// interface pointer that implements the IBackgroundCallback interface for notifications.
// If the pointer becomes invalid, the service will try to create a new notification object
// with the notify CLSID.
HRESULT SetNotifyInterface( [in] IUnknown * Val );
HRESULT GetNotifyInterface( [out] IUnknown ** pVal );
HRESULT SetMinimumRetryDelay( [in] ULONG Seconds );
HRESULT GetMinimumRetryDelay( [out] ULONG * Seconds );
HRESULT SetNoProgressTimeout( [in] ULONG Seconds );
HRESULT GetNoProgressTimeout( [out] ULONG * Seconds );
HRESULT GetErrorCount( [out] ULONG * Errors );
HRESULT SetProxySettings(
[in] BG_JOB_PROXY_USAGE ProxyUsage,
[in,string,unique] const WCHAR * ProxyList,
[in,string,unique] const WCHAR * ProxyBypassList );
HRESULT GetProxySettings(
[out] BG_JOB_PROXY_USAGE *pProxyUsage,
[out] LPWSTR *pProxyList,
[out] LPWSTR *pProxyBypassList );
HRESULT TakeOwnership();
}
// ==============================================
// IEnumJobs Interface
// This interface allows enumerating the jobs under a Job
[
uuid(1af4f612-3b71-466f-8f58-7b6f73ac57ad),
helpstring("IEnumBackgroundCopyJobs2 Interface"),
odl
]
interface IEnumBackgroundCopyJobs : IUnknown
{
HRESULT Next( [in] ULONG celt,
[out, size_is(BG_ENUM_SIZEIS(celt)), length_is(BG_ENUM_LENGTHIS(celt,pceltFetched))] IBackgroundCopyJob **rgelt,
[in,out,unique] ULONG *pceltFetched );
HRESULT Skip( [in] ULONG celt);
HRESULT Reset();
HRESULT Clone( [out] IEnumBackgroundCopyJobs **ppenum );
HRESULT GetCount( [out] ULONG *puCount );
}
cpp_quote("#define BG_NOTIFY_JOB_TRANSFERRED 0x0001")
cpp_quote("#define BG_NOTIFY_JOB_ERROR 0x0002")
cpp_quote("#define BG_NOTIFY_DISABLE 0x0004")
cpp_quote("#define BG_NOTIFY_JOB_MODIFICATION 0x0008")
cpp_quote("#define BG_NOTIFY_FILE_TRANSFERRED 0x0010")
// ==============================================
// IBackgroundCallback Interface
// This interface is implemented by the client and is used by the queue manager
// to supply progress information to the client.
[
uuid(97ea99c7-0186-4ad4-8df9-c5b4e0ed6b22),
#if !defined( BITS_DONT_USE_ASYNC_DCOM )
async_uuid(ca29d251-b4bb-4679-a3d9-ae8006119d54),
#endif
helpstring("IBackgroundCopyCallback Interface"),
odl
]
interface IBackgroundCopyCallback : IUnknown
{
//
// A job has transferred successfully.
//
HRESULT JobTransferred( [in] IBackgroundCopyJob *pJob );
//
// An error occurred, and the service has suspended the job.
// Fix the error and resume the job.
// Get error details by calling (*pFailingJob)->GetStatus().
//
HRESULT JobError( [in] IBackgroundCopyJob *pJob,
[in] IBackgroundCopyError * pError );
//
// The job has been modified. Intendended for user interfaces.
//
HRESULT JobModification( [in] IBackgroundCopyJob *pJob,
[in] DWORD dwReserved );
}
//
// IBackgroundCopyManager is the "root" interface to the background file copy component.
//
[
uuid(5ce34c0d-0dc9-4c1f-897c-daa1b78cee7c),
helpstring("Background Copy interface"),
odl
]
interface IBackgroundCopyManager : IUnknown
{
HRESULT CreateJob(
[in] LPCWSTR DisplayName,
[in] BG_JOB_TYPE Type,
[out] GUID * pJobId,
[out] IBackgroundCopyJob **ppJob );
HRESULT GetJob( [in] REFGUID jobID,
[out] IBackgroundCopyJob **ppJob );
//
// Without this flag, jobs not owned by the caller are excluded from the enumeration.
// With this flag, those jobs are included. Only works if the caller is an administrator.
//
cpp_quote("#define BG_JOB_ENUM_ALL_USERS 0x0001")
HRESULT EnumJobs( [in] DWORD dwFlags,
[out] IEnumBackgroundCopyJobs **ppEnum );
HRESULT GetErrorDescription(
[in] HRESULT hResult,
[in] DWORD LanguageId,
[out] LPWSTR *pErrorDescription );
}
//---------------------------------------------------------------------------
[
uuid(1deeb74f-7915-4560-b558-918c83f176a6),
helpstring("Microsoft Background Copy Queue Manager 1.0"),
lcid(0x0000),
version(1.0)
]
library BackgroundCopyManager
{
[
uuid(4991d34b-80a1-4291-83b6-3328366b9097),
helpstring("Background copy control class")
]
coclass BackgroundCopyManager
{
[default] interface IBackgroundCopyManager;
};
interface IBackgroundCopyCallback;
}
cpp_quote("#include \"bits1_5.h\"")

1475
BuildTools/Include/Bits.h Normal file

File diff suppressed because it is too large Load Diff

1560
BuildTools/Include/Bits3_0.h Normal file

File diff suppressed because it is too large Load Diff

1130
BuildTools/Include/BitsMsg.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,731 @@
#----------------------------------------------------------------------------
#
# Description:
# Make File Header for BackOffice Software Development Kit
#
# Copyright:
# Copyright (C) Microsoft Corp. 1986-1999. All Rights Reserved.
#
#----------------------------------------------------------------------------
!ifndef BASEMAKE_INCLUDED # Prevent multiple inclusions
BASEMAKE_INCLUDED = 1
#*********************************************
#
# Parameter Checking and Defaults
#
#*********************************************
!ifndef Proj
! ERROR Component name (Proj) has not been defined.
!endif
!ifndef INCLUDE
! ERROR INCLUDE variable is empty; must include at least system include directory
!endif
!ifndef LIB
! ERROR LIB variable is empty; must include at least system lib directory
!endif
!if defined(clean)
$(Proj): Clean
!else
$(Proj): All
!endif
!if defined(nodebug)
BLDTYPE=Retail
!endif
!if "$(BLDTYPE)" == "Retail" | "$(BLDTYPE)" == "RETAIL" | "$(BLDTYPE)" == "retail" | "$(BLDTYPE)" == "RTL" | "$(BLDTYPE)" == "rtl"
BLDTYPE1=Retail
!else if "$(BLDTYPE)" == "Profile" | "$(BLDTYPE)" == "PROFILE" | "$(BLDTYPE)" == "profile"
BLDTYPE1=Profile
!else if "$(BLDTYPE)" == "Debug" | "$(BLDTYPE)" == "DEBUG" | "$(BLDTYPE)" == "debug" | "$(BLDTYPE)" == "DBG" | "$(BLDTYPE)" == "dbg"
BLDTYPE1=Debug
!else ifndef BLDTYPE
BLDTYPE1=Debug
!else
! ERROR BLDTYPE must be either Retail, Profile or Debug.
!endif
!if "$(BLDTYPE1)" == "Retail"
nodebug=1
!endif
!ifndef PLATFORM
PLATFORM=Win32
!endif
!ifndef CALL
CALL=C
!endif
!ifndef PACK
PACK=YES
!endif
# Default to logging to stdout.
!ifndef LOG
LOG=NO
!endif
!ifndef WARNING_LEVEL
WARNING_LEVEL=3
!endif
!ifndef CPU
CPU=i386
!ifndef PROCESSOR_ARCHITECTURE
#!ERROR CPU and PROCESSOR_ARCHITECTURE variables are empty; at least one must be defined
!endif
CPU=$(PROCESSOR_ARCHITECTURE)
!if "$(CPU)"=="x86" | "$(CPU)"=="X86"
CPU = i386
!endif
!endif
!ifndef APPVER
APPVER=5.0
!endif
!ifndef USE_EXCHANGE
!include <Win32.Mak>
!endif
# Save build args for any recursive nmakes
BLDARGS= BLDTYPE=$(BLDTYPE) PLATFORM=$(PLATFORM) LOG=$(LOG) CPU=$(CPU)
#*********************************************
#
# Paths
#
#*********************************************
!ifndef BKOFFICE
!ifdef PROJROOT
BKOFFICE=$(PROJROOT)\ # must add trailing backslash
!else
BKOFFICE=\BkOffice\ # assume a reasonable default
!endif
!endif
!ifdef MAKEDIRS
MkDest=
!include $(MAKEDIRS)
!else
ResDir=.
ObjDir=.\$(PLATFORM)\$(BLDTYPE1)
IncDir=$(BKOFFICE)Include
LibDir=$(BKOFFICE)Lib
!if "$(APPVER)" == "5.01"
INCLUDE=$(INCLUDE);$(ObjDir);$(IncDir);
!ELSE
INCLUDE=$(ObjDir);$(IncDir);$(INCLUDE);
!ENDIF
LIB=$(LibDir);$(LIB);
# Win95 doesn't support "&" on command line
MkDest=@for %d in ("$(PLATFORM)" "$(ObjDir)") do $(COMSPEC) /c if not exist %d md %d
!endif
#*********************************************
#
# Tools
#
#*********************************************
# Check to see if Cole Porter is used
!ifndef SUBSTITUTE_CC
!ifdef COLE_64
SUBSTITUTE_CC = Port64
!endif
!endif
!ifndef CC_NAME
!if "$(SUBSTITUTE_CC)" != ""
CC_NAME = "$(SUBSTITUTE_CC)"
LINK_NAME = Rem no Link under Cole
!else
CC_NAME = Cl
LINK_NAME = Link
!endif
!endif
MAKEEXE = NMake
IMPLIB = Lib
CC = $(CC_NAME)
LIBU = Lib
LINK = $(LINK_NAME)
RC = Rc
MC = Mc
MIDL = Midl
HC = Start /Wait Hcrtf
#*********************************************
#
# Flags
#
#*********************************************
# CL is for all C and C++ files
# -WX Warnings as errors
# -J char becomes unsigned char
#
CL=$(cflags) -c -w -J -Fo$@ /nologo $(CL)
# LFLAGS is for all links
LFLAGS=-NOLOGO /NODEFAULTLIB:LIBC -machine:$(CPU) -out:$@ -INCREMENTAL:NO $(LFLAGS)
# DLLFLAGS is for linking DLLs
DLLFLAGS=-DLL -map:"$(ObjDir)\$(@B).Map" $(DLLFLAGS)
# LIBFLAGS is for making libraries
LIBFLAGS=-NOLOGO -MACHINE:$(CPU) -out:"$@" $(LIBFLAGS)
# RFLAGS is for Windows resources
RFLAGS= -I$(ResDir) -fo$@ -DWIN32 $(noansi) -r -D_WIN32 $(RFLAGS)
# MFLAGS is for the message compiler
MFLAGS=-v -c -s -h "$(ObjDir)" -r "$(ObjDir)" -x "$(ObjDir)" $(MFLAGS)
# MRFLAGS is for the resource compiler when used after the message compiler
MRFLAGS=-l 409 -r -x -i"$(ObjDir)" $(MRFLAGS)
# HFLAGS is for the help compiler
HFLAGS=-xn
#---------------------------------------------
# Calling convention Flag
#---------------------------------------------
!if "$(CALL)"=="PASCAL"
CL=-Gc $(CL)
!endif
#---------------------------------------------
# Function Packaging Flag
#---------------------------------------------
!if "$(PACK)" == "YES"
CL=-Gy $(CL)
cDefines=-Gy $(cDefines)
!endif
#---------------------------------------------
# Output Redirection
#---------------------------------------------
!if "$(LOG)" == "NO"
LogCmd=
!else
LogCmd= >> "$(ObjDir)\$(Proj).Out"
!endif
#---------------------------------------------
# select specific library based on target type
#---------------------------------------------
!if "$(BLDTYPE1)"=="Retail"
DbgLibFlag =
!else
DbgLibFlag = d
!endif
!if defined(unicode)
UnicodeLibFlag = u
!else
UnicodeLibFlag =
!endif
#---------------------------------------------
# Optimization Flags
#---------------------------------------------
!if "$(BLDTYPE1)" == "Retail"
CL=-O2 $(CL)
!else if "$(BLDTYPE1)" == "Profile"
CL=-Od -Z7 -Gh $(CL)
!else
CL=-Od -Z7 $(CL)
!endif
#---------------------------------------------
# PLATFORM specific Flags
#---------------------------------------------
!if "$(CPU)" == "I386"
CL = $(CL) -D_X86_=1
scall = -Gz
lflags = $(lflags) -align:0x1000
!endif
!if "$(CPU)" == "ALPHA"
CL = $(CL) -D_ALPHA_=1
scall =
!endif
#---------------------------------------------
# Windows version
#---------------------------------------------
!if "$(APPVER)" == "4.0"
CL = $(CL) -DWINVER=0x0400
rflags=$(rflags) -DWINVER=0x0400
!endif
#---------------------------------------------
# Additional MFC Flags
#---------------------------------------------
!ifdef Use_MFC
CL= $(CL) /EHsc /DSTRICT /DWIN32 /D_WINDOWS /D_MBCS /D_WINDLL
CL= $(CL) /D_USRDLL -D_AFX_NO_BSTR_SUPPORT /D_AFXDLL
RFLAGS = $(RFLAGS) /DSTRICT /DWIN32 /D_WINDOWS /D_MBCS /D_WINDLL /D_USRDLL -D_AFX_NO_BSTR_SUPPORT /D_AFXDLL
!if "$(BLDTYPE1)"=="Debug"
CL= $(CL) /D_DEBUG
RFLAGS = $(RFLAGS) /D_DEBUG
!endif # BLDTYPE == Debug
!ifdef crtdll # Use DLL CRT? (which is multithreaded)
crtflags = -MD$(DbgLibFlag) $(crtflags)
!elseif defined(crtst) && !defined(crtflags) # use Single Threaded CRT?
crtflags = -ML$(DbgLibFlag) $(crtflags)
!elseif defined(crtmt) # use Multithreaded CRT?
crtflags = -MT$(DbgLibFlag) $(crtflags)
!else # default to crtdll
crtflags = -MD$(DbgLibFlag) $(crtflags)
!endif # ifdef crtdll/else crtst/crtmt/else
!endif
#---------------------------------------------
# Build Type Flags (Retail/Debug)
#---------------------------------------------
!if "$(BLDTYPE1)"=="Retail"
CL=-DSHIP $(CL)
LFLAGS = $(LFLAGS) -RELEASE
!else if "$(BLDTYPE1)"=="Profile"
CL=-DDEBUG -DTEST -DPROFILE $(CL)
LFLAGS = $(LFLAGS) -DEBUG:mapped,partial -DEBUGTYPE:coff -PROFILE
libs = $(libs) CAP.Lib
!else
CL=-DDEBUG -DTEST $(CL)
LFLAGS = $(LFLAGS) -debug:full -debugtype:cv
!endif
#---------------------------------------------
# Determine CRT Flags
#---------------------------------------------
!ifdef crtdll # Use DLL CRT? (which is multithreaded)
crtflags = -MD$(DbgLibFlag) $(crtflags)
!elseif defined(crtst) && !defined(crtflags) # use Single Threaded CRT?
crtflags = -ML$(DbgLibFlag) $(crtflags)
!elseif defined(crtmt) # use Multithreaded CRT?
crtflags = -MT$(DbgLibFlag) $(crtflags)
!else # default to crtdll
crtflags = -MD$(DbgLibFlag) $(crtflags)
!endif # ifdef crtdll/else crtst/crtmt/else
#---------------------------------------------
# Determine app type Flags (console, gui, or DLL)
#---------------------------------------------
!if defined(unicode)
crtflags=-D UNICODE -D _UNICODE $(crtflags)
!endif #unicode
!if defined(console) # console app
!if !defined(unicode)
linkflags=$(linkflags) -subsystem:console -entry:mainCRTStartup
!else
linkflags=$(linkflags) -subsystem:console -entry:wmainCRTStartup
!endif #unicode
!elseif !defined(dll) # not a dll, default to gui app
!if !defined(unicode)
linkflags=$(linkflags) -subsystem:windows -entry:WinMainCRTStartup
!else
linkflags=$(linkflags) -subsystem:windows -entry:wWinMainCRTStartup
!endif #unicode
!endif # ifdef console/else
#*********************************************
#
# Libraries
#
#*********************************************
#---------------------------------------------
# Back Office SDK specific
#---------------------------------------------
!ifdef USE_SNA
libs=$(libs) fmistr32.Lib ihvLink.Lib snacli.Lib wappc32.Lib wcpic32.Lib
libs=$(libs) wincsv32.Lib winrui32.Lib winsli32.Lib
!endif # USE_SNA
!ifdef USE_SQL
libs=$(libs) ntwdbLib.Lib
!endif # USE_SQL
!ifdef USE_ODS
libs=$(libs) opends60.Lib
!endif # USE_ODS
!ifdef USE_DTC
libs=$(libs) XOleHlp.Lib
!endif # USE_ODS
!ifdef USE_ODBC
libs=$(libs) odbc32.Lib odbccp32.Lib
!endif # USE_ODS
!if defined(USE_MSM) || defined(USE_SMS)
libs=$(libs) smsapi.Lib objectty.Lib
!endif # USE_MSM || USE_SMS
!ifdef USE_NETMON
libs=$(libs) bhmon.Lib bhsupp.Lib filter.Lib friendly.Lib
libs=$(libs) hexedit.Lib nal.Lib nmapi.Lib
libs=$(libs) parser.Lib slbs.Lib toolbar.Lib
!endif # USE_NETMON
!ifdef USE_EXCHANGE
! ifndef Building_ExchSDK
libs="ExchSDK$(DbgLibFlag).Lib" $(libs)
! endif # Building_ExchSDK
# Note: when using MFC for Exchange Admin
# extension dlls they must be statically linked to MFC.
libs=$(libs) Mapi32.Lib Uuid.Lib
!if "$(WARNING_LEVEL)" != "4"
CL= $(CL) -WX
!endif
DLLFLAGS = $(DLLFLAGS) -def:$(@B).def
!endif # USE_EXCHANGE
#---------------------------------------------
# Determine CRT Libraries
#---------------------------------------------
libc = libc$(DbgLibFlag).Lib oldnames.Lib
libcmt = libcmt$(DbgLibFlag).Lib oldnames.Lib
libcdll = msvcrt$(DbgLibFlag).Lib oldnames.Lib
!ifdef crtdll # Use DLL CRT?
libcrt=$(libcdll)
!elseif defined(crtst) && !defined(crtflags) # use Single Threaded CRT?
libcrt=$(libc)
!elseif defined(crtmt) # use Multithreaded CRT?
libcrt=$(libcmt)
!else # default to crtdll
libcrt=$(libcdll)
!endif # endif crtdll/else crtst/crtmt/else
#---------------------------------------------
# Determine app type libraries (console, gui, or DLL)
#---------------------------------------------
!ifdef dll # is this a DLL?
linklibs=$(libs) kernel32.Lib advapi32.Lib user32.Lib gdi32.Lib comctl32.Lib comdlg32.Lib ole32.Lib winspool.Lib version.Lib
!elseif defined(console) # not a DLL, perhaps a console app
linklibs=$(libs) kernel32.Lib advapi32.Lib user32.Lib ole32.Lib version.Lib
!else # default to gui app
linklibs=$(libs) kernel32.Lib $(optlibs) advapi32.Lib user32.Lib gdi32.Lib comdlg32.Lib ole32.Lib winspool.Lib version.Lib
!endif # ifdef dll/else console/else
#LinkLibs = $(LibList) $(linklibs) $(libcrt)
# do not specify CRT libs if using MFC, let MFC fix this up in the default libs
!ifdef Use_MFC
LinkLibs = $(LibList) $(linklibs)
!else
LinkLibs = $(LibList) $(linklibs) $(libcrt)
!endif
#if necessary, force MSVCRT to be included in lib list
!ifdef Use_MSCRT
LinkLibs = $(LinkLibs) $(libcrt)
!endif
!if "$(BLDTYPE1)" == "Profile"
LinkLibs = $(LinkLibs) cap.Lib
!endif
#---------------------------------------------
# Additional MFC Libraries
#---------------------------------------------
# Note that linking order is important when using MFC!
!ifdef Use_MFC
!if !defined(nodebug)
linklibs = mfc80$(UnicodeLibFlag)$(DbgLibFlag).Lib $(linklibs)
!endif
linklibs = mfcs80$(UnicodeLibFlag)$(DbgLibFlag).Lib mfc80$(UnicodeLibFlag)$(DbgLibFlag).Lib $(linklibs)
!endif
#*********************************************
#
# Inference Rules
#
#*********************************************
.SUFFIXES: .c .Cpp .Cxx .Obj .Def .Lib .Dll .Exe .Idl .h .Mc .Rc .Res .Exp .Bin .Hpj .Ini .Pdb .Trg .Ocx .Tlb .Res .Srl .Odl
# C Targets
.c{$(ObjDir)\}.Obj:
$(MkDest)
!if "$(LOG)"=="YES"
@echo $(CC) $(CL) $(crtflags) $(cDefines) $< $(LogCmd)
!endif
$(CC) $(CL) $(crtflags) $(cDefines) $< $(LogCmd)
# C++ Targets
.cpp{$(ObjDir)\}.Obj:
$(MkDest)
!if "$(LOG)"=="YES"
@echo $(CC) $(CL) $(crtflags) $(cDefines) $< $(LogCmd)
!endif
$(CC) $(CL) $(crtflags) $(cDefines) $< $(LogCmd)
# C++ Targets
.cxx{$(ObjDir)\}.obj:
$(MkDest)
!if "$(LOG)"=="YES"
@echo $(CC) $(CL) $(crtflags) $(cDefines) $< $(LogCmd)
!endif
$(CC) $(CL) $(crtflags) $(cDefines) $< $(LogCmd)
# Resource Targets from .RC files
{$(ResDir)\}.Rc{$(ObjDir)\}.Res:
$(MkDest)
!if "$(LOG)"=="YES"
@echo $(RC) $(RFLAGS) $(ResDir)\$(@B).rc $(LogCmd)
!endif
$(RC) $(RFLAGS) $(ResDir)\$(@B).rc $(LogCmd)
# Resource Targets from .MC files
.Mc{$(ObjDir)\}.Res:
$(MkDest)
!if "$(LOG)"=="YES"
@echo $(MC) $(MFLAGS) $< $(LogCmd)
!endif
$(MC) $(MFLAGS) $< $(LogCmd)
!if "$(LOG)"=="YES"
@echo $(RC) $(MRFLAGS) -fo$@ "$(ObjDir)\$(@B).rc" $(LogCmd)
!endif
$(RC) $(MRFLAGS) -fo$@ "$(ObjDir)\$(@B).rc" $(LogCmd)
# Import Libraries
.Def{$(ObjDir)\}.Lib:
!if "$(LOG)"=="YES"
@echo $(IMPLIB) -NOLOGO -MACHINE:$(CPU) -DEF:$(@B).DEF -OUT:$@ $(LogCmd)
!endif
$(IMPLIB) -NOLOGO -MACHINE:$(CPU) -DEF:$(@B).DEF -OUT:$@ $(LogCmd)
set copycmd=/Y
xcopy "$@" "$(LibDir)\" $(LogCmd)
.Def{$(ObjDir)\}.Exp:
!if "$(LOG)"=="YES"
@echo $(IMPLIB) -NOLOGO -MACHINE:$(CPU) -DEF:$(@B).DEF -OUT:"$(@R).Lib" $(LogCmd)
!endif
$(IMPLIB) -NOLOGO -MACHINE:$(CPU) -DEF:$(@B).DEF -OUT:"$(@R).Lib" $(LogCmd)
# Static Libraries
{$(ObjDir)\}.Obj{$(ObjDir)\}.Lib:
!if "$(LOG)"=="YES"
@echo $(LIBU) $(LIBFLAGS) $** $(LogCmd)
!endif
$(LIBU) $(LIBFLAGS) $** $(LogCmd)
!ifdef USE_EXCHANGE
!if "$(LOG)"=="YES"
@echo xcopy "$(@R).Lib" "$(LibDir)" $(LogCmd)
!endif
set copycmd=/Y
-xcopy "$(@R).Lib" "$(LibDir)\" $(LogCmd)
!endif # USE_EXCHANGE
# DLLs
{$(ObjDir)\}.Obj{$(ObjDir)\}.Dll:
@echo $** > "$(ObjDir)\objfiles.lst"
@echo $(LinkLibs) > "$(ObjDir)\libfiles.lst"
!if "$(LOG)"=="YES"
@echo $(LINK) $(LFLAGS) $(DLLFLAGS) $(linkflags) "@$(ObjDir)\objfiles.lst" "@$(ObjDir)\libfiles.lst" $(LogCmd)
!endif
$(LINK) $(LFLAGS) $(DLLFLAGS) $(linkflags) "@$(ObjDir)\objfiles.lst" "@$(ObjDir)\libfiles.lst" $(LogCmd)
!ifdef USE_EXCHANGE
!if "$(LOG)"=="YES"
@echo xcopy "$(@R).Lib" "$(LibDir)" $(LogCmd)
!endif
set copycmd=/Y
-xcopy "$(@R).Lib" "$(LibDir)\" $(LogCmd)
!endif # USE_EXCHANGE
# OCXs
{$(ObjDir)\}.obj{$(ObjDir)\}.Ocx:
@echo $** > "$(ObjDir)\objfiles.lst"
@echo $(LinkLibs) > "$(ObjDir)\libfiles.lst"
!if "$(LOG)"=="YES"
@echo $(LINK) $(LFLAGS) $(DLLFLAGS) $(linkflags) "@$(ObjDir)\objfiles.lst" "@$(ObjDir)\libfiles.lst" $(LogCmd)
!endif
$(LINK) $(LFLAGS) $(DLLFLAGS) $(linkflags) "@$(ObjDir)\objfiles.lst" "@$(ObjDir)\libfiles.lst" $(LogCmd)
!ifdef USE_EXCHANGE
!if "$(LOG)"=="YES"
@echo xcopy "$(@R).Lib" "$(LibDir)" $(LogCmd)
!endif
set copycmd=/Y
-xcopy "$(@R).Lib" "$(LibDir)\" $(LogCmd)
!endif # USE_EXCHANGE
# BINs
{$(ObjDir)\}.Obj{$(ObjDir)\}.Bin:
@echo $(LinkLibs) > "$(ObjDir)\libfiles.lst"
!if "$(LOG)"=="YES"
@echo $(LINK) $(LFLAGS) $(linkflags) $** "@$(ObjDir)\libfiles.lst" $(LogCmd)
!endif
$(LINK) $(LFLAGS) $(linkflags) $** "@$(ObjDir)\libfiles.lst" $(LogCmd)
# EXEs
{$(ObjDir)\}.Obj{$(ObjDir)\}.Exe:
@echo $** > "$(ObjDir)\objfiles.lst"
@echo $(LinkLibs) > "$(ObjDir)\libfiles.lst"
!if "$(LOG)"=="YES"
@echo $(LINK) $(LFLAGS) $(linkflags) "@$(ObjDir)\objfiles.lst" "@$(ObjDir)\libfiles.lst" $(LogCmd)
!endif
$(LINK) $(LFLAGS) $(linkflags) "@$(ObjDir)\objfiles.lst" "@$(ObjDir)\libfiles.lst" $(LogCmd)
# Helpfiles
.Hpj{$(ObjDir)\}.Hlp:
$(MkDest)
!if "$(LOG)"=="YES"
@echo $(HC) $(HFLAGS) $(@B).Hpj
!endif
$(HC) $(HFLAGS) $(@B).Hpj
!if "$(LOG)"=="YES"
@echo xcopy "$(@F)" "$(ObjDir)"
!endif
set copycmd=/Y
-xcopy "$(@F)" "$(ObjDir)" $(LogCmd)
# TRGs
{$(ObjDir)\}.Exe{$(ObjDir)\}.Trg:
$(MkDest)
!if "$(LOG)"=="YES"
@echo $? /RegServer "$(ObjDir)\regsvr32.Trg" $(LogCmd)
!endif
@-$? /RegServer $(LogCmd)
echo regsvr32 exec. time > "$(ObjDir)\regsvr32.Trg" $(LogCmd)
{$(ObjDir)\}.Dll{$(ObjDir)\}.Trg:
$(MkDest)
!if "$(LOG)"=="YES"
@echo regsvr32 /s $? regsvr32.trg
!endif
@-regsvr32 /s $? $(LogCmd)
echo regsvr32 exec. time > "$(ObjDir)\regsvr32.Trg"
# .Hs
.Idl{$(ObjDir)\}.H:
$(MkDest)
!if "$(LOG)"=="YES"
@echo $(MIDL) /Oicf /out "$(ObjDir)" $** $(LogCmd)
!endif
$(MIDL) /Oicf /out "$(ObjDir)" $** $(LogCmd)
# .Tlbs
.Odl{$(ObjDir)\}.Tlb:
$(MkDest)
!if "$(LOG)"=="YES"
@echo $(MIDL) /nologo /out "$(ObjDir)" $** $(LogCmd)
!endif
$(MIDL) /nologo /out "$(ObjDir)" $** $(LogCmd)
#*********************************************
#
# Make Targets
#
#*********************************************
#---------------------------------------------
# List Output Files
#---------------------------------------------
ListDir:
dir "$(ObjDir)"
#---------------------------------------------
# Display Output Listing File
#---------------------------------------------
!ifndef ERRVIEW
ERRVIEW=start notepad.Exe
!endif
ListOut:
$(ERRVIEW) "$(ObjDir)\$(Proj).out"
#---------------------------------------------
# Delete Output Listing File
#---------------------------------------------
DelOut:
del "$(ObjDir)\$(Proj).out"
#---------------------------------------------
# Clean Output Directories
#---------------------------------------------
clean:
$(MkDest)
!if "$(OS)" == "Windows_NT"
-del /q "$(ObjDir)\*.Obj" \
"$(ObjDir)\*.out" \
"$(ObjDir)\*.h" \
"$(ObjDir)\*.dbg" \
"$(ObjDir)\*.Lib" \
"$(ObjDir)\*.Exe" \
"$(ObjDir)\*.Dll" \
"$(ObjDir)\*.Map" \
"$(ObjDir)\*.Res" \
"$(ObjDir)\*.rc" \
"$(ObjDir)\*.bin" \
"$(ObjDir)\*.lst" \
"$(ObjDir)\*.blt" \
"$(ObjDir)\*.hlp" \
"$(ObjDir)\*.trg" \
"$(ObjDir)\*.srl" \
"$(ObjDir)\*.ini" \
"$(ObjDir)\*.tlb" \
"$(ObjDir)\*.pdb" \
"$(ObjDir)\*.exp" >NUL 2>NUL
!else # Win95 doesn't support "2>" on command line, multiple files on a Del command, or /q
-erase "$(ObjDir)\*.Obj" >NUL
-erase "$(ObjDir)\*.out" >NUL
-erase "$(ObjDir)\*.h" >NUL
-erase "$(ObjDir)\*.dbg" >NUL
-erase "$(ObjDir)\*.Lib" >NUL
-erase "$(ObjDir)\*.Exe" >NUL
-erase "$(ObjDir)\*.Dll" >NUL
-erase "$(ObjDir)\*.Map" >NUL
-erase "$(ObjDir)\*.Res" >NUL
-erase "$(ObjDir)\*.rc" >NUL
-erase "$(ObjDir)\*.bin" >NUL
-erase "$(ObjDir)\*.lst" >NUL
-erase "$(ObjDir)\*.blt" >NUL
-erase "$(ObjDir)\*.hlp" >NUL
-erase "$(ObjDir)\*.trg" >NUL
-erase "$(ObjDir)\*.srl" >NUL
-erase "$(ObjDir)\*.ini" >NUL
-erase "$(ObjDir)\*.pdb" >NUL
-erase "$(ObjDir)\*.exp" >NUL
-erase "$(ObjDir)\*.tlb" >NUL
-erase "$(ObjDir)\*.c" >NUL
-erase "$(ObjDir)\*.trg" >NUL
!endif # OS == Windows_NT
!endif # BASEMAKE_INCLUDED

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,345 @@
/****************************************************************************/
/* Header: cchannel.h */
/* */
/* Purpose: Virtual Channel Client API */
/* */
/* Copyright(C) Microsoft Corporation 1999 */
/* */
/****************************************************************************/
#ifndef H_CCHANNEL
#define H_CCHANNEL
/****************************************************************************/
/* Include Virtual Channel Protocol header */
/****************************************************************************/
#include <pchannel.h>
#ifdef _WIN32
#define VCAPITYPE _stdcall
#define VCEXPORT
#else // _WIN32
#define VCAPITYPE CALLBACK
#define VCEXPORT __export
#endif // _WIN32
/****************************************************************************/
/* Name: CHANNEL_INIT_EVENT_FN */
/* */
/* Purpose: */
/* */
/* This function is passed to MSTSC on VirtualChannelInit. It is called by */
/* MSTSC to tell the application about interesting events. */
/* */
/* Returns: */
/* */
/* none */
/* */
/* Params: */
/* */
/* - pInitHandle - a handle uniquely identifying this connection */
/* - event - the event that has occurred - see CHANNEL_EVENT_XXX below */
/* - pData - data associated with the event - see CHANNEL_EVENT_XXX below */
/* - dataLength - length of the data. */
/* */
/****************************************************************************/
typedef VOID VCAPITYPE CHANNEL_INIT_EVENT_FN(LPVOID pInitHandle,
UINT event,
LPVOID pData,
UINT dataLength);
typedef CHANNEL_INIT_EVENT_FN FAR * PCHANNEL_INIT_EVENT_FN;
/****************************************************************************/
/* Events passed to VirtualChannelInitEvent */
/****************************************************************************/
/* Client initialized (no data) */
#define CHANNEL_EVENT_INITIALIZED 0
/* Connection established (data = name of Server) */
#define CHANNEL_EVENT_CONNECTED 1
/* Connection established with old Server, so no channel support */
#define CHANNEL_EVENT_V1_CONNECTED 2
/* Connection ended (no data) */
#define CHANNEL_EVENT_DISCONNECTED 3
/* Client terminated (no data) */
#define CHANNEL_EVENT_TERMINATED 4
/****************************************************************************/
/* Name: CHANNEL_OPEN_EVENT_FN */
/* */
/* Purpose: */
/* */
/* This function is passed to MSTSC on VirtualChannelOpen. It is called by */
/* MSTSC when data is available on the channel. */
/* */
/* Returns: */
/* */
/* none */
/* */
/* Params: */
/* */
/* - openHandle - a handle uniquely identifying this channel */
/* - event - event that has occurred - see CHANNEL_EVENT_XXX below */
/* - pData - data received */
/* - dataLength - length of the data */
/* - totalLength - total length of data written by the Server */
/* - dataFlags - flags, zero, one or more of: */
/* - 0x01 - beginning of data from a single write operation at the Server */
/* - 0x02 - end of data from a single write operation at the Server. */
/* */
/****************************************************************************/
typedef VOID VCAPITYPE CHANNEL_OPEN_EVENT_FN(DWORD openHandle,
UINT event,
LPVOID pData,
UINT32 dataLength,
UINT32 totalLength,
UINT32 dataFlags);
typedef CHANNEL_OPEN_EVENT_FN FAR * PCHANNEL_OPEN_EVENT_FN;
/****************************************************************************/
/* Events passed to VirtualChannelOpenEvent */
/****************************************************************************/
/* Data received from Server (data = incoming data) */
#define CHANNEL_EVENT_DATA_RECEIVED 10
/* VirtualChannelWrite completed (pData - pUserData passed on
VirtualChannelWrite) */
#define CHANNEL_EVENT_WRITE_COMPLETE 11
/* VirtualChannelWrite cancelled (pData - pUserData passed on
VirtualChannelWrite) */
#define CHANNEL_EVENT_WRITE_CANCELLED 12
/****************************************************************************/
/* Return codes from VirtualChannelXxx functions */
/****************************************************************************/
#define CHANNEL_RC_OK 0
#define CHANNEL_RC_ALREADY_INITIALIZED 1
#define CHANNEL_RC_NOT_INITIALIZED 2
#define CHANNEL_RC_ALREADY_CONNECTED 3
#define CHANNEL_RC_NOT_CONNECTED 4
#define CHANNEL_RC_TOO_MANY_CHANNELS 5
#define CHANNEL_RC_BAD_CHANNEL 6
#define CHANNEL_RC_BAD_CHANNEL_HANDLE 7
#define CHANNEL_RC_NO_BUFFER 8
#define CHANNEL_RC_BAD_INIT_HANDLE 9
#define CHANNEL_RC_NOT_OPEN 10
#define CHANNEL_RC_BAD_PROC 11
#define CHANNEL_RC_NO_MEMORY 12
#define CHANNEL_RC_UNKNOWN_CHANNEL_NAME 13
#define CHANNEL_RC_ALREADY_OPEN 14
#define CHANNEL_RC_NOT_IN_VIRTUALCHANNELENTRY 15
#define CHANNEL_RC_NULL_DATA 16
#define CHANNEL_RC_ZERO_LENGTH 17
/****************************************************************************/
/* Levels of Virtual Channel Support */
/****************************************************************************/
#define VIRTUAL_CHANNEL_VERSION_WIN2000 1
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/****************************************************************************/
/* Name: VirtualChannelInit */
/* */
/* Purpose: */
/* */
/* This function is called by the application to register the virtual */
/* channels it wants to have access to. Note that this does not open the */
/* channels, merely reserves the names for use by this application. This */
/* function must be called before the Client connects to the Server, hence */
/* it is recommended that it is called from the DLL's initialization */
/* procedure. */
/* */
/* */
/* On_return, the channels requested have been registered. However, other */
/* MSTSC initialization may not yet have completed. The application */
/* receives a VirtualChannelInitEvent callback with the "Client */
/* initialized" event when all MSTSC initialization is complete. */
/* */
/* Returns: */
/* */
/* CHANNEL_RC_OK */
/* CHANNEL_RC_ALREADY_INITIALIZED */
/* CHANNEL_RC_ALREADY_CONNECTED */
/* CHANNEL_RC_TOO_MANY_CHANNELS */
/* CHANNEL_RC_NOT_IN_VIRTUALCHANNELENTRY */
/* */
/* Parameters */
/* */
/* - ppInitHandle (returned) - handle to pass to subsequent */
/* VirtualChannelXxx calls */
/* - pChannel - list of names registered by this application */
/* - channelCount - number of channels registered. */
/* - versionRequested - level of virtual channel support requested (one of */
/* the VIRTUAL_CHANNEL_LEVEL_XXX parameters) */
/* - pChannelInitEventProc - address of VirtualChannelInitEvent procedure */
/* */
/****************************************************************************/
typedef UINT VCAPITYPE VIRTUALCHANNELINIT(
LPVOID FAR * ppInitHandle,
PCHANNEL_DEF pChannel,
INT channelCount,
ULONG versionRequested,
PCHANNEL_INIT_EVENT_FN pChannelInitEventProc);
typedef VIRTUALCHANNELINIT FAR * PVIRTUALCHANNELINIT;
/****************************************************************************/
/* Name: VirtualChannelOpen */
/* */
/* Purpose: */
/* */
/* This function is called by the application to open a channel. It cannot */
/* be called until a connection is established with a Server. */
/* */
/* Returns: */
/* */
/* CHANNEL_RC_OK */
/* CHANNEL_RC_NOT_INITIALIZED */
/* CHANNEL_RC_NOT_CONNECTED */
/* CHANNEL_RC_BAD_CHANNEL_NAME */
/* CHANNEL_RC_BAD_INIT_HANDLE */
/* */
/* Params: */
/* */
/* - pInitHandle - handle from VirtualChannelInit */
/* */
/* - pOpenHandle (returned) - handle to pass to subsequent */
/* VirtualChannelXxx calls */
/* - pChannelName - name of channel to open */
/* - pChannelOpenEventProc - address of VirtualChannelOpenEvent procedure */
/* */
/****************************************************************************/
typedef UINT VCAPITYPE VIRTUALCHANNELOPEN(
LPVOID pInitHandle,
LPDWORD pOpenHandle,
PCHAR pChannelName,
PCHANNEL_OPEN_EVENT_FN pChannelOpenEventProc);
typedef VIRTUALCHANNELOPEN FAR * PVIRTUALCHANNELOPEN;
/****************************************************************************/
/* Name: VirtualChannelClose */
/* */
/* Purpose: */
/* */
/* This function is called to close a previously opened channel. */
/* */
/* Returns: */
/* */
/* CHANNEL_RC_OK */
/* CHANNEL_RC_BAD_CHANNEL_HANDLE */
/* */
/* Params: */
/* */
/* - openHandle - handle returned on VirtualChannelOpen */
/* */
/****************************************************************************/
typedef UINT VCAPITYPE VIRTUALCHANNELCLOSE(DWORD openHandle);
typedef VIRTUALCHANNELCLOSE FAR * PVIRTUALCHANNELCLOSE;
/****************************************************************************/
/* Name: VirtualChannelWrite */
/* */
/* Purpose: */
/* */
/* This function is used to send data to the partner app on the Server. */
/* */
/* VirtualChannelWrite copies the data to one or more network buffers as */
/* necessary. VirtualChannelWrite ensures that data is sent to the Server */
/* on the right context. It sends all data on MS TC's Sender thread. */
/* */
/* VirtualChannelWrite is asynchronous - the VirtualChannelOpenEvent */
/* procedure is called when the write completes. Until that callback is */
/* made, the caller must not free or reuse the buffer passed on */
/* VirtualChannelWrite. The caller passes a piece of data (pUserData) to */
/* VirtualChannelWrite, which is returned on the VirtualChannelOpenEvent */
/* callback. The caller can use this data to identify the write which has */
/* completed. */
/* */
/* */
/* Returns: */
/* */
/* CHANNEL_RC_OK */
/* CHANNEL_RC_NOT_INITIALIZED */
/* CHANNEL_RC_NOT_CONNECTED */
/* CHANNEL_RC_BAD_CHANNEL_HANDLE */
/* */
/* Params: */
/* - openHandle - handle from VirtualChannelOpen */
/* - pData - data to write */
/* - datalength - length of data to write */
/* - pUserData - user supplied data, returned on VirtualChannelOpenEvent */
/* when the write completes */
/* */
/****************************************************************************/
typedef UINT VCAPITYPE VIRTUALCHANNELWRITE(DWORD openHandle,
LPVOID pData,
ULONG dataLength,
LPVOID pUserData);
typedef VIRTUALCHANNELWRITE FAR * PVIRTUALCHANNELWRITE;
/****************************************************************************/
/* Structure: CHANNEL_ENTRY_POINTS */
/* */
/* Description: Virtual Channel entry points passed to VirtualChannelEntry */
/****************************************************************************/
typedef struct tagCHANNEL_ENTRY_POINTS
{
DWORD cbSize;
DWORD protocolVersion;
PVIRTUALCHANNELINIT pVirtualChannelInit;
PVIRTUALCHANNELOPEN pVirtualChannelOpen;
PVIRTUALCHANNELCLOSE pVirtualChannelClose;
PVIRTUALCHANNELWRITE pVirtualChannelWrite;
} CHANNEL_ENTRY_POINTS, FAR * PCHANNEL_ENTRY_POINTS;
/****************************************************************************/
/* Name: VirtualChannelEntry */
/* */
/* Purpose: */
/* */
/* This function is provided by addin DLLS. It is called by MSTSC at */
/* initialization to tell the addin DLL the addresses of the */
/* VirtualChannelXxx functions. */
/* */
/* Returns: */
/* */
/* TRUE - everything OK */
/* FALSE - error, unload the DLL */
/* */
/* Parameters: */
/* */
/* - pVirtualChannelInit - pointers to VirtualChannelXxx functions */
/* - pVirtualChannelOpen */
/* - pVirtualChannelClose */
/* - pVirtualChannelWrite */
/* */
/****************************************************************************/
typedef BOOL VCAPITYPE VIRTUALCHANNELENTRY(
PCHANNEL_ENTRY_POINTS pEntryPoints);
typedef VIRTUALCHANNELENTRY FAR * PVIRTUALCHANNELENTRY;
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* H_CCHANNEL */

4543
BuildTools/Include/CDONTS.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,909 @@
import "oaidl.idl";
import "ocidl.idl";
import "msado15.idl";
interface IMessage;
interface IMessages;
interface IBodyPart;
interface IConfiguration;
interface IBodyParts;
interface IDataSource;
[helpstring("Used with the IConfiguration.Load method to specify which default configuration values are to be loaded.")]
typedef enum CdoConfigSource
{
[helpstring("Load all applicable default values from both Outlook Express (OE) and Internet Information Services.")]
cdoDefaults = -1,
[helpstring("Load configuration default values from the local Internet Information Service.")]
cdoIIS = 1,
[helpstring("Load configuration values from the default identify of the default Outlook Express account.")]
cdoOutlookExpress = 2,
} CdoConfigSource;
[helpstring("Used to set or examine the IMessage.DSNOptions property, the value of which identifies the condition(s) under which Delivery Status Notifications (DSNs) are to be sent.")]
typedef enum CdoDSNOptions
{
[helpstring("No DSN commands are issued.")]
cdoDSNDefault = 0,
[helpstring("No DSNs are issued.")]
cdoDSNNever = 1,
[helpstring("Return an DSN if delivery fails.")]
cdoDSNFailure = 2,
[helpstring("Return a DSN if delivery succeeds.")]
cdoDSNSuccess = 4,
[helpstring("Return a DSN if delivery is delayed.")]
cdoDSNDelay = 8,
[helpstring("Return a DSN if delivery succeeds, fails, or is delayed.")]
cdoDSNSuccessFailOrDelay = 14,
} CdoDSNOptions;
[helpstring("Passed to SMTP-NNTP transport event sinks through corresponding event methods and used by sinks to indicate to the event source whether or not they have consumed the event.")]
typedef enum CdoEventStatus
{
[helpstring("Proceed to run the next sink.")]
cdoRunNextSink = 0,
[helpstring("Do not notify (skip) any remaining sinks for the event (i.e. this sink has consumed the event).")]
cdoSkipRemainingSinks = 1,
} CdoEventStatus;
typedef enum CdoEventType
{
cdoSMTPOnArrival = 1,
cdoNNTPOnPostEarly = 2,
cdoNNTPOnPost = 3,
cdoNNTPOnPostFinal = 4,
} CdoEventType;
typedef enum cdoImportanceValues
{
cdoLow = 0,
cdoNormal = 1,
cdoHigh = 2,
} cdoImportanceValues;
[helpstring("Used by SMTP transport event sinks to set or examine the http://schemas.microsoft.com/cdo/smtpenvelope/messagestatus property, the value of which indicates the current message status.")]
typedef enum CdoMessageStat
{
[helpstring("Success. Proceed to deliver message.")]
cdoStatSuccess = 0,
[helpstring("Discard message and do not deliver.")]
cdoStatAbortDelivery = 2,
[helpstring("Do not deliver message and place it in the bad mail location.")]
cdoStatBadMail = 3,
} CdoMessageStat;
[helpstring("Used with the IMessage.CreateMHTMLBody method to specify what resource types referenced within the page specified by the URL parameter should not be downloaded.")]
typedef enum CdoMHTMLFlags
{
[helpstring("Download all resources referred to in elements within the resource at the specified URI. (not recursive)")]
cdoSuppressNone = 0,
[helpstring("Do not download resources referred to in IMG elements.")]
cdoSuppressImages = 1,
[helpstring("Do not download resources referred to in BGSOUND elements.")]
cdoSuppressBGSounds = 2,
[helpstring("Do not download resources referred to in FRAME elements.")]
cdoSuppressFrames = 4,
[helpstring("Do not download resources referred to in OBJECT elements.")]
cdoSuppressObjects = 8,
[helpstring("Do not download resources referred to in LINK elements.")]
cdoSuppressStyleSheets = 16,
[helpstring("Do not download any resources referred to from within the page.")]
cdoSuppressAll = 31,
} CdoMHTMLFlags;
[helpstring("Used by NNTP transport event sinks to set or examine the http://schemas.microsoft.com/cdo/nntpenvelope/nntpprocessing property, the value of which indicates what message processing is to occur.")]
typedef enum CdoNNTPProcessingField
{
[helpstring("Post the message.")]
cdoPostMessage = 1,
[helpstring("Send message through process control.")]
cdoProcessControl = 2,
[helpstring("Send message to moderator.")]
cdoProcessModerator = 4,
} CdoNNTPProcessingField;
[helpstring("Used with the http://schemas.microsoft.com/cdo/configuration/postusing property, the value of which specifies how a message is to be posted.")]
typedef enum CdoPostUsing
{
[helpstring(" Post the message using the local NNTP Service pickup directory.")]
cdoPostUsingPickup = 1,
[helpstring(" Post the message using the NNTP protocol over the network.")]
cdoPostUsingPort = 2,
} CdoPostUsing;
typedef enum cdoPriorityValues
{
cdoPriorityNonUrgent = -1,
cdoPriorityNormal = 0,
cdoPriorityUrgent = 1,
} cdoPriorityValues;
[helpstring("Used with the http://schemas.microsoft.com/cdo/configuration/smtpauthenticate and http://schemas.microsoft.com/cdo/configuration/nntpauthenticate properties, the values of which specify the network authentication mechansim to use when sending messages.")]
typedef enum CdoProtocolsAuthentication
{
[helpstring("Perform no authentication (anonymous)")]
cdoAnonymous = 0,
[helpstring("Use the basic (clear text) authentication mechanism.")]
cdoBasic = 1,
[helpstring("Use the NTLM authentication mechanism")]
cdoNTLM = 2,
} CdoProtocolsAuthentication;
[helpstring("Used with the IMessage.AddRelatedBodyPart method to specify how the new body part is to be referenced within the related HTML body part.")]
typedef enum CdoReferenceType
{
[helpstring("The reference paramter contains a value for the Content-ID header. The HTML body refers to the resource using this Content-ID header")]
cdoRefTypeId = 0,
[helpstring("The reference parameter contains a value for the Content-Location MIME header. The HTML body refers to this resource using this message-relative URL.")]
cdoRefTypeLocation = 1,
} CdoReferenceType;
[helpstring(" Used with the http://schemas.microsoft.com/cdo/configuration/sendusing property, the value of which specifies how a message is to be sent.")]
typedef enum CdoSendUsing
{
[helpstring("Send message using the local SMTP service pickup directory.")]
cdoSendUsingPickup = 1,
[helpstring("Send the message using the SMTP protocol over the network.")]
cdoSendUsingPort = 2,
} CdoSendUsing;
typedef enum cdoSensitivityValues
{
cdoSensitivityNone = 0,
cdoPersonal = 1,
cdoPrivate = 2,
cdoCompanyConfidential = 3,
} cdoSensitivityValues;
[helpstring("Used to set or examine the urn:schemas:calendar:timezoneid property, the value of which specifies the local timezone to use when returning Date properties.")]
typedef enum CdoTimeZoneId
{
[helpstring("(UTC) Universal Coordinated Time")]
cdoUTC = 0,
[helpstring("(GMT) Greenwich Mean Time; Dublin, Edinburgh, London")]
cdoGMT = 1,
[helpstring("(GMT+01:00) Lisbon, Warsaw")]
cdoLisbon = 2,
[helpstring("(GMT+01:00) Paris, Madrid")]
cdoParis = 3,
[helpstring("(GMT+01:00) Berlin, Stockholm, Rome, Bern, Brussels, Vienna")]
cdoBerlin = 4,
[helpstring("(GMT+02:00) Eastern Europe")]
cdoEasternEurope = 5,
[helpstring("(GMT+01:00) Prague")]
cdoPrague = 6,
[helpstring("(GMT+02:00) Athens, Helsinki, Istanbul")]
cdoAthens = 7,
[helpstring("(GMT-03:00) Brasilia")]
cdoBrasilia = 8,
[helpstring("(GMT-04:00) Atlantic Time (Canada)")]
cdoAtlanticCanada = 9,
[helpstring("(GMT-05:00) Eastern Time (US & Canada)")]
cdoEastern = 10,
[helpstring("(GMT-06:00) Central Time (US & Canada)")]
cdoCentral = 11,
[helpstring("(GMT-07:00) Mountain Time (US & Canada)")]
cdoMountain = 12,
[helpstring("(GMT-08:00) Pacific Time (US & Canada); Tijuana")]
cdoPacific = 13,
[helpstring("(GMT-09:00) Alaska")]
cdoAlaska = 14,
[helpstring("(GMT-10:00) Hawaii")]
cdoHawaii = 15,
[helpstring("(GMT-11:00) Midway Island, Samoa")]
cdoMidwayIsland = 16,
[helpstring("(GMT+12:00) Wellington, Auckland")]
cdoWellington = 17,
[helpstring("(GMT+10:00) Brisbane, Melbourne, Sydney")]
cdoBrisbane = 18,
[helpstring("(GMT+09:30) Adelaide")]
cdoAdelaide = 19,
[helpstring("(GMT+09:00) Tokyo, Osaka, Sapporo, Seoul, Yakutsk")]
cdoTokyo = 20,
[helpstring("(GMT+08:00) Hong Kong, Perth, Singapore, Taipei")]
cdoHongKong = 21,
[helpstring("(GMT+07:00) Bangkok, Jakarta, Hanoi")]
cdoBangkok = 22,
[helpstring("(GMT+05:30) Bombay, Calcutta, Madras, New Delhi, Colombo")]
cdoBombay = 23,
[helpstring("(GMT+04:00) Abu Dhabi, Muscat, Tbilisi, Kazan, Volgograd")]
cdoAbuDhabi = 24,
[helpstring("(GMT+03:30) Tehran")]
cdoTehran = 25,
[helpstring("(GMT+03:00) Baghdad, Kuwait, Nairobi, Riyadh")]
cdoBaghdad = 26,
[helpstring("(GMT+02:00) Israel")]
cdoIsrael = 27,
[helpstring("(GMT-03:30) Newfoundland")]
cdoNewfoundland = 28,
[helpstring("(GMT-01:00) Azores, Cape Verde Is.")]
cdoAzores = 29,
[helpstring("(GMT-02:00) Mid-Atlantic")]
cdoMidAtlantic = 30,
[helpstring("(GMT) Monrovia, Casablanca")]
cdoMonrovia = 31,
[helpstring("(GMT-03:00) Buenos Aires, Georgetown")]
cdoBuenosAires = 32,
[helpstring("(GMT-04:00) Caracas, La Paz")]
cdoCaracas = 33,
[helpstring("(GMT-05:00) Indiana (East)")]
cdoIndiana = 34,
[helpstring("(GMT-05:00) Bogota, Lima")]
cdoBogota = 35,
[helpstring("(GMT-06:00) Saskatchewan")]
cdoSaskatchewan = 36,
[helpstring("(GMT-06:00) Mexico City, Tegucigalpa")]
cdoMexicoCity = 37,
[helpstring("(GMT-07:00) Arizona")]
cdoArizona = 38,
[helpstring("(GMT-12:00) Eniwetok, Kwajalein")]
cdoEniwetok = 39,
[helpstring("(GMT+12:00) Fiji, Kamchatka, Marshall Is.")]
cdoFiji = 40,
[helpstring("(GMT+11:00) Magadan, Solomon Is., New Caledonia")]
cdoMagadan = 41,
[helpstring("(GMT+10:00) Hobart")]
cdoHobart = 42,
[helpstring("(GMT+10:00) Guam, Port Moresby, Vladivostok")]
cdoGuam = 43,
[helpstring("(GMT+09:30) Darwin")]
cdoDarwin = 44,
[helpstring("(GMT+08:00) Beijing, Chongqing, Urumqi")]
cdoBeijing = 45,
[helpstring("(GMT+06:00) Almaty, Dhaka")]
cdoAlmaty = 46,
[helpstring("(GMT+05:00) Islamabad, Karachi, Sverdlovsk, Tashkent")]
cdoIslamabad = 47,
[helpstring("(GMT+04:30) Kabul")]
cdoKabul = 48,
[helpstring("(GMT+02:00) Cairo")]
cdoCairo = 49,
[helpstring("(GMT+02:00) Harare, Pretoria")]
cdoHarare = 50,
[helpstring("(GMT+03:00) Moscow, St. Petersburg")]
cdoMoscow = 51,
cdoInvalidTimeZone = 52,
} CdoTimeZoneId;
[ object, uuid(CD000029-8B95-11D1-82DB-00C04FB1625D), dual, nonextensible, helpstring("Defines abstract methods and properties used to extract messages from or embed messages into other CDO message body parts"), helpcontext(0x00000100), pointer_default(unique) ] interface IDataSource : IDispatch
{
[ id( 207 ), propget, helpstring( "Returns the name (type) of the interface originally used to bind the object" ), helpcontext( 0x00000101 ), readonly ] HRESULT SourceClass ([out,retval] BSTR* varSourceClass);
[ id( 208 ), propget, helpstring( "Returns the currently bound object" ), helpcontext( 0x00000102 ), readonly ] HRESULT Source ([out,retval] IUnknown** varSource);
[ id( 209 ), propget, helpstring( "Indicates whether or not the local data has been changed since the last save or bind operation" ), helpcontext(0x00000103) ] HRESULT IsDirty ([out,retval] VARIANT_BOOL* pIsDirty); [ id( 209 ), propput, helpstring( "Indicates whether or not the local data has been changed since the last save or bind operation" ), helpcontext(0x00000103) ] HRESULT IsDirty ([in] VARIANT_BOOL varIsDirty);
[ id( 210 ), propget, helpstring( "Not Implemented. Reserved for future use" ), helpcontext( 0x00000104 ), readonly ] HRESULT SourceURL ([out,retval] BSTR* varSourceURL);
[ id( 211 ), propget, helpstring( "Not Implemented. Reserved for future use" ), helpcontext( 0x00000105 ), readonly ] HRESULT ActiveConnection ([out,retval] _Connection** varActiveConnection);
[ id( 251 ), helpstring ( "Binds to and saves data into the specified object" ), helpcontext( 0x00000106 ) ] HRESULT SaveToObject(
[in] IUnknown* Source,
[in] BSTR InterfaceName);
[ id( 252 ), helpstring ( "Binds to and opens data from the specified object" ), helpcontext( 0x00000108 ) ] HRESULT OpenObject(
[in] IUnknown* Source,
[in] BSTR InterfaceName);
[ id( 253 ), helpstring ( "Not Implemented. Reserved for future use" ), helpcontext( 0x00000109 ) ] HRESULT SaveTo(
[in] BSTR SourceURL,
[in, defaultvalue(0)] IDispatch* ActiveConnection,
[in, optional] ConnectModeEnum Mode,
[in, optional] RecordCreateOptionsEnum CreateOptions,
[in, optional] RecordOpenOptionsEnum Options,
[in, optional] BSTR UserName,
[in, optional] BSTR Password);
[ id( 254 ), helpstring ( "Not implemented. Reserved for future use" ), helpcontext( 0x0000010a ) ] HRESULT Open(
[in] BSTR SourceURL,
[in, defaultvalue(0)] IDispatch* ActiveConnection,
[in, optional] ConnectModeEnum Mode,
[in, optional] RecordCreateOptionsEnum CreateOptions,
[in, optional] RecordOpenOptionsEnum Options,
[in, optional] BSTR UserName,
[in, optional] BSTR Password);
[ id( 255 ), helpstring ( "Saves data into the currently bound object" ), helpcontext( 0x0000010b ) ] HRESULT Save();
[ id( 256 ), helpstring ( "Not Implemented. Reserved for future use" ), helpcontext( 0x00000107 ) ] HRESULT SaveToContainer(
[in] BSTR ContainerURL,
[in, defaultvalue(0)] IDispatch* ActiveConnection,
[in, optional] ConnectModeEnum Mode,
[in, optional] RecordCreateOptionsEnum CreateOptions,
[in, optional] RecordOpenOptionsEnum Options,
[in, optional] BSTR UserName,
[in, optional] BSTR Password);
};
[ object, uuid(CD000020-8B95-11D1-82DB-00C04FB1625D), dual, nonextensible, helpstring("Defines abstract methods and properties used to manage a complete message"), helpcontext(0x00000110), pointer_default(unique) ] interface IMessage : IDispatch
{
[ id( 101 ), propget, helpstring( "The intended blind carbon copy (BCC header) recipients" ), helpcontext(0x00000111) ] HRESULT BCC ([out,retval] BSTR* pBCC); [ id( 101 ), propput, helpstring( "The intended blind carbon copy (BCC header) recipients" ), helpcontext(0x00000111) ] HRESULT BCC ([in] BSTR varBCC);
[ id( 103 ), propget, helpstring( "The intended secondary (carbon copy) recipients" ), helpcontext(0x00000112) ] HRESULT CC ([out,retval] BSTR* pCC); [ id( 103 ), propput, helpstring( "The intended secondary (carbon copy) recipients" ), helpcontext(0x00000112) ] HRESULT CC ([in] BSTR varCC);
[ id( 105 ), propget, helpstring( "The recipient to which follow up messages should be sent" ), helpcontext(0x00000113) ] HRESULT FollowUpTo ([out,retval] BSTR* pFollowUpTo); [ id( 105 ), propput, helpstring( "The recipient to which follow up messages should be sent" ), helpcontext(0x00000113) ] HRESULT FollowUpTo ([in] BSTR varFollowUpTo);
[ id( 106 ), propget, helpstring( "The principle recipients from which the message is sent" ), helpcontext(0x00000114) ] HRESULT From ([out,retval] BSTR* pFrom); [ id( 106 ), propput, helpstring( "The principle recipients from which the message is sent" ), helpcontext(0x00000114) ] HRESULT From ([in] BSTR varFrom);
[ id( 107 ), propget, helpstring( "The keywords for the message" ), helpcontext(0x00000115) ] HRESULT Keywords ([out,retval] BSTR* pKeywords); [ id( 107 ), propput, helpstring( "The keywords for the message" ), helpcontext(0x00000115) ] HRESULT Keywords ([in] BSTR varKeywords);
[ id( 110 ), propget, helpstring( "Specifies whether or not the message is to be formatted using MIME (True) or UUEncode (False)" ), helpcontext(0x00000116) ] HRESULT MimeFormatted ([out,retval] VARIANT_BOOL* pMimeFormatted); [ id( 110 ), propput, helpstring( "Specifies whether or not the message is to be formatted using MIME (True) or UUEncode (False)" ), helpcontext(0x00000116) ] HRESULT MimeFormatted ([in] VARIANT_BOOL varMimeFormatted);
[ id( 111 ), propget, helpstring( "The names of newsgroups (NewsGroups header) to which the message is to be posted" ), helpcontext(0x00000117) ] HRESULT Newsgroups ([out,retval] BSTR* pNewsgroups); [ id( 111 ), propput, helpstring( "The names of newsgroups (NewsGroups header) to which the message is to be posted" ), helpcontext(0x00000117) ] HRESULT Newsgroups ([in] BSTR varNewsgroups);
[ id( 112 ), propget, helpstring( "The organization of the sender" ), helpcontext(0x00000118) ] HRESULT Organization ([out,retval] BSTR* pOrganization); [ id( 112 ), propput, helpstring( "The organization of the sender" ), helpcontext(0x00000118) ] HRESULT Organization ([in] BSTR varOrganization);
[ id( 114 ), propget, helpstring( "Returns the time the message was received" ), helpcontext( 0x00000119 ), readonly ] HRESULT ReceivedTime ([out,retval] DATE* varReceivedTime);
[ id( 115 ), propget, helpstring( "The addresses (Reply-To header) to which to reply" ), helpcontext(0x0000011a) ] HRESULT ReplyTo ([out,retval] BSTR* pReplyTo); [ id( 115 ), propput, helpstring( "The addresses (Reply-To header) to which to reply" ), helpcontext(0x0000011a) ] HRESULT ReplyTo ([in] BSTR varReplyTo);
[ id( 116 ), propget, helpstring( "The delivery status notification options for the message" ), helpcontext(0x0000011b) ] HRESULT DSNOptions ([out,retval] CdoDSNOptions* pDSNOptions); [ id( 116 ), propput, helpstring( "The delivery status notification options for the message" ), helpcontext(0x0000011b) ] HRESULT DSNOptions ([in] CdoDSNOptions varDSNOptions);
[ id( 119 ), propget, helpstring( "The date on which the message was sent" ), helpcontext( 0x0000011c ), readonly ] HRESULT SentOn ([out,retval] DATE* varSentOn);
[ id( 120 ), propget, helpstring( "The subject (Subject header) of the message" ), helpcontext(0x0000011d) ] HRESULT Subject ([out,retval] BSTR* pSubject); [ id( 120 ), propput, helpstring( "The subject (Subject header) of the message" ), helpcontext(0x0000011d) ] HRESULT Subject ([in] BSTR varSubject);
[ id( 121 ), propget, helpstring( "The principle (To header) recipients of the message" ), helpcontext(0x0000011e) ] HRESULT To ([out,retval] BSTR* pTo); [ id( 121 ), propput, helpstring( "The principle (To header) recipients of the message" ), helpcontext(0x0000011e) ] HRESULT To ([in] BSTR varTo);
[ id( 123 ), propget, helpstring( "The text/plain portion of the message body" ), helpcontext(0x0000011f) ] HRESULT TextBody ([out,retval] BSTR* pTextBody); [ id( 123 ), propput, helpstring( "The text/plain portion of the message body" ), helpcontext(0x0000011f) ] HRESULT TextBody ([in] BSTR varTextBody);
[ id( 124 ), propget, helpstring( "The text/html portion of the message body" ), helpcontext(0x00000120) ] HRESULT HTMLBody ([out,retval] BSTR* pHTMLBody); [ id( 124 ), propput, helpstring( "The text/html portion of the message body" ), helpcontext(0x00000120) ] HRESULT HTMLBody ([in] BSTR varHTMLBody);
[ id( 125 ), propget, helpstring( "Returns the message's Attachments collection" ), helpcontext( 0x00000121 ), readonly ] HRESULT Attachments ([out,retval] IBodyParts ** varAttachments);
[ id( 126 ), propget, helpstring( "The sender of the message" ), helpcontext(0x00000122) ] HRESULT Sender ([out,retval] BSTR* pSender); [ id( 126 ), propput, helpstring( "The sender of the message" ), helpcontext(0x00000122) ] HRESULT Sender ([in] BSTR varSender);
[ id( 127 ), propget, helpstring( "The object's associated Configuration object" ), helpcontext( 0x00000123) ] HRESULT Configuration ([out,retval] IConfiguration ** pConfiguration); [ id( 127 ), propput, helpstring( "The object's associated Configuration object" ), helpcontext( 0x00000123 ) ] HRESULT Configuration ([in] IConfiguration * varConfiguration); [ id( 127 ), propputref, helpstring( "The object's associated Configuration object" ), helpcontext( 0x00000123 ) ] HRESULT Configuration ([in] IConfiguration * varConfiguration);
[ id( 128 ), propget, helpstring( "Specifies whether a text/plain alternate representation should automatically be generated from the text/html part of the message body" ), helpcontext(0x00000124) ] HRESULT AutoGenerateTextBody ([out,retval] VARIANT_BOOL* pAutoGenerateTextBody); [ id( 128 ), propput, helpstring( "Specifies whether a text/plain alternate representation should automatically be generated from the text/html part of the message body" ), helpcontext(0x00000124) ] HRESULT AutoGenerateTextBody ([in] VARIANT_BOOL varAutoGenerateTextBody);
[ id( 129 ), propget, helpstring( "Returns the transport envelope Fields collection for the message (transport event sinks only) " ), helpcontext( 0x00000125 ), readonly ] HRESULT EnvelopeFields ([out,retval] Fields ** varEnvelopeFields);
[ id( 130 ), propget, helpstring( "Returns the BodyPart object (IBodyPart interface) containing the text/plain part of the message body" ), helpcontext( 0x00000126 ), readonly ] HRESULT TextBodyPart ([out,retval] IBodyPart ** varTextBodyPart);
[ id( 131 ), propget, helpstring( "Returns the BodyPart object (IBodyPart interface) containing the text/html portion of the message body" ), helpcontext( 0x00000127 ), readonly ] HRESULT HTMLBodyPart ([out,retval] IBodyPart ** varHTMLBodyPart);
[ id( 132 ), propget, helpstring( "Returns the IBodyPart interface on the object" ), helpcontext( 0x00000128 ), readonly ] HRESULT BodyPart ([out,retval] IBodyPart ** varBodyPart);
[ id( 133 ), propget, helpstring( "Returns the IDataSource interface on the object" ), helpcontext( 0x00000129 ), readonly ] HRESULT DataSource ([out,retval] IDataSource ** varDataSource);
[ id( 134 ), propget, helpstring( "Returns the Fields collection for the message" ), helpcontext( 0x0000012a ), readonly ] HRESULT Fields ([out,retval] Fields ** varFields);
[ id( 135 ), propget, helpstring( "Specifies whether or not mail delivery notifications should be sent when the message is received" ), helpcontext(0x0000012b) ] HRESULT MDNRequested ([out,retval] VARIANT_BOOL* pMDNRequested); [ id( 135 ), propput, helpstring( "Specifies whether or not mail delivery notifications should be sent when the message is received" ), helpcontext(0x0000012b) ] HRESULT MDNRequested ([in] VARIANT_BOOL varMDNRequested);
[ id( 150 ), helpstring ( "Adds a BodyPart object with content referenced within the text/html portion of the message body" ), helpcontext( 0x0000012c ) ] HRESULT AddRelatedBodyPart(
[in] BSTR URL,
[in] BSTR Reference,
[in] CdoReferenceType ReferenceType,
[in, optional] BSTR UserName,
[in, optional] BSTR Password,
[out,retval] IBodyPart **ppBody);
[ id( 151 ), helpstring ( "Adds an attachment (BodyPart) to the message" ), helpcontext( 0x0000012d ) ] HRESULT AddAttachment(
[in] BSTR URL,
[in, optional] BSTR UserName,
[in, optional] BSTR Password,
[out,retval] IBodyPart **ppBody);
[ id( 152 ), helpstring ( "Creates an MHTML-formatted message body using the contents at the specified URL" ), helpcontext( 0x0000012e ) ] HRESULT CreateMHTMLBody(
[in] BSTR URL,
[in, defaultvalue(cdoSuppressNone)] CdoMHTMLFlags Flags,
[in, optional] BSTR UserName,
[in, optional] BSTR Password);
[ id( 153 ), helpstring ( "Returns a Message object that can be used to forward the message" ), helpcontext( 0x0000012f ) ] HRESULT Forward(
[out,retval] IMessage **ppMsg);
[ id( 154 ), helpstring ( "Post the message using the method specified in the associated Configuration object" ), helpcontext( 0x00000130 ) ] HRESULT Post();
[ id( 155 ), helpstring ( "Returns a Message object that can be used to post a reply to the message" ), helpcontext( 0x00000131 ) ] HRESULT PostReply(
[out,retval] IMessage **ppMsg);
[ id( 156 ), helpstring ( "Returns a Message object that can be used to reply to the message" ), helpcontext( 0x00000132 ) ] HRESULT Reply(
[out,retval] IMessage **ppMsg);
[ id( 157 ), helpstring ( "Returns a Message object that can be used to post a reply to all recipients of the message" ), helpcontext( 0x00000133 ) ] HRESULT ReplyAll(
[out,retval] IMessage **ppMsg);
[ id( 158 ), helpstring ( "Send the message using the method specified in the associated Configuration object" ), helpcontext( 0x00000136 ) ] HRESULT Send();
[ id( 159 ), helpstring ( "Returns a Stream object containing the message in serialized format" ), helpcontext( 0x00000134 ) ] HRESULT GetStream(
[out,retval] _Stream **ppStream);
[ id( 160 ), helpstring ( "Returns the specified interface on the object" ), helpcontext( 0x00000135 ) ] HRESULT GetInterface(
[in] BSTR Interface,
[out, retval] IDispatch** ppUnknown);
};
[ object, uuid(CD000021-8B95-11D1-82DB-00C04FB1625D), dual, nonextensible, helpstring("Defines abstract methods and properties used to manage a message body part"), helpcontext(0x00000140), pointer_default(unique) ] interface IBodyPart : IDispatch
{
[ id( 200 ), propget, helpstring( "Returns the object's BodyParts collection" ), helpcontext( 0x00000141 ), readonly ] HRESULT BodyParts ([out,retval] IBodyParts ** varBodyParts);
[ id( 201 ), propget, helpstring( "The encoding mechanism for the body part's content" ), helpcontext(0x00000142) ] HRESULT ContentTransferEncoding ([out,retval] BSTR* pContentTransferEncoding); [ id( 201 ), propput, helpstring( "The encoding mechanism for the body part's content" ), helpcontext(0x00000142) ] HRESULT ContentTransferEncoding ([in] BSTR varContentTransferEncoding);
[ id( 202 ), propget, helpstring( "The content media type portion of the body part's content type" ), helpcontext(0x00000143) ] HRESULT ContentMediaType ([out,retval] BSTR* pContentMediaType); [ id( 202 ), propput, helpstring( "The content media type portion of the body part's content type" ), helpcontext(0x00000143) ] HRESULT ContentMediaType ([in] BSTR varContentMediaType);
[ id( 203 ), propget, helpstring( "Returns the Fields collection for the body part" ), helpcontext( 0x00000144 ), readonly ] HRESULT Fields ([out,retval] Fields ** varFields);
[ id( 204 ), propget, helpstring( "The character set of the body part text content (not applicable for non-text content types)" ), helpcontext(0x00000145) ] HRESULT Charset ([out,retval] BSTR* pCharset); [ id( 204 ), propput, helpstring( "The character set of the body part text content (not applicable for non-text content types)" ), helpcontext(0x00000145) ] HRESULT Charset ([in] BSTR varCharset);
[ id( 205 ), propget, helpstring( "Returns the value of the filename parameter for the content-disposition MIME header" ), helpcontext( 0x00000146 ), readonly ] HRESULT FileName ([out,retval] BSTR* varFileName);
[ id( 207 ), propget, helpstring( "Returns the IDataSource interface on the object" ), helpcontext( 0x00000147 ), readonly ] HRESULT DataSource ([out,retval] IDataSource ** varDataSource);
[ id( 208 ), propget, helpstring( "The content class for the body part's content" ), helpcontext(0x00000148) ] HRESULT ContentClass ([out,retval] BSTR* pContentClass); [ id( 208 ), propput, helpstring( "The content class for the body part's content" ), helpcontext(0x00000148) ] HRESULT ContentClass ([in] BSTR varContentClass);
[ id( 209 ), propget, helpstring( "The friendly name for the body part's content class" ), helpcontext(0x00000149) ] HRESULT ContentClassName ([out,retval] BSTR* pContentClassName); [ id( 209 ), propput, helpstring( "The friendly name for the body part's content class" ), helpcontext(0x00000149) ] HRESULT ContentClassName ([in] BSTR varContentClassName);
[ id( 210 ), propget, helpstring( "Returns the parent object in the body part hierarchy" ), helpcontext( 0x0000014a ), readonly ] HRESULT Parent ([out,retval] IBodyPart** varParent);
[ id( 250 ), helpstring ( "Adds a body part to the object's BodyParts collection" ), helpcontext( 0x0000014b ) ] HRESULT AddBodyPart(
[in, defaultvalue(-1)] long Index,
[out, retval] IBodyPart **ppPart);
[ id( 251 ), helpstring ( "Saves the body part contents to the specified file" ), helpcontext( 0x0000014c ) ] HRESULT SaveToFile(
[in] BSTR FileName);
[ id( 252 ), helpstring ( "Returns a Stream object containing the body part content in serialized, encoded format" ), helpcontext( 0x0000014d ) ] HRESULT GetEncodedContentStream(
[out, retval]_Stream **ppStream);
[ id( 253 ), helpstring ( "Returns a Stream object containing the body part content in serialized, decoded format" ), helpcontext( 0x0000014e ) ] HRESULT GetDecodedContentStream(
[out, retval]_Stream **ppStream);
[ id( 254 ), helpstring ( "Returns a Stream object containing the complete body part in serialized, encoded format" ), helpcontext( 0x0000014f ) ] HRESULT GetStream(
[out,retval] _Stream **ppStream);
[ id( 255 ), helpstring ( "Returns the specified parameter from the body part's specified MIME header" ), helpcontext( 0x00000150 ) ] HRESULT GetFieldParameter(
[in] BSTR FieldName,
[in] BSTR Parameter,
[out, retval] BSTR* pbstrValue);
[ id( 160 ), helpstring ( "Returns the specified interface on the object" ), helpcontext( 0x00000151 ) ] HRESULT GetInterface(
[in] BSTR Interface,
[out, retval] IDispatch** ppUnknown);
};
[ object, uuid(CD000022-8B95-11D1-82DB-00C04FB1625D), dual, nonextensible, helpstring("Defines abstract methods and properties used to manage configuration information for CDO objects"), helpcontext(0x00000160), pointer_default(unique) ] interface IConfiguration : IDispatch
{
[ id( 0 ), propget, helpstring( "Returns the Fields collection for the object" ), helpcontext( 0x00000161 ), readonly ] HRESULT Fields ([out,retval] Fields ** varFields);
[ id( 50 ), helpstring ( "Loads the specified configuration" ), helpcontext( 0x00000162 ) ] HRESULT Load(
[in] CdoConfigSource LoadFrom,
[in, optional] BSTR URL);
[ id( 160 ), helpstring ( "Returns the specified interface on the object" ), helpcontext( 0x00000163 ) ] HRESULT GetInterface(
[in] BSTR Interface,
[out, retval] IDispatch** ppUnknown);
};
[ object, uuid(CD000025-8B95-11D1-82DB-00C04FB1625D), dual, nonextensible, helpstring("Defines abstract methods and properties used to manage a collection of Message objects on the file system. Returned by IDropDirectory.GetMessages"), helpcontext(0x00000180), pointer_default(unique) ] interface IMessages : IDispatch
{
[
id( 0 ),
propget,
helpstring( "Returns the message specified by index from the collection" ),
helpcontext( 0x00000181 ),
readonly
] HRESULT Item (long Index,
[out, retval] IMessage **ppMessage);
[ id( 1 ), propget, helpstring( "Returns the number of message objects in the collection" ), helpcontext( 0x00000182 ), readonly ] HRESULT Count ([out,retval] long* varCount);
[ id( 2 ), helpstring ( "Deletes the specifed message object in the collection" ), helpcontext( 0x00000183 ) ] HRESULT Delete(
[in] long Index);
[ id( 3 ), helpstring ( "Deletes all message objects in the collection" ), helpcontext( 0x00000184 ) ] HRESULT DeleteAll();
[propget, restricted, id(DISPID_NEWENUM)]
HRESULT _NewEnum(
[out, retval] IUnknown** retval);
[
id( 5 ),
propget,
helpstring( "Returns the name of the file containing the specified message on the file system" ),
helpcontext( 0x00000185 ),
readonly
] HRESULT Filename (VARIANT var,
[out, retval] BSTR *Filename);
};
[ object, uuid(CD000024-8B95-11D1-82DB-00C04FB1625D), dual, nonextensible, helpstring("Defines abstract methods and properties used to manage a collection of messages on the file system"), helpcontext(0x00000190), pointer_default(unique) ] interface IDropDirectory : IDispatch
{
[
id( 200 ),
helpstring( "Returns a collection of messages contained in the specified directory on the file system. Default is SMTP drop directory." ),
helpcontext( 0x00000191 ),
readonly
]
HRESULT GetMessages ([in, optional] BSTR DirName,
[out,retval] IMessages** Msgs);
};
[ object, uuid(CD000023-8B95-11D1-82DB-00C04FB1625D), dual, nonextensible, helpstring("Defines abstract methods and properties used to manage a collection of BodyPart objects"), helpcontext(0x00000170), pointer_default(unique) ] interface IBodyParts : IDispatch
{
[ id( 1 ), propget, helpstring( "Returns the number of BodyPart objects in the collection" ), helpcontext( 0x00000171 ), readonly ] HRESULT Count ([out,retval] long* varCount);
[
id( 0 ),
propget,
helpstring( "Returns the specified BodyPart object from the collection" ),
helpcontext( 0x00000172 ),
readonly
]
HRESULT Item (
[in] long Index,
[out, retval] IBodyPart **ppBody);
[propget, restricted, id(DISPID_NEWENUM)]
HRESULT _NewEnum(
[out, retval] IUnknown** retval);
[ id( 2 ), helpstring ( "Deletes the specified BodyPart object from the collection. Can use index or object reference" ), helpcontext( 0x00000173 ) ] HRESULT Delete(
[in] VARIANT varBP);
[ id( 3 ), helpstring ( "Deletes all BodyPart objects in the collection" ), helpcontext( 0x00000174 ) ] HRESULT DeleteAll();
[ id( 4 ), helpstring ( "Adds a BodyPart object to the collection at the specified index, and returns the newly added object" ), helpcontext( 0x00000175 ) ] HRESULT Add(
[in, defaultvalue(-1)] long Index,
[out, retval] IBodyPart **ppPart);
};
[ object, uuid(CD000030-8B95-11D1-82DB-00C04FB1625D), dual, nonextensible, helpstring("ISMTPScriptConnector interface"), pointer_default(unique), hidden ] interface ISMTPScriptConnector : IDispatch
{
};
[ object, uuid(CD000034-8B95-11D1-82DB-00C04FB1625D), dual, nonextensible, helpstring("INNTPFinalScriptConnector interface"), pointer_default(unique), hidden ] interface INNTPEarlyScriptConnector : IDispatch
{
};
[ object, uuid(CD000031-8B95-11D1-82DB-00C04FB1625D), dual, nonextensible, helpstring("INNTPPostScriptConnector interface"), pointer_default(unique), hidden ] interface INNTPPostScriptConnector : IDispatch
{
};
[ object, uuid(CD000032-8B95-11D1-82DB-00C04FB1625D), dual, nonextensible, helpstring("INNTPFinalScriptConnector interface"), pointer_default(unique), hidden ] interface INNTPFinalScriptConnector : IDispatch
{
};
[ object, uuid(CD000026-8B95-11D1-82DB-00C04FB1625D), dual, nonextensible, helpstring("The interface to implement when creating SMTP OnArrival event sinks"), helpcontext(0x00000200), pointer_default(unique) ] interface ISMTPOnArrival : IDispatch
{
[ id( 256 ), helpstring ( "Called by the SMTP event source when a message arrives" ), helpcontext( 0x00000201 ) ] HRESULT OnArrival(
[in] IMessage *Msg, [in,out]CdoEventStatus *EventStatus);
};
[ object, uuid(CD000033-8B95-11D1-82DB-00C04FB1625D), dual, nonextensible, helpstring("The interface to implement when creating NNTP OnPostEarly event sinks"), helpcontext(0x00000210), pointer_default(unique) ] interface INNTPOnPostEarly : IDispatch
{
[ id( 256 ), helpstring ( "Called by the NNTP event source when message headers arrive" ), helpcontext( 0x00000211 ) ] HRESULT OnPostEarly(
[in] IMessage *Msg, [in,out]CdoEventStatus *EventStatus);
}
[ object, uuid(CD000027-8B95-11D1-82DB-00C04FB1625D), dual, nonextensible, helpstring("The interface to implement when creating NNTP OnPost event sinks"), helpcontext(0x00000220), pointer_default(unique) ] interface INNTPOnPost : IDispatch
{
[ id( 256 ), helpstring ( "Called by the NNTP event source when a message is posted" ), helpcontext( 0x00000221 ) ] HRESULT OnPost(
[in] IMessage *Msg, [in,out]CdoEventStatus *EventStatus);
};
[ object, uuid(CD000028-8B95-11D1-82DB-00C04FB1625D), dual, nonextensible, helpstring("The interface to implement when creating NNTP OnPostFinal event sinks"), helpcontext(0x00000230), pointer_default(unique) ] interface INNTPOnPostFinal : IDispatch
{
[ id( 256 ), helpstring ( "Called by the NNTP event source after a posted message has been saved to disk or the Exchange store" ), helpcontext( 0x00000231 ) ] HRESULT OnPostFinal(
[in] IMessage *Msg, [in,out]CdoEventStatus *EventStatus);
};
[
uuid(CD000000-8B95-11D1-82DB-00C04FB1625D),
version(1.0),
helpfile("cdosys.chm"),
helpstring("Microsoft CDO for Windows 2000 Library")
]
library CDO
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
importlib("msado15.dll");
enum CdoConfigSource;
enum CdoDSNOptions;
enum CdoEventStatus;
enum cdoImportanceValues;
enum CdoMessageStat;
enum CdoMHTMLFlags;
enum CdoNNTPProcessingField;
enum CdoPostUsing;
enum cdoPriorityValues;
enum CdoProtocolsAuthentication;
enum CdoReferenceType;
enum CdoSendUsing;
enum cdoSensitivityValues;
enum CdoTimeZoneId;
[ dllname("cdosys.dll") ]
module CdoCalendar
{
const BSTR cdoTimeZoneIDURN =L"urn:schemas:calendar:timezoneid";
};
[ dllname("cdosys.dll") ]
module CdoCharset
{
const BSTR cdoBIG5 =L"big5";
const BSTR cdoEUC_JP =L"euc-jp";
const BSTR cdoEUC_KR =L"euc-kr";
const BSTR cdoGB2312 =L"gb2312";
const BSTR cdoISO_2022_JP =L"iso-2022-jp";
const BSTR cdoISO_2022_KR =L"iso-2022-kr";
const BSTR cdoISO_8859_1 =L"iso-8859-1";
const BSTR cdoISO_8859_2 =L"iso-8859-2";
const BSTR cdoISO_8859_3 =L"iso-8859-3";
const BSTR cdoISO_8859_4 =L"iso-8859-4";
const BSTR cdoISO_8859_5 =L"iso-8859-5";
const BSTR cdoISO_8859_6 =L"iso-8859-6";
const BSTR cdoISO_8859_7 =L"iso-8859-7";
const BSTR cdoISO_8859_8 =L"iso-8859-8";
const BSTR cdoISO_8859_9 =L"iso-8859-9";
const BSTR cdoKOI8_R =L"koi8-r";
const BSTR cdoShift_JIS =L"shift-jis";
const BSTR cdoUS_ASCII =L"us-ascii";
const BSTR cdoUTF_7 =L"utf-7";
const BSTR cdoUTF_8 =L"utf-8";
};
[ dllname("cdosys.dll") ]
module CdoConfiguration
{
const BSTR cdoAutoPromoteBodyParts =L"http://schemas.microsoft.com/cdo/configuration/autopromotebodyparts";
const BSTR cdoFlushBuffersOnWrite =L"http://schemas.microsoft.com/cdo/configuration/flushbuffersonwrite";
const BSTR cdoHTTPCookies =L"http://schemas.microsoft.com/cdo/configuration/httpcookies";
const BSTR cdoLanguageCode =L"http://schemas.microsoft.com/cdo/configuration/languagecode";
const BSTR cdoNNTPAccountName =L"http://schemas.microsoft.com/cdo/configuration/nntpaccountname";
const BSTR cdoNNTPAuthenticate =L"http://schemas.microsoft.com/cdo/configuration/nntpauthenticate";
const BSTR cdoNNTPConnectionTimeout =L"http://schemas.microsoft.com/cdo/configuration/nntpconnectiontimeout";
const BSTR cdoNNTPServer =L"http://schemas.microsoft.com/cdo/configuration/nntpserver";
const BSTR cdoNNTPServerPickupDirectory =L"http://schemas.microsoft.com/cdo/configuration/nntpserverpickupdirectory";
const BSTR cdoNNTPServerPort =L"http://schemas.microsoft.com/cdo/configuration/nntpserverport";
const BSTR cdoNNTPUseSSL =L"http://schemas.microsoft.com/cdo/configuration/nntpusessl";
const BSTR cdoPostEmailAddress =L"http://schemas.microsoft.com/cdo/configuration/postemailaddress";
const BSTR cdoPostPassword =L"http://schemas.microsoft.com/cdo/configuration/postpassword";
const BSTR cdoPostUserName =L"http://schemas.microsoft.com/cdo/configuration/postusername";
const BSTR cdoPostUserReplyEmailAddress =L"http://schemas.microsoft.com/cdo/configuration/postuserreplyemailaddress";
const BSTR cdoPostUsingMethod =L"http://schemas.microsoft.com/cdo/configuration/postusing";
const BSTR cdoSaveSentItems =L"http://schemas.microsoft.com/cdo/configuration/savesentitems";
const BSTR cdoSendEmailAddress =L"http://schemas.microsoft.com/cdo/configuration/sendemailaddress";
const BSTR cdoSendPassword =L"http://schemas.microsoft.com/cdo/configuration/sendpassword";
const BSTR cdoSendUserName =L"http://schemas.microsoft.com/cdo/configuration/sendusername";
const BSTR cdoSendUserReplyEmailAddress =L"http://schemas.microsoft.com/cdo/configuration/senduserreplyemailaddress";
const BSTR cdoSendUsingMethod =L"http://schemas.microsoft.com/cdo/configuration/sendusing";
const BSTR cdoSMTPAccountName =L"http://schemas.microsoft.com/cdo/configuration/smtpaccountname";
const BSTR cdoSMTPAuthenticate =L"http://schemas.microsoft.com/cdo/configuration/smtpauthenticate";
const BSTR cdoSMTPConnectionTimeout =L"http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout";
const BSTR cdoSMTPServer =L"http://schemas.microsoft.com/cdo/configuration/smtpserver";
const BSTR cdoSMTPServerPickupDirectory =L"http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory";
const BSTR cdoSMTPServerPort =L"http://schemas.microsoft.com/cdo/configuration/smtpserverport";
const BSTR cdoSMTPUseSSL =L"http://schemas.microsoft.com/cdo/configuration/smtpusessl";
const BSTR cdoURLGetLatestVersion =L"http://schemas.microsoft.com/cdo/configuration/urlgetlatestversion";
const BSTR cdoURLProxyBypass =L"http://schemas.microsoft.com/cdo/configuration/urlproxybypass";
const BSTR cdoURLProxyServer =L"http://schemas.microsoft.com/cdo/configuration/urlproxyserver";
const BSTR cdoUseMessageResponseText =L"http://schemas.microsoft.com/cdo/configuration/usemessageresponsetext";
};
[ dllname("cdosys.dll") ]
module CdoContentTypeValues
{
const BSTR cdoGif =L"image/gif";
const BSTR cdoJpeg =L"image/jpeg";
const BSTR cdoMessageExternalBody =L"message/external-body";
const BSTR cdoMessagePartial =L"message/partial";
const BSTR cdoMessageRFC822 =L"message/rfc822";
const BSTR cdoMultipartAlternative =L"multipart/alternative";
const BSTR cdoMultipartDigest =L"multipart/digest";
const BSTR cdoMultipartMixed =L"multipart/mixed";
const BSTR cdoMultipartRelated =L"multipart/related";
const BSTR cdoTextHTML =L"text/html";
const BSTR cdoTextPlain =L"text/plain";
};
[ dllname("cdosys.dll") ]
module CdoEncodingType
{
const BSTR cdo7bit =L"7bit";
const BSTR cdo8bit =L"8bit";
const BSTR cdoBase64 =L"base64";
const BSTR cdoBinary =L"binary";
const BSTR cdoMacBinHex40 =L"mac-binhex40";
const BSTR cdoQuotedPrintable =L"quoted-printable";
const BSTR cdoUuencode =L"uuencode";
};
[ dllname("cdosys.dll") ]
module CdoExchange
{
const BSTR cdoSensitivity =L"http://schemas.microsoft.com/exchange/sensitivity";
};
[ dllname("cdosys.dll") ]
module CdoHTTPMail
{
const BSTR cdoAttachmentFilename =L"urn:schemas:httpmail:attachmentfilename";
const BSTR cdoBcc =L"urn:schemas:httpmail:bcc";
const BSTR cdoCc =L"urn:schemas:httpmail:cc";
const BSTR cdoContentDispositionType =L"urn:schemas:httpmail:content-disposition-type";
const BSTR cdoContentMediaType =L"urn:schemas:httpmail:content-media-type";
const BSTR cdoDate =L"urn:schemas:httpmail:date";
const BSTR cdoDateReceived =L"urn:schemas:httpmail:datereceived";
const BSTR cdoFrom =L"urn:schemas:httpmail:from";
const BSTR cdoHasAttachment =L"urn:schemas:httpmail:hasattachment";
const BSTR cdoHTMLDescription =L"urn:schemas:httpmail:htmldescription";
const BSTR cdoImportance =L"urn:schemas:httpmail:importance";
const BSTR cdoNormalizedSubject =L"urn:schemas:httpmail:normalizedsubject";
const BSTR cdoPriority =L"urn:schemas:httpmail:priority";
const BSTR cdoReplyTo =L"urn:schemas:httpmail:reply-to";
const BSTR cdoSender =L"urn:schemas:httpmail:sender";
const BSTR cdoSubject =L"urn:schemas:httpmail:subject";
const BSTR cdoTextDescription =L"urn:schemas:httpmail:textdescription";
const BSTR cdoThreadTopic =L"urn:schemas:httpmail:thread-topic";
const BSTR cdoTo =L"urn:schemas:httpmail:to";
};
[ dllname("cdosys.dll") ]
module CdoInterfaces
{
const BSTR cdoAdoStream =L"_Stream";
const BSTR cdoIBodyPart =L"IBodyPart";
const BSTR cdoIConfiguration =L"IConfiguration";
const BSTR cdoIDataSource =L"IDataSource";
const BSTR cdoIMessage =L"IMessage";
const BSTR cdoIStream =L"IStream";
};
[ dllname("cdosys.dll") ]
module CdoMailHeader
{
const BSTR cdoApproved =L"urn:schemas:mailheader:approved";
const BSTR cdoComment =L"urn:schemas:mailheader:comment";
const BSTR cdoContentBase =L"urn:schemas:mailheader:content-base";
const BSTR cdoContentDescription =L"urn:schemas:mailheader:content-description";
const BSTR cdoContentDisposition =L"urn:schemas:mailheader:content-disposition";
const BSTR cdoContentId =L"urn:schemas:mailheader:content-id";
const BSTR cdoContentLanguage =L"urn:schemas:mailheader:content-language";
const BSTR cdoContentLocation =L"urn:schemas:mailheader:content-location";
const BSTR cdoContentTransferEncoding =L"urn:schemas:mailheader:content-transfer-encoding";
const BSTR cdoContentType =L"urn:schemas:mailheader:content-type";
const BSTR cdoControl =L"urn:schemas:mailheader:control";
const BSTR cdoDisposition =L"urn:schemas:mailheader:disposition";
const BSTR cdoDispositionNotificationTo =L"urn:schemas:mailheader:disposition-notification-to";
const BSTR cdoDistribution =L"urn:schemas:mailheader:distribution";
const BSTR cdoExpires =L"urn:schemas:mailheader:expires";
const BSTR cdoFollowupTo =L"urn:schemas:mailheader:followup-to";
const BSTR cdoInReplyTo =L"urn:schemas:mailheader:in-reply-to";
const BSTR cdoLines =L"urn:schemas:mailheader:lines";
const BSTR cdoMessageId =L"urn:schemas:mailheader:message-id";
const BSTR cdoMIMEVersion =L"urn:schemas:mailheader:mime-version";
const BSTR cdoNewsgroups =L"urn:schemas:mailheader:newsgroups";
const BSTR cdoOrganization =L"urn:schemas:mailheader:organization";
const BSTR cdoOriginalRecipient =L"urn:schemas:mailheader:original-recipient";
const BSTR cdoPath =L"urn:schemas:mailheader:path";
const BSTR cdoPostingVersion =L"urn:schemas:mailheader:posting-version";
const BSTR cdoReceived =L"urn:schemas:mailheader:received";
const BSTR cdoReferences =L"urn:schemas:mailheader:references";
const BSTR cdoRelayVersion =L"urn:schemas:mailheader:relay-version";
const BSTR cdoReturnPath =L"urn:schemas:mailheader:return-path";
const BSTR cdoReturnReceiptTo =L"urn:schemas:mailheader:return-receipt-to";
const BSTR cdoSummary =L"urn:schemas:mailheader:summary";
const BSTR cdoThreadIndex =L"urn:schemas:mailheader:thread-index";
const BSTR cdoXMailer =L"urn:schemas:mailheader:x-mailer";
const BSTR cdoXref =L"urn:schemas:mailheader:xref";
const BSTR cdoXUnsent =L"urn:schemas:mailheader:x-unsent";
};
[ dllname("cdosys.dll") ]
module CdoNamespace
{
const BSTR cdoNSConfiguration =L"http://schemas.microsoft.com/cdo/configuration/";
const BSTR cdoNSContacts =L"urn:schemas:contacts:";
const BSTR cdoNSHTTPMail =L"urn:schemas:httpmail:";
const BSTR cdoNSMailHeader =L"urn:schemas:mailheader:";
const BSTR cdoNSNNTPEnvelope =L"http://schemas.microsoft.com/cdo/nntpenvelope/";
const BSTR cdoNSSMTPEnvelope =L"http://schemas.microsoft.com/cdo/smtpenvelope/";
};
[ dllname("cdosys.dll") ]
module CdoNNTPEnvelope
{
const BSTR cdoNewsgroupList =L"http://schemas.microsoft.com/cdo/nntpenvelope/newsgrouplist";
const BSTR cdoNNTPProcessing =L"http://schemas.microsoft.com/cdo/nntpenvelope/nntpprocessing";
};
[ dllname("cdosys.dll") ]
module CdoSMTPEnvelope
{
const BSTR cdoArrivalTime =L"http://schemas.microsoft.com/cdo/smtpenvelope/arrivaltime";
const BSTR cdoClientIPAddress =L"http://schemas.microsoft.com/cdo/smtpenvelope/clientipaddress";
const BSTR cdoMessageStatus =L"http://schemas.microsoft.com/cdo/smtpenvelope/messagestatus";
const BSTR cdoPickupFileName =L"http://schemas.microsoft.com/cdo/smtpenvelope/pickupfilename";
const BSTR cdoRecipientList =L"http://schemas.microsoft.com/cdo/smtpenvelope/recipientlist";
const BSTR cdoSenderEmailAddress =L"http://schemas.microsoft.com/cdo/smtpenvelope/senderemailaddress";
};
[ dllname("cdosys.dll") ]
module CdoErrors
{
const LONG CDO_E_UNCAUGHT_EXCEPTION = 0x80040201L;
const LONG CDO_E_NOT_OPENED = 0x80040202L;
const LONG CDO_E_UNSUPPORTED_DATASOURCE = 0x80040203L;
const LONG CDO_E_INVALID_PROPERTYNAME = 0x80040204L;
const LONG CDO_E_PROP_UNSUPPORTED = 0x80040205L;
const LONG CDO_E_INACTIVE = 0x80040206L;
const LONG CDO_E_NO_SUPPORT_FOR_OBJECTS = 0x80040207L;
const LONG CDO_E_NOT_AVAILABLE = 0x80040208L;
const LONG CDO_E_NO_DEFAULT_DROP_DIR = 0x80040209L;
const LONG CDO_E_SMTP_SERVER_REQUIRED = 0x8004020AL;
const LONG CDO_E_NNTP_SERVER_REQUIRED = 0x8004020BL;
const LONG CDO_E_RECIPIENT_MISSING = 0x8004020CL;
const LONG CDO_E_FROM_MISSING = 0x8004020DL;
const LONG CDO_E_SENDER_REJECTED = 0x8004020EL;
const LONG CDO_E_RECIPIENTS_REJECTED = 0x8004020FL;
const LONG CDO_E_NNTP_POST_FAILED = 0x80040210L;
const LONG CDO_E_SMTP_SEND_FAILED = 0x80040211L;
const LONG CDO_E_CONNECTION_DROPPED = 0x80040212L;
const LONG CDO_E_FAILED_TO_CONNECT = 0x80040213L;
const LONG CDO_E_INVALID_POST = 0x80040214L;
const LONG CDO_E_AUTHENTICATION_FAILURE = 0x80040215L;
const LONG CDO_E_INVALID_CONTENT_TYPE = 0x80040216L;
const LONG CDO_E_LOGON_FAILURE = 0x80040217L;
const LONG CDO_E_HTTP_NOT_FOUND = 0x80040218L;
const LONG CDO_E_HTTP_FORBIDDEN = 0x80040219L;
const LONG CDO_E_HTTP_FAILED = 0x8004021AL;
const LONG CDO_E_MULTIPART_NO_DATA = 0x8004021BL;
const LONG CDO_E_INVALID_ENCODING_FOR_MULTIPART = 0x8004021CL;
const LONG CDO_E_PROP_NOT_FOUND = 0x8004021EL;
const LONG CDO_E_INVALID_SEND_OPTION = 0x80040220L;
const LONG CDO_E_INVALID_POST_OPTION = 0x80040221L;
const LONG CDO_E_NO_PICKUP_DIR = 0x80040222L;
const LONG CDO_E_NOT_ALL_DELETED = 0x80040223L;
const LONG CDO_E_PROP_READONLY = 0x80040227L;
const LONG CDO_E_PROP_CANNOT_DELETE = 0x80040228L;
const LONG CDO_E_BAD_DATA = 0x80040229L;
const LONG CDO_E_PROP_NONHEADER = 0x8004022AL;
const LONG CDO_E_INVALID_CHARSET = 0x8004022BL;
const LONG CDO_E_ADOSTREAM_NOT_BOUND = 0x8004022CL;
const LONG CDO_E_CONTENTPROPXML_NOT_FOUND = 0x8004022DL;
const LONG CDO_E_CONTENTPROPXML_WRONG_CHARSET = 0x8004022EL;
const LONG CDO_E_CONTENTPROPXML_PARSE_FAILED = 0x8004022FL;
const LONG CDO_E_CONTENTPROPXML_CONVERT_FAILED = 0x80040230L;
const LONG CDO_E_NO_DIRECTORIES_SPECIFIED = 0x80040231L;
const LONG CDO_E_DIRECTORIES_UNREACHABLE = 0x80040232L;
const LONG CDO_E_BAD_SENDER = 0x80040233L;
const LONG CDO_E_SELF_BINDING = 0x80040234L;
const LONG CDO_E_ARGUMENT1 = 0x80044000L;
const LONG CDO_E_ARGUMENT2 = 0x80044001L;
const LONG CDO_E_ARGUMENT3 = 0x80044002L;
const LONG CDO_E_ARGUMENT4 = 0x80044003L;
const LONG CDO_E_ARGUMENT5 = 0x80044004L;
const LONG CDO_E_NOT_FOUND = 0x800CCE05L;
const LONG CDO_E_INVALID_ENCODING_TYPE = 0x800CCE1DL;
};
interface IBodyParts;
interface IMessages;
[ uuid(CD000001-8B95-11D1-82DB-00C04FB1625D), helpstring("Defines an object used to manage or create a complete message"), helpcontext(0x00000010) ] coclass Message
{
[default] interface IMessage;
interface IDataSource;
interface IBodyPart;
};
[ uuid(CD000002-8B95-11D1-82DB-00C04FB1625D), helpstring("Defines an object used to store configuration information for CDO objects"), helpcontext(0x00000012) ] coclass Configuration
{
[default] interface IConfiguration;
};
[ uuid(CD000004-8B95-11D1-82DB-00C04FB1625D), helpstring("Defines an object used to access messages on the file system"), helpcontext(0x00000011) ] coclass DropDirectory
{
[default] interface IDropDirectory;
};
[ uuid(CD000008-8B95-11D1-82DB-00C04FB1625D), helpstring("SMTPConnector Class"), hidden ] coclass SMTPConnector
{
[default] interface ISMTPScriptConnector;
[default,source] interface ISMTPOnArrival;
};
[ uuid(CD000011-8B95-11D1-82DB-00C04FB1625D), helpstring("NNTPEarlyConnector Class"), hidden ] coclass NNTPEarlyConnector
{
[default] interface INNTPEarlyScriptConnector;
[default,source] interface INNTPOnPostEarly;
};
[ uuid(CD000009-8B95-11D1-82DB-00C04FB1625D), helpstring("NNTPPostConnector Class"), hidden ] coclass NNTPPostConnector
{
[default] interface INNTPPostScriptConnector;
[default,source] interface INNTPOnPost;
};
[ uuid(CD000010-8B95-11D1-82DB-00C04FB1625D), helpstring("NNTPFinalConnector Class"), hidden ] coclass NNTPFinalConnector
{
[default] interface INNTPFinalScriptConnector;
[default,source] interface INNTPOnPostFinal;
};
[
object,
uuid(CD0ff000-8B95-11D1-82DB-00C04FB1625D),
pointer_default(unique)
]
interface IGetInterface : IUnknown
{
HRESULT GetInterface(
[in] BSTR Interface,
[out, retval] IDispatch** ppUnknown);
HRESULT GetInterfaceInner(
[in] BSTR Interface,
[out, retval] IDispatch** ppUnknown);
};
};

4016
BuildTools/Include/CDOSys.h Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,186 @@
#ifndef __cdostr_h_
#define __cdostr_h_
// __CdoCalendar_MODULE_DEFINED__
#define cdoTimeZoneIDURN L"urn:schemas:calendar:timezoneid"
// __CdoCharset_MODULE_DEFINED__
#define cdoBIG5 L"big5"
#define cdoEUC_JP L"euc-jp"
#define cdoEUC_KR L"euc-kr"
#define cdoGB2312 L"gb2312"
#define cdoISO_2022_JP L"iso-2022-jp"
#define cdoISO_2022_KR L"iso-2022-kr"
#define cdoISO_8859_1 L"iso-8859-1"
#define cdoISO_8859_2 L"iso-8859-2"
#define cdoISO_8859_3 L"iso-8859-3"
#define cdoISO_8859_4 L"iso-8859-4"
#define cdoISO_8859_5 L"iso-8859-5"
#define cdoISO_8859_6 L"iso-8859-6"
#define cdoISO_8859_7 L"iso-8859-7"
#define cdoISO_8859_8 L"iso-8859-8"
#define cdoISO_8859_9 L"iso-8859-9"
#define cdoKOI8_R L"koi8-r"
#define cdoShift_JIS L"shift-jis"
#define cdoUS_ASCII L"us-ascii"
#define cdoUTF_7 L"utf-7"
#define cdoUTF_8 L"utf-8"
#define cdoISO_8859_15 L"iso-8859-15"
// __CdoConfiguration_MODULE_DEFINED__
#define cdoAutoPromoteBodyParts L"http://schemas.microsoft.com/cdo/configuration/autopromotebodyparts"
#define cdoFlushBuffersOnWrite L"http://schemas.microsoft.com/cdo/configuration/flushbuffersonwrite"
#define cdoHTTPCookies L"http://schemas.microsoft.com/cdo/configuration/httpcookies"
#define cdoLanguageCode L"http://schemas.microsoft.com/cdo/configuration/languagecode"
#define cdoNNTPAccountName L"http://schemas.microsoft.com/cdo/configuration/nntpaccountname"
#define cdoNNTPAuthenticate L"http://schemas.microsoft.com/cdo/configuration/nntpauthenticate"
#define cdoNNTPConnectionTimeout L"http://schemas.microsoft.com/cdo/configuration/nntpconnectiontimeout"
#define cdoNNTPServer L"http://schemas.microsoft.com/cdo/configuration/nntpserver"
#define cdoNNTPServerPickupDirectory L"http://schemas.microsoft.com/cdo/configuration/nntpserverpickupdirectory"
#define cdoNNTPServerPort L"http://schemas.microsoft.com/cdo/configuration/nntpserverport"
#define cdoNNTPUseSSL L"http://schemas.microsoft.com/cdo/configuration/nntpusessl"
#define cdoPostEmailAddress L"http://schemas.microsoft.com/cdo/configuration/postemailaddress"
#define cdoPostPassword L"http://schemas.microsoft.com/cdo/configuration/postpassword"
#define cdoPostUserName L"http://schemas.microsoft.com/cdo/configuration/postusername"
#define cdoPostUserReplyEmailAddress L"http://schemas.microsoft.com/cdo/configuration/postuserreplyemailaddress"
#define cdoPostUsingMethod L"http://schemas.microsoft.com/cdo/configuration/postusing"
#define cdoSaveSentItems L"http://schemas.microsoft.com/cdo/configuration/savesentitems"
#define cdoSendEmailAddress L"http://schemas.microsoft.com/cdo/configuration/sendemailaddress"
#define cdoSendPassword L"http://schemas.microsoft.com/cdo/configuration/sendpassword"
#define cdoSendUserName L"http://schemas.microsoft.com/cdo/configuration/sendusername"
#define cdoSendUserReplyEmailAddress L"http://schemas.microsoft.com/cdo/configuration/senduserreplyemailaddress"
#define cdoSendUsingMethod L"http://schemas.microsoft.com/cdo/configuration/sendusing"
#define cdoSMTPAccountName L"http://schemas.microsoft.com/cdo/configuration/smtpaccountname"
#define cdoSMTPAuthenticate L"http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
#define cdoSMTPConnectionTimeout L"http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
#define cdoSMTPServer L"http://schemas.microsoft.com/cdo/configuration/smtpserver"
#define cdoSMTPServerPickupDirectory L"http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory"
#define cdoSMTPServerPort L"http://schemas.microsoft.com/cdo/configuration/smtpserverport"
#define cdoSMTPUseSSL L"http://schemas.microsoft.com/cdo/configuration/smtpusessl"
#define cdoURLGetLatestVersion L"http://schemas.microsoft.com/cdo/configuration/urlgetlatestversion"
#define cdoURLProxyBypass L"http://schemas.microsoft.com/cdo/configuration/urlproxybypass"
#define cdoURLProxyServer L"http://schemas.microsoft.com/cdo/configuration/urlproxyserver"
#define cdoUseMessageResponseText L"http://schemas.microsoft.com/cdo/configuration/usemessageresponsetext"
// __CdoContentTypeValues_MODULE_DEFINED__
#define cdoGif L"image/gif"
#define cdoJpeg L"image/jpeg"
#define cdoMessageExternalBody L"message/external-body"
#define cdoMessagePartial L"message/partial"
#define cdoMessageRFC822 L"message/rfc822"
#define cdoMultipartAlternative L"multipart/alternative"
#define cdoMultipartDigest L"multipart/digest"
#define cdoMultipartMixed L"multipart/mixed"
#define cdoMultipartRelated L"multipart/related"
#define cdoTextHTML L"text/html"
#define cdoTextPlain L"text/plain"
// __CdoDAV_MODULE_DEFINED__
#define cdoContentClass L"DAV:contentclass"
#define cdoGetContentType L"DAV:getcontenttype"
// __CdoEncodingType_MODULE_DEFINED__
#define cdo7bit L"7bit"
#define cdo8bit L"8bit"
#define cdoBase64 L"base64"
#define cdoBinary L"binary"
#define cdoMacBinHex40 L"mac-binhex40"
#define cdoQuotedPrintable L"quoted-printable"
#define cdoUuencode L"uuencode"
// __CdoExchange_MODULE_DEFINED__
#define cdoSensitivity L"http://schemas.microsoft.com/exchange/sensitivity"
// __CdoHTTPMail_MODULE_DEFINED__
#define cdoAttachmentFilename L"urn:schemas:httpmail:attachmentfilename"
#define cdoBcc L"urn:schemas:httpmail:bcc"
#define cdoCc L"urn:schemas:httpmail:cc"
#define cdoContentDispositionType L"urn:schemas:httpmail:content-disposition-type"
#define cdoContentMediaType L"urn:schemas:httpmail:content-media-type"
#define cdoDate L"urn:schemas:httpmail:date"
#define cdoDateReceived L"urn:schemas:httpmail:datereceived"
#define cdoFrom L"urn:schemas:httpmail:from"
#define cdoHasAttachment L"urn:schemas:httpmail:hasattachment"
#define cdoHTMLDescription L"urn:schemas:httpmail:htmldescription"
#define cdoImportance L"urn:schemas:httpmail:importance"
#define cdoNormalizedSubject L"urn:schemas:httpmail:normalizedsubject"
#define cdoPriority L"urn:schemas:httpmail:priority"
#define cdoReplyTo L"urn:schemas:httpmail:reply-to"
#define cdoSender L"urn:schemas:httpmail:sender"
#define cdoSubject L"urn:schemas:httpmail:subject"
#define cdoTextDescription L"urn:schemas:httpmail:textdescription"
#define cdoThreadTopic L"urn:schemas:httpmail:thread-topic"
#define cdoTo L"urn:schemas:httpmail:to"
// __CdoInterfaces_MODULE_DEFINED__
#define cdoAdoStream L"_Stream"
#define cdoIBodyPart L"IBodyPart"
#define cdoIConfiguration L"IConfiguration"
#define cdoIDataSource L"IDataSource"
#define cdoIMessage L"IMessage"
#define cdoIStream L"IStream"
// __CdoMailHeader_MODULE_DEFINED__
#define cdoApproved L"urn:schemas:mailheader:approved"
#define cdoComment L"urn:schemas:mailheader:comment"
#define cdoContentBase L"urn:schemas:mailheader:content-base"
#define cdoContentDescription L"urn:schemas:mailheader:content-description"
#define cdoContentDisposition L"urn:schemas:mailheader:content-disposition"
#define cdoContentId L"urn:schemas:mailheader:content-id"
#define cdoContentLanguage L"urn:schemas:mailheader:content-language"
#define cdoContentLocation L"urn:schemas:mailheader:content-location"
#define cdoContentTransferEncoding L"urn:schemas:mailheader:content-transfer-encoding"
#define cdoContentType L"urn:schemas:mailheader:content-type"
#define cdoControl L"urn:schemas:mailheader:control"
#define cdoDisposition L"urn:schemas:mailheader:disposition"
#define cdoDispositionNotificationTo L"urn:schemas:mailheader:disposition-notification-to"
#define cdoDistribution L"urn:schemas:mailheader:distribution"
#define cdoExpires L"urn:schemas:mailheader:expires"
#define cdoFollowupTo L"urn:schemas:mailheader:followup-to"
#define cdoInReplyTo L"urn:schemas:mailheader:in-reply-to"
#define cdoLines L"urn:schemas:mailheader:lines"
#define cdoMessageId L"urn:schemas:mailheader:message-id"
#define cdoMIMEVersion L"urn:schemas:mailheader:mime-version"
#define cdoNewsgroups L"urn:schemas:mailheader:newsgroups"
#define cdoOrganization L"urn:schemas:mailheader:organization"
#define cdoOriginalRecipient L"urn:schemas:mailheader:original-recipient"
#define cdoPath L"urn:schemas:mailheader:path"
#define cdoPostingVersion L"urn:schemas:mailheader:posting-version"
#define cdoReceived L"urn:schemas:mailheader:received"
#define cdoReferences L"urn:schemas:mailheader:references"
#define cdoRelayVersion L"urn:schemas:mailheader:relay-version"
#define cdoReturnPath L"urn:schemas:mailheader:return-path"
#define cdoReturnReceiptTo L"urn:schemas:mailheader:return-receipt-to"
#define cdoSummary L"urn:schemas:mailheader:summary"
#define cdoThreadIndex L"urn:schemas:mailheader:thread-index"
#define cdoXMailer L"urn:schemas:mailheader:x-mailer"
#define cdoXref L"urn:schemas:mailheader:xref"
#define cdoXUnsent L"urn:schemas:mailheader:x-unsent"
#define cdoXFidelity L"urn:schemas:mailheader:x-cdostreamhighfidelity"
// __CdoNamespace_MODULE_DEFINED__
#define cdoNSConfiguration L"http://schemas.microsoft.com/cdo/configuration/"
#define cdoNSContacts L"urn:schemas:contacts:"
#define cdoNSHTTPMail L"urn:schemas:httpmail:"
#define cdoNSMailHeader L"urn:schemas:mailheader:"
#define cdoNSNNTPEnvelope L"http://schemas.microsoft.com/cdo/nntpenvelope/"
#define cdoNSSMTPEnvelope L"http://schemas.microsoft.com/cdo/smtpenvelope/"
// __CdoNNTPEnvelope_MODULE_DEFINED__
#define cdoNewsgroupList L"http://schemas.microsoft.com/cdo/nntpenvelope/newsgrouplist"
#define cdoNNTPProcessing L"http://schemas.microsoft.com/cdo/nntpenvelope/nntpprocessing"
// __CdoOffice_MODULE_DEFINED__
#define cdoKeywords L"urn:schemas-microsoft-com:office:office#Keywords"
// __CdoSMTPEnvelope_MODULE_DEFINED__
#define cdoArrivalTime L"http://schemas.microsoft.com/cdo/smtpenvelope/arrivaltime"
#define cdoClientIPAddress L"http://schemas.microsoft.com/cdo/smtpenvelope/clientipaddress"
#define cdoMessageStatus L"http://schemas.microsoft.com/cdo/smtpenvelope/messagestatus"
#define cdoPickupFileName L"http://schemas.microsoft.com/cdo/smtpenvelope/pickupfilename"
#define cdoRecipientList L"http://schemas.microsoft.com/cdo/smtpenvelope/recipientlist"
#define cdoSenderEmailAddress L"http://schemas.microsoft.com/cdo/smtpenvelope/senderemailaddress"
// __CdoErrors_MODULE_DEFINED__
#endif // __cdostr_h_

160
BuildTools/Include/CGuid.h Normal file
View File

@ -0,0 +1,160 @@
/*+-------------------------------------------------------------------------
Microsoft Windows
Copyright (c) Microsoft Corporation. All rights reserved.
File: cguid.h
--------------------------------------------------------------------------*/
#ifndef __CGUID_H__
#define __CGUID_H__
#if _MSC_VER > 1000
#pragma once
#endif
#if (_MSC_VER >= 800)
#if (_MSC_VER >= 1200)
#pragma warning(push)
#endif
#pragma warning(disable:4001) /* non standard extension : single line comment */
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern const IID GUID_NULL;
#if(NTDDI_VERSION >= NTDDI_WINXP)
extern const IID CATID_MARSHALER;
#endif
extern const IID IID_IRpcChannel;
extern const IID IID_IRpcStub;
extern const IID IID_IStubManager;
extern const IID IID_IRpcProxy;
extern const IID IID_IProxyManager;
extern const IID IID_IPSFactory;
extern const IID IID_IInternalMoniker;
extern const IID IID_IDfReserved1;
extern const IID IID_IDfReserved2;
extern const IID IID_IDfReserved3;
extern const CLSID CLSID_StdMarshal;
extern const CLSID CLSID_AggStdMarshal;
extern const CLSID CLSID_StdAsyncActManager;
extern const IID IID_IStub;
extern const IID IID_IProxy;
extern const IID IID_IEnumGeneric;
extern const IID IID_IEnumHolder;
extern const IID IID_IEnumCallback;
extern const IID IID_IOleManager;
extern const IID IID_IOlePresObj;
extern const IID IID_IDebug;
extern const IID IID_IDebugStream;
extern const CLSID CLSID_PSGenObject;
extern const CLSID CLSID_PSClientSite;
extern const CLSID CLSID_PSClassObject;
extern const CLSID CLSID_PSInPlaceActive;
extern const CLSID CLSID_PSInPlaceFrame;
extern const CLSID CLSID_PSDragDrop;
extern const CLSID CLSID_PSBindCtx;
extern const CLSID CLSID_PSEnumerators;
extern const CLSID CLSID_StaticMetafile;
extern const CLSID CLSID_StaticDib;
extern const CLSID CID_CDfsVolume;
extern const CLSID CLSID_DCOMAccessControl;
extern const CLSID CLSID_GlobalOptions;
extern const CLSID CLSID_StdGlobalInterfaceTable;
extern const CLSID CLSID_ComBinding;
extern const CLSID CLSID_StdEvent;
extern const CLSID CLSID_ManualResetEvent;
extern const CLSID CLSID_SynchronizeContainer;
#if(NTDDI_VERSION >= NTDDI_WINXP)
extern const CLSID CLSID_AddrControl;
#endif
#if(NTDDI_VERSION >= NTDDI_VISTA)
extern const CLSID CLSID_ContextSwitcher;
#endif
//--------------------------------------------
//
// CD Forms CLSIDs
//
//--------------------------------------------
//
// Form Kernel objects
//
extern const CLSID CLSID_CCDFormKrnl;
extern const CLSID CLSID_CCDPropertyPage;
extern const CLSID CLSID_CCDFormDialog;
//
// Control objects
//
extern const CLSID CLSID_CCDCommandButton;
extern const CLSID CLSID_CCDComboBox;
extern const CLSID CLSID_CCDTextBox;
extern const CLSID CLSID_CCDCheckBox;
extern const CLSID CLSID_CCDLabel;
extern const CLSID CLSID_CCDOptionButton;
extern const CLSID CLSID_CCDListBox;
extern const CLSID CLSID_CCDScrollBar;
extern const CLSID CLSID_CCDGroupBox;
//
// Property Pages
//
extern const CLSID CLSID_CCDGeneralPropertyPage;
extern const CLSID CLSID_CCDGenericPropertyPage;
extern const CLSID CLSID_CCDFontPropertyPage;
extern const CLSID CLSID_CCDColorPropertyPage;
extern const CLSID CLSID_CCDLabelPropertyPage;
extern const CLSID CLSID_CCDCheckBoxPropertyPage;
extern const CLSID CLSID_CCDTextBoxPropertyPage;
extern const CLSID CLSID_CCDOptionButtonPropertyPage;
extern const CLSID CLSID_CCDListBoxPropertyPage;
extern const CLSID CLSID_CCDCommandButtonPropertyPage;
extern const CLSID CLSID_CCDComboBoxPropertyPage;
extern const CLSID CLSID_CCDScrollBarPropertyPage;
extern const CLSID CLSID_CCDGroupBoxPropertyPage;
extern const CLSID CLSID_CCDXObjectPropertyPage;
extern const CLSID CLSID_CStdPropertyFrame;
extern const CLSID CLSID_CFormPropertyPage;
extern const CLSID CLSID_CGridPropertyPage;
extern const CLSID CLSID_CWSJArticlePage;
extern const CLSID CLSID_CSystemPage;
extern const CLSID CLSID_IdentityUnmarshal;
extern const CLSID CLSID_InProcFreeMarshaler;
extern const CLSID CLSID_Picture_Metafile;
extern const CLSID CLSID_Picture_EnhMetafile;
extern const CLSID CLSID_Picture_Dib;
//
// Enumerations
//
extern const GUID GUID_TRISTATE;
#ifdef __cplusplus
}
#endif
#if (_MSC_VER >= 800)
#if (_MSC_VER >= 1200)
#pragma warning(pop)
#else
#pragma warning(default:4001)
#endif
#endif
#endif /* __CGUID_H__ */

View File

@ -0,0 +1,304 @@
;****************************CallConv.Inc************************************
;
; Copyright (c) 1990-1995, Microsoft Corp. All rights reserved.
;
;****************************************************************************
;****************************Public Macro************************************
;
; ComposeInst Inst,p1,p2,p3,p4,p5,p6,p7,p8,p9
;
; This macro simply concatenates all arguments into one string.
;
;
;****************************************************************************
ComposeInst macro Inst,p1,p2,p3,p4,p5,p6,p7,p8,p9
&Inst p1&p2&p3&p4&p5&p6&p7&p8&p9
endm
;****************************Public Macro************************************
;
; CountArg cCount,ArgList
;
; This macro count the number of arguments in the ArgList and returns
; the value in cCount.
;
;
;****************************************************************************
CountArg macro cCount,ArgList
cCount = 0
irp arg,<ArgList>
cCount = cCount+1
endm
endm
;****************************Public Macro************************************
;
; RevPush ArgList,cCount
;
; This macro pushes the arguments in ArgList in the reverse order
; and returns the number of arguments in cCount.
;
;
;****************************************************************************
RevPush macro ArgList,cCount
Local index,x
CountArg cCount,<ArgList>
index = cCount
rept cCount
x = 0
irp arg,<ArgList>
x = x+1
ife index-x
push arg
exitm
endif
endm
index = index-1
endm
endm
;****************************Public Macro************************************
;
; The following sections contain calling-convention related macros for:
;
; PUBLICP Func,N
; to define a public label
;
; EXTRNP Func,N,Thunk
; to define a external near label
;
; LABELP Func,N
; to label an address as a routine entry point
;
; stdPROC Func,N,ArgList
; to declare a routine header
;
; ProcName Name,Func,N
; to rename a function Func to Name. Using it in conjunction with
; normal function declaration (with the new name) will solve an error
; caused by a long parameter list routine that exhausts page width.
;
; stdRET Func
; to return from Func routines (declared with stdPROC or ProcName.)
;
; stdENDP Func
; to declare the end of routine (declared with stdPROC or ProcName.)
;
; endMod Func
; to declare the end of module with an entry point at Func (declared
; with stdPROC or ProcName.)
;
; stdCall Func,ArgList
; to call to a routine--Func--with the arguments pushed on the stack
;
; MovAddr dest,Func,n
; to move the address of the routine--Func--into dest.
;
; Note that for the standard calling convention all the function names,
; Func, are automatically converted to Func@N where N is the number of
; bytes (decimal) in the argument list.
;
;
;****************************************************************************
if @Version GE 600
option nokeyword:<stdcall>
endif
PUBLICP macro Func,N
ifb <N>
public Func&@0
else
PUBLICP2 Func,%(N*4)
endif
endm
PUBLICP2 macro Func,N
public Func&@&N
endm
EXTRNP macro Func,N,Thunk,FastCall
ifb <N>
IFNDEF Func&@0
extrn Func&@0:NEAR
ENDIF
else
ifb <FastCall>
ifb <Thunk>
EXTRNP2 Func,%(N*4)
else
EXTRNTHUNK Func,%(N*4)
endif
else
cFCall&@&Func equ (N*4)
ifb <Thunk>
EXTRNP2 &@&Func,%(N*4)
else
EXTRNTHUNK &@&Func,%(N*4)
endif
endif
endif
endm
EXTRNP2 macro Func,N
IFNDEF Func&@&N
extrn Func&@&N:NEAR
ENDIF
endm
EXTRNTHUNK macro Func,N
IFNDEF __imp_&Func&@&N
extrn __imp_&Func&@&N:DWORD
ENDIF
endm
LABELP macro Func,N
ifb <N>
Func&@0 label near
else
LABELP2 Func,%(N*4)
endif
endm
LABELP2 macro Func,N
Func&@&N label near
endm
ProcName macro Name,Func,N
ifb <N>
cByte&Func equ 0
Name equ <Func&@0>
else
cByte&Func equ N
Name equ <Func&@&N>
endif
endm
stdPROC macro Func,N,ArgList
ProcName Func,Func,%(N*4)
Func proc ArgList
endm
cPublicProc macro Func,N,ArgList
align dword
PUBLICP Func,N
ifb <N>
stdPROC Func,0,<ArgList>
else
stdPROC Func,N,<ArgList>
endif
endm
ProcNameF macro Name,Func,N,M
cByte&Func equ M
cFCall&Func equ N
Name equ <Func&@&N>
endm
stdPROCF macro Func,N,ArgList
if N gt 2
ProcNameF Func,Func,%(N*4),%((N-2)*4)
else
ProcNameF Func,Func,%(N*4),0
endif
Func proc ArgList
endm
cPublicFastCall macro Func,N,ArgList
align dword
PUBLICP &@&Func,N
ifb <N>
stdPROCF &@&Func,0,<ArgList>
else
stdPROCF &@&Func,N,<ArgList>
endif
endm
fstRET macro Func
ret cByte&@&Func
endm
stdRET macro Func
ret cByte&Func
endm
cPublicFpo macro FpoLocals, FpoParams
.FPO ( FpoParams, FpoLocals, 0, 0, 0, 0 )
endm
fstENDP macro Func
&@&Func endp
endm
stdENDP macro Func
Func endp
endm
endMod macro Func
end Func
endm
stdCallCall macro Func,N
IFDEF __imp_&Func&@&N
call dword ptr [__imp_&Func&@&N]
ELSE
call Func&@&N
ENDIF
endm
stdCall macro Func,ArgList
Local Bytes
RevPush <ArgList>,Bytes
Bytes = Bytes*4
stdCallCall Func,%(Bytes)
endm
fstCall macro Func,ArgList
Local Bytes
RevPush <ArgList>,Bytes
Bytes = Bytes*4
if Bytes eq 0
stdCallCall &@&Func,%cFCall&@&Func
else
; must have 2 register params
stdCallCall &@&Func,%(Bytes+8)
endif
endm
MovAddr macro dest,addr,n
ComposeInst <mov >,dest,<,offset FLAT:>,addr,<@>,n
endm

View File

@ -0,0 +1,388 @@
;//+----------------------------------------------------------------------------
;//
;// Copyright (C) 1998, Microsoft Corporation
;//
;// File: cat.mc
;//
;// Contents: Events and Errors for Categorizer
;//
;//-----------------------------------------------------------------------------
;
;#ifndef _CATMSG_H_
;#define _CATMSG_H_
;
SeverityNames=(Success=0x0
Informational=0x1
Warning=0x2
Error=0x3
)
FacilityNames=(Interface=0x04)
Messageid=1301 Facility=Interface Severity=Error SymbolicName=CAT_EVENT_OUT_OF_MEMORY
Language=English
%1 was unable to initialize due to a shortage of available memory.
.
Messageid=1302 Facility=Interface Severity=Success SymbolicName=CAT_EVENT_SERVICE_STARTED
Language=English
%1 service has been started.
.
Messageid=1303 Facility=Interface Severity=Error SymbolicName=CAT_EVENT_SERVICE_STOPPED
Language=English
%1 service has been stopped.
.
Messageid=1304 Facility=Interface Severity=Error SymbolicName=CAT_EVENT_CANNOT_OPEN_SVC_REGKEY
Language=English
Routing table could not open registry key %1.
.
Messageid=1305 Facility=Interface Severity=Error SymbolicName=CAT_EVENT_CANNOT_READ_SVC_REGKEY
Language=English
Routing table could not read registry key %1.
.
Messageid=1306 Facility=Interface Severity=Error SymbolicName=CAT_EVENT_CANNOT_CREATE_FILE
Language=English
Routing table could not create file %1. The data is the error.
.
Messageid=1307 Facility=Interface Severity=Error SymbolicName=CAT_EVENT_CANNOT_WRITE_FILE
Language=English
Routing table could not write to file %1. The data is the error.
.
Messageid=1308 Facility=Interface Severity=Error SymbolicName=CAT_EVENT_SP_EXEC_FAILED
Language=English
Stored Procedure %1 failed to execute. Please make sure it is loaded properly.
.
Messageid=1310 Facility=Interface Severity=Success SymbolicName=CAT_E_TRANX_DL_CREATED
Language=English
Distribution List %1 created by %1.
.
Messageid=1311 Facility=Interface Severity=Error SymbolicName=CAT_E_DBCONNECTION
Language=English
Routing table failed to connect to database server.
.
Messageid=1312 Facility=Interface Severity=Error SymbolicName=CAT_E_DBFAIL
Language=English
Routing table database transaction failed.
.
Messageid=1313 Facility=Interface Severity=Error SymbolicName=CAT_E_OUT_OF_MEMORY
Language=English
Not enough memory.
.
Messageid=1314 Facility=Interface Severity=Error SymbolicName=CAT_E_UNEXPECT_ROWCOUNT
Language=English
Number of rows returned from SQL server is unexpected.
.
Messageid=1315 Facility=Interface Severity=Error SymbolicName=CAT_E_INVALID_DOMAIN_ID
Language=English
The domain id is invalid.
.
Messageid=1316 Facility=Interface Severity=Error SymbolicName=CAT_E_INVALID_ARG
Language=English
One of the arguments passed in is invalid.
.
Messageid=1317 Facility=Interface Severity=Error SymbolicName=CAT_E_MORE_DATA
Language=English
More data to returned.
.
Messageid=1318 Facility=Interface Severity=Error SymbolicName=CAT_E_NOTLOCAL
Language=English
The email is not local to this site.
.
Messageid=1319 Facility=Interface Severity=Error SymbolicName=CAT_E_USER_UNKNOWN
Language=English
The user's email name is not found.
.
Messageid=1320 Facility=Interface Severity=Error SymbolicName=CAT_E_OUT_OF_DISK
Language=English
Not enough disk space.
.
Messageid=1321 Facility=Interface Severity=Error SymbolicName=CAT_E_INVALID_HANDLE
Language=English
Invalid handle.
.
Messageid=1322 Facility=Interface Severity=Error SymbolicName=CAT_E_INVALID_LOGINNAME
Language=English
Invalid login name.
.
Messageid=1323 Facility=Interface Severity=Error SymbolicName=CAT_E_INVALID_DOMAIN
Language=English
Invalid domain.
.
Messageid=1324 Facility=Interface Severity=Error SymbolicName=CAT_E_DOMAIN_EXISTS
Language=English
The domain you want to add already exists.
.
Messageid=1325 Facility=Interface Severity=Error SymbolicName=CAT_E_DOMAIN_IN_USE
Language=English
The domain is being referenced.
.
Messageid=1326 Facility=Interface Severity=Error SymbolicName=CAT_E_DOMAIN_NOT_EXIST
Language=English
Domain doesn't exist.
.
Messageid=1327 Facility=Interface Severity=Error SymbolicName=CAT_E_EX_DL_FOUND
Language=English
Distribution list doesn't exist.
.
Messageid=1328 Facility=Interface Severity=Error SymbolicName=CAT_E_INVALID_DL
Language=English
Invalid distribution list.
.
Messageid=1329 Facility=Interface Severity=Error SymbolicName=CAT_E_ALREADY_IN_DL
Language=English
The member to be added is already in the distribution list.
.
Messageid=1330 Facility=Interface Severity=Error SymbolicName=CAT_E_CYCLIC_DL
Language=English
Cyclic distribution list.
.
Messageid=1331 Facility=Interface Severity=Error SymbolicName=CAT_E_AMBIGUOUS
Language=English
Ambiguous email address.
.
Messageid=1332 Facility=Interface Severity=Error SymbolicName=CAT_E_TRANX_FAILED
Language=English
SQL transaction failed.
.
Messageid=1333 Facility=Interface Severity=Error SymbolicName=CAT_E_GENERIC
Language=English
Generic error.
.
Messageid=1334 Facility=Interface Severity=Error SymbolicName=CAT_E_INVALID_USAGE
Language=English
Invalid usage.
.
Messageid=1335 Facility=Interface Severity=Error SymbolicName=CAT_E_NO_MORE_ROW
Language=English
No more rows from SQL.
.
Messageid=1336 Facility=Interface Severity=Error SymbolicName=CAT_E_USER_EXISTS
Language=English
The user to be created already exists.
.
Messageid=1337 Facility=Interface Severity=Error SymbolicName=CAT_E_CANT_FWD
Language=English
Routing table can only set forward from normal account to normal account.
.
Messageid=1338 Facility=Interface Severity=Error SymbolicName=CAT_E_NOT_IN_DL
Language=English
The member is not in the distribution list.
.
Messageid=1339 Facility=Interface Severity=Error SymbolicName=CAT_E_LOCAL_DOMAIN
Language=English
Domain is local.
.
Messageid=1340 Facility=Interface Severity=Error SymbolicName=CAT_E_REMOTE_DOMAIN
Language=English
Domain is remote.
.
Messageid=1341 Facility=Interface Severity=Error SymbolicName=CAT_E_FILE_NOT_FOUND
Language=English
A file required by routing table was not found
.
Messageid=1342 Facility=Interface Severity=Error SymbolicName=CAT_E_INVALID_SCHEMA
Language=English
The specified schema is incomplete - it does specify all required properties
.
Messageid=1343 Facility=Interface Severity=Error SymbolicName=CAT_E_LOGIN_FAILED
Language=English
The logon attempt to %1 with Account %2 and Password %3 failed with an invalid credentials error.
.
Messageid=1350 Facility=Interface Severity=Warning SymbolicName=CAT_W_SOME_UNDELIVERABLE_MSGS
Language=English
Some messages have problems.
.
Messageid=1351 Facility=Interface Severity=Error SymbolicName=CAT_E_UNKNOWN_RECIPIENT
Language=English
The addressed recipient does not exist.
.
Messageid=1352 Facility=Interface Severity=Error SymbolicName=CAT_E_UNKNOWN_ADDRESS_TYPE
Language=English
The address type is unknown.
.
Messageid=1353 Facility=Interface Severity=Informational SymbolicName=CAT_I_DL
Language=English
The address corresponds to a distribution list.
.
Messageid=1354 Facility=Interface Severity=Informational SymbolicName=CAT_I_FWD
Language=English
The user has a forwarding address.
.
Messageid=1355 Facility=Interface Severity=Error SymbolicName=CAT_E_NOFWD
Language=English
The user does not have a forwaring address.
.
Messageid=1356 Facility=Interface Severity=Error SymbolicName=CAT_E_NORESULT
Language=English
No such entry exists.
.
Messageid=1357 Facility=Interface Severity=Error SymbolicName=CAT_E_ILLEGAL_ADDRESS
Language=English
The address is not legal (badly formatted).
.
Messageid=1358 Facility=Interface Severity=Informational SymbolicName=CAT_I_ALIASED_DOMAIN
Language=English
The address contained an aliased domain name.
.
Messageid=1359 Facility=Interface Severity=Error SymbolicName=CAT_E_MAX_RETRIES
Language=English
The maximum number of retries would be exceeded.
.
Messageid=1360 Facility=Interface Severity=Error SymbolicName=CAT_E_PROPNOTFOUND
Language=English
The property was not set.
.
Messageid=1361 Facility=Interface Severity=Error SymbolicName=CAT_E_PROPTYPE
Language=English
The property was not the correct type.
.
Messageid=1362 Facility=Interface Severity=Error SymbolicName=CAT_E_MULTIVALUE
Language=English
The attribute requested has multiple values.
.
Messageid=1363 Facility=Interface Severity=Error SymbolicName=CAT_E_MULTIPLE_MATCHES
Language=English
There are multiple DS objects that match this search request
.
Messageid=1364 Facility=Interface Severity=Error SymbolicName=CAT_E_FORWARD_LOOP
Language=English
The user is part of a forwarding loop
.
Messageid=1365 Facility=Interface Severity=Error SymbolicName=CAT_E_INIT_FAILED
Language=English
The categorizer was unable to initialize
.
Messageid=1366 Facility=Interface Severity=Success SymbolicName=CAT_S_NOT_INITIALIZED
Language=English
The categorizer has not yet been initialized
.
Messageid=1367 Facility=Interface Severity=Error SymbolicName=CAT_E_BAD_RECIPIENT
Language=English
Some malformed property of the recipient caused it to be NDRd
.
Messageid=1368 Facility=Interface Severity=Error SymbolicName=CAT_E_DEFER
Language=English
Not ready to handle this item at the current time.
.
Messageid=1369 Facility=Interface Severity=Error SymbolicName=CAT_E_RETRY
Language=English
A retryable categorizer error occured.
.
Messageid=1370 Facility=Interface Severity=Error SymbolicName=CAT_E_NO_SMTP_ADDRESS
Language=English
The recipient did not have an SMTP address
.
Messageid=1371 Facility=Interface Severity=Error SymbolicName=CAT_E_DELETE_RECIPIENT
Language=English
The recipient will be removed from the mailmsg recip list
.
Messageid=1372 Facility=Interface Severity=Error SymbolicName=CAT_E_BAD_SENDER
Language=English
The sender address is malformed
.
Messageid=1373 Facility=Interface Severity=Error SymbolicName=CAT_E_UNABLE_TO_ROUTE
Language=English
Unable to route the recipient address.
.
Messageid=1374 Facility=Interface Severity=Error SymbolicName=CAT_E_NO_GC_SERVERS
Language=English
Unable to categorize because there are no GC servers available
.
Messageid=1375 Facility=Interface Severity=Error SymbolicName=CAT_E_NO_FILTER
Language=English
No BuildQuery sinks were able to build an LDAP filter for the address
.
Messageid=1376 Facility=Interface Severity=Error SymbolicName=CAT_E_SHUTDOWN
Language=English
The categorizer was unable to perform the requested operation because it is shutting down.
.
;
;#endif // _CAT_H_
;

View File

@ -0,0 +1,63 @@
/*****************************************************************************\
* *
* cderr.h - Common dialog error return codes *
* *
* Version 1.0 *
* *
* Copyright (c) 1992-1999, Microsoft Corp. All rights reserved. *
* *
\*****************************************************************************/
#ifndef _INC_CDERR
#define _INC_CDERR
#if _MSC_VER > 1000
#pragma once
#endif
#define CDERR_DIALOGFAILURE 0xFFFF
#define CDERR_GENERALCODES 0x0000
#define CDERR_STRUCTSIZE 0x0001
#define CDERR_INITIALIZATION 0x0002
#define CDERR_NOTEMPLATE 0x0003
#define CDERR_NOHINSTANCE 0x0004
#define CDERR_LOADSTRFAILURE 0x0005
#define CDERR_FINDRESFAILURE 0x0006
#define CDERR_LOADRESFAILURE 0x0007
#define CDERR_LOCKRESFAILURE 0x0008
#define CDERR_MEMALLOCFAILURE 0x0009
#define CDERR_MEMLOCKFAILURE 0x000A
#define CDERR_NOHOOK 0x000B
#define CDERR_REGISTERMSGFAIL 0x000C
#define PDERR_PRINTERCODES 0x1000
#define PDERR_SETUPFAILURE 0x1001
#define PDERR_PARSEFAILURE 0x1002
#define PDERR_RETDEFFAILURE 0x1003
#define PDERR_LOADDRVFAILURE 0x1004
#define PDERR_GETDEVMODEFAIL 0x1005
#define PDERR_INITFAILURE 0x1006
#define PDERR_NODEVICES 0x1007
#define PDERR_NODEFAULTPRN 0x1008
#define PDERR_DNDMMISMATCH 0x1009
#define PDERR_CREATEICFAILURE 0x100A
#define PDERR_PRINTERNOTFOUND 0x100B
#define PDERR_DEFAULTDIFFERENT 0x100C
#define CFERR_CHOOSEFONTCODES 0x2000
#define CFERR_NOFONTS 0x2001
#define CFERR_MAXLESSTHANMIN 0x2002
#define FNERR_FILENAMECODES 0x3000
#define FNERR_SUBCLASSFAILURE 0x3001
#define FNERR_INVALIDFILENAME 0x3002
#define FNERR_BUFFERTOOSMALL 0x3003
#define FRERR_FINDREPLACECODES 0x4000
#define FRERR_BUFFERLENGTHZERO 0x4001
#define CCERR_CHOOSECOLORCODES 0x5000
#endif /* !_INC_CDERR */

477
BuildTools/Include/CeLib.h Normal file
View File

@ -0,0 +1,477 @@
//+-------------------------------------------------------------------------
//
// Microsoft Windows
//
// Copyright (C) Microsoft Corporation, 1995 - 1999
//
// File: celib.h
//
// Contents: helper functions
//
//--------------------------------------------------------------------------
#ifndef __CELIB_H__
#define __CELIB_H__
#include <stdio.h>
#define CENCODEMAX (64 * 1024)
// Bitmap manipulation routines. Fetch or set a bit, given a base and index.
#define GETBIT(pb, i) ((pb)[(i) / 8] & (1 << ((i) % 8)))
#define SETBIT(pb, i) ((pb)[(i) / 8] |= (1 << ((i) % 8)))
#define CLEARBIT(pb, i) ((pb)[(i) / 8] &= ~(1 << ((i) % 8)))
#define BITSTOBYTES(b) ((int)(((b) + 7) / 8))
#define ceCASIGN_KEY_USAGE \
(CERT_KEY_CERT_SIGN_KEY_USAGE | CERT_DIGITAL_SIGNATURE_KEY_USAGE | \
CERT_CRL_SIGN_KEY_USAGE)
// Size of a fixed array: Use ARRAYSIZE(a)
// wcslen of a static string:
#define WSZARRAYSIZE(a) ((sizeof(a)/sizeof((a)[0])) - 1)
#define wszCERTENROLLSHAREPATH L"CertSrv\\CertEnroll"
#define cwcHRESULTSTRING 40
#define cwcDWORDSPRINTF (1 + 10 + 1) // DWORD "%d" w/sign & '\0'
#define SAFE_SUBTRACT_POINTERS(p1, p2) \
(assert(sizeof((*p1)) == sizeof(*(p2))), (DWORD)((p1) - (p2)))
#define printf Use_wprintf_Instead_Of_printf
#define _LeaveError(hr, label, pszMessage) \
_LeaveErrorStr2((hr), label, (pszMessage), NULL, S_OK)
#define _LeaveError2(hr, label, pszMessage, hr2) \
_LeaveErrorStr2((hr), label, (pszMessage), NULL, (hr2))
#define _LeaveErrorStr(hr, label, pszMessage, pwszData) \
_LeaveErrorStr2((hr), label, (pszMessage), (pwszData), S_OK)
#define _LeaveErrorStr2(hr, label, pszMessage, pwszData, hr2) \
{ \
ceERRORPRINTLINESTR((pszMessage), (pwszData), (hr)); \
goto label; \
}
#define _LeaveIfError(hr, label, pszMessage) \
_LeaveIfErrorStr2((hr), label, (pszMessage), NULL, S_OK)
#define _LeaveIfError2(hr, label, pszMessage, hr2) \
_LeaveIfErrorStr2((hr), label, (pszMessage), NULL, (hr2))
#define _LeaveIfErrorStr(hr, label, pszMessage, pwszData) \
_LeaveIfErrorStr2((hr), label, (pszMessage), (pwszData), S_OK)
#define _LeaveIfErrorStr2(hr, label, pszMessage, pwszData, hr2) \
{ \
if (S_OK != (hr)) \
{ \
ceERRORPRINTLINESTR((pszMessage), (pwszData), (hr)); \
goto label; \
} \
}
#define _PrintErrorStr(hr, pszMessage, pwsz) \
ceERRORPRINTLINESTR((pszMessage), (pwsz), (hr))
#define _PrintErrorStr2(hr, pszMessage, pwsz, hr2) \
_PrintErrorStr((hr), (pszMessage), (pwsz))
#define _PrintError2(hr, pszMessage, hr2) \
_PrintErrorStr((hr), (pszMessage), NULL)
#define _PrintError(hr, pszMessage) \
_PrintErrorStr((hr), (pszMessage), NULL)
#define _PrintIfErrorStr(hr, pszMessage, pwsz) \
{ \
if (S_OK != (hr)) \
{ \
ceERRORPRINTLINESTR((pszMessage), (pwsz), (hr)); \
} \
}
#define _PrintIfErrorStr2(hr, pszMessage, pwsz, hr2) \
_PrintIfErrorStr((hr), (pszMessage), (pwsz))
#define _PrintIfError2(hr, pszMessage, hr2) \
_PrintIfErrorStr((hr), (pszMessage), NULL)
#define _PrintIfError(hr, pszMessage) \
_PrintIfErrorStr((hr), (pszMessage), NULL)
#define _JumpErrorStr(hr, label, pszMessage, pwsz) \
_JumpError((hr), label, (pszMessage))
#define _JumpError(hr, label, pszMessage) \
{ \
ceERRORPRINTLINESTR((pszMessage), NULL, (hr)); \
goto label; \
}
#define _JumpIfErrorStr(hr, label, pszMessage, pwsz) \
{ \
if (S_OK != (hr)) \
{ \
ceERRORPRINTLINESTR((pszMessage), (pwsz), (hr)); \
goto label; \
} \
}
#define _JumpIfErrorStr2(hr, label, pszMessage, pwsz, hr2) \
_JumpIfErrorStr((hr), label, (pszMessage), NULL)
#define _JumpIfError2(hr, label, pszMessage, hr2) \
_JumpIfErrorStr((hr), label, (pszMessage), NULL)
#define _JumpIfError(hr, label, pszMessage) \
_JumpIfErrorStr((hr), label, (pszMessage), NULL)
#if DBG
#define ceERRORPRINTLINE(pszMessage, hr) \
ceErrorPrintLine(__FILE__, __LINE__, (pszMessage), NULL, (hr))
#define ceERRORPRINTLINESTR(pszMessage, pwszData, hr) \
ceErrorPrintLine(__FILE__, __LINE__, (pszMessage), (pwszData), (hr))
#define DBGPRINT(a) ceDbgPrintf a
#else
// Windows OS Bug:1412284
#define ceERRORPRINTLINE(pszMessage, hr)
#define ceERRORPRINTLINESTR(pszMessage, pwszData, hr)
#define DBGPRINT(a)
#endif
// typedef for buffers that may be read up to and including the first sequence
// of two NULL characters:
typedef __nullnullterminated WCHAR * CSPZZWSTR;
typedef __nullnullterminated WCHAR const * CSPCZZWSTR;
// typedef for buffers that may be read up to and including the first NULL
// pointer:
typedef __nullterminated PCWSTR const * CSPCZPCWSTR;
int WINAPIV ceDbgPrintf(BOOL fDebug, char const *pszfmt, ...);
VOID
ceErrorPrintLine(
IN char const *pszFile,
IN DWORD line,
IN char const *pszMessage,
IN WCHAR const *pwszData,
IN HRESULT hr);
HRESULT
ceHLastError(VOID);
HRESULT
ceHError(
IN HRESULT hr);
#define ceHEXCEPTIONCODE(_ex) ceHError((_ex).GetSeCode())
#define chLBRACE '{'
#define chRBRACE '}'
#define szLBRACE "{"
#define szRBRACE "}"
#define wcLBRACE L'{'
#define wcRBRACE L'}'
#define wszLBRACE L"{"
#define wszRBRACE L"}"
#define chLPAREN '('
#define chRPAREN ')'
#define szLPAREN "("
#define szRPAREN ")"
#define wcLPAREN L'('
#define wcRPAREN L')'
#define wszLPAREN L"("
#define wszRPAREN L")"
// Constants chosen to avoid DWORD overflow:
#define CVT_WEEKS (7 * CVT_DAYS)
#define CVT_DAYS (24 * CVT_HOURS)
#define CVT_HOURS (60 * CVT_MINUTES)
#define CVT_MINUTES (60 * CVT_SECONDS)
#define CVT_SECONDS (1)
#define CVT_BASE (1000 * 1000 * 10)
enum ENUM_PERIOD
{
ENUM_PERIOD_INVALID = -1,
ENUM_PERIOD_SECONDS = 0,
ENUM_PERIOD_MINUTES,
ENUM_PERIOD_HOURS,
ENUM_PERIOD_DAYS,
ENUM_PERIOD_WEEKS,
ENUM_PERIOD_MONTHS,
ENUM_PERIOD_YEARS
};
#define IsNullOrEmptyBStr(str) \
__pragma(prefast(suppress: __WARNING_325, "Intentional NULL check, avoid SysStringLen")) \
(NULL == str || 0 == SysStringByteLen(str))
#define IsNullBStr(str) \
__pragma(prefast(suppress: __WARNING_325, "Intentional NULL check")) \
(NULL == str)
HMODULE
ceLoadSystem32Library(
IN WCHAR const *pwszLibFileName);
typedef struct _LLFILETIME
{
union {
LONGLONG ll;
FILETIME ft;
};
} LLFILETIME;
__inline VOID
ceAddToFileTime(
IN OUT FILETIME *pft,
IN LONGLONG ll)
{
LLFILETIME llft;
llft.ft = *pft;
llft.ll += ll;
*pft = llft.ft;
}
__inline LONGLONG
ceSubtractFileTimes(
IN FILETIME const *pft1,
IN FILETIME const *pft2)
{
LLFILETIME llft1;
LLFILETIME llft2;
llft1.ft = *pft1;
llft2.ft = *pft2;
return(llft1.ll - llft2.ll);
}
HRESULT
ceMakeExprDate(
IN OUT DATE *pDate,
IN LONG lDelta,
IN enum ENUM_PERIOD enumPeriod);
HRESULT
ceTranslatePeriodUnits(
IN WCHAR const *pwszPeriod,
IN LONG lCount,
OUT enum ENUM_PERIOD *penumPeriod,
OUT LONG *plCount);
WCHAR const *
ceGetOIDNameA(
IN char const *pszObjId);
WCHAR const *
ceGetOIDName(
IN WCHAR const *pwszObjId);
BOOL
ceDecodeObject(
IN DWORD dwEncodingType,
IN LPCSTR lpszStructType,
IN BYTE const *pbEncoded,
IN DWORD cbEncoded,
IN BOOL fCoTaskMemAlloc,
OUT VOID **ppvStructInfo,
OUT DWORD *pcbStructInfo);
BOOL
ceEncodeObject(
DWORD dwEncodingType,
IN LPCSTR lpszStructType,
IN VOID const *pvStructInfo,
IN DWORD dwFlags,
IN BOOL fCoTaskMemAlloc,
OUT BYTE **ppbEncoded,
OUT DWORD *pcbEncoded);
WCHAR *
ceDuplicateString(
IN WCHAR const *pwsz);
HRESULT
ceDupString(
IN WCHAR const *pwszIn,
__deref_out PWSTR *ppwszOut);
BOOL
ceConvertWszToSz(
__deref_out PSTR *ppsz,
IN WCHAR const *pwc,
IN LONG cb);
BOOL
ceConvertWszToBstr(
OUT BSTR *pbstr,
IN WCHAR const *pwc,
IN LONG cb);
BOOL
ceConvertSzToWsz(
__deref_out PWSTR *ppwsz,
IN char const *pch,
IN LONG cch);
BOOL
ceConvertSzToBstr(
OUT BSTR *pbstr,
IN CHAR const *pch,
IN LONG cch);
VOID
ceFreeBstr(
IN OUT BSTR *pstr);
HRESULT
ceDateToFileTime(
IN DATE const *pDate,
OUT FILETIME *pft);
HRESULT
ceFileTimeToDate(
IN FILETIME const *pft,
OUT DATE *pDate);
HRESULT
ceVerifyObjIdA(
IN char const *pszObjId);
HRESULT
ceVerifyObjId(
IN WCHAR const *pwszObjId);
HRESULT
ceVerifyAndConvertWszToSzObjIds(
__in_opt CSPZZWSTR ppwszObjIds,
__out DWORD* pdwcObjIds,
__deref_out PZPSTR *pppszObjIds);
HRESULT
ceVerifyAltNameString(
IN LONG NameChoice,
IN BSTR strName);
HRESULT
ceDispatchSetErrorInfo(
IN HRESULT hrError,
IN WCHAR const *pwszDescription,
OPTIONAL IN WCHAR const *pwszProgId,
OPTIONAL IN IID const *piid);
VOID
ceInitErrorMessageText(
IN HMODULE hMod,
IN DWORD idsUnexpected,
IN DWORD idsUnknownErrorCode); // L"Error %ws %ws"
WCHAR const *
ceGetErrorMessageText(
IN HRESULT hr,
IN BOOL fHResultString);
WCHAR const *
ceGetErrorMessageTextEx(
IN HRESULT hr,
IN BOOL fHResultString,
IN OPTIONAL WCHAR const * const *papwszInsertionText);
WCHAR const *
ceHResultToString(
__inout PWSTR awchr,
IN HRESULT hr);
#define cwcFILENAMESUFFIXMAX 20
#define cwcSUFFIXMAX (1 + 5 + 1) // five decimal digits plus parentheses
#define wszFCSAPARM_SERVERDNSNAME L"%1"
#define wszFCSAPARM_SERVERSHORTNAME L"%2"
#define wszFCSAPARM_SANITIZEDCANAME L"%3"
#define wszFCSAPARM_CERTFILENAMESUFFIX L"%4"
#define wszFCSAPARM_DOMAINDN L"%5"
#define wszFCSAPARM_CONFIGDN L"%6"
#define wszFCSAPARM_SANITIZEDCANAMEHASH L"%7"
#define wszFCSAPARM_CRLFILENAMESUFFIX L"%8"
#define wszFCSAPARM_CRLDELTAFILENAMESUFFIX L"%9"
#define wszFCSAPARM_DSCRLATTRIBUTE L"%10"
#define wszFCSAPARM_DSCACERTATTRIBUTE L"%11"
#define wszFCSAPARM_DSUSERCERTATTRIBUTE L"%12"
#define wszFCSAPARM_DSKRACERTATTRIBUTE L"%13"
#define wszFCSAPARM_DSCROSSCERTPAIRATTRIBUTE L"%14"
HRESULT
ceFormatCertsrvStringArray(
IN BOOL fURL,
IN LPCWSTR pwszServerName_p1_2,
IN LPCWSTR pwszSanitizedName_p3_7,
IN DWORD iCert_p4,
IN DWORD iCertTarget_p4,
IN LPCWSTR pwszDomainDN_p5,
IN LPCWSTR pwszConfigDN_p6,
IN DWORD iCRL_p8,
IN BOOL fDeltaCRL_p9,
IN BOOL fDSAttrib_p10_11,
IN DWORD cStrings,
IN LPCWSTR *apwszStringsIn,
__deref_out LPWSTR *apwszStringsOut);
HRESULT
ceBuildPathAndExt(
IN WCHAR const *pwszDir,
IN WCHAR const *pwszFile,
OPTIONAL IN WCHAR const *pwszExt,
__deref_out PWSTR *ppwszPath);
HRESULT
ceInternetCanonicalizeUrl(
IN WCHAR const *pwszIn,
__deref_out PWSTR *ppwszOut);
int
ceWtoI(
IN WCHAR const *pwszDigitString,
OUT BOOL *pfValid);
int
celstrcmpiL(
IN WCHAR const *pwsz1,
IN WCHAR const *pwsz2);
HRESULT
ceIsConfigLocal(
IN WCHAR const *pwszConfig,
__deref_opt_out PWSTR *ppwszMachine,
OUT BOOL *pfLocal);
#endif // __CELIB_H__

2091
BuildTools/Include/CertAdm.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,18 @@
//+--------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1996 - 1999
//
// File: certbcli.idl
//
// Contents: IDL imports for certbcli.h
//
//---------------------------------------------------------------------------
#include <SpecStrings.h>
typedef __nullterminated WCHAR * PWSTR;
typedef __nullterminated WCHAR const * PCWSTR;
typedef __nullterminated CHAR * PSTR;
typedef __nullterminated CHAR const * PCSTR;
#include "certbcli.h"

View File

@ -0,0 +1,697 @@
//+--------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1996 - 1999
//
// File: certbcli.h
//
// Contents: Cert Server backup client APIs
//
//---------------------------------------------------------------------------
#ifdef _CERTBCLI_TYPECHECK
#undef __CERTBCLI_H__ // allow redundant include
#endif
#ifndef __CERTBCLI_H__
#define __CERTBCLI_H__
#ifdef __cplusplus
extern "C" {
#endif
#ifdef MIDL_PASS
#define RPC_STRING [string]
#else
#define RPC_STRING
#endif
#define IN
#define OUT
#define OPTIONAL
#define VOID void
#define CERTBCLI_CALL __stdcall
#ifndef _CERTBCLI_DEFINED
#define CERTBCLI_API __declspec(dllimport) CERTBCLI_CALL
#else
#define CERTBCLI_API
#endif
#define szBACKUPANNOTATION "Cert Server Backup Interface"
#define wszBACKUPANNOTATION TEXT(szBACKUPANNOTATION)
#define szRESTOREANNOTATION "Cert Server Restore Interface"
#define wszRESTOREANNOTATION TEXT(szRESTOREANNOTATION)
// Type of Backup passed to CertSrvBackupPrepare:
// CSBACKUP_TYPE_FULL: Requesting backup of the complete DB (DB & Log files)
// CSBACKUP_TYPE_LOGS_ONLY: Requesting backup of only the log files
// CSBACKUP_TYPE_INCREMENTAL: Requesting incremental backup
// CertSrvBackupPrepare flags:
#define CSBACKUP_TYPE_FULL 0x00000001
#define CSBACKUP_TYPE_LOGS_ONLY 0x00000002
//#define CSBACKUP_TYPE_INCREMENTAL 0x00000004 // not yet supported
#define CSBACKUP_TYPE_MASK 0x00000003 // valid flags
// Type of Restore passed to CertSrvRestorePrepare:
// CSRESTORE_TYPE_FULL: Requesting restore of the complete DB (DB & Log files)
// CSRESTORE_TYPE_ONLINE: Restoration is done when Cert Server is online.
#define CSRESTORE_TYPE_FULL 0x00000001 // else incremental
#define CSRESTORE_TYPE_ONLINE 0x00000002 // not yet supported
#define CSRESTORE_TYPE_CATCHUP 0x00000004 // not yet supported
#define CSRESTORE_TYPE_MASK 0x00000005 // valid flags
// Setting the current log # to this value would disable incremental backup
#define CSBACKUP_DISABLE_INCREMENTAL 0xffffffff
// BFT is the bit flag used to represent file types (directory/dit/logfile/etc.)
// We keep them as a character so that we can append/prepend them to the actual
// file path. The code in the Backup API's rely on the fact that values 0-256
// in 8 bit ascii map to the values 0-256 in unicode.
typedef WCHAR CSBFT;
// Bit flags:
// CSBFT_DIRECTORY - path specified is a directory
// CSBFT_DATABASE_DIRECTORY - that file goes into database directory
// CSBFT_LOG_DIRECTORY - that the file goes into log directory
#define CSBFT_DIRECTORY 0x80
#define CSBFT_DATABASE_DIRECTORY 0x40
#define CSBFT_LOG_DIRECTORY 0x20
// Following combinations are defined for easy use of the filetype and the
// directory into into which it goes
#define CSBFT_LOG ((CSBFT) (TEXT('\x01') | CSBFT_LOG_DIRECTORY))
#define CSBFT_LOG_DIR ((CSBFT) (TEXT('\x02') | CSBFT_DIRECTORY))
#define CSBFT_CHECKPOINT_DIR ((CSBFT) (TEXT('\x03') | CSBFT_DIRECTORY))
#define CSBFT_CERTSERVER_DATABASE ((CSBFT) (TEXT('\x04') | CSBFT_DATABASE_DIRECTORY))
#define CSBFT_PATCH_FILE ((CSBFT) (TEXT('\x05') | CSBFT_LOG_DIRECTORY))
#define CSBFT_UNKNOWN ((CSBFT) (TEXT('\x0f')))
// Backup Context Handle
typedef void *HCSBC;
#ifndef CSEDB_RSTMAP
typedef struct tagCSEDB_RSTMAPW {
RPC_STRING WCHAR *pwszDatabaseName;
RPC_STRING WCHAR *pwszNewDatabaseName;
} CSEDB_RSTMAPW;
#define CSEDB_RSTMAP CSEDB_RSTMAPW
#endif // CSEDB_RSTMAP
// For all the functions in this interface that have at least one string
// parameter, provide macros to invoke the appropriate version of the
// corresponding function.
#define CertSrvIsServerOnline CertSrvIsServerOnlineW
#define CertSrvBackupGetDynamicFileList CertSrvBackupGetDynamicFileListW
#define CertSrvBackupPrepare CertSrvBackupPrepareW
#define CertSrvBackupGetDatabaseNames CertSrvBackupGetDatabaseNamesW
#define CertSrvBackupOpenFile CertSrvBackupOpenFileW
#define CertSrvBackupGetBackupLogs CertSrvBackupGetBackupLogsW
#define CertSrvRestoreGetDatabaseLocations CertSrvRestoreGetDatabaseLocationsW
#define CertSrvRestorePrepare CertSrvRestorePrepareW
#define CertSrvRestoreRegister CertSrvRestoreRegisterW
#define CertSrvServerControl CertSrvServerControlW
//+--------------------------------------------------------------------------
// CertSrvIsServerOnline -- check to see if the Cert Server is Online on the
// given server. This call is guaranteed to return quickly.
//
// Parameters:
// [in] pwszServerName - name or config string of the server to check
// [out] pfServerOnline - pointer to receive the bool result
// (TRUE if Cert Server is online; FALSE, otherwise)
// Returns:
// S_OK if the call executed successfully;
// Failure code otherwise.
//+--------------------------------------------------------------------------
typedef HRESULT (CERTBCLI_CALL FNCERTSRVISSERVERONLINEW)(
IN WCHAR const *pwszServerName,
OUT BOOL *pfServerOnline);
HRESULT
CERTBCLI_API
CertSrvIsServerOnlineW(
IN WCHAR const *pwszServerName,
OUT BOOL *pfServerOnline);
#ifdef _CERTBCLI_TYPECHECK
FNCERTSRVISSERVERONLINEW *pfnCertSrvIsServerOnline = CertSrvIsServerOnline;
#endif
//+--------------------------------------------------------------------------
// CertSrvBackupGetDynamicFileList -- return the list of dynamic files that
// need to be backed up in addition to database files.
//
// Parameters:
// [in] hbc - backup context handle
// [out] ppwszzFileList - pointer to receive the pointer to the file list;
// allocated memory should be freed using CertSrvBackupFree() API
// by the caller when it is no longer needed; The file list info
// is an array of null-terminated filenames and the list is
// terminated by two L'\0's.
// [out] pcbSize - will receive the number of bytes returned
//
// Returns:
// S_OK if the call executed successfully;
// Failure code otherwise.
//---------------------------------------------------------------------------
typedef HRESULT (CERTBCLI_CALL FNCERTSRVBACKUPGETDYNAMICFILELISTW)(
IN HCSBC hbc,
OUT WCHAR **ppwszzFileList,
OUT DWORD *pcbSize);
HRESULT
CERTBCLI_API
CertSrvBackupGetDynamicFileListW(
__in IN HCSBC hbc,
__deref_out PWSTR *ppwszzFileList,
__out OUT DWORD *pcbSize);
#ifdef _CERTBCLI_TYPECHECK
FNCERTSRVBACKUPGETDYNAMICFILELISTW *pfnCertSrvBackupGetDynamicFileList = CertSrvBackupGetDynamicFileList;
#endif
//+--------------------------------------------------------------------------
// CertSrvBackupPrepare -- prepare the DB for the online backup and return a
// Backup Context Handle to be used for subsequent calls to backup
// functions.
//
// Parameters:
// [in] pwszServerName - name or config string of the server to check
// [in] grbitJet - flag to be passed to jet while backing up dbs
// [in] dwBackupFlags - CSBACKUP_TYPE_FULL or CSBACKUP_TYPE_LOGS_ONLY
// [out] phbc - pointer that will receive the backup context handle
//
// Returns:
// S_OK if the call executed successfully;
// Failure code otherwise.
//---------------------------------------------------------------------------
typedef HRESULT (CERTBCLI_CALL FNCERTSRVBACKUPPREPAREW)(
IN WCHAR const *pwszServerName,
IN ULONG grbitJet,
IN ULONG dwBackupFlags, // CSBACKUP_TYPE_*
OUT HCSBC *phbc);
HRESULT
CERTBCLI_API
CertSrvBackupPrepareW(
IN WCHAR const *pwszServerName,
IN ULONG grbitJet,
IN ULONG dwBackupFlags, // CSBACKUP_TYPE_*
OUT HCSBC *phbc);
#ifdef _CERTBCLI_TYPECHECK
FNCERTSRVBACKUPPREPAREW *pfnCertSrvBackupPrepare = CertSrvBackupPrepare;
#endif
//+--------------------------------------------------------------------------
// CertSrvBackupGetDatabaseNames -- return the list of data bases that need to
// be backed up for the given backup context
//
// Parameters:
// [in] hbc - backup context handle
// [out] ppwszzAttachmentInformation - pointer to receive the pointer to
// the attachment info; allocated memory should be freed using
// CertSrvBackupFree() API by the caller when it is no longer
// needed; Attachment info is an array of null-terminated
// filenames and the list is terminated by two L'\0's.
// [out] pcbSize - will receive the number of bytes returned
//
// Returns:
// S_OK if the call executed successfully;
// Failure code otherwise.
//---------------------------------------------------------------------------
typedef HRESULT (CERTBCLI_CALL FNCERTSRVBACKUPGETDATABASENAMESW)(
IN HCSBC hbc,
OUT WCHAR **ppwszzAttachmentInformation,
OUT DWORD *pcbSize);
HRESULT
CERTBCLI_API
CertSrvBackupGetDatabaseNamesW(
__in IN HCSBC hbc,
__deref_out PWSTR *ppwszzAttachmentInformation,
__out OUT DWORD *pcbSize);
#ifdef _CERTBCLI_TYPECHECK
FNCERTSRVBACKUPGETDATABASENAMESW *pfnCertSrvBackupGetDatabaseNames = CertSrvBackupGetDatabaseNames;
#endif
//+--------------------------------------------------------------------------
// CertSrvBackupOpenFile -- open the given attachment for read.
//
// Parameters:
// [in] hbc - backup context handle
// [in] pwszAttachmentName - name of the attachment to be opened for read
// [in] cbReadHintSize - suggested size in bytes that might be used
// during the subsequent reads on this attachment
// [out] pliFileSize - pointer to a large integer that would receive the
// size in bytes of the given attachment
// Returns:
// S_OK if the call executed successfully;
// Failure code otherwise.
//---------------------------------------------------------------------------
typedef HRESULT (CERTBCLI_CALL FNCERTSRVBACKUPOPENFILEW)(
IN HCSBC hbc,
IN WCHAR const *pwszAttachmentName,
IN DWORD cbReadHintSize,
OUT LARGE_INTEGER *pliFileSize);
HRESULT
CERTBCLI_API
CertSrvBackupOpenFileW(
IN HCSBC hbc,
IN WCHAR const *pwszAttachmentName,
IN DWORD cbReadHintSize,
OUT LARGE_INTEGER *pliFileSize);
#ifdef _CERTBCLI_TYPECHECK
FNCERTSRVBACKUPOPENFILEW *pfnCertSrvBackupOpenFile = CertSrvBackupOpenFile;
#endif
//+--------------------------------------------------------------------------
// CertSrvBackupRead -- read the currently open attachment bytes into the given
// buffer. The client application is expected to call this function
// repeatedly until it gets the entire file (the application would have
// received the file size through the CertSrvBackupOpenFile call before.
//
// Parameters:
// [in] hbc - backup context handle
// [out] pvBuffer - pointer to the buffer that would receive the read data.
// [in] cbBuffer - specifies the size of the above buffer
// [out] pcbRead - pointer to receive the actual number of bytes read.
//
// Returns:
// S_OK if the call executed successfully;
// Failure code otherwise.
//---------------------------------------------------------------------------
typedef HRESULT (CERTBCLI_CALL FNCERTSRVBACKUPREAD)(
IN HCSBC hbc,
OUT VOID *pvBuffer,
IN DWORD cbBuffer,
OUT DWORD *pcbRead);
HRESULT
CERTBCLI_API
CertSrvBackupRead(
IN HCSBC hbc,
OUT VOID *pvBuffer,
IN DWORD cbBuffer,
OUT DWORD *pcbRead);
#ifdef _CERTBCLI_TYPECHECK
FNCERTSRVBACKUPREAD *pfnCertSrvBackupRead = CertSrvBackupRead;
#endif
//+--------------------------------------------------------------------------
// CertSrvBackupClose -- called by the application after it completes reading all
// the data in the currently opened attachement.
//
// Parameters:
// [in] hbc - backup context handle
//
// Returns:
// S_OK if the call executed successfully;
// Failure code otherwise.
//---------------------------------------------------------------------------
typedef HRESULT (CERTBCLI_CALL FNCERTSRVBACKUPCLOSE)(
IN HCSBC hbc);
HRESULT
CERTBCLI_API
CertSrvBackupClose(
IN HCSBC hbc);
#ifdef _CERTBCLI_TYPECHECK
FNCERTSRVBACKUPCLOSE *pfnCertSrvBackupClose = CertSrvBackupClose;
#endif
//+--------------------------------------------------------------------------
// CertSrvBackupGetBackupLogs -- return the list of log files that need to be
// backed up for the given backup context
//
// Parameters:
// [in] hbc - backup context handle
// [out] pwszzBackupLogFiles - pointer that will receive the pointer to
// the list of log files; allocated memory should be freed using
// CertSrvBackupFree() API by the caller when it is no
// longer needed; Log files are returned in an array of
// null-terminated filenames and the list is terminated by two
// L'\0's
// [out] pcbSize - will receive the number of bytes returned
//
// Returns:
// S_OK if the call executed successfully;
// Failure code otherwise.
//---------------------------------------------------------------------------
typedef HRESULT (CERTBCLI_CALL FNCERTSRVBACKUPGETBACKUPLOGSW)(
IN HCSBC hbc,
OUT WCHAR **ppwszzBackupLogFiles,
OUT DWORD *pcbSize);
HRESULT
CERTBCLI_API
CertSrvBackupGetBackupLogsW(
__in IN HCSBC hbc,
__deref_out PWSTR *ppwszzBackupLogFiles,
__out OUT DWORD *pcbSize);
#ifdef _CERTBCLI_TYPECHECK
FNCERTSRVBACKUPGETBACKUPLOGSW *pfnCertSrvBackupGetBackupLogs = CertSrvBackupGetBackupLogs;
#endif
//+--------------------------------------------------------------------------
// CertSrvBackupTruncateLogs -- called to truncate the already read backup logs.
//
// Parameters:
// [in] hbc - backup context handle
//
// Returns:
// S_OK if the call executed successfully;
// Failure code otherwise.
//---------------------------------------------------------------------------
typedef HRESULT (CERTBCLI_CALL FNCERTSRVBACKUPTRUNCATELOGS)(
IN HCSBC hbc);
HRESULT
CERTBCLI_API
CertSrvBackupTruncateLogs(
IN HCSBC hbc);
#ifdef _CERTBCLI_TYPECHECK
FNCERTSRVBACKUPTRUNCATELOGS *pfnCertSrvBackupTruncateLogs = CertSrvBackupTruncateLogs;
#endif
//+--------------------------------------------------------------------------
// CertSrvBackupEnd -- called to end the current backup session.
//
// Parameters:
// [in] hbc - backup context handle of the backup session
//
// Returns:
// S_OK if the call executed successfully;
// Failure code otherwise.
//---------------------------------------------------------------------------
typedef HRESULT (CERTBCLI_CALL FNCERTSRVBACKUPEND)(
IN HCSBC hbc);
HRESULT
CERTBCLI_API
CertSrvBackupEnd(
IN HCSBC hbc);
#ifdef _CERTBCLI_TYPECHECK
FNCERTSRVBACKUPEND *pfnCertSrvBackupEnd = CertSrvBackupEnd;
#endif
//+--------------------------------------------------------------------------
// CertSrvBackupFree -- free any buffer allocated by certbcli.dll APIs.
//
// Parameters:
// [in] pv - pointer to the buffer that is to be freed.
//
// Returns:
// None.
//---------------------------------------------------------------------------
typedef VOID (CERTBCLI_CALL FNCERTSRVBACKUPFREE)(
IN VOID *pv);
VOID
CERTBCLI_API
CertSrvBackupFree(
IN VOID *pv);
#ifdef _CERTBCLI_TYPECHECK
FNCERTSRVBACKUPFREE *pfnCertSrvBackupFree = CertSrvBackupFree;
#endif
//+--------------------------------------------------------------------------
// CertSrvRestoreGetDatabaseLocations -- called both at backup time as well as
// at restorate time to get data base locations for different types of
// files.
//
// Parameters:
// [in] hbc - backup context handle which would have been obtained
// through CertSrvBackupPrepare in the backup case and through
// CertSrvRestorePrepare in the restore case.
// [out] ppwszzDatabaseLocationList - pointer that will receive the
// pointer to the list of database locations; allocated memory
// should be freed using CertSrvBackupFree() API by the caller
// when it is no longer needed; locations are returned in an array
// of null-terminated names and and the list is terminated by
// two L'\0's. The first character of each name is the BFT
// character that indicates the type of the file and the rest of
// the name tells gives the path into which that particular type
// of file should be restored.
// [out] pcbSize - will receive the number of bytes returned
//
// Returns:
// S_OK if the call executed successfully;
// Failure code otherwise.
//---------------------------------------------------------------------------
typedef HRESULT (CERTBCLI_CALL FNCERTSRVRESTOREGETDATABASELOCATIONSW)(
IN HCSBC hbc,
OUT WCHAR **ppwszzDatabaseLocationList,
OUT DWORD *pcbSize);
HRESULT
CERTBCLI_API
CertSrvRestoreGetDatabaseLocationsW(
__in IN HCSBC hbc,
__deref_out PWSTR *ppwszzDatabaseLocationList,
__out OUT DWORD *pcbSize);
#ifdef _CERTBCLI_TYPECHECK
FNCERTSRVRESTOREGETDATABASELOCATIONSW *pfnCertSrvRestoreGetDatabaseLocations = CertSrvRestoreGetDatabaseLocations;
#endif
//+--------------------------------------------------------------------------
// CertSrvRestorePrepare -- indicate beginning of a restore session.
//
// Parameters:
// [in] pwszServerName - name or config string of the server into which
// the restore operation is going to be performed.
// [in] dwRestoreFlags - Or'ed combination of CSRESTORE_TYPE_* flags;
// 0 if no special flags are to be specified
// [out] phbc - pointer to receive the backup context handle which is to
// be passed to the subsequent restore APIs
//
// Returns:
// S_OK if the call executed successfully;
// Failure code otherwise.
//---------------------------------------------------------------------------
typedef HRESULT (CERTBCLI_CALL FNCERTSRVRESTOREPREPAREW)(
IN WCHAR const *pwszServerName,
IN ULONG dwRestoreFlags,
OUT HCSBC *phbc);
HRESULT
CERTBCLI_API
CertSrvRestorePrepareW(
IN WCHAR const *pwszServerName,
IN ULONG dwRestoreFlags, // CSRESTORE_TYPE_*
OUT HCSBC *phbc);
#ifdef _CERTBCLI_TYPECHECK
FNCERTSRVRESTOREPREPAREW *pfnCertSrvRestorePrepare = CertSrvRestorePrepare;
#endif
//+--------------------------------------------------------------------------
// CertSrvRestoreRegister -- register a restore operation. It will interlock
// all subsequent restore operations, and will prevent the restore target
// from starting until the call to CertSrvRestoreRegisterComplete is made.
//
// Parameters:
// [in] hbc - backup context handle for the restore session.
// [in] pwszCheckPointFilePath - path to restore the check point files
// [in] pwszLogPath - path where the log files are restored
// [in] rgrstmap - restore map
// [in] crstmap - tells if there is a new restore map
// [in] pwszBackupLogPath - path where the backup logs are located
// [in] genLow - Lowest log# that was restored in this restore session
// [in] genHigh - Highest log# that was restored in this restore session
//
// Returns:
// S_OK if the call executed successfully;
// Failure code otherwise.
//---------------------------------------------------------------------------
typedef HRESULT (CERTBCLI_CALL FNCERTSRVRESTOREREGISTERW)(
OPTIONAL IN HCSBC hbc,
OPTIONAL IN WCHAR const *pwszCheckPointFilePath,
OPTIONAL IN WCHAR const *pwszLogPath,
OPTIONAL IN CSEDB_RSTMAPW rgrstmap[],
IN LONG crstmap,
OPTIONAL IN WCHAR const *pwszBackupLogPath,
IN ULONG genLow,
IN ULONG genHigh);
HRESULT
CERTBCLI_API
CertSrvRestoreRegisterW(
OPTIONAL IN HCSBC hbc,
OPTIONAL IN WCHAR const *pwszCheckPointFilePath,
OPTIONAL IN WCHAR const *pwszLogPath,
OPTIONAL IN CSEDB_RSTMAPW rgrstmap[],
IN LONG crstmap,
OPTIONAL IN WCHAR const *pwszBackupLogPath,
IN ULONG genLow,
IN ULONG genHigh);
HRESULT
CERTBCLI_API
CertSrvRestoreRegisterThroughFile(
IN HCSBC hbc,
OPTIONAL IN WCHAR const *pwszCheckPointFilePath,
OPTIONAL IN WCHAR const *pwszLogPath,
OPTIONAL IN CSEDB_RSTMAPW rgrstmap[],
IN LONG crstmap,
OPTIONAL IN WCHAR const *pwszBackupLogPath,
IN ULONG genLow,
IN ULONG genHigh);
#ifdef _CERTBCLI_TYPECHECK
FNCERTSRVRESTOREREGISTERW *pfnCertSrvRestoreRegister = CertSrvRestoreRegister;
#endif
//+--------------------------------------------------------------------------
// CertSrvRestoreRegisterComplete -- indicate that a previously registered
// restore is complete.
//
// Parameters:
// [in] hbc - backup context handle
// [in] hrRestoreState - success code if the restore was successful
//
// Returns:
// S_OK if the call executed successfully;
// Failure code otherwise.
//---------------------------------------------------------------------------
typedef HRESULT (CERTBCLI_CALL FNCERTSRVRESTOREREGISTERCOMPLETE)(
OPTIONAL IN HCSBC hbc,
IN HRESULT hrRestoreState);
HRESULT
CERTBCLI_API
CertSrvRestoreRegisterComplete(
OPTIONAL IN HCSBC hbc,
IN HRESULT hrRestoreState);
#ifdef _CERTBCLI_TYPECHECK
FNCERTSRVRESTOREREGISTERCOMPLETE *pfnCertSrvRestoreRegisterComplete = CertSrvRestoreRegisterComplete;
#endif
//+--------------------------------------------------------------------------
// CertSrvRestoreEnd -- end a restore session
//
// Parameters:
// [in] hbc - backup context handle
//
// Returns:
// S_OK if the call executed successfully;
// Failure code otherwise.
//---------------------------------------------------------------------------
typedef HRESULT (CERTBCLI_CALL FNCERTSRVRESTOREEND)(
IN HCSBC hbc);
HRESULT
CERTBCLI_API
CertSrvRestoreEnd(
IN HCSBC hbc);
#ifdef _CERTBCLI_TYPECHECK
FNCERTSRVRESTOREEND *pfnCertSrvRestoreEnd = CertSrvRestoreEnd;
#endif
//+--------------------------------------------------------------------------
// CertSrvServerControl -- send a control command to the cert server.
//
// Parameters:
// [in] pwszServerName - name or config string of the server to control
// [in] dwControlFlags - control command and flags
// [out] pcbOut - pointer to receive the size of command output data
// [out] ppbOut - pointer to receive command output data. Use the
// CertSrvBackupFree() API to free the buffer.
//
// Returns:
// S_OK if the call executed successfully;
// Failure code otherwise.
//---------------------------------------------------------------------------
#define CSCONTROL_SHUTDOWN 0x000000001
#define CSCONTROL_SUSPEND 0x000000002
#define CSCONTROL_RESTART 0x000000003
typedef HRESULT (CERTBCLI_CALL FNCERTSRVSERVERCONTROLW)(
IN WCHAR const *pwszServerName,
IN DWORD dwControlFlags,
OPTIONAL OUT DWORD *pcbOut,
OPTIONAL OUT BYTE **ppbOut);
HRESULT
CERTBCLI_API
CertSrvServerControlW(
IN WCHAR const *pwszServerName,
IN DWORD dwControlFlags,
OPTIONAL OUT DWORD *pcbOut,
OPTIONAL OUT BYTE **ppbOut);
#ifdef _CERTBCLI_TYPECHECK
FNCERTSRVSERVERCONTROLW *pfnCertSrvServerControl = CertSrvServerControl;
#endif
#ifdef __cplusplus
}
#endif
#endif // __CERTBCLI_H__

View File

@ -0,0 +1,89 @@
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 7.00.0555 */
/* Compiler settings for certbase.idl:
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING( ) */
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 500
#endif
/* verify that the <rpcsal.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCSAL_H_VERSION__
#define __REQUIRED_RPCSAL_H_VERSION__ 100
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__
#ifndef __certbase_h__
#define __certbase_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
/* header files for imported files */
#include "wtypes.h"
#ifdef __cplusplus
extern "C"{
#endif
/* interface __MIDL_itf_certbase_0000_0000 */
/* [local] */
typedef struct _CERTTRANSBLOB
{
unsigned long cb;
BYTE *pb;
} CERTTRANSBLOB;
typedef struct _CERTVIEWRESTRICTION
{
DWORD ColumnIndex;
LONG SeekOperator;
LONG SortOrder;
BYTE *pbValue;
DWORD cbValue;
} CERTVIEWRESTRICTION;
extern RPC_IF_HANDLE __MIDL_itf_certbase_0000_0000_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_certbase_0000_0000_v0_0_s_ifspec;
/* Additional Prototypes for ALL interfaces */
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif

1712
BuildTools/Include/CertCli.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,333 @@
//+--------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1996 - 1999
//
// File: certenc.idl
//
// Contents: IDL source for certenc.dll
//
//---------------------------------------------------------------------------
// This file will be processed by the MIDL tool to produce the type library
// (certenc.tlb) and marshalling code.
import "wtypes.idl";
//+--------------------------------------------------------------------------
// ICertEncodeStringArray class -- local COM interface
//+--------------------------------------------------------------------------
[
object,
uuid(12a88820-7494-11d0-8816-00a0c903b83c),
dual,
helpstring("ICertEncodeStringArray Interface"),
pointer_default(unique)
]
interface ICertEncodeStringArray: IDispatch
{
import "oaidl.idl";
HRESULT Decode(
[in] BSTR const strBinary);
HRESULT GetStringType(
[out, retval] LONG *pStringType);
HRESULT GetCount(
[out, retval] LONG *pCount);
HRESULT GetValue(
[in] LONG Index,
[out, retval] BSTR *pstr);
HRESULT Reset(
[in] LONG Count,
[in] LONG StringType);
HRESULT SetValue(
[in] LONG Index,
[in] BSTR const str);
HRESULT Encode(
[out, retval] BSTR *pstrBinary);
};
//+--------------------------------------------------------------------------
// ICertEncodeLongArray class -- local COM interface
//+--------------------------------------------------------------------------
[
object,
uuid(15e2f230-a0a2-11d0-8821-00a0c903b83c),
dual,
helpstring("ICertEncodeLongArray Interface"),
pointer_default(unique)
]
interface ICertEncodeLongArray: IDispatch
{
import "oaidl.idl";
HRESULT Decode(
[in] BSTR const strBinary);
HRESULT GetCount(
[out, retval] LONG *pCount);
HRESULT GetValue(
[in] LONG Index,
[out, retval] LONG *pValue);
HRESULT Reset(
[in] LONG Count);
HRESULT SetValue(
[in] LONG Index,
[in] LONG Value);
HRESULT Encode(
[out, retval] BSTR *pstrBinary);
};
//+--------------------------------------------------------------------------
// ICertEncodeDateArray class -- local COM interface
//+--------------------------------------------------------------------------
[
object,
uuid(2f9469a0-a470-11d0-8821-00a0c903b83c),
dual,
helpstring("ICertEncodeDateArray Interface"),
pointer_default(unique)
]
interface ICertEncodeDateArray: IDispatch
{
import "oaidl.idl";
HRESULT Decode(
[in] BSTR const strBinary);
HRESULT GetCount(
[out, retval] LONG *pCount);
HRESULT GetValue(
[in] LONG Index,
[out, retval] DATE *pValue);
HRESULT Reset(
[in] LONG Count);
HRESULT SetValue(
[in] LONG Index,
[in] DATE Value);
HRESULT Encode(
[out, retval] BSTR *pstrBinary);
};
//+--------------------------------------------------------------------------
// ICertEncodeCRLDistInfo class -- local COM interface
//+--------------------------------------------------------------------------
[
object,
uuid(01958640-bbff-11d0-8825-00a0c903b83c),
dual,
helpstring("ICertEncodeCRLDistInfo Interface"),
pointer_default(unique)
]
interface ICertEncodeCRLDistInfo: IDispatch
{
import "oaidl.idl";
HRESULT Decode(
[in] BSTR const strBinary);
HRESULT GetDistPointCount(
[out, retval] LONG *pDistPointCount);
HRESULT GetNameCount(
[in] LONG DistPointIndex,
[out, retval] LONG *pNameCount);
HRESULT GetNameChoice(
[in] LONG DistPointIndex,
[in] LONG NameIndex,
[out, retval] LONG *pNameChoice);
HRESULT GetName(
[in] LONG DistPointIndex,
[in] LONG NameIndex,
[out, retval] BSTR *pstrName);
HRESULT Reset(
[in] LONG DistPointCount);
HRESULT SetNameCount(
[in] LONG DistPointIndex,
[in] LONG NameCount);
HRESULT SetNameEntry(
[in] LONG DistPointIndex,
[in] LONG NameIndex,
[in] LONG NameChoice,
[in] BSTR const strName);
HRESULT Encode(
[out, retval] BSTR *pstrBinary);
};
//+--------------------------------------------------------------------------
// ICertEncodeAltName class -- local COM interface
//+--------------------------------------------------------------------------
const LONG EAN_NAMEOBJECTID = 0x80000000;
[
object,
uuid(1c9a8c70-1271-11d1-9bd4-00c04fb683fa),
dual,
helpstring("ICertEncodeAltName Interface"),
pointer_default(unique)
]
interface ICertEncodeAltName: IDispatch
{
import "oaidl.idl";
HRESULT Decode(
[in] BSTR const strBinary);
HRESULT GetNameCount(
[out, retval] LONG *pNameCount);
HRESULT GetNameChoice(
[in] LONG NameIndex,
[out, retval] LONG *pNameChoice);
HRESULT GetName(
[in] LONG NameIndex, // NameIndex | EAN_*
[out, retval] BSTR *pstrName);
HRESULT Reset(
[in] LONG NameCount);
HRESULT SetNameEntry(
[in] LONG NameIndex, // NameIndex | EAN_*
[in] LONG NameChoice,
[in] BSTR const strName);
HRESULT Encode(
[out, retval] BSTR *pstrBinary);
};
//+--------------------------------------------------------------------------
// ICertEncodeBitString class -- local COM interface
//+--------------------------------------------------------------------------
[
object,
uuid(6db525be-1278-11d1-9bd4-00c04fb683fa),
dual,
helpstring("ICertEncodeBitString Interface"),
pointer_default(unique)
]
interface ICertEncodeBitString: IDispatch
{
import "oaidl.idl";
HRESULT Decode(
[in] BSTR const strBinary);
HRESULT GetBitCount(
[out, retval] LONG *pBitCount);
HRESULT GetBitString(
[out, retval] BSTR *pstrBitString);
HRESULT Encode(
[in] LONG BitCount,
[in] BSTR strBitString,
[out, retval] BSTR *pstrBinary);
};
//+--------------------------------------------------------------------------
// certenc Type library
//+--------------------------------------------------------------------------
[
uuid(13199c00-7494-11d0-8816-00a0c903b83c),
version(1.0),
helpstring("CertEnc 1.0 Type Library")
]
library CERTENCODELib
{
importlib("stdole2.tlb");
[
uuid(19a76fe0-7494-11d0-8816-00a0c903b83c),
helpstring("CertEncodeStringArray Class")
]
coclass CCertEncodeStringArray
{
[default] interface ICertEncodeStringArray;
};
[
uuid(4e0680a0-a0a2-11d0-8821-00a0c903b83c),
helpstring("CertEncodeLongArray Class")
]
coclass CCertEncodeLongArray
{
[default] interface ICertEncodeLongArray;
};
[
uuid(301f77b0-a470-11d0-8821-00a0c903b83c),
helpstring("CertEncodeDateArray Class")
]
coclass CCertEncodeDateArray
{
[default] interface ICertEncodeDateArray;
};
[
uuid(01fa60a0-bbff-11d0-8825-00a0c903b83c),
helpstring("CertEncodeCRLDistInfo Class")
]
coclass CCertEncodeCRLDistInfo
{
[default] interface ICertEncodeCRLDistInfo;
};
[
uuid(1cfc4cda-1271-11d1-9bd4-00c04fb683fa),
helpstring("CertEncodeAltName Class")
]
coclass CCertEncodeAltName
{
[default] interface ICertEncodeAltName;
};
[
uuid(6d6b3cd8-1278-11d1-9bd4-00c04fb683fa),
helpstring("CertEncodeBitString Class")
]
coclass CCertEncodeBitString
{
[default] interface ICertEncodeBitString;
};
};

1358
BuildTools/Include/CertEnc.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,76 @@
//+--------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1996 - 1999
//
// File: certexit.idl
//
// Contents: IDL source for certexit.dll
//
//---------------------------------------------------------------------------
// This file will be processed by the MIDL tool to produce the type library
// (certexit.tlb) and marshalling code.
import "wtypes.idl";
import "certmod.idl";
cpp_quote("#define EXITEVENT_INVALID ( 0x0 ) // Invalid event")
cpp_quote("#define EXITEVENT_CERTISSUED ( 0x1 ) // Certificate issued")
cpp_quote("#define EXITEVENT_CERTPENDING ( 0x2 ) // Certificate pending")
cpp_quote("#define EXITEVENT_CERTDENIED ( 0x4 ) // Certificate denied")
cpp_quote("#define EXITEVENT_CERTREVOKED ( 0x8 ) // Certificate revoked")
cpp_quote("#define EXITEVENT_CERTRETRIEVEPENDING ( 0x10 ) // Certificate retrieval")
cpp_quote("#define EXITEVENT_CRLISSUED ( 0x20 ) // CRL issued")
cpp_quote("#define EXITEVENT_SHUTDOWN ( 0x40 ) // Service shutdown")
cpp_quote("#define EXITEVENT_STARTUP ( 0x80 ) // Service startup, fake event generated by exit module")
cpp_quote("#define EXITEVENT_CERTIMPORTED ( 0x200 ) // Certificate Imported")
//+--------------------------------------------------------------------------
// ICertExit class -- local COM interface, local implementation
//+--------------------------------------------------------------------------
[
object,
uuid(e19ae1a0-7364-11d0-8816-00a0c903b83c),
dual,
helpstring("ICertExit Interface"),
pointer_default(unique)
]
interface ICertExit: IDispatch
{
import "oaidl.idl";
HRESULT Initialize(
[in] BSTR const strConfig,
[out, retval] LONG *pEventMask);
HRESULT Notify(
[in] LONG ExitEvent,
[in] LONG Context);
HRESULT GetDescription(
[out, retval] BSTR *pstrDescription);
};
//+--------------------------------------------------------------------------
// ICertExit2 -- local COM interface
//+--------------------------------------------------------------------------
[
object,
uuid(0abf484b-d049-464d-a7ed-552e7529b0ff),
dual,
helpstring("ICertExit2 Interface"),
pointer_default(unique)
]
interface ICertExit2: ICertExit
{
HRESULT GetManageModule(
[out, retval] ICertManageModule **ppManageModule);
};

View File

@ -0,0 +1,401 @@
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 7.00.0555 */
/* Compiler settings for certexit.idl:
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING( ) */
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 500
#endif
/* verify that the <rpcsal.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCSAL_H_VERSION__
#define __REQUIRED_RPCSAL_H_VERSION__ 100
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#ifndef __certexit_h__
#define __certexit_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifndef __ICertExit_FWD_DEFINED__
#define __ICertExit_FWD_DEFINED__
typedef interface ICertExit ICertExit;
#endif /* __ICertExit_FWD_DEFINED__ */
#ifndef __ICertExit2_FWD_DEFINED__
#define __ICertExit2_FWD_DEFINED__
typedef interface ICertExit2 ICertExit2;
#endif /* __ICertExit2_FWD_DEFINED__ */
/* header files for imported files */
#include "wtypes.h"
#include "certmod.h"
#ifdef __cplusplus
extern "C"{
#endif
/* interface __MIDL_itf_certexit_0000_0000 */
/* [local] */
#define EXITEVENT_INVALID ( 0x0 ) // Invalid event
#define EXITEVENT_CERTISSUED ( 0x1 ) // Certificate issued
#define EXITEVENT_CERTPENDING ( 0x2 ) // Certificate pending
#define EXITEVENT_CERTDENIED ( 0x4 ) // Certificate denied
#define EXITEVENT_CERTREVOKED ( 0x8 ) // Certificate revoked
#define EXITEVENT_CERTRETRIEVEPENDING ( 0x10 ) // Certificate retrieval
#define EXITEVENT_CRLISSUED ( 0x20 ) // CRL issued
#define EXITEVENT_SHUTDOWN ( 0x40 ) // Service shutdown
#define EXITEVENT_STARTUP ( 0x80 ) // Service startup, fake event generated by exit module
#define EXITEVENT_CERTIMPORTED ( 0x200 ) // Certificate Imported
extern RPC_IF_HANDLE __MIDL_itf_certexit_0000_0000_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_certexit_0000_0000_v0_0_s_ifspec;
#ifndef __ICertExit_INTERFACE_DEFINED__
#define __ICertExit_INTERFACE_DEFINED__
/* interface ICertExit */
/* [unique][helpstring][dual][uuid][object] */
EXTERN_C const IID IID_ICertExit;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("e19ae1a0-7364-11d0-8816-00a0c903b83c")
ICertExit : public IDispatch
{
public:
virtual HRESULT STDMETHODCALLTYPE Initialize(
/* [in] */ __RPC__in const BSTR strConfig,
/* [retval][out] */ __RPC__out LONG *pEventMask) = 0;
virtual HRESULT STDMETHODCALLTYPE Notify(
/* [in] */ LONG ExitEvent,
/* [in] */ LONG Context) = 0;
virtual HRESULT STDMETHODCALLTYPE GetDescription(
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrDescription) = 0;
};
#else /* C style interface */
typedef struct ICertExitVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in ICertExit * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
__RPC__deref_out void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in ICertExit * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in ICertExit * This);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )(
__RPC__in ICertExit * This,
/* [out] */ __RPC__out UINT *pctinfo);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )(
__RPC__in ICertExit * This,
/* [in] */ UINT iTInfo,
/* [in] */ LCID lcid,
/* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo);
HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )(
__RPC__in ICertExit * This,
/* [in] */ __RPC__in REFIID riid,
/* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames,
/* [range][in] */ __RPC__in_range(0,16384) UINT cNames,
/* [in] */ LCID lcid,
/* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId);
/* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )(
ICertExit * This,
/* [in] */ DISPID dispIdMember,
/* [in] */ REFIID riid,
/* [in] */ LCID lcid,
/* [in] */ WORD wFlags,
/* [out][in] */ DISPPARAMS *pDispParams,
/* [out] */ VARIANT *pVarResult,
/* [out] */ EXCEPINFO *pExcepInfo,
/* [out] */ UINT *puArgErr);
HRESULT ( STDMETHODCALLTYPE *Initialize )(
__RPC__in ICertExit * This,
/* [in] */ __RPC__in const BSTR strConfig,
/* [retval][out] */ __RPC__out LONG *pEventMask);
HRESULT ( STDMETHODCALLTYPE *Notify )(
__RPC__in ICertExit * This,
/* [in] */ LONG ExitEvent,
/* [in] */ LONG Context);
HRESULT ( STDMETHODCALLTYPE *GetDescription )(
__RPC__in ICertExit * This,
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrDescription);
END_INTERFACE
} ICertExitVtbl;
interface ICertExit
{
CONST_VTBL struct ICertExitVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define ICertExit_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define ICertExit_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define ICertExit_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define ICertExit_GetTypeInfoCount(This,pctinfo) \
( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) )
#define ICertExit_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) )
#define ICertExit_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) )
#define ICertExit_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) )
#define ICertExit_Initialize(This,strConfig,pEventMask) \
( (This)->lpVtbl -> Initialize(This,strConfig,pEventMask) )
#define ICertExit_Notify(This,ExitEvent,Context) \
( (This)->lpVtbl -> Notify(This,ExitEvent,Context) )
#define ICertExit_GetDescription(This,pstrDescription) \
( (This)->lpVtbl -> GetDescription(This,pstrDescription) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __ICertExit_INTERFACE_DEFINED__ */
#ifndef __ICertExit2_INTERFACE_DEFINED__
#define __ICertExit2_INTERFACE_DEFINED__
/* interface ICertExit2 */
/* [unique][helpstring][dual][uuid][object] */
EXTERN_C const IID IID_ICertExit2;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("0abf484b-d049-464d-a7ed-552e7529b0ff")
ICertExit2 : public ICertExit
{
public:
virtual HRESULT STDMETHODCALLTYPE GetManageModule(
/* [retval][out] */ __RPC__deref_out_opt ICertManageModule **ppManageModule) = 0;
};
#else /* C style interface */
typedef struct ICertExit2Vtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in ICertExit2 * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
__RPC__deref_out void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in ICertExit2 * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in ICertExit2 * This);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )(
__RPC__in ICertExit2 * This,
/* [out] */ __RPC__out UINT *pctinfo);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )(
__RPC__in ICertExit2 * This,
/* [in] */ UINT iTInfo,
/* [in] */ LCID lcid,
/* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo);
HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )(
__RPC__in ICertExit2 * This,
/* [in] */ __RPC__in REFIID riid,
/* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames,
/* [range][in] */ __RPC__in_range(0,16384) UINT cNames,
/* [in] */ LCID lcid,
/* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId);
/* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )(
ICertExit2 * This,
/* [in] */ DISPID dispIdMember,
/* [in] */ REFIID riid,
/* [in] */ LCID lcid,
/* [in] */ WORD wFlags,
/* [out][in] */ DISPPARAMS *pDispParams,
/* [out] */ VARIANT *pVarResult,
/* [out] */ EXCEPINFO *pExcepInfo,
/* [out] */ UINT *puArgErr);
HRESULT ( STDMETHODCALLTYPE *Initialize )(
__RPC__in ICertExit2 * This,
/* [in] */ __RPC__in const BSTR strConfig,
/* [retval][out] */ __RPC__out LONG *pEventMask);
HRESULT ( STDMETHODCALLTYPE *Notify )(
__RPC__in ICertExit2 * This,
/* [in] */ LONG ExitEvent,
/* [in] */ LONG Context);
HRESULT ( STDMETHODCALLTYPE *GetDescription )(
__RPC__in ICertExit2 * This,
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrDescription);
HRESULT ( STDMETHODCALLTYPE *GetManageModule )(
__RPC__in ICertExit2 * This,
/* [retval][out] */ __RPC__deref_out_opt ICertManageModule **ppManageModule);
END_INTERFACE
} ICertExit2Vtbl;
interface ICertExit2
{
CONST_VTBL struct ICertExit2Vtbl *lpVtbl;
};
#ifdef COBJMACROS
#define ICertExit2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define ICertExit2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define ICertExit2_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define ICertExit2_GetTypeInfoCount(This,pctinfo) \
( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) )
#define ICertExit2_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) )
#define ICertExit2_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) )
#define ICertExit2_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) )
#define ICertExit2_Initialize(This,strConfig,pEventMask) \
( (This)->lpVtbl -> Initialize(This,strConfig,pEventMask) )
#define ICertExit2_Notify(This,ExitEvent,Context) \
( (This)->lpVtbl -> Notify(This,ExitEvent,Context) )
#define ICertExit2_GetDescription(This,pstrDescription) \
( (This)->lpVtbl -> GetDescription(This,pstrDescription) )
#define ICertExit2_GetManageModule(This,ppManageModule) \
( (This)->lpVtbl -> GetManageModule(This,ppManageModule) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __ICertExit2_INTERFACE_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
unsigned long __RPC_USER BSTR_UserSize( __RPC__in unsigned long *, unsigned long , __RPC__in BSTR * );
unsigned char * __RPC_USER BSTR_UserMarshal( __RPC__in unsigned long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in BSTR * );
unsigned char * __RPC_USER BSTR_UserUnmarshal(__RPC__in unsigned long *, __RPC__in_xcount(0) unsigned char *, __RPC__out BSTR * );
void __RPC_USER BSTR_UserFree( __RPC__in unsigned long *, __RPC__in BSTR * );
unsigned long __RPC_USER BSTR_UserSize64( __RPC__in unsigned long *, unsigned long , __RPC__in BSTR * );
unsigned char * __RPC_USER BSTR_UserMarshal64( __RPC__in unsigned long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in BSTR * );
unsigned char * __RPC_USER BSTR_UserUnmarshal64(__RPC__in unsigned long *, __RPC__in_xcount(0) unsigned char *, __RPC__out BSTR * );
void __RPC_USER BSTR_UserFree64( __RPC__in unsigned long *, __RPC__in BSTR * );
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,74 @@
//+--------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1996 - 1999
//
// File: certmod.idl
//
// Contents: IDL source for module management functions
//
//---------------------------------------------------------------------------
import "wtypes.idl";
//+--------------------------------------------------------------------------
// ICertManageModule::Configure()
// Flags for configuration interface
const LONG CMM_REFRESHONLY = 0x00000001; // Non-interactive configure; just reload settings
const LONG CMM_READONLY = 0x00000002; // show UI in read-only mode
//+--------------------------------------------------------------------------
// ICertManageModule::XetProperty()
// Flags for get/set property interface
// values are bstrs
const WCHAR wszCMM_PROP_NAME[] = L"Name";
const WCHAR wszCMM_PROP_DESCRIPTION[] = L"Description";
const WCHAR wszCMM_PROP_COPYRIGHT[] = L"Copyright";
const WCHAR wszCMM_PROP_FILEVER[] = L"File Version";
const WCHAR wszCMM_PROP_PRODUCTVER[] = L"Product Version";
// value is bstr sizeof(HWND)
const WCHAR wszCMM_PROP_DISPLAY_HWND[] = L"HWND";
// values are longs
const WCHAR wszCMM_PROP_ISMULTITHREADED[] = L"IsMultiThreaded";
//+--------------------------------------------------------------------------
// ICertManageModule class -- local COM interface
//+--------------------------------------------------------------------------
[
object,
uuid(e7d7ad42-bd3d-11d1-9a4d-00c04fc297eb),
dual,
helpstring("ICertManageModule Interface"),
pointer_default(unique)
]
interface ICertManageModule: IDispatch
{
import "oaidl.idl";
HRESULT GetProperty(
[in] BSTR const strConfig,
[in] BSTR strStorageLocation,
[in] BSTR strPropertyName,
[in] LONG Flags,
[out, retval] VARIANT* pvarProperty);
HRESULT SetProperty(
[in] BSTR const strConfig,
[in] BSTR strStorageLocation,
[in] BSTR strPropertyName,
[in] LONG Flags,
[in] VARIANT const *pvarProperty);
HRESULT Configure(
[in] BSTR const strConfig,
[in] BSTR strStorageLocation,
[in] LONG Flags);
};

View File

@ -0,0 +1,284 @@
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 7.00.0555 */
/* Compiler settings for certmod.idl:
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING( ) */
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 500
#endif
/* verify that the <rpcsal.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCSAL_H_VERSION__
#define __REQUIRED_RPCSAL_H_VERSION__ 100
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#ifndef __certmod_h__
#define __certmod_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifndef __ICertManageModule_FWD_DEFINED__
#define __ICertManageModule_FWD_DEFINED__
typedef interface ICertManageModule ICertManageModule;
#endif /* __ICertManageModule_FWD_DEFINED__ */
/* header files for imported files */
#include "wtypes.h"
#include "oaidl.h"
#ifdef __cplusplus
extern "C"{
#endif
/* interface __MIDL_itf_certmod_0000_0000 */
/* [local] */
#define CMM_REFRESHONLY ( 0x1 )
#define CMM_READONLY ( 0x2 )
const WCHAR wszCMM_PROP_NAME[ ] = L"Name";
const WCHAR wszCMM_PROP_DESCRIPTION[ ] = L"Description";
const WCHAR wszCMM_PROP_COPYRIGHT[ ] = L"Copyright";
const WCHAR wszCMM_PROP_FILEVER[ ] = L"File Version";
const WCHAR wszCMM_PROP_PRODUCTVER[ ] = L"Product Version";
const WCHAR wszCMM_PROP_DISPLAY_HWND[ ] = L"HWND";
const WCHAR wszCMM_PROP_ISMULTITHREADED[ ] = L"IsMultiThreaded";
extern RPC_IF_HANDLE __MIDL_itf_certmod_0000_0000_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_certmod_0000_0000_v0_0_s_ifspec;
#ifndef __ICertManageModule_INTERFACE_DEFINED__
#define __ICertManageModule_INTERFACE_DEFINED__
/* interface ICertManageModule */
/* [unique][helpstring][dual][uuid][object] */
EXTERN_C const IID IID_ICertManageModule;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("e7d7ad42-bd3d-11d1-9a4d-00c04fc297eb")
ICertManageModule : public IDispatch
{
public:
virtual HRESULT STDMETHODCALLTYPE GetProperty(
/* [in] */ __RPC__in const BSTR strConfig,
/* [in] */ __RPC__in BSTR strStorageLocation,
/* [in] */ __RPC__in BSTR strPropertyName,
/* [in] */ LONG Flags,
/* [retval][out] */ __RPC__out VARIANT *pvarProperty) = 0;
virtual HRESULT STDMETHODCALLTYPE SetProperty(
/* [in] */ __RPC__in const BSTR strConfig,
/* [in] */ __RPC__in BSTR strStorageLocation,
/* [in] */ __RPC__in BSTR strPropertyName,
/* [in] */ LONG Flags,
/* [in] */ __RPC__in const VARIANT *pvarProperty) = 0;
virtual HRESULT STDMETHODCALLTYPE Configure(
/* [in] */ __RPC__in const BSTR strConfig,
/* [in] */ __RPC__in BSTR strStorageLocation,
/* [in] */ LONG Flags) = 0;
};
#else /* C style interface */
typedef struct ICertManageModuleVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in ICertManageModule * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
__RPC__deref_out void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in ICertManageModule * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in ICertManageModule * This);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )(
__RPC__in ICertManageModule * This,
/* [out] */ __RPC__out UINT *pctinfo);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )(
__RPC__in ICertManageModule * This,
/* [in] */ UINT iTInfo,
/* [in] */ LCID lcid,
/* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo);
HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )(
__RPC__in ICertManageModule * This,
/* [in] */ __RPC__in REFIID riid,
/* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames,
/* [range][in] */ __RPC__in_range(0,16384) UINT cNames,
/* [in] */ LCID lcid,
/* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId);
/* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )(
ICertManageModule * This,
/* [in] */ DISPID dispIdMember,
/* [in] */ REFIID riid,
/* [in] */ LCID lcid,
/* [in] */ WORD wFlags,
/* [out][in] */ DISPPARAMS *pDispParams,
/* [out] */ VARIANT *pVarResult,
/* [out] */ EXCEPINFO *pExcepInfo,
/* [out] */ UINT *puArgErr);
HRESULT ( STDMETHODCALLTYPE *GetProperty )(
__RPC__in ICertManageModule * This,
/* [in] */ __RPC__in const BSTR strConfig,
/* [in] */ __RPC__in BSTR strStorageLocation,
/* [in] */ __RPC__in BSTR strPropertyName,
/* [in] */ LONG Flags,
/* [retval][out] */ __RPC__out VARIANT *pvarProperty);
HRESULT ( STDMETHODCALLTYPE *SetProperty )(
__RPC__in ICertManageModule * This,
/* [in] */ __RPC__in const BSTR strConfig,
/* [in] */ __RPC__in BSTR strStorageLocation,
/* [in] */ __RPC__in BSTR strPropertyName,
/* [in] */ LONG Flags,
/* [in] */ __RPC__in const VARIANT *pvarProperty);
HRESULT ( STDMETHODCALLTYPE *Configure )(
__RPC__in ICertManageModule * This,
/* [in] */ __RPC__in const BSTR strConfig,
/* [in] */ __RPC__in BSTR strStorageLocation,
/* [in] */ LONG Flags);
END_INTERFACE
} ICertManageModuleVtbl;
interface ICertManageModule
{
CONST_VTBL struct ICertManageModuleVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define ICertManageModule_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define ICertManageModule_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define ICertManageModule_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define ICertManageModule_GetTypeInfoCount(This,pctinfo) \
( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) )
#define ICertManageModule_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) )
#define ICertManageModule_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) )
#define ICertManageModule_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) )
#define ICertManageModule_GetProperty(This,strConfig,strStorageLocation,strPropertyName,Flags,pvarProperty) \
( (This)->lpVtbl -> GetProperty(This,strConfig,strStorageLocation,strPropertyName,Flags,pvarProperty) )
#define ICertManageModule_SetProperty(This,strConfig,strStorageLocation,strPropertyName,Flags,pvarProperty) \
( (This)->lpVtbl -> SetProperty(This,strConfig,strStorageLocation,strPropertyName,Flags,pvarProperty) )
#define ICertManageModule_Configure(This,strConfig,strStorageLocation,Flags) \
( (This)->lpVtbl -> Configure(This,strConfig,strStorageLocation,Flags) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __ICertManageModule_INTERFACE_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
unsigned long __RPC_USER BSTR_UserSize( __RPC__in unsigned long *, unsigned long , __RPC__in BSTR * );
unsigned char * __RPC_USER BSTR_UserMarshal( __RPC__in unsigned long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in BSTR * );
unsigned char * __RPC_USER BSTR_UserUnmarshal(__RPC__in unsigned long *, __RPC__in_xcount(0) unsigned char *, __RPC__out BSTR * );
void __RPC_USER BSTR_UserFree( __RPC__in unsigned long *, __RPC__in BSTR * );
unsigned long __RPC_USER VARIANT_UserSize( __RPC__in unsigned long *, unsigned long , __RPC__in VARIANT * );
unsigned char * __RPC_USER VARIANT_UserMarshal( __RPC__in unsigned long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in VARIANT * );
unsigned char * __RPC_USER VARIANT_UserUnmarshal(__RPC__in unsigned long *, __RPC__in_xcount(0) unsigned char *, __RPC__out VARIANT * );
void __RPC_USER VARIANT_UserFree( __RPC__in unsigned long *, __RPC__in VARIANT * );
unsigned long __RPC_USER BSTR_UserSize64( __RPC__in unsigned long *, unsigned long , __RPC__in BSTR * );
unsigned char * __RPC_USER BSTR_UserMarshal64( __RPC__in unsigned long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in BSTR * );
unsigned char * __RPC_USER BSTR_UserUnmarshal64(__RPC__in unsigned long *, __RPC__in_xcount(0) unsigned char *, __RPC__out BSTR * );
void __RPC_USER BSTR_UserFree64( __RPC__in unsigned long *, __RPC__in BSTR * );
unsigned long __RPC_USER VARIANT_UserSize64( __RPC__in unsigned long *, unsigned long , __RPC__in VARIANT * );
unsigned char * __RPC_USER VARIANT_UserMarshal64( __RPC__in unsigned long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in VARIANT * );
unsigned char * __RPC_USER VARIANT_UserUnmarshal64(__RPC__in unsigned long *, __RPC__in_xcount(0) unsigned char *, __RPC__out VARIANT * );
void __RPC_USER VARIANT_UserFree64( __RPC__in unsigned long *, __RPC__in VARIANT * );
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,68 @@
//+--------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1996 - 1999
//
// File: certpol.idl
//
// Contents: IDL source for certpol.dll
//
//---------------------------------------------------------------------------
// This file will be processed by the MIDL tool to produce the type library
// (certpol.tlb) and marshalling code.
import "wtypes.idl";
import "certmod.idl";
//+--------------------------------------------------------------------------
// ICertPolicy class -- local COM interface
//+--------------------------------------------------------------------------
[
object,
uuid(38bb5a00-7636-11d0-b413-00a0c91bbf8c),
dual,
helpstring("ICertPolicy Interface"),
pointer_default(unique)
]
interface ICertPolicy: IDispatch
{
import "oaidl.idl";
HRESULT Initialize(
[in] BSTR const strConfig);
HRESULT VerifyRequest(
[in] BSTR const strConfig,
[in] LONG Context,
[in] LONG bNewRequest,
[in] LONG Flags,
[out, retval] LONG *pDisposition);
HRESULT GetDescription(
[out, retval] BSTR *pstrDescription);
HRESULT ShutDown();
};
//+--------------------------------------------------------------------------
// ICertPolicy2 -- local COM interface
//+--------------------------------------------------------------------------
[
object,
uuid(3db4910e-8001-4bf1-aa1b-f43a808317a0),
dual,
helpstring("ICertPolicy2 Interface"),
pointer_default(unique)
]
interface ICertPolicy2: ICertPolicy
{
HRESULT GetManageModule(
[out, retval] ICertManageModule **ppManageModule);
};

View File

@ -0,0 +1,403 @@
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 7.00.0555 */
/* Compiler settings for certpol.idl:
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING( ) */
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 500
#endif
/* verify that the <rpcsal.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCSAL_H_VERSION__
#define __REQUIRED_RPCSAL_H_VERSION__ 100
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#ifndef __certpol_h__
#define __certpol_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifndef __ICertPolicy_FWD_DEFINED__
#define __ICertPolicy_FWD_DEFINED__
typedef interface ICertPolicy ICertPolicy;
#endif /* __ICertPolicy_FWD_DEFINED__ */
#ifndef __ICertPolicy2_FWD_DEFINED__
#define __ICertPolicy2_FWD_DEFINED__
typedef interface ICertPolicy2 ICertPolicy2;
#endif /* __ICertPolicy2_FWD_DEFINED__ */
/* header files for imported files */
#include "wtypes.h"
#include "certmod.h"
#ifdef __cplusplus
extern "C"{
#endif
#ifndef __ICertPolicy_INTERFACE_DEFINED__
#define __ICertPolicy_INTERFACE_DEFINED__
/* interface ICertPolicy */
/* [unique][helpstring][dual][uuid][object] */
EXTERN_C const IID IID_ICertPolicy;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("38bb5a00-7636-11d0-b413-00a0c91bbf8c")
ICertPolicy : public IDispatch
{
public:
virtual HRESULT STDMETHODCALLTYPE Initialize(
/* [in] */ __RPC__in const BSTR strConfig) = 0;
virtual HRESULT STDMETHODCALLTYPE VerifyRequest(
/* [in] */ __RPC__in const BSTR strConfig,
/* [in] */ LONG Context,
/* [in] */ LONG bNewRequest,
/* [in] */ LONG Flags,
/* [retval][out] */ __RPC__out LONG *pDisposition) = 0;
virtual HRESULT STDMETHODCALLTYPE GetDescription(
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrDescription) = 0;
virtual HRESULT STDMETHODCALLTYPE ShutDown( void) = 0;
};
#else /* C style interface */
typedef struct ICertPolicyVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in ICertPolicy * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
__RPC__deref_out void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in ICertPolicy * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in ICertPolicy * This);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )(
__RPC__in ICertPolicy * This,
/* [out] */ __RPC__out UINT *pctinfo);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )(
__RPC__in ICertPolicy * This,
/* [in] */ UINT iTInfo,
/* [in] */ LCID lcid,
/* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo);
HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )(
__RPC__in ICertPolicy * This,
/* [in] */ __RPC__in REFIID riid,
/* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames,
/* [range][in] */ __RPC__in_range(0,16384) UINT cNames,
/* [in] */ LCID lcid,
/* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId);
/* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )(
ICertPolicy * This,
/* [in] */ DISPID dispIdMember,
/* [in] */ REFIID riid,
/* [in] */ LCID lcid,
/* [in] */ WORD wFlags,
/* [out][in] */ DISPPARAMS *pDispParams,
/* [out] */ VARIANT *pVarResult,
/* [out] */ EXCEPINFO *pExcepInfo,
/* [out] */ UINT *puArgErr);
HRESULT ( STDMETHODCALLTYPE *Initialize )(
__RPC__in ICertPolicy * This,
/* [in] */ __RPC__in const BSTR strConfig);
HRESULT ( STDMETHODCALLTYPE *VerifyRequest )(
__RPC__in ICertPolicy * This,
/* [in] */ __RPC__in const BSTR strConfig,
/* [in] */ LONG Context,
/* [in] */ LONG bNewRequest,
/* [in] */ LONG Flags,
/* [retval][out] */ __RPC__out LONG *pDisposition);
HRESULT ( STDMETHODCALLTYPE *GetDescription )(
__RPC__in ICertPolicy * This,
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrDescription);
HRESULT ( STDMETHODCALLTYPE *ShutDown )(
__RPC__in ICertPolicy * This);
END_INTERFACE
} ICertPolicyVtbl;
interface ICertPolicy
{
CONST_VTBL struct ICertPolicyVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define ICertPolicy_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define ICertPolicy_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define ICertPolicy_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define ICertPolicy_GetTypeInfoCount(This,pctinfo) \
( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) )
#define ICertPolicy_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) )
#define ICertPolicy_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) )
#define ICertPolicy_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) )
#define ICertPolicy_Initialize(This,strConfig) \
( (This)->lpVtbl -> Initialize(This,strConfig) )
#define ICertPolicy_VerifyRequest(This,strConfig,Context,bNewRequest,Flags,pDisposition) \
( (This)->lpVtbl -> VerifyRequest(This,strConfig,Context,bNewRequest,Flags,pDisposition) )
#define ICertPolicy_GetDescription(This,pstrDescription) \
( (This)->lpVtbl -> GetDescription(This,pstrDescription) )
#define ICertPolicy_ShutDown(This) \
( (This)->lpVtbl -> ShutDown(This) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __ICertPolicy_INTERFACE_DEFINED__ */
#ifndef __ICertPolicy2_INTERFACE_DEFINED__
#define __ICertPolicy2_INTERFACE_DEFINED__
/* interface ICertPolicy2 */
/* [unique][helpstring][dual][uuid][object] */
EXTERN_C const IID IID_ICertPolicy2;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("3db4910e-8001-4bf1-aa1b-f43a808317a0")
ICertPolicy2 : public ICertPolicy
{
public:
virtual HRESULT STDMETHODCALLTYPE GetManageModule(
/* [retval][out] */ __RPC__deref_out_opt ICertManageModule **ppManageModule) = 0;
};
#else /* C style interface */
typedef struct ICertPolicy2Vtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in ICertPolicy2 * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
__RPC__deref_out void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in ICertPolicy2 * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in ICertPolicy2 * This);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )(
__RPC__in ICertPolicy2 * This,
/* [out] */ __RPC__out UINT *pctinfo);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )(
__RPC__in ICertPolicy2 * This,
/* [in] */ UINT iTInfo,
/* [in] */ LCID lcid,
/* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo);
HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )(
__RPC__in ICertPolicy2 * This,
/* [in] */ __RPC__in REFIID riid,
/* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames,
/* [range][in] */ __RPC__in_range(0,16384) UINT cNames,
/* [in] */ LCID lcid,
/* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId);
/* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )(
ICertPolicy2 * This,
/* [in] */ DISPID dispIdMember,
/* [in] */ REFIID riid,
/* [in] */ LCID lcid,
/* [in] */ WORD wFlags,
/* [out][in] */ DISPPARAMS *pDispParams,
/* [out] */ VARIANT *pVarResult,
/* [out] */ EXCEPINFO *pExcepInfo,
/* [out] */ UINT *puArgErr);
HRESULT ( STDMETHODCALLTYPE *Initialize )(
__RPC__in ICertPolicy2 * This,
/* [in] */ __RPC__in const BSTR strConfig);
HRESULT ( STDMETHODCALLTYPE *VerifyRequest )(
__RPC__in ICertPolicy2 * This,
/* [in] */ __RPC__in const BSTR strConfig,
/* [in] */ LONG Context,
/* [in] */ LONG bNewRequest,
/* [in] */ LONG Flags,
/* [retval][out] */ __RPC__out LONG *pDisposition);
HRESULT ( STDMETHODCALLTYPE *GetDescription )(
__RPC__in ICertPolicy2 * This,
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrDescription);
HRESULT ( STDMETHODCALLTYPE *ShutDown )(
__RPC__in ICertPolicy2 * This);
HRESULT ( STDMETHODCALLTYPE *GetManageModule )(
__RPC__in ICertPolicy2 * This,
/* [retval][out] */ __RPC__deref_out_opt ICertManageModule **ppManageModule);
END_INTERFACE
} ICertPolicy2Vtbl;
interface ICertPolicy2
{
CONST_VTBL struct ICertPolicy2Vtbl *lpVtbl;
};
#ifdef COBJMACROS
#define ICertPolicy2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define ICertPolicy2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define ICertPolicy2_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define ICertPolicy2_GetTypeInfoCount(This,pctinfo) \
( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) )
#define ICertPolicy2_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) )
#define ICertPolicy2_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) )
#define ICertPolicy2_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) )
#define ICertPolicy2_Initialize(This,strConfig) \
( (This)->lpVtbl -> Initialize(This,strConfig) )
#define ICertPolicy2_VerifyRequest(This,strConfig,Context,bNewRequest,Flags,pDisposition) \
( (This)->lpVtbl -> VerifyRequest(This,strConfig,Context,bNewRequest,Flags,pDisposition) )
#define ICertPolicy2_GetDescription(This,pstrDescription) \
( (This)->lpVtbl -> GetDescription(This,pstrDescription) )
#define ICertPolicy2_ShutDown(This) \
( (This)->lpVtbl -> ShutDown(This) )
#define ICertPolicy2_GetManageModule(This,ppManageModule) \
( (This)->lpVtbl -> GetManageModule(This,ppManageModule) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __ICertPolicy2_INTERFACE_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
unsigned long __RPC_USER BSTR_UserSize( __RPC__in unsigned long *, unsigned long , __RPC__in BSTR * );
unsigned char * __RPC_USER BSTR_UserMarshal( __RPC__in unsigned long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in BSTR * );
unsigned char * __RPC_USER BSTR_UserUnmarshal(__RPC__in unsigned long *, __RPC__in_xcount(0) unsigned char *, __RPC__out BSTR * );
void __RPC_USER BSTR_UserFree( __RPC__in unsigned long *, __RPC__in BSTR * );
unsigned long __RPC_USER BSTR_UserSize64( __RPC__in unsigned long *, unsigned long , __RPC__in BSTR * );
unsigned char * __RPC_USER BSTR_UserMarshal64( __RPC__in unsigned long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in BSTR * );
unsigned char * __RPC_USER BSTR_UserUnmarshal64(__RPC__in unsigned long *, __RPC__in_xcount(0) unsigned char *, __RPC__out BSTR * );
void __RPC_USER BSTR_UserFree64( __RPC__in unsigned long *, __RPC__in BSTR * );
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,76 @@
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#if !defined(_CERT_POL_ENG_)
#define CERTPOLENGAPI DECLSPEC_IMPORT
#else
#define CERTPOLENGAPI
#endif
CERTPOLENGAPI
NTSTATUS
NTAPI
PstGetTrustAnchors(
__in PUNICODE_STRING pTargetName,
__in DWORD cCriteria,
__in_ecount_opt(cCriteria) PCCERT_SELECT_CRITERIA rgpCriteria,
__deref_out PSecPkgContext_IssuerListInfoEx* ppTrustedIssuers
);
CERTPOLENGAPI
NTSTATUS
NTAPI
PstGetCertificates(
__in PUNICODE_STRING pTargetName,
__in DWORD cCriteria,
__in_ecount_opt(cCriteria) PCCERT_SELECT_CRITERIA rgpCriteria,
__in BOOL bIsClient,
__out PDWORD pdwCertChainContextCount,
__deref_out_ecount(*pdwCertChainContextCount) PCCERT_CHAIN_CONTEXT** ppCertChainContexts
);
CERTPOLENGAPI
NTSTATUS
NTAPI
PstAcquirePrivateKey(
__in PCCERT_CONTEXT pCert
);
CERTPOLENGAPI
NTSTATUS
NTAPI
PstValidate(
__in_opt PUNICODE_STRING pTargetName,
__in BOOL bIsClient,
__in_opt CERT_USAGE_MATCH* pRequestedIssuancePolicy,
__in_opt HCERTSTORE* phAdditionalCertStore,
__in PCCERT_CONTEXT pCert,
__out_opt GUID* pProvGUID
);
CERTPOLENGAPI
NTSTATUS
NTAPI
PstMapCertificate(
__in PCCERT_CONTEXT pCert,
__out LSA_TOKEN_INFORMATION_TYPE* pTokenInformationType,
__deref_out PVOID* ppTokenInformation
);
CERTPOLENGAPI
NTSTATUS
NTAPI
PstGetUserNameForCertificate(
__in PCCERT_CONTEXT pCertContext,
__out PUNICODE_STRING UserName
);
#ifdef __cplusplus
}
#endif

1255
BuildTools/Include/CertSrv.h Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

625
BuildTools/Include/Certif.h Normal file
View File

@ -0,0 +1,625 @@
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 7.00.0555 */
/* Compiler settings for certif.idl:
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING( ) */
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 500
#endif
/* verify that the <rpcsal.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCSAL_H_VERSION__
#define __REQUIRED_RPCSAL_H_VERSION__ 100
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#ifndef __certif_h__
#define __certif_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifndef __ICertServerPolicy_FWD_DEFINED__
#define __ICertServerPolicy_FWD_DEFINED__
typedef interface ICertServerPolicy ICertServerPolicy;
#endif /* __ICertServerPolicy_FWD_DEFINED__ */
#ifndef __ICertServerExit_FWD_DEFINED__
#define __ICertServerExit_FWD_DEFINED__
typedef interface ICertServerExit ICertServerExit;
#endif /* __ICertServerExit_FWD_DEFINED__ */
/* header files for imported files */
#include "wtypes.h"
#include "oaidl.h"
#ifdef __cplusplus
extern "C"{
#endif
/* interface __MIDL_itf_certif_0000_0000 */
/* [local] */
#define ENUMEXT_OBJECTID ( 0x1 )
extern RPC_IF_HANDLE __MIDL_itf_certif_0000_0000_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_certif_0000_0000_v0_0_s_ifspec;
#ifndef __ICertServerPolicy_INTERFACE_DEFINED__
#define __ICertServerPolicy_INTERFACE_DEFINED__
/* interface ICertServerPolicy */
/* [unique][helpstring][dual][uuid][object] */
EXTERN_C const IID IID_ICertServerPolicy;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("aa000922-ffbe-11cf-8800-00a0c903b83c")
ICertServerPolicy : public IDispatch
{
public:
virtual HRESULT STDMETHODCALLTYPE SetContext(
/* [in] */ LONG Context) = 0;
virtual HRESULT STDMETHODCALLTYPE GetRequestProperty(
/* [in] */ __RPC__in const BSTR strPropertyName,
/* [in] */ LONG PropertyType,
/* [retval][out] */ __RPC__out VARIANT *pvarPropertyValue) = 0;
virtual HRESULT STDMETHODCALLTYPE GetRequestAttribute(
/* [in] */ __RPC__in const BSTR strAttributeName,
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrAttributeValue) = 0;
virtual HRESULT STDMETHODCALLTYPE GetCertificateProperty(
/* [in] */ __RPC__in const BSTR strPropertyName,
/* [in] */ LONG PropertyType,
/* [retval][out] */ __RPC__out VARIANT *pvarPropertyValue) = 0;
virtual HRESULT STDMETHODCALLTYPE SetCertificateProperty(
/* [in] */ __RPC__in const BSTR strPropertyName,
/* [in] */ LONG PropertyType,
/* [in] */ __RPC__in const VARIANT *pvarPropertyValue) = 0;
virtual HRESULT STDMETHODCALLTYPE GetCertificateExtension(
/* [in] */ __RPC__in const BSTR strExtensionName,
/* [in] */ LONG Type,
/* [retval][out] */ __RPC__out VARIANT *pvarValue) = 0;
virtual HRESULT STDMETHODCALLTYPE GetCertificateExtensionFlags(
/* [retval][out] */ __RPC__out LONG *pExtFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE SetCertificateExtension(
/* [in] */ __RPC__in const BSTR strExtensionName,
/* [in] */ LONG Type,
/* [in] */ LONG ExtFlags,
/* [in] */ __RPC__in const VARIANT *pvarValue) = 0;
virtual HRESULT STDMETHODCALLTYPE EnumerateExtensionsSetup(
/* [in] */ LONG Flags) = 0;
virtual HRESULT STDMETHODCALLTYPE EnumerateExtensions(
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrExtensionName) = 0;
virtual HRESULT STDMETHODCALLTYPE EnumerateExtensionsClose( void) = 0;
virtual HRESULT STDMETHODCALLTYPE EnumerateAttributesSetup(
/* [in] */ LONG Flags) = 0;
virtual HRESULT STDMETHODCALLTYPE EnumerateAttributes(
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrAttributeName) = 0;
virtual HRESULT STDMETHODCALLTYPE EnumerateAttributesClose( void) = 0;
};
#else /* C style interface */
typedef struct ICertServerPolicyVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in ICertServerPolicy * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
__RPC__deref_out void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in ICertServerPolicy * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in ICertServerPolicy * This);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )(
__RPC__in ICertServerPolicy * This,
/* [out] */ __RPC__out UINT *pctinfo);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )(
__RPC__in ICertServerPolicy * This,
/* [in] */ UINT iTInfo,
/* [in] */ LCID lcid,
/* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo);
HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )(
__RPC__in ICertServerPolicy * This,
/* [in] */ __RPC__in REFIID riid,
/* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames,
/* [range][in] */ __RPC__in_range(0,16384) UINT cNames,
/* [in] */ LCID lcid,
/* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId);
/* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )(
ICertServerPolicy * This,
/* [in] */ DISPID dispIdMember,
/* [in] */ REFIID riid,
/* [in] */ LCID lcid,
/* [in] */ WORD wFlags,
/* [out][in] */ DISPPARAMS *pDispParams,
/* [out] */ VARIANT *pVarResult,
/* [out] */ EXCEPINFO *pExcepInfo,
/* [out] */ UINT *puArgErr);
HRESULT ( STDMETHODCALLTYPE *SetContext )(
__RPC__in ICertServerPolicy * This,
/* [in] */ LONG Context);
HRESULT ( STDMETHODCALLTYPE *GetRequestProperty )(
__RPC__in ICertServerPolicy * This,
/* [in] */ __RPC__in const BSTR strPropertyName,
/* [in] */ LONG PropertyType,
/* [retval][out] */ __RPC__out VARIANT *pvarPropertyValue);
HRESULT ( STDMETHODCALLTYPE *GetRequestAttribute )(
__RPC__in ICertServerPolicy * This,
/* [in] */ __RPC__in const BSTR strAttributeName,
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrAttributeValue);
HRESULT ( STDMETHODCALLTYPE *GetCertificateProperty )(
__RPC__in ICertServerPolicy * This,
/* [in] */ __RPC__in const BSTR strPropertyName,
/* [in] */ LONG PropertyType,
/* [retval][out] */ __RPC__out VARIANT *pvarPropertyValue);
HRESULT ( STDMETHODCALLTYPE *SetCertificateProperty )(
__RPC__in ICertServerPolicy * This,
/* [in] */ __RPC__in const BSTR strPropertyName,
/* [in] */ LONG PropertyType,
/* [in] */ __RPC__in const VARIANT *pvarPropertyValue);
HRESULT ( STDMETHODCALLTYPE *GetCertificateExtension )(
__RPC__in ICertServerPolicy * This,
/* [in] */ __RPC__in const BSTR strExtensionName,
/* [in] */ LONG Type,
/* [retval][out] */ __RPC__out VARIANT *pvarValue);
HRESULT ( STDMETHODCALLTYPE *GetCertificateExtensionFlags )(
__RPC__in ICertServerPolicy * This,
/* [retval][out] */ __RPC__out LONG *pExtFlags);
HRESULT ( STDMETHODCALLTYPE *SetCertificateExtension )(
__RPC__in ICertServerPolicy * This,
/* [in] */ __RPC__in const BSTR strExtensionName,
/* [in] */ LONG Type,
/* [in] */ LONG ExtFlags,
/* [in] */ __RPC__in const VARIANT *pvarValue);
HRESULT ( STDMETHODCALLTYPE *EnumerateExtensionsSetup )(
__RPC__in ICertServerPolicy * This,
/* [in] */ LONG Flags);
HRESULT ( STDMETHODCALLTYPE *EnumerateExtensions )(
__RPC__in ICertServerPolicy * This,
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrExtensionName);
HRESULT ( STDMETHODCALLTYPE *EnumerateExtensionsClose )(
__RPC__in ICertServerPolicy * This);
HRESULT ( STDMETHODCALLTYPE *EnumerateAttributesSetup )(
__RPC__in ICertServerPolicy * This,
/* [in] */ LONG Flags);
HRESULT ( STDMETHODCALLTYPE *EnumerateAttributes )(
__RPC__in ICertServerPolicy * This,
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrAttributeName);
HRESULT ( STDMETHODCALLTYPE *EnumerateAttributesClose )(
__RPC__in ICertServerPolicy * This);
END_INTERFACE
} ICertServerPolicyVtbl;
interface ICertServerPolicy
{
CONST_VTBL struct ICertServerPolicyVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define ICertServerPolicy_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define ICertServerPolicy_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define ICertServerPolicy_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define ICertServerPolicy_GetTypeInfoCount(This,pctinfo) \
( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) )
#define ICertServerPolicy_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) )
#define ICertServerPolicy_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) )
#define ICertServerPolicy_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) )
#define ICertServerPolicy_SetContext(This,Context) \
( (This)->lpVtbl -> SetContext(This,Context) )
#define ICertServerPolicy_GetRequestProperty(This,strPropertyName,PropertyType,pvarPropertyValue) \
( (This)->lpVtbl -> GetRequestProperty(This,strPropertyName,PropertyType,pvarPropertyValue) )
#define ICertServerPolicy_GetRequestAttribute(This,strAttributeName,pstrAttributeValue) \
( (This)->lpVtbl -> GetRequestAttribute(This,strAttributeName,pstrAttributeValue) )
#define ICertServerPolicy_GetCertificateProperty(This,strPropertyName,PropertyType,pvarPropertyValue) \
( (This)->lpVtbl -> GetCertificateProperty(This,strPropertyName,PropertyType,pvarPropertyValue) )
#define ICertServerPolicy_SetCertificateProperty(This,strPropertyName,PropertyType,pvarPropertyValue) \
( (This)->lpVtbl -> SetCertificateProperty(This,strPropertyName,PropertyType,pvarPropertyValue) )
#define ICertServerPolicy_GetCertificateExtension(This,strExtensionName,Type,pvarValue) \
( (This)->lpVtbl -> GetCertificateExtension(This,strExtensionName,Type,pvarValue) )
#define ICertServerPolicy_GetCertificateExtensionFlags(This,pExtFlags) \
( (This)->lpVtbl -> GetCertificateExtensionFlags(This,pExtFlags) )
#define ICertServerPolicy_SetCertificateExtension(This,strExtensionName,Type,ExtFlags,pvarValue) \
( (This)->lpVtbl -> SetCertificateExtension(This,strExtensionName,Type,ExtFlags,pvarValue) )
#define ICertServerPolicy_EnumerateExtensionsSetup(This,Flags) \
( (This)->lpVtbl -> EnumerateExtensionsSetup(This,Flags) )
#define ICertServerPolicy_EnumerateExtensions(This,pstrExtensionName) \
( (This)->lpVtbl -> EnumerateExtensions(This,pstrExtensionName) )
#define ICertServerPolicy_EnumerateExtensionsClose(This) \
( (This)->lpVtbl -> EnumerateExtensionsClose(This) )
#define ICertServerPolicy_EnumerateAttributesSetup(This,Flags) \
( (This)->lpVtbl -> EnumerateAttributesSetup(This,Flags) )
#define ICertServerPolicy_EnumerateAttributes(This,pstrAttributeName) \
( (This)->lpVtbl -> EnumerateAttributes(This,pstrAttributeName) )
#define ICertServerPolicy_EnumerateAttributesClose(This) \
( (This)->lpVtbl -> EnumerateAttributesClose(This) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __ICertServerPolicy_INTERFACE_DEFINED__ */
#ifndef __ICertServerExit_INTERFACE_DEFINED__
#define __ICertServerExit_INTERFACE_DEFINED__
/* interface ICertServerExit */
/* [unique][helpstring][dual][uuid][object] */
EXTERN_C const IID IID_ICertServerExit;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("4ba9eb90-732c-11d0-8816-00a0c903b83c")
ICertServerExit : public IDispatch
{
public:
virtual HRESULT STDMETHODCALLTYPE SetContext(
/* [in] */ LONG Context) = 0;
virtual HRESULT STDMETHODCALLTYPE GetRequestProperty(
/* [in] */ __RPC__in const BSTR strPropertyName,
/* [in] */ LONG PropertyType,
/* [retval][out] */ __RPC__out VARIANT *pvarPropertyValue) = 0;
virtual HRESULT STDMETHODCALLTYPE GetRequestAttribute(
/* [in] */ __RPC__in const BSTR strAttributeName,
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrAttributeValue) = 0;
virtual HRESULT STDMETHODCALLTYPE GetCertificateProperty(
/* [in] */ __RPC__in const BSTR strPropertyName,
/* [in] */ LONG PropertyType,
/* [retval][out] */ __RPC__out VARIANT *pvarPropertyValue) = 0;
virtual HRESULT STDMETHODCALLTYPE GetCertificateExtension(
/* [in] */ __RPC__in const BSTR strExtensionName,
/* [in] */ LONG Type,
/* [retval][out] */ __RPC__out VARIANT *pvarValue) = 0;
virtual HRESULT STDMETHODCALLTYPE GetCertificateExtensionFlags(
/* [retval][out] */ __RPC__out LONG *pExtFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE EnumerateExtensionsSetup(
/* [in] */ LONG Flags) = 0;
virtual HRESULT STDMETHODCALLTYPE EnumerateExtensions(
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrExtensionName) = 0;
virtual HRESULT STDMETHODCALLTYPE EnumerateExtensionsClose( void) = 0;
virtual HRESULT STDMETHODCALLTYPE EnumerateAttributesSetup(
/* [in] */ LONG Flags) = 0;
virtual HRESULT STDMETHODCALLTYPE EnumerateAttributes(
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrAttributeName) = 0;
virtual HRESULT STDMETHODCALLTYPE EnumerateAttributesClose( void) = 0;
};
#else /* C style interface */
typedef struct ICertServerExitVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in ICertServerExit * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
__RPC__deref_out void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in ICertServerExit * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in ICertServerExit * This);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )(
__RPC__in ICertServerExit * This,
/* [out] */ __RPC__out UINT *pctinfo);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )(
__RPC__in ICertServerExit * This,
/* [in] */ UINT iTInfo,
/* [in] */ LCID lcid,
/* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo);
HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )(
__RPC__in ICertServerExit * This,
/* [in] */ __RPC__in REFIID riid,
/* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames,
/* [range][in] */ __RPC__in_range(0,16384) UINT cNames,
/* [in] */ LCID lcid,
/* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId);
/* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )(
ICertServerExit * This,
/* [in] */ DISPID dispIdMember,
/* [in] */ REFIID riid,
/* [in] */ LCID lcid,
/* [in] */ WORD wFlags,
/* [out][in] */ DISPPARAMS *pDispParams,
/* [out] */ VARIANT *pVarResult,
/* [out] */ EXCEPINFO *pExcepInfo,
/* [out] */ UINT *puArgErr);
HRESULT ( STDMETHODCALLTYPE *SetContext )(
__RPC__in ICertServerExit * This,
/* [in] */ LONG Context);
HRESULT ( STDMETHODCALLTYPE *GetRequestProperty )(
__RPC__in ICertServerExit * This,
/* [in] */ __RPC__in const BSTR strPropertyName,
/* [in] */ LONG PropertyType,
/* [retval][out] */ __RPC__out VARIANT *pvarPropertyValue);
HRESULT ( STDMETHODCALLTYPE *GetRequestAttribute )(
__RPC__in ICertServerExit * This,
/* [in] */ __RPC__in const BSTR strAttributeName,
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrAttributeValue);
HRESULT ( STDMETHODCALLTYPE *GetCertificateProperty )(
__RPC__in ICertServerExit * This,
/* [in] */ __RPC__in const BSTR strPropertyName,
/* [in] */ LONG PropertyType,
/* [retval][out] */ __RPC__out VARIANT *pvarPropertyValue);
HRESULT ( STDMETHODCALLTYPE *GetCertificateExtension )(
__RPC__in ICertServerExit * This,
/* [in] */ __RPC__in const BSTR strExtensionName,
/* [in] */ LONG Type,
/* [retval][out] */ __RPC__out VARIANT *pvarValue);
HRESULT ( STDMETHODCALLTYPE *GetCertificateExtensionFlags )(
__RPC__in ICertServerExit * This,
/* [retval][out] */ __RPC__out LONG *pExtFlags);
HRESULT ( STDMETHODCALLTYPE *EnumerateExtensionsSetup )(
__RPC__in ICertServerExit * This,
/* [in] */ LONG Flags);
HRESULT ( STDMETHODCALLTYPE *EnumerateExtensions )(
__RPC__in ICertServerExit * This,
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrExtensionName);
HRESULT ( STDMETHODCALLTYPE *EnumerateExtensionsClose )(
__RPC__in ICertServerExit * This);
HRESULT ( STDMETHODCALLTYPE *EnumerateAttributesSetup )(
__RPC__in ICertServerExit * This,
/* [in] */ LONG Flags);
HRESULT ( STDMETHODCALLTYPE *EnumerateAttributes )(
__RPC__in ICertServerExit * This,
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrAttributeName);
HRESULT ( STDMETHODCALLTYPE *EnumerateAttributesClose )(
__RPC__in ICertServerExit * This);
END_INTERFACE
} ICertServerExitVtbl;
interface ICertServerExit
{
CONST_VTBL struct ICertServerExitVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define ICertServerExit_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define ICertServerExit_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define ICertServerExit_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define ICertServerExit_GetTypeInfoCount(This,pctinfo) \
( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) )
#define ICertServerExit_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) )
#define ICertServerExit_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) )
#define ICertServerExit_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) )
#define ICertServerExit_SetContext(This,Context) \
( (This)->lpVtbl -> SetContext(This,Context) )
#define ICertServerExit_GetRequestProperty(This,strPropertyName,PropertyType,pvarPropertyValue) \
( (This)->lpVtbl -> GetRequestProperty(This,strPropertyName,PropertyType,pvarPropertyValue) )
#define ICertServerExit_GetRequestAttribute(This,strAttributeName,pstrAttributeValue) \
( (This)->lpVtbl -> GetRequestAttribute(This,strAttributeName,pstrAttributeValue) )
#define ICertServerExit_GetCertificateProperty(This,strPropertyName,PropertyType,pvarPropertyValue) \
( (This)->lpVtbl -> GetCertificateProperty(This,strPropertyName,PropertyType,pvarPropertyValue) )
#define ICertServerExit_GetCertificateExtension(This,strExtensionName,Type,pvarValue) \
( (This)->lpVtbl -> GetCertificateExtension(This,strExtensionName,Type,pvarValue) )
#define ICertServerExit_GetCertificateExtensionFlags(This,pExtFlags) \
( (This)->lpVtbl -> GetCertificateExtensionFlags(This,pExtFlags) )
#define ICertServerExit_EnumerateExtensionsSetup(This,Flags) \
( (This)->lpVtbl -> EnumerateExtensionsSetup(This,Flags) )
#define ICertServerExit_EnumerateExtensions(This,pstrExtensionName) \
( (This)->lpVtbl -> EnumerateExtensions(This,pstrExtensionName) )
#define ICertServerExit_EnumerateExtensionsClose(This) \
( (This)->lpVtbl -> EnumerateExtensionsClose(This) )
#define ICertServerExit_EnumerateAttributesSetup(This,Flags) \
( (This)->lpVtbl -> EnumerateAttributesSetup(This,Flags) )
#define ICertServerExit_EnumerateAttributes(This,pstrAttributeName) \
( (This)->lpVtbl -> EnumerateAttributes(This,pstrAttributeName) )
#define ICertServerExit_EnumerateAttributesClose(This) \
( (This)->lpVtbl -> EnumerateAttributesClose(This) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __ICertServerExit_INTERFACE_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
unsigned long __RPC_USER BSTR_UserSize( __RPC__in unsigned long *, unsigned long , __RPC__in BSTR * );
unsigned char * __RPC_USER BSTR_UserMarshal( __RPC__in unsigned long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in BSTR * );
unsigned char * __RPC_USER BSTR_UserUnmarshal(__RPC__in unsigned long *, __RPC__in_xcount(0) unsigned char *, __RPC__out BSTR * );
void __RPC_USER BSTR_UserFree( __RPC__in unsigned long *, __RPC__in BSTR * );
unsigned long __RPC_USER VARIANT_UserSize( __RPC__in unsigned long *, unsigned long , __RPC__in VARIANT * );
unsigned char * __RPC_USER VARIANT_UserMarshal( __RPC__in unsigned long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in VARIANT * );
unsigned char * __RPC_USER VARIANT_UserUnmarshal(__RPC__in unsigned long *, __RPC__in_xcount(0) unsigned char *, __RPC__out VARIANT * );
void __RPC_USER VARIANT_UserFree( __RPC__in unsigned long *, __RPC__in VARIANT * );
unsigned long __RPC_USER BSTR_UserSize64( __RPC__in unsigned long *, unsigned long , __RPC__in BSTR * );
unsigned char * __RPC_USER BSTR_UserMarshal64( __RPC__in unsigned long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in BSTR * );
unsigned char * __RPC_USER BSTR_UserUnmarshal64(__RPC__in unsigned long *, __RPC__in_xcount(0) unsigned char *, __RPC__out BSTR * );
void __RPC_USER BSTR_UserFree64( __RPC__in unsigned long *, __RPC__in BSTR * );
unsigned long __RPC_USER VARIANT_UserSize64( __RPC__in unsigned long *, unsigned long , __RPC__in VARIANT * );
unsigned char * __RPC_USER VARIANT_UserMarshal64( __RPC__in unsigned long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in VARIANT * );
unsigned char * __RPC_USER VARIANT_UserUnmarshal64(__RPC__in unsigned long *, __RPC__in_xcount(0) unsigned char *, __RPC__out VARIANT * );
void __RPC_USER VARIANT_UserFree64( __RPC__in unsigned long *, __RPC__in VARIANT * );
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,90 @@
//***************************************************************************
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// chptrarr.h
//
// Purpose: Non-MFC CPtrArray class definition
//
//***************************************************************************
#if _MSC_VER > 1000
#pragma once
#endif
#ifndef __CHPTRARRAY__
#define __CHPTRARRAY__
#include <windows.h>
#include <limits.h>
#include <assert.h>
#include <tchar.h>
#include <polarity.h>
#include <ProvExce.h>
class POLARITY CHPtrArray
{
public :
// Construction/destruction
//=========================
CHPtrArray() ;
// Attributes
int GetSize() const ;
int GetUpperBound() const ;
void SetSize(int nNewSize, int nGrowBy = -1) throw ( CHeap_Exception ) ;
// Operations
// Clean up
void FreeExtra() throw ( CHeap_Exception ) ;
void RemoveAll() ;
// Accessing elements
void* GetAt(int nIndex) const ;
void SetAt(int nIndex, void* newElement) ;
void*& ElementAt(int nIndex) ;
// Direct Access to the element data (may return NULL)
const void** GetData() const ;
void** GetData() ;
// Potentially growing the array
void SetAtGrow(int nIndex, void* newElement) throw ( CHeap_Exception ) ;
int Add(void* newElement) throw ( CHeap_Exception ) ;
int Append(const CHPtrArray& src) throw ( CHeap_Exception ) ;
void Copy(const CHPtrArray& src) throw ( CHeap_Exception ) ;
// overloaded operator helpers
void* operator[](int nIndex) const ;
void*& operator[](int nIndex) ;
// Operations that move elements around
void InsertAt(int nIndex, void* newElement, int nCount = 1) throw ( CHeap_Exception ) ;
void RemoveAt(int nIndex, int nCount = 1) ;
void InsertAt(int nStartIndex, CHPtrArray* pNewArray) throw ( CHeap_Exception ) ;
// Implementation
protected:
void** m_pData ; // the actual array of data
int m_nSize ; // # of elements (upperBound - 1)
int m_nMaxSize ; // max allocated
int m_nGrowBy ; // grow amount
public:
~CHPtrArray() ;
#ifdef _DEBUG
// void Dump(CDumpContext&) const ;
void AssertValid() const ;
#endif
protected:
// local typedefs for class templates
typedef void* BASE_TYPE ;
typedef void* BASE_ARG_TYPE ;
} ;
#endif

View File

@ -0,0 +1,87 @@
//***************************************************************************
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// CHSTRARR.H
//
// Purpose: Utility library version of MFC CHStringArray
//
//***************************************************************************
#if _MSC_VER > 1000
#pragma once
#endif
#ifndef _CHStringArray_
#define _CHStringArray_
#include <polarity.h>
#include <ProvExce.h>
class POLARITY CHStringArray
{
public:
CHStringArray();
~CHStringArray();
// Attributes
int GetSize() const { return m_nSize; }
int GetUpperBound() const { return m_nSize-1; }
void SetSize(int nNewSize, int nGrowBy = -1) throw ( CHeap_Exception ) ;
// Operations
// Clean up
void FreeExtra() throw ( CHeap_Exception ) ;
void RemoveAll() { SetSize(0); }
// Accessing elements
#if (!defined DEBUG && !defined _DEBUG)
CHString GetAt(int nIndex) const{ return m_pData[nIndex]; }
void SetAt(int nIndex, LPCWSTR newElement){ m_pData[nIndex] = newElement; }
CHString& ElementAt(int nIndex) { return m_pData[nIndex]; }
#else
CHString GetAt(int nIndex) const;
void SetAt(int nIndex, LPCWSTR newElement);
CHString& ElementAt(int nIndex);
#endif
// Direct Access to the element data (may return NULL)
const CHString* GetData() const { return (const CHString*)m_pData; }
CHString* GetData() { return (CHString*)m_pData; }
// Potentially growing the array
void SetAtGrow(int nIndex, LPCWSTR newElement) throw ( CHeap_Exception ) ;
int Add(LPCWSTR newElement) throw ( CHeap_Exception )
{
int nIndex = m_nSize;
SetAtGrow(nIndex, newElement);
return nIndex;
}
int Append(const CHStringArray& src) throw ( CHeap_Exception ) ;
void Copy(const CHStringArray& src) throw ( CHeap_Exception ) ;
// overloaded operator helpers
CHString operator[](int nIndex) const { return GetAt(nIndex); }
CHString& operator[](int nIndex) { return ElementAt(nIndex); }
// Operations that move elements around
void InsertAt(int nIndex, LPCWSTR newElement, int nCount = 1) throw ( CHeap_Exception ) ;
void RemoveAt(int nIndex, int nCount = 1);
void InsertAt(int nStartIndex, CHStringArray* pNewArray) throw ( CHeap_Exception ) ;
// Implementation
protected:
CHString* m_pData; // the actual array of data
int m_nSize; // # of elements (upperBound - 1)
int m_nMaxSize; // max allocated
int m_nGrowBy; // grow amount
// local typedefs for class templates
typedef CHString BASE_TYPE;
typedef LPCWSTR BASE_ARG_TYPE;
};
////////////////////////////////////////////////////////////////////////////
#endif

View File

@ -0,0 +1,268 @@
//***************************************************************************
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// CHSTRING.h
//
// Purpose: Utility library version of MFC CString
//
//***************************************************************************
#if _MSC_VER > 1000
#pragma once
#endif
#ifndef _CHSTRING_H
#define _CHSTRING_H
/////////////////////////////////////////////////////////////////////////////
#include <windows.h>
#include <limits.h>
#include <tchar.h>
#include <polarity.h>
#pragma warning( disable : 4290 ) // Ignore 'C++ Exception Specification ignored'
#include <ProvExce.h>
/////////////////////////////////////////////////////////////////////////////
struct _DOUBLE { BYTE doubleBits[sizeof(double)]; };
#ifdef FRAMEWORK_ALLOW_DEPRECATED
void POLARITY WINAPI SetCHStringResourceHandle(HINSTANCE handle);
#endif
/////////////////////////////////////////////////////////////////////////////
// CHString formatting
/////////////////////////////////////////////////////////////////////////////
#define TCHAR_ARG WCHAR
#define WCHAR_ARG WCHAR
#define CHAR_ARG char
#if defined(_68K_) || defined(_X86_)
#define DOUBLE_ARG _DOUBLE
#else
#define DOUBLE_ARG double
#endif
struct CHStringData
{
long nRefs;
int nDataLength;
int nAllocLength;
WCHAR* data()
{
return (WCHAR*)(this+1);
}
};
/////////////////////////////////////////////////////////////////////////////
class POLARITY CHString
{
protected:
LPWSTR m_pchData; // pointer to ref counted string data
protected:
// implementation helpers
CHStringData* GetData() const; // returns data pointer
void Init();
void AllocCopy(CHString& dest, int nCopyLen, int nCopyIndex, int nExtraLen) const throw ( CHeap_Exception ) ;
void AllocBuffer(int nLen) throw ( CHeap_Exception ) ;
void AssignCopy(int nSrcLen, LPCWSTR lpszSrcData) throw ( CHeap_Exception ) ;
void ConcatCopy(int nSrc1Len, LPCWSTR lpszSrc1Data, int nSrc2Len, LPCWSTR lpszSrc2Data) throw ( CHeap_Exception ) ;
void ConcatInPlace(int nSrcLen, LPCWSTR lpszSrcData);
void CopyBeforeWrite() throw ( CHeap_Exception ) ;
void AllocBeforeWrite(int nLen) throw ( CHeap_Exception ) ;
static inline int WINAPI SafeStrlen(LPCWSTR lpsz) { return (lpsz == NULL) ? 0 : (int)wcslen(lpsz); }
// Helper function used to load resource into lpszBuf buffer.
#ifdef FRAMEWORK_ALLOW_DEPRECATED
int LoadStringW(UINT nID, __in_ecount(nMaxBuf) LPWSTR lpszBuf, UINT nMaxBuf) throw ( CHeap_Exception ) ;
#endif
public:
// Constructors/Destruction
CHString();
CHString(const CHString& stringSrc);
CHString(WCHAR ch, int nRepeat = 1) throw ( CHeap_Exception ) ;
CHString(LPCSTR lpsz) throw ( CHeap_Exception ) ;
CHString(LPCWSTR lpsz) throw ( CHeap_Exception ) ;
CHString(LPCWSTR lpch, int nLength) throw ( CHeap_Exception ) ;
inline CHString(const unsigned char* lpsz) { Init(); *this = (LPCSTR)lpsz; }
~CHString();
// Functions
void SetAt(int nIndex, WCHAR ch) throw ( CHeap_Exception ) ;
void Empty();
// inlines
inline int GetLength() const { return GetData()->nDataLength; }
inline BOOL IsEmpty() const { return GetData()->nDataLength == 0; }
#if (!defined DEBUG && !defined _DEBUG)
inline WCHAR GetAt(int nIndex) const{ return m_pchData[nIndex]; }
inline WCHAR operator[](int nIndex) const{ return m_pchData[nIndex]; }
#else
WCHAR GetAt(int nIndex) const;
WCHAR operator[](int nIndex) const;
#endif
inline operator LPCWSTR() const { return m_pchData; }
inline int GetAllocLength() const { return GetData()->nAllocLength; }
// overloaded assignment
const CHString& operator=(const CHString& stringSrc) throw ( CHeap_Exception ) ;
const CHString& operator=(WCHAR ch) throw ( CHeap_Exception ) ;
const CHString& operator=(LPCSTR lpsz) throw ( CHeap_Exception ) ;
const CHString& operator=(LPCWSTR lpsz) throw ( CHeap_Exception ) ;
inline const CHString& operator=(const unsigned char* lpsz) throw ( CHeap_Exception ) { *this = (LPCSTR)lpsz; return *this; }
inline const CHString& operator=(CHString *p) throw ( CHeap_Exception ) { *this = *p; return *this; }
inline const CHString& operator=(char ch) throw ( CHeap_Exception ) { *this = (WCHAR)ch; return *this; }
inline const CHString& CHString::operator+=(char ch) throw ( CHeap_Exception ) { *this += (WCHAR)ch; return *this; }
friend inline CHString operator+(const CHString& string, char ch) throw ( CHeap_Exception ) { return string + (WCHAR)ch; }
friend inline CHString operator+(char ch, const CHString& string) throw ( CHeap_Exception ) { return (WCHAR)ch + string; }
const CHString& operator+=(const CHString& string) throw ( CHeap_Exception ) ;
const CHString& operator+=(WCHAR ch) throw ( CHeap_Exception ) ;
const CHString& operator+=(LPCWSTR lpsz) throw ( CHeap_Exception ) ;
friend CHString POLARITY WINAPI operator+(const CHString& string1, const CHString& string2) throw ( CHeap_Exception ) ;
friend CHString POLARITY WINAPI operator+(const CHString& string, WCHAR ch) throw ( CHeap_Exception ) ;
friend CHString POLARITY WINAPI operator+(WCHAR ch, const CHString& string) throw ( CHeap_Exception ) ;
friend CHString POLARITY WINAPI operator+(const CHString& string, LPCWSTR lpsz) throw ( CHeap_Exception ) ;
friend CHString POLARITY WINAPI operator+(LPCWSTR lpsz, const CHString& string) throw ( CHeap_Exception ) ;
// string comparison
int Compare(LPCWSTR lpsz) const;
inline int CompareNoCase(LPCWSTR lpsz) const
{
// ignore case
return _wcsicmp(m_pchData, lpsz);
} // MBCS/Unicode aware
inline int Collate(LPCWSTR lpsz) const
{
// NLS aware
// CHString::Collate is often slower than Compare but is MBSC/Unicode
// aware as well as locale-sensitive with respect to sort order.
return wcscoll(m_pchData, lpsz);
} // locale sensitive
// Load string from resource file.
#ifdef FRAMEWORK_ALLOW_DEPRECATED
BOOL LoadStringW(UINT nID) throw ( CHeap_Exception ) ;
#endif
// Access to string implementation buffer as "C" character array
LPWSTR GetBuffer(int nMinBufLength) throw ( CHeap_Exception ) ;
void ReleaseBuffer(int nNewLength = -1) throw ( CHeap_Exception ) ;
LPWSTR GetBufferSetLength(int nNewLength) throw ( CHeap_Exception ) ;
void FreeExtra() throw ( CHeap_Exception ) ;
// Use LockBuffer/UnlockBuffer to turn refcounting off
LPWSTR LockBuffer() ;
void UnlockBuffer();
// searching (return starting index, or -1 if not found)
// look for a single character match
int Find(WCHAR ch) const; // like "C" strchr
int FindOneOf(LPCWSTR lpszCharSet) const;
int ReverseFind(WCHAR ch) const;
// look for a specific sub-string
int Find(LPCWSTR lpszSub) const; // like "C" strstr
// upper/lower/reverse conversion
void MakeUpper() throw ( CHeap_Exception ) ;
void MakeLower() throw ( CHeap_Exception ) ;
void MakeReverse() throw ( CHeap_Exception ) ;
// simple sub-string extraction
CHString Mid(int nFirst, int nCount) const throw ( CHeap_Exception ) ;
CHString Mid(int nFirst) const throw ( CHeap_Exception ) ;
CHString Left(int nCount) const throw ( CHeap_Exception ) ;
CHString Right(int nCount) const throw ( CHeap_Exception ) ;
CHString SpanIncluding(LPCWSTR lpszCharSet) const throw ( CHeap_Exception ) ;
CHString SpanExcluding(LPCWSTR lpszCharSet) const throw ( CHeap_Exception ) ;
// trimming whitespace (either side)
void TrimRight() throw ( CHeap_Exception ) ;
void TrimLeft() throw ( CHeap_Exception ) ;
// printf-like formatting using passed string
void __cdecl Format(LPCWSTR lpszFormat, ...) throw ( CHeap_Exception ) ;
void FormatV(LPCWSTR lpszFormat, va_list argList);
// printf-like formatting using referenced string resource
#ifdef FRAMEWORK_ALLOW_DEPRECATED
void __cdecl Format(UINT nFormatID, ...) throw ( CHeap_Exception ) ;
#endif
// format using FormatMessage API on passed string
// Warning: if you pass string inserts to this function, they must
// be LPCSTRs on Win9x and LPCWSTRs on NT.
void __cdecl FormatMessageW(LPCWSTR lpszFormat, ...) throw ( CHeap_Exception ) ;
// format using FormatMessage API on referenced string resource
// Warning: if you pass string inserts to this function, they must
// be LPCSTRs on Win9x and LPCWSTRs on NT.
#ifdef FRAMEWORK_ALLOW_DEPRECATED
void __cdecl FormatMessageW(UINT nFormatID, ...) throw ( CHeap_Exception ) ;
#endif
#ifndef _NO_BSTR_SUPPORT
// OLE BSTR support (use for OLE automation)
BSTR AllocSysString() const throw ( CHeap_Exception ) ;
static void WINAPI Release(CHStringData* pData);
void Release();
#endif
};
inline BOOL operator==(const CHString& s1, const CHString& s2) { return s1.Compare(s2) == 0; }
inline BOOL operator==(const CHString& s1, LPCWSTR s2) { return s1.Compare(s2) == 0; }
inline BOOL operator!=(const CHString& s1, const CHString& s2) { return s1.Compare(s2) != 0; }
inline BOOL operator!=(const CHString& s1, LPCWSTR s2) { return s1.Compare(s2) != 0; }
inline BOOL operator<(const CHString& s1, const CHString& s2) { return s1.Compare(s2) < 0; }
inline BOOL operator<(const CHString& s1, LPCWSTR s2) { return s1.Compare(s2) < 0; }
inline BOOL operator>(const CHString& s1, const CHString& s2) { return s1.Compare(s2) > 0; }
inline BOOL operator>(const CHString& s1, LPCWSTR s2) { return s1.Compare(s2) > 0; }
inline BOOL operator<=(const CHString& s1, const CHString& s2) { return s1.Compare(s2) <= 0; }
inline BOOL operator<=(const CHString& s1, LPCWSTR s2) { return s1.Compare(s2) <= 0; }
inline BOOL operator>=(const CHString& s1, const CHString& s2) { return s1.Compare(s2) >= 0; }
inline BOOL operator>=(const CHString& s1, LPCWSTR s2) { return s1.Compare(s2) >= 0; }
#endif

View File

@ -0,0 +1,149 @@
//+-------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//--------------------------------------------------------------------------
cpp_quote("//=--------------------------------------------------------------------------=")
cpp_quote("// chanmgr.h")
cpp_quote("//=--------------------------------------------------------------------------=")
cpp_quote("// Copyright (c) Microsoft Corporation. All rights reserved.")
cpp_quote("//")
cpp_quote("// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF")
cpp_quote("// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO")
cpp_quote("// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A")
cpp_quote("// PARTICULAR PURPOSE.")
cpp_quote("//=--------------------------------------------------------------------------=")
cpp_quote("")
cpp_quote("#pragma comment(lib,\"uuid.lib\")")
cpp_quote("")
cpp_quote("//---------------------------------------------------------------------------=")
cpp_quote("// Channel Manager Interfaces.")
cpp_quote("")
#ifndef DO_NO_IMPORTS
import "unknwn.idl";
#endif
interface IChannelMgr;
interface IEnumChannels;
//---------------------------------------------------------------
// Channel Manager
//---------------------------------------------------------------
[
uuid(4804f2e0-d16e-11d0-802b-00c04fd75d13), // LIBID_CHANNELMGR
helpstring("Microsoft Channel Manager 1.0"),
lcid(0x0000),
version(1.0)
]
library CHANNELMGR
{
// ChannelMgr interface
[
uuid(85BD8E82-0FBA-11d1-90C3-00C04FC2F568), // IID_IChannelMgr
helpstring("Channel Manager interface"),
odl
]
interface IChannelMgr : IUnknown
{
typedef struct _tagChannelShortcutInfo {
DWORD cbSize; // size of struct, must be specified
LPWSTR pszTitle; // channel title
LPWSTR pszURL; // required url to channel cdf
LPWSTR pszLogo; // optional logo url
LPWSTR pszIcon; // optional icon url
LPWSTR pszWideLogo;// optional wide logo url
BOOL bIsSoftware;// is software update and lives in that folder (normally false)
} CHANNELSHORTCUTINFO;
typedef struct _tagChannelCategoryInfo {
DWORD cbSize; // size of struct, must be specified
LPWSTR pszTitle; // category title
LPWSTR pszURL; // optional url to category html
LPWSTR pszLogo; // optional logo url
LPWSTR pszIcon; // optional icon url
LPWSTR pszWideLogo;// optional wide logo url
} CHANNELCATEGORYINFO;
typedef enum _tagChannelEnumFlags {
CHANENUM_CHANNELFOLDER = 0x00000001,
CHANENUM_SOFTUPDATEFOLDER = 0x00000002,
CHANENUM_DESKTOPFOLDER = 0x00000004,
CHANENUM_TITLE = 0x00010000,
CHANENUM_PATH = 0x00020000,
CHANENUM_URL = 0x00040000,
CHANENUM_SUBSCRIBESTATE = 0x00080000
} CHANNELENUMFLAGS;
cpp_quote("#define CHANENUM_ALLFOLDERS (CHANENUM_CHANNELFOLDER | \\")
cpp_quote(" CHANENUM_SOFTUPDATEFOLDER | \\")
cpp_quote(" CHANENUM_DESKTOPFOLDER )")
cpp_quote("")
cpp_quote("#define CHANENUM_ALLDATA (CHANENUM_TITLE | \\")
cpp_quote(" CHANENUM_PATH | \\")
cpp_quote(" CHANENUM_URL | \\")
cpp_quote(" CHANENUM_SUBSCRIBESTATE )")
cpp_quote("")
cpp_quote("#define CHANENUM_ALL (CHANENUM_CHANNELFOLDER | \\")
cpp_quote(" CHANENUM_SOFTUPDATEFOLDER | \\")
cpp_quote(" CHANENUM_DESKTOPFOLDER | \\")
cpp_quote(" CHANENUM_TITLE | \\")
cpp_quote(" CHANENUM_PATH | \\")
cpp_quote(" CHANENUM_URL | \\")
cpp_quote(" CHANENUM_SUBSCRIBESTATE )")
cpp_quote("")
HRESULT AddChannelShortcut([in]CHANNELSHORTCUTINFO *pChannelInfo);
HRESULT DeleteChannelShortcut([in]LPWSTR pszTitle);
HRESULT AddCategory([in]CHANNELCATEGORYINFO *pCategoryInfo);
HRESULT DeleteCategory([in]LPWSTR pszTitle);
HRESULT EnumChannels([in]DWORD dwEnumFlags,
[in]LPCWSTR pszURL, // optional cdf url
[out]IEnumChannels** pIEnumChannels);
};
// EnumChannels interface
[
uuid(A4C65425-0F82-11d1-90C3-00C04FC2F568), // IID_IEnumChannels
helpstring("Channel Enumerator interface"),
odl
]
interface IEnumChannels : IUnknown
{
typedef enum _tagSubcriptionState{
SUBSTATE_NOTSUBSCRIBED,
SUBSTATE_PARTIALSUBSCRIPTION,
SUBSTATE_FULLSUBSCRIPTION
} SUBSCRIPTIONSTATE;
typedef struct _tagChannelInfo {
LPOLESTR pszTitle;
LPOLESTR pszPath;
LPOLESTR pszURL;
SUBSCRIPTIONSTATE stSubscriptionState;
} CHANNELENUMINFO;
HRESULT Next(ULONG celt, CHANNELENUMINFO* rgChanInf,
ULONG *pceltFetched);
HRESULT Skip(ULONG celt);
HRESULT Reset(void);
HRESULT Clone(IEnumChannels **ppenum);
};
// ChannelMgr class
[
uuid(b3cdae90-d170-11d0-802b-00c04fd75d13), // CLSID_ChannelMgr
helpstring("ChannelMgr class"),
]
coclass ChannelMgr
{
[default] interface IChannelMgr;
}
}

View File

@ -0,0 +1,542 @@
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 7.00.0447 */
/* Compiler settings for chanmgr.idl:
Oicf, W1, Zp8, env=Win32 (32b run)
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
//@@MIDL_FILE_HEADING( )
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 475
#endif
/* verify that the <rpcsal.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCSAL_H_VERSION__
#define __REQUIRED_RPCSAL_H_VERSION__ 100
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__
#ifndef __chanmgr_h__
#define __chanmgr_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifndef __IChannelMgr_FWD_DEFINED__
#define __IChannelMgr_FWD_DEFINED__
typedef interface IChannelMgr IChannelMgr;
#endif /* __IChannelMgr_FWD_DEFINED__ */
#ifndef __IEnumChannels_FWD_DEFINED__
#define __IEnumChannels_FWD_DEFINED__
typedef interface IEnumChannels IEnumChannels;
#endif /* __IEnumChannels_FWD_DEFINED__ */
#ifndef __ChannelMgr_FWD_DEFINED__
#define __ChannelMgr_FWD_DEFINED__
#ifdef __cplusplus
typedef class ChannelMgr ChannelMgr;
#else
typedef struct ChannelMgr ChannelMgr;
#endif /* __cplusplus */
#endif /* __ChannelMgr_FWD_DEFINED__ */
/* header files for imported files */
#include "unknwn.h"
#ifdef __cplusplus
extern "C"{
#endif
/* interface __MIDL_itf_chanmgr_0000_0000 */
/* [local] */
//=--------------------------------------------------------------------------=
// chanmgr.h
//=--------------------------------------------------------------------------=
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//=--------------------------------------------------------------------------=
#pragma comment(lib,"uuid.lib")
//---------------------------------------------------------------------------=
// Channel Manager Interfaces.
extern RPC_IF_HANDLE __MIDL_itf_chanmgr_0000_0000_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_chanmgr_0000_0000_v0_0_s_ifspec;
#ifndef __CHANNELMGR_LIBRARY_DEFINED__
#define __CHANNELMGR_LIBRARY_DEFINED__
/* library CHANNELMGR */
/* [version][lcid][helpstring][uuid] */
EXTERN_C const IID LIBID_CHANNELMGR;
#ifndef __IChannelMgr_INTERFACE_DEFINED__
#define __IChannelMgr_INTERFACE_DEFINED__
/* interface IChannelMgr */
/* [object][helpstring][uuid] */
typedef struct _tagChannelShortcutInfo
{
DWORD cbSize;
LPWSTR pszTitle;
LPWSTR pszURL;
LPWSTR pszLogo;
LPWSTR pszIcon;
LPWSTR pszWideLogo;
BOOL bIsSoftware;
} CHANNELSHORTCUTINFO;
typedef struct _tagChannelCategoryInfo
{
DWORD cbSize;
LPWSTR pszTitle;
LPWSTR pszURL;
LPWSTR pszLogo;
LPWSTR pszIcon;
LPWSTR pszWideLogo;
} CHANNELCATEGORYINFO;
typedef
enum _tagChannelEnumFlags
{ CHANENUM_CHANNELFOLDER = 0x1,
CHANENUM_SOFTUPDATEFOLDER = 0x2,
CHANENUM_DESKTOPFOLDER = 0x4,
CHANENUM_TITLE = 0x10000,
CHANENUM_PATH = 0x20000,
CHANENUM_URL = 0x40000,
CHANENUM_SUBSCRIBESTATE = 0x80000
} CHANNELENUMFLAGS;
#define CHANENUM_ALLFOLDERS (CHANENUM_CHANNELFOLDER | \
CHANENUM_SOFTUPDATEFOLDER | \
CHANENUM_DESKTOPFOLDER )
#define CHANENUM_ALLDATA (CHANENUM_TITLE | \
CHANENUM_PATH | \
CHANENUM_URL | \
CHANENUM_SUBSCRIBESTATE )
#define CHANENUM_ALL (CHANENUM_CHANNELFOLDER | \
CHANENUM_SOFTUPDATEFOLDER | \
CHANENUM_DESKTOPFOLDER | \
CHANENUM_TITLE | \
CHANENUM_PATH | \
CHANENUM_URL | \
CHANENUM_SUBSCRIBESTATE )
EXTERN_C const IID IID_IChannelMgr;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("85BD8E82-0FBA-11d1-90C3-00C04FC2F568")
IChannelMgr : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE AddChannelShortcut(
/* [in] */ __RPC__in CHANNELSHORTCUTINFO *pChannelInfo) = 0;
virtual HRESULT STDMETHODCALLTYPE DeleteChannelShortcut(
/* [in] */ __RPC__in LPWSTR pszTitle) = 0;
virtual HRESULT STDMETHODCALLTYPE AddCategory(
/* [in] */ __RPC__in CHANNELCATEGORYINFO *pCategoryInfo) = 0;
virtual HRESULT STDMETHODCALLTYPE DeleteCategory(
/* [in] */ __RPC__in LPWSTR pszTitle) = 0;
virtual HRESULT STDMETHODCALLTYPE EnumChannels(
/* [in] */ DWORD dwEnumFlags,
/* [in] */ __RPC__in LPCWSTR pszURL,
/* [out] */ __RPC__deref_out_opt IEnumChannels **pIEnumChannels) = 0;
};
#else /* C style interface */
typedef struct IChannelMgrVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IChannelMgr * This,
/* [in] */ __RPC__in REFIID riid,
/* [iid_is][out] */ __RPC__deref_out_opt void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IChannelMgr * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IChannelMgr * This);
HRESULT ( STDMETHODCALLTYPE *AddChannelShortcut )(
IChannelMgr * This,
/* [in] */ __RPC__in CHANNELSHORTCUTINFO *pChannelInfo);
HRESULT ( STDMETHODCALLTYPE *DeleteChannelShortcut )(
IChannelMgr * This,
/* [in] */ __RPC__in LPWSTR pszTitle);
HRESULT ( STDMETHODCALLTYPE *AddCategory )(
IChannelMgr * This,
/* [in] */ __RPC__in CHANNELCATEGORYINFO *pCategoryInfo);
HRESULT ( STDMETHODCALLTYPE *DeleteCategory )(
IChannelMgr * This,
/* [in] */ __RPC__in LPWSTR pszTitle);
HRESULT ( STDMETHODCALLTYPE *EnumChannels )(
IChannelMgr * This,
/* [in] */ DWORD dwEnumFlags,
/* [in] */ __RPC__in LPCWSTR pszURL,
/* [out] */ __RPC__deref_out_opt IEnumChannels **pIEnumChannels);
END_INTERFACE
} IChannelMgrVtbl;
interface IChannelMgr
{
CONST_VTBL struct IChannelMgrVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IChannelMgr_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IChannelMgr_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IChannelMgr_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IChannelMgr_AddChannelShortcut(This,pChannelInfo) \
( (This)->lpVtbl -> AddChannelShortcut(This,pChannelInfo) )
#define IChannelMgr_DeleteChannelShortcut(This,pszTitle) \
( (This)->lpVtbl -> DeleteChannelShortcut(This,pszTitle) )
#define IChannelMgr_AddCategory(This,pCategoryInfo) \
( (This)->lpVtbl -> AddCategory(This,pCategoryInfo) )
#define IChannelMgr_DeleteCategory(This,pszTitle) \
( (This)->lpVtbl -> DeleteCategory(This,pszTitle) )
#define IChannelMgr_EnumChannels(This,dwEnumFlags,pszURL,pIEnumChannels) \
( (This)->lpVtbl -> EnumChannels(This,dwEnumFlags,pszURL,pIEnumChannels) )
#endif /* COBJMACROS */
#endif /* C style interface */
HRESULT STDMETHODCALLTYPE IChannelMgr_AddChannelShortcut_Proxy(
IChannelMgr * This,
/* [in] */ __RPC__in CHANNELSHORTCUTINFO *pChannelInfo);
void __RPC_STUB IChannelMgr_AddChannelShortcut_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IChannelMgr_DeleteChannelShortcut_Proxy(
IChannelMgr * This,
/* [in] */ __RPC__in LPWSTR pszTitle);
void __RPC_STUB IChannelMgr_DeleteChannelShortcut_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IChannelMgr_AddCategory_Proxy(
IChannelMgr * This,
/* [in] */ __RPC__in CHANNELCATEGORYINFO *pCategoryInfo);
void __RPC_STUB IChannelMgr_AddCategory_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IChannelMgr_DeleteCategory_Proxy(
IChannelMgr * This,
/* [in] */ __RPC__in LPWSTR pszTitle);
void __RPC_STUB IChannelMgr_DeleteCategory_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IChannelMgr_EnumChannels_Proxy(
IChannelMgr * This,
/* [in] */ DWORD dwEnumFlags,
/* [in] */ __RPC__in LPCWSTR pszURL,
/* [out] */ __RPC__deref_out_opt IEnumChannels **pIEnumChannels);
void __RPC_STUB IChannelMgr_EnumChannels_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IChannelMgr_INTERFACE_DEFINED__ */
#ifndef __IEnumChannels_INTERFACE_DEFINED__
#define __IEnumChannels_INTERFACE_DEFINED__
/* interface IEnumChannels */
/* [object][helpstring][uuid] */
typedef
enum _tagSubcriptionState
{ SUBSTATE_NOTSUBSCRIBED = 0,
SUBSTATE_PARTIALSUBSCRIPTION = ( SUBSTATE_NOTSUBSCRIBED + 1 ) ,
SUBSTATE_FULLSUBSCRIPTION = ( SUBSTATE_PARTIALSUBSCRIPTION + 1 )
} SUBSCRIPTIONSTATE;
typedef struct _tagChannelInfo
{
LPOLESTR pszTitle;
LPOLESTR pszPath;
LPOLESTR pszURL;
SUBSCRIPTIONSTATE stSubscriptionState;
} CHANNELENUMINFO;
EXTERN_C const IID IID_IEnumChannels;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("A4C65425-0F82-11d1-90C3-00C04FC2F568")
IEnumChannels : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE Next(
ULONG celt,
__RPC__in CHANNELENUMINFO *rgChanInf,
__RPC__in ULONG *pceltFetched) = 0;
virtual HRESULT STDMETHODCALLTYPE Skip(
ULONG celt) = 0;
virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0;
virtual HRESULT STDMETHODCALLTYPE Clone(
__RPC__deref_in_opt IEnumChannels **ppenum) = 0;
};
#else /* C style interface */
typedef struct IEnumChannelsVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IEnumChannels * This,
/* [in] */ __RPC__in REFIID riid,
/* [iid_is][out] */ __RPC__deref_out_opt void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IEnumChannels * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IEnumChannels * This);
HRESULT ( STDMETHODCALLTYPE *Next )(
IEnumChannels * This,
ULONG celt,
__RPC__in CHANNELENUMINFO *rgChanInf,
__RPC__in ULONG *pceltFetched);
HRESULT ( STDMETHODCALLTYPE *Skip )(
IEnumChannels * This,
ULONG celt);
HRESULT ( STDMETHODCALLTYPE *Reset )(
IEnumChannels * This);
HRESULT ( STDMETHODCALLTYPE *Clone )(
IEnumChannels * This,
__RPC__deref_in_opt IEnumChannels **ppenum);
END_INTERFACE
} IEnumChannelsVtbl;
interface IEnumChannels
{
CONST_VTBL struct IEnumChannelsVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IEnumChannels_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IEnumChannels_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IEnumChannels_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IEnumChannels_Next(This,celt,rgChanInf,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,rgChanInf,pceltFetched) )
#define IEnumChannels_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
#define IEnumChannels_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
#define IEnumChannels_Clone(This,ppenum) \
( (This)->lpVtbl -> Clone(This,ppenum) )
#endif /* COBJMACROS */
#endif /* C style interface */
HRESULT STDMETHODCALLTYPE IEnumChannels_Next_Proxy(
IEnumChannels * This,
ULONG celt,
__RPC__in CHANNELENUMINFO *rgChanInf,
__RPC__in ULONG *pceltFetched);
void __RPC_STUB IEnumChannels_Next_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IEnumChannels_Skip_Proxy(
IEnumChannels * This,
ULONG celt);
void __RPC_STUB IEnumChannels_Skip_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IEnumChannels_Reset_Proxy(
IEnumChannels * This);
void __RPC_STUB IEnumChannels_Reset_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE IEnumChannels_Clone_Proxy(
IEnumChannels * This,
__RPC__deref_in_opt IEnumChannels **ppenum);
void __RPC_STUB IEnumChannels_Clone_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IEnumChannels_INTERFACE_DEFINED__ */
EXTERN_C const CLSID CLSID_ChannelMgr;
#ifdef __cplusplus
class DECLSPEC_UUID("b3cdae90-d170-11d0-802b-00c04fd75d13")
ChannelMgr;
#endif
#endif /* __CHANNELMGR_LIBRARY_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif

1281
BuildTools/Include/CiError.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,511 @@
/////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 1996-1997 Microsoft Corporation
//
// Module Name:
// CluAdmEx.idl
//
// Abstract:
// Definition of COM interfaces for Cluster Administrator extensions.
//
// Author:
// davidp August 22, 1996
//
// Revision History:
// davidp June 23, 1998
// Added IWCWizard97Callback and IWEExtendWizard97.
//
// Notes:
// The following interfaces defined below are used to get information
// about the object(s) for which a property page, wizard, or context
// menu is being displayed. These interfaces may be queried for by
// the extension using the piData IUnknown interface pointer.
//
// IGetClusterPropSheetInfo
// IGetClusterDataInfo
// IGetClusterObjectInfo
// IGetClusterNodeInfo
// IGetClusterGroupInfo
// IGetClusterResourceInfo
// IGetClusterNetworkInfo
// IGetClusterNetInterfaceInfo
//
// The following interfaces defined below are implemented by extensions
// are are used to extend property sheets, wizards, and context menus.
//
// IWEExtendPropertySheet
// IWEExtendWizard
// IWEExtendWizard97
// IWEExtendContextMenu
// IWEInvokeCommand
//
// The following interfaces defined below are implemented by CluAdmin
// and are passed to the extension to allow it to add its extension
// property pages, wizard pages, or context menu items.
//
// IWCPropertySheetCallback
// IWCWizardCallback
// IWCWizard97Callback
// IWCContextMenuCallback
//
/////////////////////////////////////////////////////////////////////////////
#ifndef _CLUADMEX_IDL_
#define _CLUADMEX_IDL_
import "oaidl.idl";
import "clusapi.h";
// Define HPROPSHEETPAGE because we can't include prsht.h.
#define HPROPSHEETPAGE LONG *
/////////////////////////////////////////////////////////////////////////////
// Cluster Administrator Extensions type definitions
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
//
// CLUADMEX_OBJECT_TYPE
//
// Enumeration of the types of objects that can be administered.
//
/////////////////////////////////////////////////////////////////////////
typedef enum _CLUADMEX_OBJECT_TYPE
{
CLUADMEX_OT_NONE = 0,
CLUADMEX_OT_CLUSTER,
CLUADMEX_OT_NODE,
CLUADMEX_OT_GROUP,
CLUADMEX_OT_RESOURCE,
CLUADMEX_OT_RESOURCETYPE,
CLUADMEX_OT_NETWORK,
CLUADMEX_OT_NETINTERFACE
} CLUADMEX_OBJECT_TYPE;
/////////////////////////////////////////////////////////////////////////////
// Cluster Administrator Extensions data interface definitions
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
//
// IGetClusterUIInfo
//
/////////////////////////////////////////////////////////////////////////
[
object,
uuid(97DEDE50-FC6B-11CF-B5F5-00A0C90AB505),
helpstring("IGetClusterUIInfo Interface"),
pointer_default(unique)
]
interface IGetClusterUIInfo : IUnknown
{
import "oaidl.idl";
[local] HRESULT GetClusterName(
[out] BSTR lpszName,
[in, out] LONG * pcchName
);
[local] LCID GetLocale(void);
[local] HFONT GetFont(void);
[local] HICON GetIcon(void);
}; //*** interface IGetClusterUIInfo
/////////////////////////////////////////////////////////////////////////
//
// IGetClusterDataInfo
//
/////////////////////////////////////////////////////////////////////////
[
object,
uuid(97DEDE51-FC6B-11CF-B5F5-00A0C90AB505),
helpstring("IGetClusterDataInfo Interface"),
pointer_default(unique)
]
interface IGetClusterDataInfo : IUnknown
{
import "oaidl.idl";
[local] HRESULT GetClusterName(
[out] BSTR lpszName,
[in, out] LONG * pcchName
);
[local] HCLUSTER GetClusterHandle(void);
[local] LONG GetObjectCount(void);
}; //*** interface IGetClusterDataInfo
/////////////////////////////////////////////////////////////////////////
//
// IGetClusterObjectInfo
//
/////////////////////////////////////////////////////////////////////////
[
object,
uuid(97DEDE52-FC6B-11CF-B5F5-00A0C90AB505),
helpstring("IGetClusterObjectInfo Interface"),
pointer_default(unique)
]
interface IGetClusterObjectInfo : IUnknown
{
import "oaidl.idl";
[local] HRESULT GetObjectName(
[in] LONG lObjIndex,
[out] BSTR lpszName,
[in, out] LONG * pcchName
);
[local] CLUADMEX_OBJECT_TYPE GetObjectType(
[in] LONG lObjIndex
);
}; //*** interface IGetClusterObjectInfo
/////////////////////////////////////////////////////////////////////////
//
// IGetClusterNodeInfo
//
/////////////////////////////////////////////////////////////////////////
[
object,
uuid(97DEDE53-FC6B-11CF-B5F5-00A0C90AB505),
helpstring("IGetClusterNodeInfo Interface"),
pointer_default(unique)
]
interface IGetClusterNodeInfo : IUnknown
{
import "oaidl.idl";
[local] HNODE GetNodeHandle(
[in] LONG lObjIndex
);
}; //*** interface IGetClusterObjectInfo
/////////////////////////////////////////////////////////////////////////
//
// IGetClusterGroupInfo
//
/////////////////////////////////////////////////////////////////////////
[
object,
uuid(97DEDE54-FC6B-11CF-B5F5-00A0C90AB505),
helpstring("IGetClusterGroupInfo Interface"),
pointer_default(unique)
]
interface IGetClusterGroupInfo : IUnknown
{
import "oaidl.idl";
[local] HGROUP GetGroupHandle(
[in] LONG lObjIndex
);
}; //*** interface IGetClusterGroupInfo
/////////////////////////////////////////////////////////////////////////
//
// IGetClusterResourceInfo
//
/////////////////////////////////////////////////////////////////////////
[
object,
uuid(97DEDE55-FC6B-11CF-B5F5-00A0C90AB505),
helpstring("IGetClusterResourceInfo Interface"),
pointer_default(unique)
]
interface IGetClusterResourceInfo : IUnknown
{
import "oaidl.idl";
[local] HRESOURCE GetResourceHandle(
[in] LONG lObjIndex
);
[local] HRESULT GetResourceTypeName(
[in] LONG lObjIndex,
[out] BSTR lpszResTypeName,
[in, out] LONG * pcchResTypeName
);
[local] BOOL GetResourceNetworkName(
[in] LONG lObjIndex,
[out] BSTR lpszNetName,
[in, out] ULONG * pcchNetName
);
}; //*** interface IGetClusterResourceInfo
/////////////////////////////////////////////////////////////////////////
//
// IGetClusterNetworkInfo
//
/////////////////////////////////////////////////////////////////////////
[
object,
uuid(97DEDE56-FC6B-11CF-B5F5-00A0C90AB505),
helpstring("IGetClusterNetworkInfo Interface"),
pointer_default(unique)
]
interface IGetClusterNetworkInfo : IUnknown
{
import "oaidl.idl";
[local] HNETWORK GetNetworkHandle(
[in] LONG lObjIndex
);
}; //*** interface IGetClusterNetworkInfo
/////////////////////////////////////////////////////////////////////////
//
// IGetClusterNetInterfaceInfo
//
/////////////////////////////////////////////////////////////////////////
[
object,
uuid(97DEDE57-FC6B-11CF-B5F5-00A0C90AB505),
helpstring("IGetClusterNetInterfaceInfo Interface"),
pointer_default(unique)
]
interface IGetClusterNetInterfaceInfo : IUnknown
{
import "oaidl.idl";
[local] HNETINTERFACE GetNetInterfaceHandle(
[in] LONG lObjIndex
);
}; //*** interface IGetClusterNetInterfaceInfo
/////////////////////////////////////////////////////////////////////////////
// Cluster Administrator Extensions interface definitions
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
//
// IWCPropertySheetCallback
//
/////////////////////////////////////////////////////////////////////////
[
object,
uuid(97DEDE60-FC6B-11CF-B5F5-00A0C90AB505),
helpstring("IWCPropertySheetCallback Interface"),
pointer_default(unique)
]
interface IWCPropertySheetCallback : IUnknown
{
import "oaidl.idl";
HRESULT AddPropertySheetPage(
[in] HPROPSHEETPAGE hpage
);
}; //*** interface IWCPropertySheetCallback
/////////////////////////////////////////////////////////////////////////
//
// IWEExtendPropertySheet
//
/////////////////////////////////////////////////////////////////////////
[
object,
uuid(97DEDE61-FC6B-11CF-B5F5-00A0C90AB505),
helpstring("IWSExtendPropertySheet Interface"),
pointer_default(unique)
]
interface IWEExtendPropertySheet : IUnknown
{
import "oaidl.idl";
HRESULT CreatePropertySheetPages(
[in] IUnknown * piData,
[in] IWCPropertySheetCallback * piCallback
);
}; //*** interface IWEExtendPropertySheet
/////////////////////////////////////////////////////////////////////////
//
// IWCWizardCallback
//
/////////////////////////////////////////////////////////////////////////
[
object,
uuid(97DEDE62-FC6B-11CF-B5F5-00A0C90AB505),
helpstring("IWCWizardCallback Interface"),
pointer_default(unique)
]
interface IWCWizardCallback : IUnknown
{
import "oaidl.idl";
HRESULT AddWizardPage(
[in] HPROPSHEETPAGE hpage
);
HRESULT EnableNext(
[in] HPROPSHEETPAGE hpage,
[in] BOOL bEnable
);
}; //*** interface IWCWizardCallback
/////////////////////////////////////////////////////////////////////////
//
// IWEExtendWizard
//
/////////////////////////////////////////////////////////////////////////
[
object,
uuid(97DEDE63-FC6B-11CF-B5F5-00A0C90AB505),
helpstring("IWEExtendWizard Interface"),
pointer_default(unique)
]
interface IWEExtendWizard : IUnknown
{
import "oaidl.idl";
HRESULT CreateWizardPages(
[in] IUnknown * piData,
[in] IWCWizardCallback * piCallback
);
}; //*** interface IWEExtendWizard
/////////////////////////////////////////////////////////////////////////
//
// IWCContextMenuCallback
//
/////////////////////////////////////////////////////////////////////////
[
object,
uuid(97DEDE64-FC6B-11CF-B5F5-00A0C90AB505),
helpstring("IWCContextMenuCallback Interface"),
pointer_default(unique)
]
interface IWCContextMenuCallback : IUnknown
{
import "oaidl.idl";
HRESULT AddExtensionMenuItem(
[in] BSTR lpszName,
[in] BSTR lpszStatusBarText,
[in] ULONG nCommandID,
[in] ULONG nSubmenuCommandID,
[in] ULONG uFlags
);
}; //*** interface IWCContextMenuCallback
/////////////////////////////////////////////////////////////////////////
//
// IWEExtendContextMenu
//
/////////////////////////////////////////////////////////////////////////
[
object,
uuid(97DEDE65-FC6B-11CF-B5F5-00A0C90AB505),
helpstring("IWEExtendContextMenu Interface"),
pointer_default(unique)
]
interface IWEExtendContextMenu : IUnknown
{
import "oaidl.idl";
HRESULT AddContextMenuItems(
[in] IUnknown * piData,
[in] IWCContextMenuCallback * piCallback
);
}; //*** interface IWEExtendContextMenu
/////////////////////////////////////////////////////////////////////////
//
// IWEInvokeCommand
//
/////////////////////////////////////////////////////////////////////////
[
object,
uuid(97DEDE66-FC6B-11CF-B5F5-00A0C90AB505),
helpstring("IWEInvokeCommand Interface"),
pointer_default(unique)
]
interface IWEInvokeCommand : IUnknown
{
import "oaidl.idl";
HRESULT InvokeCommand(
[in] ULONG nCommandID,
[in] IUnknown * piData
);
}; //*** interface IWEInvokeCommand
/////////////////////////////////////////////////////////////////////////
//
// IWCWizard97Callback
//
/////////////////////////////////////////////////////////////////////////
[
object,
uuid(97DEDE67-FC6B-11CF-B5F5-00A0C90AB505),
helpstring("IWCWizard97Callback Interface"),
pointer_default(unique)
]
interface IWCWizard97Callback : IUnknown
{
import "oaidl.idl";
HRESULT AddWizard97Page(
[in] HPROPSHEETPAGE hpage
);
HRESULT EnableNext(
[in] HPROPSHEETPAGE hpage,
[in] BOOL bEnable
);
}; //*** interface IWCWizard97Callback
/////////////////////////////////////////////////////////////////////////
//
// IWEExtendWizard97
//
/////////////////////////////////////////////////////////////////////////
[
object,
uuid(97DEDE68-FC6B-11CF-B5F5-00A0C90AB505),
helpstring("IWEExtendWizard97 Interface"),
pointer_default(unique)
]
interface IWEExtendWizard97 : IUnknown
{
import "oaidl.idl";
HRESULT CreateWizard97Pages(
[in] IUnknown * piData,
[in] IWCWizard97Callback * piCallback
);
}; //*** interface IWEExtendWizard97
/////////////////////////////////////////////////////////////////////////////
#endif // _CLUADMEX_IDL_

File diff suppressed because it is too large Load Diff

4918
BuildTools/Include/ClusApi.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,211 @@
#ifndef __cmnquery_h
#define __cmnquery_h
DEFINE_GUID(IID_IQueryForm, 0x8cfcee30, 0x39bd, 0x11d0, 0xb8, 0xd1, 0x0, 0xa0, 0x24, 0xab, 0x2d, 0xbb);
DEFINE_GUID(IID_IPersistQuery, 0x1a3114b8, 0xa62e, 0x11d0, 0xa6, 0xc5, 0x0, 0xa0, 0xc9, 0x06, 0xaf, 0x45);
DEFINE_GUID(CLSID_CommonQuery, 0x83bc5ec0, 0x6f2a, 0x11d0, 0xa1, 0xc4, 0x0, 0xaa, 0x00, 0xc1, 0x6e, 0x65);
DEFINE_GUID(IID_ICommonQuery, 0xab50dec0, 0x6f1d, 0x11d0, 0xa1, 0xc4, 0x0, 0xaa, 0x00, 0xc1, 0x6e, 0x65);
#ifndef GUID_DEFS_ONLY
//-----------------------------------------------------------------------------
// IQueryForm
//-----------------------------------------------------------------------------
//
// A query form object is registered under the query handlers CLSID,
// a list is stored in the registry:
//
// HKCR\CLSID\{CLSID query handler}\Forms
//
// For each form object there are server values which can be defined:
//
// Flags = flags for the form object:
// QUERYFORM_CHANGESFORMLIST
// QUERYFORM_CHANGESOPTFORMLIST
//
// CLSID = string containing the CLSID of the InProc server to invoke
// to get the IQueryFormObject.
//
// Forms = a sub key containing the CLSIDs for the forms registered
// by IQueryForm::AddForms (or modified by ::AddPages), if
// the flags are 0, then we scan this list looking for a match
// for the default form specified.
//
#define QUERYFORM_CHANGESFORMLIST 0x000000001
#define QUERYFORM_CHANGESOPTFORMLIST 0x000000002
//
// Query Forms
// ===========
// Query forms are registered and have query pages added to them, a form without
// pages is not displayed. Each form has a unique CLSID to allow it to be
// selected by invoking the query dialog.
//
#define CQFF_NOGLOBALPAGES 0x0000001 // = 1 => doesn't have global pages added
#define CQFF_ISOPTIONAL 0x0000002 // = 1 => form is hidden, unless optional forms requested
typedef struct
{
DWORD cbStruct;
DWORD dwFlags;
CLSID clsid;
HICON hIcon;
LPCWSTR pszTitle;
} CQFORM, * LPCQFORM;
typedef HRESULT (CALLBACK *LPCQADDFORMSPROC)(LPARAM lParam, LPCQFORM pForm);
//
// Query Form Pages
// ================
// When a query form has been registered the caller can then add pages to it,
// any form can have pages appended.
//
struct _cqpage;
typedef struct _cqpage CQPAGE, * LPCQPAGE;
typedef HRESULT (CALLBACK *LPCQADDPAGESPROC)(LPARAM lParam, REFCLSID clsidForm, LPCQPAGE pPage);
typedef HRESULT (CALLBACK *LPCQPAGEPROC)(LPCQPAGE pPage, HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
struct _cqpage
{
DWORD cbStruct;
DWORD dwFlags;
LPCQPAGEPROC pPageProc;
HINSTANCE hInstance;
INT idPageName;
INT idPageTemplate;
DLGPROC pDlgProc;
LPARAM lParam;
};
//
// IQueryForm interfaces
//
#undef INTERFACE
#define INTERFACE IQueryForm
DECLARE_INTERFACE_IID_(IQueryForm, IUnknown, "8cfcee30-39bd-11d0-b8d1-00a024ab2dbb")
{
// *** IUnknown methods ***
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
// IQueryForm methods
STDMETHOD(Initialize)(THIS_ HKEY hkForm) PURE;
STDMETHOD(AddForms)(THIS_ LPCQADDFORMSPROC pAddFormsProc, LPARAM lParam) PURE;
STDMETHOD(AddPages)(THIS_ LPCQADDPAGESPROC pAddPagesProc, LPARAM lParam) PURE;
};
//
// Messages for pages
//
#define CQPM_INITIALIZE 0x00000001
#define CQPM_RELEASE 0x00000002
#define CQPM_ENABLE 0x00000003 // wParam = TRUE/FALSE (enable, disable), lParam = 0
#define CQPM_GETPARAMETERS 0x00000005 // wParam = 0, lParam = -> receives the LocalAlloc
#define CQPM_CLEARFORM 0x00000006 // wParam, lParam = 0
#define CQPM_PERSIST 0x00000007 // wParam = fRead, lParam -> IPersistQuery
#define CQPM_HELP 0x00000008 // wParam = 0, lParam -> LPHELPINFO
#define CQPM_SETDEFAULTPARAMETERS 0x00000009 // wParam = 0, lParam -> OPENQUERYWINDOW
#define CQPM_HANDLERSPECIFIC 0x10000000
//-----------------------------------------------------------------------------
// IPersistQuery
//-----------------------------------------------------------------------------
// IPersistQuery interface
#undef INTERFACE
#define INTERFACE IPersistQuery
DECLARE_INTERFACE_IID_(IPersistQuery, IPersist, "1a3114b8-a62e-11d0-a6c5-00a0c906af45")
{
// *** IUnknown methods ***
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
// IPersist
STDMETHOD(GetClassID)(THIS_ CLSID* pClassID) PURE;
// IPersistQuery
STDMETHOD(WriteString)(THIS_ LPCWSTR pSection, LPCWSTR pValueName, LPCWSTR pValue) PURE;
STDMETHOD(ReadString)(THIS_ LPCWSTR pSection, LPCWSTR pValueName, __out LPWSTR pBuffer, INT cchBuffer) PURE;
STDMETHOD(WriteInt)(THIS_ LPCWSTR pSection, LPCWSTR pValueName, INT value) PURE;
STDMETHOD(ReadInt)(THIS_ LPCWSTR pSection, LPCWSTR pValueName, LPINT pValue) PURE;
STDMETHOD(WriteStruct)(THIS_ LPCWSTR pSection, LPCWSTR pValueName, LPVOID pStruct, DWORD cbStruct) PURE;
STDMETHOD(ReadStruct)(THIS_ LPCWSTR pSection, LPCWSTR pValueName, LPVOID pStruct, DWORD cbStruct) PURE;
STDMETHOD(Clear)(THIS) PURE;
};
//-----------------------------------------------------------------------------
// ICommonQuery
//-----------------------------------------------------------------------------
#define OQWF_OKCANCEL 0x00000001 // = 1 => Provide OK/Cancel buttons
#define OQWF_DEFAULTFORM 0x00000002 // = 1 => clsidDefaultQueryForm is valid
#define OQWF_SINGLESELECT 0x00000004 // = 1 => view to have single selection (depends on viewer)
#define OQWF_LOADQUERY 0x00000008 // = 1 => use the IPersistQuery to load the given query
#define OQWF_REMOVESCOPES 0x00000010 // = 1 => remove scope picker from dialog
#define OQWF_REMOVEFORMS 0x00000020 // = 1 => remove form picker from dialog
#define OQWF_ISSUEONOPEN 0x00000040 // = 1 => issue query on opening the dialog
#define OQWF_SHOWOPTIONAL 0x00000080 // = 1 => list optional forms by default
#define OQWF_SAVEQUERYONOK 0x00000200 // = 1 => use the IPersistQuery to write the query on close
#define OQWF_HIDEMENUS 0x00000400 // = 1 => no menu bar displayed
#define OQWF_HIDESEARCHUI 0x00000800 // = 1 => dialog is filter, therefore start, stop, new search etc
#define OQWF_PARAMISPROPERTYBAG 0x80000000 // = 1 => the form parameters ptr is an IPropertyBag (ppbFormParameters)
typedef struct
{
DWORD cbStruct; // structure size
DWORD dwFlags; // flags (OQFW_*)
CLSID clsidHandler; // clsid of handler we are using
LPVOID pHandlerParameters; // handler specific structure for initialization
CLSID clsidDefaultForm; // default form to be selected (if OQF_DEFAULTFORM == 1 )
IPersistQuery* pPersistQuery; // IPersistQuery used for loading queries
union
{
void* pFormParameters;
IPropertyBag* ppbFormParameters;
};
} OPENQUERYWINDOW, * LPOPENQUERYWINDOW;
// ICommonQuery
#undef INTERFACE
#define INTERFACE ICommonQuery
DECLARE_INTERFACE_IID_(ICommonQuery, IUnknown, "ab50dec0-6f1d-11d0-a1c4-00aa00c16e65")
{
// *** IUnknown methods ***
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
// ICommonQuery methods
STDMETHOD(OpenQueryWindow)(THIS_ HWND hwndParent, LPOPENQUERYWINDOW pQueryWnd, IDataObject** ppDataObject) PURE;
};
#endif // GUID_DEFS_ONLY
#endif

View File

@ -0,0 +1,91 @@
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
color.dlg
Abstract:
This module contains the resource descriptions for the Win32
color common dialogs.
Revision History:
--*/
//
// Include Files.
//
#include <colordlg.h>
//
// Color Dialogs.
//
ChooseColor DIALOG LOADONCALL MOVEABLE DISCARDABLE 2, 0, 298, 184
STYLE WS_BORDER | DS_MODALFRAME | WS_CAPTION | WS_POPUP | WS_SYSMENU |
DS_3DLOOK
CAPTION "Color"
FONT 8 "MS Shell Dlg"
BEGIN
LTEXT "&Basic colors:", -1, 4, 4, 140, 9
CONTROL "", COLOR_BOX1, "static",
SS_SIMPLE | WS_CHILD | WS_TABSTOP | WS_GROUP,
4, 14, 140, 86
LTEXT "&Custom colors:", -1, 4, 106, 140, 9
CONTROL "", COLOR_CUSTOM1, "static",
SS_SIMPLE | WS_CHILD | WS_TABSTOP | WS_GROUP,
4, 116, 140, 28
PUSHBUTTON "&Define Custom Colors >>" COLOR_MIX, 4, 150, 138, 14,
WS_TABSTOP | WS_GROUP
DEFPUSHBUTTON "OK", IDOK, 4, 166, 44, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Cancel", IDCANCEL, 52, 166, 44, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Help", pshHelp, 100, 166, 44, 14, WS_GROUP | WS_TABSTOP
CONTROL "", COLOR_RAINBOW, "static",
SS_SUNKEN | SS_SIMPLE | WS_CHILD, 152, 4, 118, 116
CONTROL "", COLOR_LUMSCROLL, "static",
SS_SUNKEN | SS_SIMPLE | WS_CHILD, 280, 4, 8, 116
CONTROL "", COLOR_CURRENT, "static",
SS_SUNKEN | SS_SIMPLE | WS_CHILD, 152, 124, 40, 26
PUSHBUTTON "&o", COLOR_SOLID, 300, 200, 4, 14, WS_GROUP
RTEXT "Color", COLOR_SOLID_LEFT, 152, 151, 20, 9
LTEXT "|S&olid", COLOR_SOLID_RIGHT, 172, 151, 20, 9
RTEXT "Hu&e:", COLOR_HUEACCEL, 194, 126, 20, 9
EDITTEXT, COLOR_HUE, 216, 124, 18, 12, WS_GROUP | WS_TABSTOP
RTEXT "&Sat:", COLOR_SATACCEL, 194, 140, 20, 9
EDITTEXT, COLOR_SAT, 216, 138, 18, 12, WS_GROUP | WS_TABSTOP
RTEXT "&Lum:", COLOR_LUMACCEL, 194, 154, 20, 9
EDITTEXT, COLOR_LUM, 216, 152, 18, 12, WS_GROUP | WS_TABSTOP
RTEXT "&Red:", COLOR_REDACCEL, 243, 126, 24, 9
EDITTEXT, COLOR_RED, 269, 124, 18, 12, WS_GROUP | WS_TABSTOP
RTEXT "&Green:", COLOR_GREENACCEL, 243, 140, 24, 9
EDITTEXT, COLOR_GREEN, 269, 138, 18, 12, WS_GROUP | WS_TABSTOP
RTEXT "Bl&ue:", COLOR_BLUEACCEL, 243, 154, 24, 9
EDITTEXT, COLOR_BLUE, 269, 152, 18, 12, WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Add to Custom Colors", COLOR_ADD, 152, 166, 142, 14,
WS_GROUP | WS_TABSTOP
END

View File

@ -0,0 +1,65 @@
/*++
Copyright (c) 1990-1999, Microsoft Corporation All rights reserved.
Module Name:
colordlg.h
Abstract:
This module contains the header information for the Win32 color dialog.
Revision History:
--*/
#if _MSC_VER > 1000
#pragma once
#endif
//
// Constant Declarations.
//
#define DLG_COLOR 10
#define COLOR_HUESCROLL 700 // color dialog
#define COLOR_SATSCROLL 701
#define COLOR_LUMSCROLL 702
#define COLOR_HUE 703
#define COLOR_SAT 704
#define COLOR_LUM 705
#define COLOR_RED 706
#define COLOR_GREEN 707
#define COLOR_BLUE 708
#define COLOR_CURRENT 709
#define COLOR_RAINBOW 710
#define COLOR_SAVE 711
#define COLOR_ADD 712
#define COLOR_SOLID 713
#define COLOR_TUNE 714
#define COLOR_SCHEMES 715
#define COLOR_ELEMENT 716
#define COLOR_SAMPLES 717
#define COLOR_PALETTE 718
#define COLOR_MIX 719
#define COLOR_BOX1 720
#define COLOR_CUSTOM1 721
#define COLOR_HUEACCEL 723
#define COLOR_SATACCEL 724
#define COLOR_LUMACCEL 725
#define COLOR_REDACCEL 726
#define COLOR_GREENACCEL 727
#define COLOR_BLUEACCEL 728
#define COLOR_SOLID_LEFT 730
#define COLOR_SOLID_RIGHT 731
#define NUM_BASIC_COLORS 48
#define NUM_CUSTOM_COLORS 16

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,278 @@
//+---------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Contents: Component Categories Interfaces
//
//----------------------------------------------------------------------------
cpp_quote("//=--------------------------------------------------------------------------=")
cpp_quote("// ComCat.h")
cpp_quote("//=--------------------------------------------------------------------------=")
cpp_quote("// Copyright (c) Microsoft Corporation. All rights reserved.")
cpp_quote("//")
cpp_quote("// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF")
cpp_quote("// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO")
cpp_quote("// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A")
cpp_quote("// PARTICULAR PURPOSE.")
cpp_quote("//=--------------------------------------------------------------------------=")
cpp_quote("")
cpp_quote("#pragma comment(lib,\"uuid.lib\")")
cpp_quote("")
cpp_quote("//=--------------------------------------------------------------------------=")
cpp_quote("// OLE Componet Categories Interfaces.")
cpp_quote("//=--------------------------------------------------------------------------=")
cpp_quote("//")
#ifndef DO_NO_IMPORTS
import "unknwn.idl";
#endif
interface IEnumGUID;
interface IEnumCATEGORYINFO;
interface ICatRegister;
interface ICatInformation;
cpp_quote("EXTERN_C const CLSID CLSID_StdComponentCategoriesMgr;")
cpp_quote("")
cpp_quote("////////////////////////////////////////////////////////////////////////////")
cpp_quote("// Types")
typedef GUID CATID;
typedef REFGUID REFCATID;
cpp_quote("#define IID_IEnumCLSID IID_IEnumGUID")
cpp_quote("#define IEnumCLSID IEnumGUID")
cpp_quote("#define LPENUMCLSID LPENUMGUID")
#define IEnumCLSID IEnumGUID
cpp_quote("#define CATID_NULL GUID_NULL")
cpp_quote("#define IsEqualCATID(rcatid1, rcatid2) IsEqualGUID(rcatid1, rcatid2)")
cpp_quote("#define IID_IEnumCATID IID_IEnumGUID")
cpp_quote("#define IEnumCATID IEnumGUID")
#define IEnumCATID IEnumGUID
cpp_quote("")
cpp_quote("////////////////////////////////////////////////////////////////////////////")
cpp_quote("// Category IDs (link to uuid3.lib)")
cpp_quote("EXTERN_C const CATID CATID_Insertable;")
cpp_quote("EXTERN_C const CATID CATID_Control;")
cpp_quote("EXTERN_C const CATID CATID_Programmable;")
cpp_quote("EXTERN_C const CATID CATID_IsShortcut;")
cpp_quote("EXTERN_C const CATID CATID_NeverShowExt;")
cpp_quote("EXTERN_C const CATID CATID_DocObject;")
cpp_quote("EXTERN_C const CATID CATID_Printable;")
cpp_quote("EXTERN_C const CATID CATID_RequiresDataPathHost;")
cpp_quote("EXTERN_C const CATID CATID_PersistsToMoniker;")
cpp_quote("EXTERN_C const CATID CATID_PersistsToStorage;")
cpp_quote("EXTERN_C const CATID CATID_PersistsToStreamInit;")
cpp_quote("EXTERN_C const CATID CATID_PersistsToStream;")
cpp_quote("EXTERN_C const CATID CATID_PersistsToMemory;")
cpp_quote("EXTERN_C const CATID CATID_PersistsToFile;")
cpp_quote("EXTERN_C const CATID CATID_PersistsToPropertyBag;")
cpp_quote("EXTERN_C const CATID CATID_InternetAware;")
cpp_quote("EXTERN_C const CATID CATID_DesignTimeUIActivatableControl;")
cpp_quote("")
cpp_quote("////////////////////////////////////////////////////////////////////////////")
cpp_quote("// Interface Definitions")
//+---------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Contents: IEnumGUID interface definition
//
//----------------------------------------------------------------------------
cpp_quote("#ifndef _LPENUMGUID_DEFINED")
cpp_quote("#define _LPENUMGUID_DEFINED")
[
object,
uuid(0002E000-0000-0000-C000-000000000046),
pointer_default(unique)
]
interface IEnumGUID : IUnknown
{
typedef [unique] IEnumGUID *LPENUMGUID;
[local]
HRESULT Next(
[in] ULONG celt,
[out, size_is(celt), length_is(*pceltFetched), annotation("__out_ecount_part(celt,*pceltFetched)")] GUID *rgelt,
[out, annotation("__out_opt")] ULONG *pceltFetched);
[call_as(Next)]
HRESULT RemoteNext(
[in] ULONG celt,
[out, size_is(celt), length_is(*pceltFetched)] GUID *rgelt,
[out] ULONG *pceltFetched);
HRESULT Skip(
[in] ULONG celt);
HRESULT Reset();
HRESULT Clone(
[out] IEnumGUID **ppenum);
}
cpp_quote("#endif")
//+---------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Contents: IEnumCATEGORYINFO definition
//
//----------------------------------------------------------------------------
cpp_quote("#ifndef _LPENUMCATEGORYINFO_DEFINED")
cpp_quote("#define _LPENUMCATEGORYINFO_DEFINED")
[
object,
uuid(0002E011-0000-0000-C000-000000000046),
pointer_default(unique)
]
interface IEnumCATEGORYINFO : IUnknown
{
typedef [unique] IEnumCATEGORYINFO *LPENUMCATEGORYINFO;
#define CATDESC_MAX 128
typedef struct tagCATEGORYINFO {
CATID catid;
LCID lcid;
OLECHAR szDescription[CATDESC_MAX];
} CATEGORYINFO, *LPCATEGORYINFO;
HRESULT Next(
[in] ULONG celt,
[out, size_is(celt), length_is(*pceltFetched)] CATEGORYINFO* rgelt,
[out] ULONG* pceltFetched);
HRESULT Skip(
[in] ULONG celt);
HRESULT Reset();
HRESULT Clone(
[out] IEnumCATEGORYINFO** ppenum);
}
cpp_quote("#endif")
//+---------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Contents: ICatRegister definition
//
//----------------------------------------------------------------------------
cpp_quote("#ifndef _LPCATREGISTER_DEFINED")
cpp_quote("#define _LPCATREGISTER_DEFINED")
[
object,
uuid(0002E012-0000-0000-C000-000000000046),
pointer_default(unique)
]
interface ICatRegister : IUnknown
{
typedef [unique] ICatRegister* LPCATREGISTER;
HRESULT RegisterCategories(
[in] ULONG cCategories,
[in, size_is(cCategories)] CATEGORYINFO rgCategoryInfo[]);
HRESULT UnRegisterCategories(
[in] ULONG cCategories,
[in, size_is(cCategories)] CATID rgcatid[]);
HRESULT RegisterClassImplCategories(
[in] REFCLSID rclsid,
[in] ULONG cCategories,
[in, size_is(cCategories)] CATID rgcatid[]);
HRESULT UnRegisterClassImplCategories(
[in] REFCLSID rclsid,
[in] ULONG cCategories,
[in, size_is(cCategories)] CATID rgcatid[]);
HRESULT RegisterClassReqCategories(
[in] REFCLSID rclsid,
[in] ULONG cCategories,
[in, size_is(cCategories)] CATID rgcatid[]);
HRESULT UnRegisterClassReqCategories(
[in] REFCLSID rclsid,
[in] ULONG cCategories,
[in, size_is(cCategories)] CATID rgcatid[]);
}
cpp_quote("#endif")
//+---------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Contents: ICatInformation definition
//
//----------------------------------------------------------------------------
cpp_quote("#ifndef _LPCATINFORMATION_DEFINED")
cpp_quote("#define _LPCATINFORMATION_DEFINED")
[
object,
uuid(0002E013-0000-0000-C000-000000000046),
pointer_default(unique)
]
interface ICatInformation : IUnknown
{
typedef [unique] ICatInformation* LPCATINFORMATION;
HRESULT EnumCategories(
[in] LCID lcid,
[out] IEnumCATEGORYINFO** ppenumCategoryInfo);
HRESULT GetCategoryDesc(
[in] REFCATID rcatid,
[in] LCID lcid,
[out] LPWSTR* pszDesc);
[local]
HRESULT EnumClassesOfCategories(
[in] ULONG cImplemented,
[in,size_is(cImplemented)] const CATID rgcatidImpl[],
[in] ULONG cRequired,
[in,size_is(cRequired)] const CATID rgcatidReq[],
[out] IEnumCLSID** ppenumClsid);
[call_as(EnumClassesOfCategories)]
HRESULT RemoteEnumClassesOfCategories(
[in] ULONG cImplemented,
[in,unique,size_is(cImplemented)] const CATID rgcatidImpl[],
[in] ULONG cRequired,
[in,unique,size_is(cRequired)] const CATID rgcatidReq[],
[out] IEnumCLSID** ppenumClsid);
[local]
HRESULT IsClassOfCategories(
[in] REFCLSID rclsid,
[in] ULONG cImplemented,
[in,size_is(cImplemented)] const CATID rgcatidImpl[],
[in] ULONG cRequired,
[in,size_is(cRequired)] const CATID rgcatidReq[]);
[call_as(IsClassOfCategories)]
HRESULT RemoteIsClassOfCategories(
[in] REFCLSID rclsid,
[in] ULONG cImplemented,
[in,unique,size_is(cImplemented)] const CATID rgcatidImpl[],
[in] ULONG cRequired,
[in,unique,size_is(cRequired)] const CATID rgcatidReq[] );
HRESULT EnumImplCategoriesOfClass(
[in] REFCLSID rclsid,
[out] IEnumCATID** ppenumCatid);
HRESULT EnumReqCategoriesOfClass(
[in] REFCLSID rclsid,
[out] IEnumCATID** ppenumCatid);
}
cpp_quote("#endif")

849
BuildTools/Include/ComCat.h Normal file
View File

@ -0,0 +1,849 @@
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 7.00.0555 */
/* Compiler settings for comcat.idl:
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING( ) */
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 500
#endif
/* verify that the <rpcsal.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCSAL_H_VERSION__
#define __REQUIRED_RPCSAL_H_VERSION__ 100
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#ifndef __comcat_h__
#define __comcat_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifndef __IEnumGUID_FWD_DEFINED__
#define __IEnumGUID_FWD_DEFINED__
typedef interface IEnumGUID IEnumGUID;
#endif /* __IEnumGUID_FWD_DEFINED__ */
#ifndef __IEnumCATEGORYINFO_FWD_DEFINED__
#define __IEnumCATEGORYINFO_FWD_DEFINED__
typedef interface IEnumCATEGORYINFO IEnumCATEGORYINFO;
#endif /* __IEnumCATEGORYINFO_FWD_DEFINED__ */
#ifndef __ICatRegister_FWD_DEFINED__
#define __ICatRegister_FWD_DEFINED__
typedef interface ICatRegister ICatRegister;
#endif /* __ICatRegister_FWD_DEFINED__ */
#ifndef __ICatInformation_FWD_DEFINED__
#define __ICatInformation_FWD_DEFINED__
typedef interface ICatInformation ICatInformation;
#endif /* __ICatInformation_FWD_DEFINED__ */
/* header files for imported files */
#include "unknwn.h"
#ifdef __cplusplus
extern "C"{
#endif
/* interface __MIDL_itf_comcat_0000_0000 */
/* [local] */
//=--------------------------------------------------------------------------=
// ComCat.h
//=--------------------------------------------------------------------------=
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//=--------------------------------------------------------------------------=
#pragma comment(lib,"uuid.lib")
//=--------------------------------------------------------------------------=
// OLE Componet Categories Interfaces.
//=--------------------------------------------------------------------------=
//
EXTERN_C const CLSID CLSID_StdComponentCategoriesMgr;
////////////////////////////////////////////////////////////////////////////
// Types
typedef GUID CATID;
typedef REFGUID REFCATID;
#define IID_IEnumCLSID IID_IEnumGUID
#define IEnumCLSID IEnumGUID
#define LPENUMCLSID LPENUMGUID
#define CATID_NULL GUID_NULL
#define IsEqualCATID(rcatid1, rcatid2) IsEqualGUID(rcatid1, rcatid2)
#define IID_IEnumCATID IID_IEnumGUID
#define IEnumCATID IEnumGUID
////////////////////////////////////////////////////////////////////////////
// Category IDs (link to uuid3.lib)
EXTERN_C const CATID CATID_Insertable;
EXTERN_C const CATID CATID_Control;
EXTERN_C const CATID CATID_Programmable;
EXTERN_C const CATID CATID_IsShortcut;
EXTERN_C const CATID CATID_NeverShowExt;
EXTERN_C const CATID CATID_DocObject;
EXTERN_C const CATID CATID_Printable;
EXTERN_C const CATID CATID_RequiresDataPathHost;
EXTERN_C const CATID CATID_PersistsToMoniker;
EXTERN_C const CATID CATID_PersistsToStorage;
EXTERN_C const CATID CATID_PersistsToStreamInit;
EXTERN_C const CATID CATID_PersistsToStream;
EXTERN_C const CATID CATID_PersistsToMemory;
EXTERN_C const CATID CATID_PersistsToFile;
EXTERN_C const CATID CATID_PersistsToPropertyBag;
EXTERN_C const CATID CATID_InternetAware;
EXTERN_C const CATID CATID_DesignTimeUIActivatableControl;
////////////////////////////////////////////////////////////////////////////
// Interface Definitions
#ifndef _LPENUMGUID_DEFINED
#define _LPENUMGUID_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_comcat_0000_0000_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_comcat_0000_0000_v0_0_s_ifspec;
#ifndef __IEnumGUID_INTERFACE_DEFINED__
#define __IEnumGUID_INTERFACE_DEFINED__
/* interface IEnumGUID */
/* [unique][uuid][object] */
typedef /* [unique] */ __RPC_unique_pointer IEnumGUID *LPENUMGUID;
EXTERN_C const IID IID_IEnumGUID;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("0002E000-0000-0000-C000-000000000046")
IEnumGUID : public IUnknown
{
public:
virtual /* [local] */ HRESULT STDMETHODCALLTYPE Next(
/* [in] */ ULONG celt,
/* [annotation][length_is][size_is][out] */
__out_ecount_part(celt,*pceltFetched) GUID *rgelt,
/* [annotation][out] */
__out_opt ULONG *pceltFetched) = 0;
virtual HRESULT STDMETHODCALLTYPE Skip(
/* [in] */ ULONG celt) = 0;
virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0;
virtual HRESULT STDMETHODCALLTYPE Clone(
/* [out] */ __RPC__deref_out_opt IEnumGUID **ppenum) = 0;
};
#else /* C style interface */
typedef struct IEnumGUIDVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IEnumGUID * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
__RPC__deref_out void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IEnumGUID * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IEnumGUID * This);
/* [local] */ HRESULT ( STDMETHODCALLTYPE *Next )(
IEnumGUID * This,
/* [in] */ ULONG celt,
/* [annotation][length_is][size_is][out] */
__out_ecount_part(celt,*pceltFetched) GUID *rgelt,
/* [annotation][out] */
__out_opt ULONG *pceltFetched);
HRESULT ( STDMETHODCALLTYPE *Skip )(
__RPC__in IEnumGUID * This,
/* [in] */ ULONG celt);
HRESULT ( STDMETHODCALLTYPE *Reset )(
__RPC__in IEnumGUID * This);
HRESULT ( STDMETHODCALLTYPE *Clone )(
__RPC__in IEnumGUID * This,
/* [out] */ __RPC__deref_out_opt IEnumGUID **ppenum);
END_INTERFACE
} IEnumGUIDVtbl;
interface IEnumGUID
{
CONST_VTBL struct IEnumGUIDVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IEnumGUID_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IEnumGUID_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IEnumGUID_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IEnumGUID_Next(This,celt,rgelt,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,rgelt,pceltFetched) )
#define IEnumGUID_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
#define IEnumGUID_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
#define IEnumGUID_Clone(This,ppenum) \
( (This)->lpVtbl -> Clone(This,ppenum) )
#endif /* COBJMACROS */
#endif /* C style interface */
/* [call_as] */ HRESULT STDMETHODCALLTYPE IEnumGUID_RemoteNext_Proxy(
__RPC__in IEnumGUID * This,
/* [in] */ ULONG celt,
/* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) GUID *rgelt,
/* [out] */ __RPC__out ULONG *pceltFetched);
void __RPC_STUB IEnumGUID_RemoteNext_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IEnumGUID_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_comcat_0000_0001 */
/* [local] */
#endif
#ifndef _LPENUMCATEGORYINFO_DEFINED
#define _LPENUMCATEGORYINFO_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_comcat_0000_0001_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_comcat_0000_0001_v0_0_s_ifspec;
#ifndef __IEnumCATEGORYINFO_INTERFACE_DEFINED__
#define __IEnumCATEGORYINFO_INTERFACE_DEFINED__
/* interface IEnumCATEGORYINFO */
/* [unique][uuid][object] */
typedef /* [unique] */ __RPC_unique_pointer IEnumCATEGORYINFO *LPENUMCATEGORYINFO;
typedef struct tagCATEGORYINFO
{
CATID catid;
LCID lcid;
OLECHAR szDescription[ 128 ];
} CATEGORYINFO;
typedef struct tagCATEGORYINFO *LPCATEGORYINFO;
EXTERN_C const IID IID_IEnumCATEGORYINFO;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("0002E011-0000-0000-C000-000000000046")
IEnumCATEGORYINFO : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE Next(
/* [in] */ ULONG celt,
/* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) CATEGORYINFO *rgelt,
/* [out] */ __RPC__out ULONG *pceltFetched) = 0;
virtual HRESULT STDMETHODCALLTYPE Skip(
/* [in] */ ULONG celt) = 0;
virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0;
virtual HRESULT STDMETHODCALLTYPE Clone(
/* [out] */ __RPC__deref_out_opt IEnumCATEGORYINFO **ppenum) = 0;
};
#else /* C style interface */
typedef struct IEnumCATEGORYINFOVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IEnumCATEGORYINFO * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
__RPC__deref_out void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IEnumCATEGORYINFO * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IEnumCATEGORYINFO * This);
HRESULT ( STDMETHODCALLTYPE *Next )(
__RPC__in IEnumCATEGORYINFO * This,
/* [in] */ ULONG celt,
/* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) CATEGORYINFO *rgelt,
/* [out] */ __RPC__out ULONG *pceltFetched);
HRESULT ( STDMETHODCALLTYPE *Skip )(
__RPC__in IEnumCATEGORYINFO * This,
/* [in] */ ULONG celt);
HRESULT ( STDMETHODCALLTYPE *Reset )(
__RPC__in IEnumCATEGORYINFO * This);
HRESULT ( STDMETHODCALLTYPE *Clone )(
__RPC__in IEnumCATEGORYINFO * This,
/* [out] */ __RPC__deref_out_opt IEnumCATEGORYINFO **ppenum);
END_INTERFACE
} IEnumCATEGORYINFOVtbl;
interface IEnumCATEGORYINFO
{
CONST_VTBL struct IEnumCATEGORYINFOVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IEnumCATEGORYINFO_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IEnumCATEGORYINFO_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IEnumCATEGORYINFO_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IEnumCATEGORYINFO_Next(This,celt,rgelt,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,rgelt,pceltFetched) )
#define IEnumCATEGORYINFO_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
#define IEnumCATEGORYINFO_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
#define IEnumCATEGORYINFO_Clone(This,ppenum) \
( (This)->lpVtbl -> Clone(This,ppenum) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IEnumCATEGORYINFO_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_comcat_0000_0002 */
/* [local] */
#endif
#ifndef _LPCATREGISTER_DEFINED
#define _LPCATREGISTER_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_comcat_0000_0002_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_comcat_0000_0002_v0_0_s_ifspec;
#ifndef __ICatRegister_INTERFACE_DEFINED__
#define __ICatRegister_INTERFACE_DEFINED__
/* interface ICatRegister */
/* [unique][uuid][object] */
typedef /* [unique] */ __RPC_unique_pointer ICatRegister *LPCATREGISTER;
EXTERN_C const IID IID_ICatRegister;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("0002E012-0000-0000-C000-000000000046")
ICatRegister : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE RegisterCategories(
/* [in] */ ULONG cCategories,
/* [size_is][in] */ __RPC__in_ecount_full(cCategories) CATEGORYINFO rgCategoryInfo[ ]) = 0;
virtual HRESULT STDMETHODCALLTYPE UnRegisterCategories(
/* [in] */ ULONG cCategories,
/* [size_is][in] */ __RPC__in_ecount_full(cCategories) CATID rgcatid[ ]) = 0;
virtual HRESULT STDMETHODCALLTYPE RegisterClassImplCategories(
/* [in] */ __RPC__in REFCLSID rclsid,
/* [in] */ ULONG cCategories,
/* [size_is][in] */ __RPC__in_ecount_full(cCategories) CATID rgcatid[ ]) = 0;
virtual HRESULT STDMETHODCALLTYPE UnRegisterClassImplCategories(
/* [in] */ __RPC__in REFCLSID rclsid,
/* [in] */ ULONG cCategories,
/* [size_is][in] */ __RPC__in_ecount_full(cCategories) CATID rgcatid[ ]) = 0;
virtual HRESULT STDMETHODCALLTYPE RegisterClassReqCategories(
/* [in] */ __RPC__in REFCLSID rclsid,
/* [in] */ ULONG cCategories,
/* [size_is][in] */ __RPC__in_ecount_full(cCategories) CATID rgcatid[ ]) = 0;
virtual HRESULT STDMETHODCALLTYPE UnRegisterClassReqCategories(
/* [in] */ __RPC__in REFCLSID rclsid,
/* [in] */ ULONG cCategories,
/* [size_is][in] */ __RPC__in_ecount_full(cCategories) CATID rgcatid[ ]) = 0;
};
#else /* C style interface */
typedef struct ICatRegisterVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in ICatRegister * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
__RPC__deref_out void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in ICatRegister * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in ICatRegister * This);
HRESULT ( STDMETHODCALLTYPE *RegisterCategories )(
__RPC__in ICatRegister * This,
/* [in] */ ULONG cCategories,
/* [size_is][in] */ __RPC__in_ecount_full(cCategories) CATEGORYINFO rgCategoryInfo[ ]);
HRESULT ( STDMETHODCALLTYPE *UnRegisterCategories )(
__RPC__in ICatRegister * This,
/* [in] */ ULONG cCategories,
/* [size_is][in] */ __RPC__in_ecount_full(cCategories) CATID rgcatid[ ]);
HRESULT ( STDMETHODCALLTYPE *RegisterClassImplCategories )(
__RPC__in ICatRegister * This,
/* [in] */ __RPC__in REFCLSID rclsid,
/* [in] */ ULONG cCategories,
/* [size_is][in] */ __RPC__in_ecount_full(cCategories) CATID rgcatid[ ]);
HRESULT ( STDMETHODCALLTYPE *UnRegisterClassImplCategories )(
__RPC__in ICatRegister * This,
/* [in] */ __RPC__in REFCLSID rclsid,
/* [in] */ ULONG cCategories,
/* [size_is][in] */ __RPC__in_ecount_full(cCategories) CATID rgcatid[ ]);
HRESULT ( STDMETHODCALLTYPE *RegisterClassReqCategories )(
__RPC__in ICatRegister * This,
/* [in] */ __RPC__in REFCLSID rclsid,
/* [in] */ ULONG cCategories,
/* [size_is][in] */ __RPC__in_ecount_full(cCategories) CATID rgcatid[ ]);
HRESULT ( STDMETHODCALLTYPE *UnRegisterClassReqCategories )(
__RPC__in ICatRegister * This,
/* [in] */ __RPC__in REFCLSID rclsid,
/* [in] */ ULONG cCategories,
/* [size_is][in] */ __RPC__in_ecount_full(cCategories) CATID rgcatid[ ]);
END_INTERFACE
} ICatRegisterVtbl;
interface ICatRegister
{
CONST_VTBL struct ICatRegisterVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define ICatRegister_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define ICatRegister_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define ICatRegister_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define ICatRegister_RegisterCategories(This,cCategories,rgCategoryInfo) \
( (This)->lpVtbl -> RegisterCategories(This,cCategories,rgCategoryInfo) )
#define ICatRegister_UnRegisterCategories(This,cCategories,rgcatid) \
( (This)->lpVtbl -> UnRegisterCategories(This,cCategories,rgcatid) )
#define ICatRegister_RegisterClassImplCategories(This,rclsid,cCategories,rgcatid) \
( (This)->lpVtbl -> RegisterClassImplCategories(This,rclsid,cCategories,rgcatid) )
#define ICatRegister_UnRegisterClassImplCategories(This,rclsid,cCategories,rgcatid) \
( (This)->lpVtbl -> UnRegisterClassImplCategories(This,rclsid,cCategories,rgcatid) )
#define ICatRegister_RegisterClassReqCategories(This,rclsid,cCategories,rgcatid) \
( (This)->lpVtbl -> RegisterClassReqCategories(This,rclsid,cCategories,rgcatid) )
#define ICatRegister_UnRegisterClassReqCategories(This,rclsid,cCategories,rgcatid) \
( (This)->lpVtbl -> UnRegisterClassReqCategories(This,rclsid,cCategories,rgcatid) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __ICatRegister_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_comcat_0000_0003 */
/* [local] */
#endif
#ifndef _LPCATINFORMATION_DEFINED
#define _LPCATINFORMATION_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_comcat_0000_0003_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_comcat_0000_0003_v0_0_s_ifspec;
#ifndef __ICatInformation_INTERFACE_DEFINED__
#define __ICatInformation_INTERFACE_DEFINED__
/* interface ICatInformation */
/* [unique][uuid][object] */
typedef /* [unique] */ __RPC_unique_pointer ICatInformation *LPCATINFORMATION;
EXTERN_C const IID IID_ICatInformation;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("0002E013-0000-0000-C000-000000000046")
ICatInformation : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE EnumCategories(
/* [in] */ LCID lcid,
/* [out] */ __RPC__deref_out_opt IEnumCATEGORYINFO **ppenumCategoryInfo) = 0;
virtual HRESULT STDMETHODCALLTYPE GetCategoryDesc(
/* [in] */ __RPC__in REFCATID rcatid,
/* [in] */ LCID lcid,
/* [out] */ __RPC__deref_out_opt LPWSTR *pszDesc) = 0;
virtual /* [local] */ HRESULT STDMETHODCALLTYPE EnumClassesOfCategories(
/* [in] */ ULONG cImplemented,
/* [size_is][in] */ const CATID rgcatidImpl[ ],
/* [in] */ ULONG cRequired,
/* [size_is][in] */ const CATID rgcatidReq[ ],
/* [out] */ IEnumGUID **ppenumClsid) = 0;
virtual /* [local] */ HRESULT STDMETHODCALLTYPE IsClassOfCategories(
/* [in] */ REFCLSID rclsid,
/* [in] */ ULONG cImplemented,
/* [size_is][in] */ const CATID rgcatidImpl[ ],
/* [in] */ ULONG cRequired,
/* [size_is][in] */ const CATID rgcatidReq[ ]) = 0;
virtual HRESULT STDMETHODCALLTYPE EnumImplCategoriesOfClass(
/* [in] */ __RPC__in REFCLSID rclsid,
/* [out] */ __RPC__deref_out_opt IEnumGUID **ppenumCatid) = 0;
virtual HRESULT STDMETHODCALLTYPE EnumReqCategoriesOfClass(
/* [in] */ __RPC__in REFCLSID rclsid,
/* [out] */ __RPC__deref_out_opt IEnumGUID **ppenumCatid) = 0;
};
#else /* C style interface */
typedef struct ICatInformationVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in ICatInformation * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
__RPC__deref_out void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in ICatInformation * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in ICatInformation * This);
HRESULT ( STDMETHODCALLTYPE *EnumCategories )(
__RPC__in ICatInformation * This,
/* [in] */ LCID lcid,
/* [out] */ __RPC__deref_out_opt IEnumCATEGORYINFO **ppenumCategoryInfo);
HRESULT ( STDMETHODCALLTYPE *GetCategoryDesc )(
__RPC__in ICatInformation * This,
/* [in] */ __RPC__in REFCATID rcatid,
/* [in] */ LCID lcid,
/* [out] */ __RPC__deref_out_opt LPWSTR *pszDesc);
/* [local] */ HRESULT ( STDMETHODCALLTYPE *EnumClassesOfCategories )(
ICatInformation * This,
/* [in] */ ULONG cImplemented,
/* [size_is][in] */ const CATID rgcatidImpl[ ],
/* [in] */ ULONG cRequired,
/* [size_is][in] */ const CATID rgcatidReq[ ],
/* [out] */ IEnumGUID **ppenumClsid);
/* [local] */ HRESULT ( STDMETHODCALLTYPE *IsClassOfCategories )(
ICatInformation * This,
/* [in] */ REFCLSID rclsid,
/* [in] */ ULONG cImplemented,
/* [size_is][in] */ const CATID rgcatidImpl[ ],
/* [in] */ ULONG cRequired,
/* [size_is][in] */ const CATID rgcatidReq[ ]);
HRESULT ( STDMETHODCALLTYPE *EnumImplCategoriesOfClass )(
__RPC__in ICatInformation * This,
/* [in] */ __RPC__in REFCLSID rclsid,
/* [out] */ __RPC__deref_out_opt IEnumGUID **ppenumCatid);
HRESULT ( STDMETHODCALLTYPE *EnumReqCategoriesOfClass )(
__RPC__in ICatInformation * This,
/* [in] */ __RPC__in REFCLSID rclsid,
/* [out] */ __RPC__deref_out_opt IEnumGUID **ppenumCatid);
END_INTERFACE
} ICatInformationVtbl;
interface ICatInformation
{
CONST_VTBL struct ICatInformationVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define ICatInformation_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define ICatInformation_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define ICatInformation_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define ICatInformation_EnumCategories(This,lcid,ppenumCategoryInfo) \
( (This)->lpVtbl -> EnumCategories(This,lcid,ppenumCategoryInfo) )
#define ICatInformation_GetCategoryDesc(This,rcatid,lcid,pszDesc) \
( (This)->lpVtbl -> GetCategoryDesc(This,rcatid,lcid,pszDesc) )
#define ICatInformation_EnumClassesOfCategories(This,cImplemented,rgcatidImpl,cRequired,rgcatidReq,ppenumClsid) \
( (This)->lpVtbl -> EnumClassesOfCategories(This,cImplemented,rgcatidImpl,cRequired,rgcatidReq,ppenumClsid) )
#define ICatInformation_IsClassOfCategories(This,rclsid,cImplemented,rgcatidImpl,cRequired,rgcatidReq) \
( (This)->lpVtbl -> IsClassOfCategories(This,rclsid,cImplemented,rgcatidImpl,cRequired,rgcatidReq) )
#define ICatInformation_EnumImplCategoriesOfClass(This,rclsid,ppenumCatid) \
( (This)->lpVtbl -> EnumImplCategoriesOfClass(This,rclsid,ppenumCatid) )
#define ICatInformation_EnumReqCategoriesOfClass(This,rclsid,ppenumCatid) \
( (This)->lpVtbl -> EnumReqCategoriesOfClass(This,rclsid,ppenumCatid) )
#endif /* COBJMACROS */
#endif /* C style interface */
/* [call_as] */ HRESULT STDMETHODCALLTYPE ICatInformation_RemoteEnumClassesOfCategories_Proxy(
__RPC__in ICatInformation * This,
/* [in] */ ULONG cImplemented,
/* [size_is][unique][in] */ __RPC__in_ecount_full_opt(cImplemented) const CATID rgcatidImpl[ ],
/* [in] */ ULONG cRequired,
/* [size_is][unique][in] */ __RPC__in_ecount_full_opt(cRequired) const CATID rgcatidReq[ ],
/* [out] */ __RPC__deref_out_opt IEnumGUID **ppenumClsid);
void __RPC_STUB ICatInformation_RemoteEnumClassesOfCategories_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
/* [call_as] */ HRESULT STDMETHODCALLTYPE ICatInformation_RemoteIsClassOfCategories_Proxy(
__RPC__in ICatInformation * This,
/* [in] */ __RPC__in REFCLSID rclsid,
/* [in] */ ULONG cImplemented,
/* [size_is][unique][in] */ __RPC__in_ecount_full_opt(cImplemented) const CATID rgcatidImpl[ ],
/* [in] */ ULONG cRequired,
/* [size_is][unique][in] */ __RPC__in_ecount_full_opt(cRequired) const CATID rgcatidReq[ ]);
void __RPC_STUB ICatInformation_RemoteIsClassOfCategories_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __ICatInformation_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_comcat_0000_0004 */
/* [local] */
#endif
extern RPC_IF_HANDLE __MIDL_itf_comcat_0000_0004_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_comcat_0000_0004_v0_0_s_ifspec;
/* Additional Prototypes for ALL interfaces */
/* [local] */ HRESULT STDMETHODCALLTYPE IEnumGUID_Next_Proxy(
IEnumGUID * This,
/* [in] */ ULONG celt,
/* [annotation][length_is][size_is][out] */
__out_ecount_part(celt,*pceltFetched) GUID *rgelt,
/* [annotation][out] */
__out_opt ULONG *pceltFetched);
/* [call_as] */ HRESULT STDMETHODCALLTYPE IEnumGUID_Next_Stub(
__RPC__in IEnumGUID * This,
/* [in] */ ULONG celt,
/* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) GUID *rgelt,
/* [out] */ __RPC__out ULONG *pceltFetched);
/* [local] */ HRESULT STDMETHODCALLTYPE ICatInformation_EnumClassesOfCategories_Proxy(
ICatInformation * This,
/* [in] */ ULONG cImplemented,
/* [size_is][in] */ const CATID rgcatidImpl[ ],
/* [in] */ ULONG cRequired,
/* [size_is][in] */ const CATID rgcatidReq[ ],
/* [out] */ IEnumGUID **ppenumClsid);
/* [call_as] */ HRESULT STDMETHODCALLTYPE ICatInformation_EnumClassesOfCategories_Stub(
__RPC__in ICatInformation * This,
/* [in] */ ULONG cImplemented,
/* [size_is][unique][in] */ __RPC__in_ecount_full_opt(cImplemented) const CATID rgcatidImpl[ ],
/* [in] */ ULONG cRequired,
/* [size_is][unique][in] */ __RPC__in_ecount_full_opt(cRequired) const CATID rgcatidReq[ ],
/* [out] */ __RPC__deref_out_opt IEnumGUID **ppenumClsid);
/* [local] */ HRESULT STDMETHODCALLTYPE ICatInformation_IsClassOfCategories_Proxy(
ICatInformation * This,
/* [in] */ REFCLSID rclsid,
/* [in] */ ULONG cImplemented,
/* [size_is][in] */ const CATID rgcatidImpl[ ],
/* [in] */ ULONG cRequired,
/* [size_is][in] */ const CATID rgcatidReq[ ]);
/* [call_as] */ HRESULT STDMETHODCALLTYPE ICatInformation_IsClassOfCategories_Stub(
__RPC__in ICatInformation * This,
/* [in] */ __RPC__in REFCLSID rclsid,
/* [in] */ ULONG cImplemented,
/* [size_is][unique][in] */ __RPC__in_ecount_full_opt(cImplemented) const CATID rgcatidImpl[ ],
/* [in] */ ULONG cRequired,
/* [size_is][unique][in] */ __RPC__in_ecount_full_opt(cRequired) const CATID rgcatidReq[ ]);
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif

16812
BuildTools/Include/ComSvcs.h Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,375 @@
/*++ BUILD Version: 0000 Increment this if a change has global effects
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
commctrl.rh
Abstract:
This module defines the 32-Bit Windows resource codes from commctrl.h.
Revision History:
--*/
#define HDS_HORZ 0x0000
#define HDS_BUTTONS 0x0002
#if (_WIN32_IE >= 0x0300)
#define HDS_HOTTRACK 0x0004
#endif
#define HDS_HIDDEN 0x0008
#if (_WIN32_IE >= 0x0300)
#define HDS_DRAGDROP 0x0040
#define HDS_FULLDRAG 0x0080
#endif
#if (_WIN32_IE >= 0x0500)
#define HDS_FILTERBAR 0x0100
#endif
#if (_WIN32_WINNT >= 0x0501)
#define HDS_FLAT 0x0200
#endif
#if _WIN32_WINNT >= 0x0600
#define HDS_CHECKBOXES 0x0400
#define HDS_NOSIZING 0x0800
#define HDS_OVERFLOW 0x1000
#endif
#define TBSTYLE_BUTTON 0x0000 // obsolete; use BTNS_BUTTON instead
#define TBSTYLE_SEP 0x0001 // obsolete; use BTNS_SEP instead
#define TBSTYLE_CHECK 0x0002 // obsolete; use BTNS_CHECK instead
#define TBSTYLE_GROUP 0x0004 // obsolete; use BTNS_GROUP instead
#define TBSTYLE_CHECKGROUP (TBSTYLE_GROUP | TBSTYLE_CHECK) // obsolete; use BTNS_CHECKGROUP instead
#if (_WIN32_IE >= 0x0300)
#define TBSTYLE_DROPDOWN 0x0008 // obsolete; use BTNS_DROPDOWN instead
#endif
#if (_WIN32_IE >= 0x0400)
#define TBSTYLE_AUTOSIZE 0x0010 // obsolete; use BTNS_AUTOSIZE instead
#define TBSTYLE_NOPREFIX 0x0020 // obsolete; use BTNS_NOPREFIX instead
#endif
#define TBSTYLE_TOOLTIPS 0x0100
#define TBSTYLE_WRAPABLE 0x0200
#define TBSTYLE_ALTDRAG 0x0400
#if (_WIN32_IE >= 0x0300)
#define TBSTYLE_FLAT 0x0800
#define TBSTYLE_LIST 0x1000
#define TBSTYLE_CUSTOMERASE 0x2000
#endif
#if (_WIN32_IE >= 0x0400)
#define TBSTYLE_REGISTERDROP 0x4000
#define TBSTYLE_TRANSPARENT 0x8000
#endif
#if (_WIN32_IE >= 0x0500)
#define BTNS_BUTTON TBSTYLE_BUTTON // 0x0000
#define BTNS_SEP TBSTYLE_SEP // 0x0001
#define BTNS_CHECK TBSTYLE_CHECK // 0x0002
#define BTNS_GROUP TBSTYLE_GROUP // 0x0004
#define BTNS_CHECKGROUP TBSTYLE_CHECKGROUP // (TBSTYLE_GROUP | TBSTYLE_CHECK)
#define BTNS_DROPDOWN TBSTYLE_DROPDOWN // 0x0008
#define BTNS_AUTOSIZE TBSTYLE_AUTOSIZE // 0x0010; automatically calculate the cx of the button
#define BTNS_NOPREFIX TBSTYLE_NOPREFIX // 0x0020; this button should not have accel prefix
#if (_WIN32_IE >= 0x0501)
#define BTNS_SHOWTEXT 0x0040 // ignored unless TBSTYLE_EX_MIXEDBUTTONS is set
#endif // 0x0501
#define BTNS_WHOLEDROPDOWN 0x0080 // draw drop-down arrow, but without split arrow section
#endif
#define RBS_TOOLTIPS 0x00000100
#define RBS_VARHEIGHT 0x00000200
#define RBS_BANDBORDERS 0x00000400
#define RBS_FIXEDORDER 0x00000800
#if (_WIN32_IE >= 0x0400)
#define RBS_REGISTERDROP 0x00001000
#define RBS_AUTOSIZE 0x00002000
#define RBS_VERTICALGRIPPER 0x00004000 // this always has the vertical gripper (default for horizontal mode)
#define RBS_DBLCLKTOGGLE 0x00008000
#endif // _WIN32_IE >= 0x0400
#define TTS_ALWAYSTIP 0x01
#define TTS_NOPREFIX 0x02
#if (_WIN32_IE >= 0x0500)
#define TTS_NOANIMATE 0x10
#define TTS_NOFADE 0x20
#define TTS_BALLOON 0x40
#define TTS_CLOSE 0x80
#endif
#if _WIN32_WINNT >= 0x0600
#define TTS_USEVISUALSTYLE 0x100 // Use themed hyperlinks
#endif
#define SBARS_SIZEGRIP 0x0100
#if (_WIN32_IE >= 0x0500)
#define SBARS_TOOLTIPS 0x0800
#endif
#if (_WIN32_IE >= 0x0400)
// this is a status bar flag, preference to SBARS_TOOLTIPS
#define SBT_TOOLTIPS 0x0800
#endif
#define TBS_AUTOTICKS 0x0001
#define TBS_VERT 0x0002
#define TBS_HORZ 0x0000
#define TBS_TOP 0x0004
#define TBS_BOTTOM 0x0000
#define TBS_LEFT 0x0004
#define TBS_RIGHT 0x0000
#define TBS_BOTH 0x0008
#define TBS_NOTICKS 0x0010
#define TBS_ENABLESELRANGE 0x0020
#define TBS_FIXEDLENGTH 0x0040
#define TBS_NOTHUMB 0x0080
#if (_WIN32_IE >= 0x0300)
#define TBS_TOOLTIPS 0x0100
#endif
#if (_WIN32_IE >= 0x0500)
#define TBS_REVERSED 0x0200 // Accessibility hint: the smaller number (usually the min value) means "high" and the larger number (usually the max value) means "low"
#endif
#if (_WIN32_IE >= 0x0501)
#define TBS_DOWNISLEFT 0x0400 // Down=Left and Up=Right (default is Down=Right and Up=Left)
#endif
#if (_WIN32_IE >= 0x0600)
#define TBS_NOTIFYBEFOREMOVE 0x0800 // Trackbar should notify parent before repositioning the slider due to user action (enables snapping)
#endif
#if (NTDDI_VERSION >= NTDDI_VISTA)
#define TBS_TRANSPARENTBKGND 0x1000 // Background is painted by the parent via WM_PRINTCLIENT
#endif
#define UDS_WRAP 0x0001
#define UDS_SETBUDDYINT 0x0002
#define UDS_ALIGNRIGHT 0x0004
#define UDS_ALIGNLEFT 0x0008
#define UDS_AUTOBUDDY 0x0010
#define UDS_ARROWKEYS 0x0020
#define UDS_HORZ 0x0040
#define UDS_NOTHOUSANDS 0x0080
#if (_WIN32_IE >= 0x0300)
#define UDS_HOTTRACK 0x0100
#endif
#if (_WIN32_IE >= 0x0300)
#define PBS_SMOOTH 0x01
#define PBS_VERTICAL 0x04
#endif
#if (_WIN32_WINNT >= 0x0501)
#define PBS_MARQUEE 0x08
#endif // _WIN32_WINNT >= 0x0501
#if _WIN32_WINNT >= 0x0600
#define PBS_SMOOTHREVERSE 0x10
#endif // _WIN32_WINNT >= 0x0600
//====== COMMON CONTROL STYLES ================================================
#define CCS_TOP 0x00000001L
#define CCS_NOMOVEY 0x00000002L
#define CCS_BOTTOM 0x00000003L
#define CCS_NORESIZE 0x00000004L
#define CCS_NOPARENTALIGN 0x00000008L
#define CCS_ADJUSTABLE 0x00000020L
#define CCS_NODIVIDER 0x00000040L
#if (_WIN32_IE >= 0x0300)
#define CCS_VERT 0x00000080L
#define CCS_LEFT (CCS_VERT | CCS_TOP)
#define CCS_RIGHT (CCS_VERT | CCS_BOTTOM)
#define CCS_NOMOVEX (CCS_VERT | CCS_NOMOVEY)
#endif
#define LWS_TRANSPARENT 0x0001
#define LWS_IGNORERETURN 0x0002
#if _WIN32_WINNT >= 0x0600
#define LWS_NOPREFIX 0x0004
#define LWS_USEVISUALSTYLE 0x0008
#define LWS_USECUSTOMTEXT 0x0010
#define LWS_RIGHT 0x0020
#endif // _WIN32_WINNT >= 0x600
#define LVS_ICON 0x0000
#define LVS_REPORT 0x0001
#define LVS_SMALLICON 0x0002
#define LVS_LIST 0x0003
#define LVS_TYPEMASK 0x0003
#define LVS_SINGLESEL 0x0004
#define LVS_SHOWSELALWAYS 0x0008
#define LVS_SORTASCENDING 0x0010
#define LVS_SORTDESCENDING 0x0020
#define LVS_SHAREIMAGELISTS 0x0040
#define LVS_NOLABELWRAP 0x0080
#define LVS_AUTOARRANGE 0x0100
#define LVS_EDITLABELS 0x0200
#if (_WIN32_IE >= 0x0300)
#define LVS_OWNERDATA 0x1000
#endif
#define LVS_NOSCROLL 0x2000
#define LVS_TYPESTYLEMASK 0xfc00
#define LVS_ALIGNTOP 0x0000
#define LVS_ALIGNLEFT 0x0800
#define LVS_ALIGNMASK 0x0c00
#define LVS_OWNERDRAWFIXED 0x0400
#define LVS_NOCOLUMNHEADER 0x4000
#define LVS_NOSORTHEADER 0x8000
#define TVS_HASBUTTONS 0x0001
#define TVS_HASLINES 0x0002
#define TVS_LINESATROOT 0x0004
#define TVS_EDITLABELS 0x0008
#define TVS_DISABLEDRAGDROP 0x0010
#define TVS_SHOWSELALWAYS 0x0020
#if (_WIN32_IE >= 0x0300)
#define TVS_RTLREADING 0x0040
#define TVS_NOTOOLTIPS 0x0080
#define TVS_CHECKBOXES 0x0100
#define TVS_TRACKSELECT 0x0200
#if (_WIN32_IE >= 0x0400)
#define TVS_SINGLEEXPAND 0x0400
#define TVS_INFOTIP 0x0800
#define TVS_FULLROWSELECT 0x1000
#define TVS_NOSCROLL 0x2000
#define TVS_NONEVENHEIGHT 0x4000
#endif
#if (_WIN32_IE >= 0x500)
#define TVS_NOHSCROLL 0x8000 // TVS_NOSCROLL overrides this
#endif
#endif
#if (_WIN32_WINNT >= 0x0600)
#define TVS_EX_MULTISELECT 0x0002
#define TVS_EX_DOUBLEBUFFER 0x0004
#define TVS_EX_NOINDENTSTATE 0x0008
#define TVS_EX_RICHTOOLTIP 0x0010
#define TVS_EX_AUTOHSCROLL 0x0020
#define TVS_EX_FADEINOUTEXPANDOS 0x0040
#define TVS_EX_PARTIALCHECKBOXES 0x0080
#define TVS_EX_EXCLUSIONCHECKBOXES 0x0100
#define TVS_EX_DIMMEDCHECKBOXES 0x0200
#define TVS_EX_DRAWIMAGEASYNC 0x0400
#endif
#if (_WIN32_IE >= 0x0300)
#define TCS_SCROLLOPPOSITE 0x0001 // assumes multiline tab
#define TCS_BOTTOM 0x0002
#define TCS_RIGHT 0x0002
#define TCS_MULTISELECT 0x0004 // allow multi-select in button mode
#endif
#if (_WIN32_IE >= 0x0400)
#define TCS_FLATBUTTONS 0x0008
#endif
#define TCS_FORCEICONLEFT 0x0010
#define TCS_FORCELABELLEFT 0x0020
#if (_WIN32_IE >= 0x0300)
#define TCS_HOTTRACK 0x0040
#define TCS_VERTICAL 0x0080
#endif
#define TCS_TABS 0x0000
#define TCS_BUTTONS 0x0100
#define TCS_SINGLELINE 0x0000
#define TCS_MULTILINE 0x0200
#define TCS_RIGHTJUSTIFY 0x0000
#define TCS_FIXEDWIDTH 0x0400
#define TCS_RAGGEDRIGHT 0x0800
#define TCS_FOCUSONBUTTONDOWN 0x1000
#define TCS_OWNERDRAWFIXED 0x2000
#define TCS_TOOLTIPS 0x4000
#define TCS_FOCUSNEVER 0x8000
#define ACS_CENTER 0x0001
#define ACS_TRANSPARENT 0x0002
#define ACS_AUTOPLAY 0x0004
#if (_WIN32_IE >= 0x0300)
#define ACS_TIMER 0x0008 // don't use threads... use timers
#endif
#define MCS_DAYSTATE 0x0001
#define MCS_MULTISELECT 0x0002
#define MCS_WEEKNUMBERS 0x0004
#if (_WIN32_IE >= 0x0400)
#define MCS_NOTODAYCIRCLE 0x0008
#define MCS_NOTODAY 0x0010
#else
#define MCS_NOTODAY 0x0008
#endif
#if (NTDDI_VERSION >= NTDDI_VISTA)
#define MCS_NOTRAILINGDATES 0x0040
#define MCS_SHORTDAYSOFWEEK 0x0080
#define MCS_NOSELCHANGEONNAV 0x0100
#endif
#define DTS_UPDOWN 0x0001 // use UPDOWN instead of MONTHCAL
#define DTS_SHOWNONE 0x0002 // allow a NONE selection
#define DTS_SHORTDATEFORMAT 0x0000 // use the short date format (app must forward WM_WININICHANGE messages)
#define DTS_LONGDATEFORMAT 0x0004 // use the long date format (app must forward WM_WININICHANGE messages)
#if (_WIN32_IE >= 0x500)
#define DTS_SHORTDATECENTURYFORMAT 0x000C// short date format with century (app must forward WM_WININICHANGE messages)
#endif // (_WIN32_IE >= 0x500)
#define DTS_TIMEFORMAT 0x0009 // use the time format (app must forward WM_WININICHANGE messages)
#define DTS_APPCANPARSE 0x0010 // allow user entered strings (app MUST respond to DTN_USERSTRING)
#define DTS_RIGHTALIGN 0x0020 // right-align popup instead of left-align it
#define PGS_VERT 0x00000000
#define PGS_HORZ 0x00000001
#define PGS_AUTOSCROLL 0x00000002
#define PGS_DRAGNDROP 0x00000004
// style definition
#define NFS_EDIT 0x0001
#define NFS_STATIC 0x0002
#define NFS_LISTCOMBO 0x0004
#define NFS_BUTTON 0x0008
#define NFS_ALL 0x0010
#define NFS_USEFONTASSOC 0x0020
// BUTTON STYLES
#define BS_SPLITBUTTON 0x0000000CL
#define BS_DEFSPLITBUTTON 0x0000000DL
#define BS_COMMANDLINK 0x0000000EL
#define BS_DEFCOMMANDLINK 0x0000000FL
// SPLIT BUTTON INFO mask flags
#define BCSIF_GLYPH 0x0001
#define BCSIF_IMAGE 0x0002
#define BCSIF_STYLE 0x0004
#define BCSIF_SIZE 0x0008
// SPLIT BUTTON STYLE flags
#define BCSS_NOSPLIT 0x0001
#define BCSS_STRETCH 0x0002
#define BCSS_ALIGNLEFT 0x0004
#define BCSS_IMAGE 0x0008

1226
BuildTools/Include/CommDlg.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,19 @@
//+---------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1992-1999.
//
// File: compobj.h
//
//----------------------------------------------------------------------------
#if _MSC_VER > 1000
#pragma once
#endif
#ifndef RC_INVOKED
#pragma message("WARNING: your code should #include objbase.h instead of compobj.h")
#endif /* !RC_INVOKED */
#include <objbase.h>

File diff suppressed because it is too large Load Diff

1846
BuildTools/Include/CorHdr.h Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

209
BuildTools/Include/Cpl.h Normal file
View File

@ -0,0 +1,209 @@
/*****************************************************************************\
* *
* cpl.h - Control panel extension DLL definitions *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
******************************************************************************/
/*
* General rules for being installed in the Control Panel:
*
* 1) The CPL/DLL must export a function named CPlApplet which will handle
* the messages discussed below.
* 2) If the applet needs to save information in CONTROL.INI minimize
* clutter by using the application name [MMCPL.appletname].
* 3) If the applet is refrenced in CONTROL.INI under [MMCPL] use
* the following form:
* ...
* [MMCPL]
* uniqueName=c:\mydir\myapplet.dll
* ...
*
* The order applet CPLs/DLLs are loaded by Control Panel is not guaranteed.
* They may be sorted for display, categorization, etc.
*
*/
#ifndef _INC_CPL
#define _INC_CPL
#if (_MSC_VER >= 800)
#if (_MSC_VER >= 1200)
#pragma warning(push)
#endif
#pragma warning(disable:4001) /* nonstandard extension : single line comment */
#endif
#include <pshpack1.h> /* Assume byte packing throughout */
#ifdef __cplusplus
extern "C" { /* Assume C declarations for C++ */
#endif /* __cplusplus */
/* Deprecated; control.exe no longer uses these messages */
#define WM_CPL_LAUNCH (WM_USER+1000)
#define WM_CPL_LAUNCHED (WM_USER+1001)
/* A function prototype for CPlApplet() */
typedef LONG (APIENTRY *APPLET_PROC)(HWND hwndCpl, UINT msg, LPARAM lParam1, LPARAM lParam2);
/* The data structure CPlApplet() must fill in. */
typedef struct tagCPLINFO
{
int idIcon; /* icon resource id, provided by CPlApplet() */
int idName; /* display name string resource id, provided by CPlApplet() */
int idInfo; /* description/tooltip/status bar string resource id, provided by CPlApplet() */
LONG_PTR lData; /* user defined data */
} CPLINFO, *LPCPLINFO;
typedef struct tagNEWCPLINFOA
{
DWORD dwSize; /* size, in bytes, of the structure */
DWORD dwFlags;
DWORD dwHelpContext; /* help context to use */
LONG_PTR lData; /* user defined data */
HICON hIcon; /* icon to use, this is owned by the Control Panel window (may be deleted) */
CHAR szName[32]; /* display name */
CHAR szInfo[64]; /* description/tooltip/status bar string */
CHAR szHelpFile[128];/* path to help file to use */
} NEWCPLINFOA, *LPNEWCPLINFOA;
typedef struct tagNEWCPLINFOW
{
DWORD dwSize; /* size, in bytes, of the structure */
DWORD dwFlags;
DWORD dwHelpContext; /* help context to use */
LONG_PTR lData; /* user defined data */
HICON hIcon; /* icon to use, this is owned by the Control Panel window (may be deleted) */
WCHAR szName[32]; /* display name */
WCHAR szInfo[64]; /* description/tooltip/status bar string */
WCHAR szHelpFile[128];/* path to help file to use */
} NEWCPLINFOW, *LPNEWCPLINFOW;
#ifdef UNICODE
typedef NEWCPLINFOW NEWCPLINFO;
typedef LPNEWCPLINFOW LPNEWCPLINFO;
#else
typedef NEWCPLINFOA NEWCPLINFO;
typedef LPNEWCPLINFOA LPNEWCPLINFO;
#endif // UNICODE
#if(WINVER >= 0x0400)
#define CPL_DYNAMIC_RES 0
/* This constant may be used in place of real resource IDs for the idIcon,
* idName or idInfo members of the CPLINFO structure. Normally, the system
* uses these values to extract copies of the resources and store them in a
* cache. Once the resource information is in the cache, the system does not
* need to load a CPL unless the user actually tries to use it.
* CPL_DYNAMIC_RES tells the system not to cache the resource, but instead to
* load the CPL every time it needs to display information about an item. This
* allows a CPL to dynamically decide what information will be displayed, but
* is SIGNIFICANTLY SLOWER than displaying information from a cache.
* Typically, CPL_DYNAMIC_RES is used when a control panel must inspect the
* runtime status of some device in order to provide text or icons to display.
* It should be avoided if possible because of the performance hit to Control Panel.
*/
#endif /* WINVER >= 0x0400 */
/* The messages CPlApplet() must handle: */
#define CPL_INIT 1
/* This message is sent to indicate CPlApplet() was found. */
/* lParam1 and lParam2 are not defined. */
/* Return TRUE or FALSE indicating whether the control panel should proceed. */
#define CPL_GETCOUNT 2
/* This message is sent to determine the number of applets to be displayed. */
/* lParam1 and lParam2 are not defined. */
/* Return the number of applets you wish to display in the control */
/* panel window. */
#define CPL_INQUIRE 3
/* This message is sent for information about each applet. */
/* The return value is ignored. */
/* lParam1 is the applet number to register, a value from 0 to */
/* (CPL_GETCOUNT - 1). lParam2 is a pointer to a CPLINFO structure. */
/* Fill in CPLINFO's idIcon, idName, idInfo and lData fields with */
/* the resource id for an icon to display, name and description string ids, */
/* and a long data item associated with applet #lParam1. This information */
/* may be cached by the caller at runtime and/or across sessions. */
/* To prevent caching, see CPL_DYNAMIC_RES, above. If the icon, name, and description */
/* are not dynamic then CPL_DYNAMIC_RES should not be used and the CPL_NEWINQURE message */
/* should be ignored */
#define CPL_SELECT 4
/* The CPL_SELECT message is not used. */
#define CPL_DBLCLK 5
/* This message is sent when the applet's icon has been double-clicked. */
/* lParam1 is the applet number which was selected. */
/* lParam2 is the applet's lData value. */
/* This message should initiate the applet's dialog box. */
#define CPL_STOP 6
/* This message is sent for each applet when the control panel is exiting. */
/* lParam1 is the applet number. lParam2 is the applet's lData value. */
/* Do applet specific cleaning up here. */
#define CPL_EXIT 7
/* This message is sent just before the control panel calls FreeLibrary. */
/* lParam1 and lParam2 are not defined. */
/* Do non-applet specific cleaning up here. */
#define CPL_NEWINQUIRE 8
/* Same as CPL_INQUIRE execpt lParam2 is a pointer to a NEWCPLINFO struct. */
/* The return value is ignored. */
/* A CPL should NOT respond to the CPL_NEWINQURE message unless CPL_DYNAMIC_RES */
/* is used in CPL_INQUIRE. CPLs which respond to CPL_NEWINQUIRE cannot be cached */
/* and slow the loading of the Control Panel window. */
#if(WINVER >= 0x0400)
#define CPL_STARTWPARMSA 9
#define CPL_STARTWPARMSW 10
#ifdef UNICODE
#define CPL_STARTWPARMS CPL_STARTWPARMSW
#else
#define CPL_STARTWPARMS CPL_STARTWPARMSA
#endif
/* This message parallels CPL_DBLCLK in that the applet should initiate
* its dialog box. Where it differs is that this invocation is coming
* out of RUNDLL, and there may be some extra directions for execution.
* lParam1: the applet number.
* lParam2: an LPSTR to any extra directions that might exist.
* returns: TRUE if the message was handled; FALSE if not.
*/
#endif /* WINVER >= 0x0400 */
/* This message is internal to the Control Panel and MAIN applets. */
/* It is only sent when an applet is invoked from the command line */
/* during system installation. */
#define CPL_SETUP 200
#ifdef __cplusplus
}
#endif /* __cplusplus */
#include <poppack.h>
#if (_MSC_VER >= 800)
#if (_MSC_VER >= 1200)
#pragma warning(pop)
#else
#pragma warning(default:4001)
#endif
#endif
#endif /* _INC_CPL */

View File

@ -0,0 +1,63 @@
///////////////////////////////////////////////////////////////////////////////
//
// CPLEXT.H -- defines for property sheet extensions to system control panels
//
// Version 4.00
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
///////////////////////////////////////////////////////////////////////////////
#pragma once
#ifndef _INC_CPLEXT
#define _INC_CPLEXT
///////////////////////////////////////////////////////////////////////////////
// Below are constants for pages which can be replaced in the standard control
// panel applets. To extend an applet, you must define an object which
// supports the IShellPropSheetExt interface and register it's in-process
// server in a subkey under the applet's registry key. Registry paths for the
// applets are defined in the header file REGSTR.H
// Generally, when an IShellPropSheetExt is loaded, it's AddPages method
// will be called once, while it's ReplacePage method may be called zero or
// more times. ReplacePage is only called in context.
///////////////////////////////////////////////////////////////////////////////
//-----------------------------------------------------------------------------
// Mouse Control Panel Extensions
// The following constants MAY be passed in IShellPropSheetExt::ReplacePage's
// uPageID parameter for servers registered under
// ( REGSTR_PATH_CONTROLSFOLDER "\\Mouse" )
//-----------------------------------------------------------------------------
#define CPLPAGE_MOUSE_BUTTONS 1
#define CPLPAGE_MOUSE_PTRMOTION 2
#define CPLPAGE_MOUSE_WHEEL 3
//-----------------------------------------------------------------------------
// Keyboard Control Panel Extensions
// The following constants MAY be passed in IShellPropSheetExt::ReplacePage's
// uPageID parameter for servers registered under
// ( REGSTR_PATH_CONTROLSFOLDER "\\Keyboard" )
//-----------------------------------------------------------------------------
#define CPLPAGE_KEYBOARD_SPEED 1
//-----------------------------------------------------------------------------
// Display Control Panel Extensions
// The following constants MAY be passed in IShellPropSheetExt::ReplacePage's
// uPageID parameter for servers registered under
// ( REGSTR_PATH_CONTROLSFOLDER "\\Display" )
//-----------------------------------------------------------------------------
#define CPLPAGE_DISPLAY_BACKGROUND 1
///////////////////////////////////////////////////////////////////////////////
#endif

View File

@ -0,0 +1,213 @@
/*****************************************************************************\
* *
* custcntl.h - Custom Control Library header file *
* *
* Copyright (c) 1992-1999, Microsoft Corp. All rights reserved *
* *
\*****************************************************************************/
#ifndef _INC_CUSTCNTL
#define _INC_CUSTCNTL
#if _MSC_VER > 1000
#pragma once
#endif
#ifdef __cplusplus
extern "C" { /* Assume C declarations for C++ */
#endif /* __cplusplus */
/*
* General size defines.
*/
#define CCHCCCLASS 32 // Max chars in a class name.
#define CCHCCDESC 32 // Max chars in a control description.
#define CCHCCTEXT 256 // Max chars in a text field.
/*
* CCSTYLE - Custom Control Style structure. This structure is passed
* tp the Custom Control Style function when the user wants to edit the
* styles of the custom control.
*/
typedef struct tagCCSTYLEA {
DWORD flStyle; // Style of the control.
DWORD flExtStyle; // Extended style of the control.
CHAR szText[CCHCCTEXT]; // Text of the control.
LANGID lgid; // Language Id of the control's dialog.
WORD wReserved1; // Reserved value. Do not change.
} CCSTYLEA, *LPCCSTYLEA;
typedef struct tagCCSTYLEW {
DWORD flStyle; // Style of the control.
DWORD flExtStyle; // Extended style of the control.
WCHAR szText[CCHCCTEXT]; // Text of the control.
LANGID lgid; // Language Id of the control's dialog.
WORD wReserved1; // Reserved value. Do not change.
} CCSTYLEW, *LPCCSTYLEW;
#ifdef UNICODE
#define CCSTYLE CCSTYLEW
#define LPCCSTYLE LPCCSTYLEW
#else
#define CCSTYLE CCSTYLEA
#define LPCCSTYLE LPCCSTYLEA
#endif // UNICODE
/*
* The Style function prototype. This will be called when the user
* wants to edit the styles of a custom control. It should display a
* dialog to edit the styles, update the styles in the pccs structure,
* then return TRUE for success. If an error occurs or the user
* cancels the dialog, FALSE should be returned.
*/
typedef BOOL (CALLBACK* LPFNCCSTYLEA)(HWND hwndParent, LPCCSTYLEA pccs);
typedef BOOL (CALLBACK* LPFNCCSTYLEW)(HWND hwndParent, LPCCSTYLEW pccs);
#ifdef UNICODE
#define LPFNCCSTYLE LPFNCCSTYLEW
#else
#define LPFNCCSTYLE LPFNCCSTYLEA
#endif // UNICODE
/*
* The SizeToText function prototype. This will be called if the user
* requests that the custom control be sized to fit it's text. It
* should use the specified styles, text and font to determine how
* large the control must be to accommodate the text, then return this
* value in pixels. The value of -1 should be returned if an error
* occurs.
*/
typedef INT (CALLBACK* LPFNCCSIZETOTEXTA)(DWORD flStyle, DWORD flExtStyle,
HFONT hfont, LPSTR pszText);
typedef INT (CALLBACK* LPFNCCSIZETOTEXTW)(DWORD flStyle, DWORD flExtStyle,
HFONT hfont, LPWSTR pszText);
#ifdef UNICODE
#define LPFNCCSIZETOTEXT LPFNCCSIZETOTEXTW
#else
#define LPFNCCSIZETOTEXT LPFNCCSIZETOTEXTA
#endif // UNICODE
/*
* CCSTYLEFLAG - Custom Control Style Flag structure. A table of these
* structures is used to specify the define strings that match the
* different styles for a custom control.
*/
typedef struct tagCCSTYLEFLAGA {
DWORD flStyle; // Style bits for this style.
DWORD flStyleMask; // Mask for the style. Can be zero.
LPSTR pszStyle; // Points to the style define string.
} CCSTYLEFLAGA, *LPCCSTYLEFLAGA;
typedef struct tagCCSTYLEFLAGW {
DWORD flStyle; // Style bits for this style.
DWORD flStyleMask; // Mask for the style. Can be zero.
LPWSTR pszStyle; // Points to the style define string.
} CCSTYLEFLAGW, *LPCCSTYLEFLAGW;
#ifdef UNICODE
#define CCSTYLEFLAG CCSTYLEFLAGW
#define LPCCSTYLEFLAG LPCCSTYLEFLAGW
#else
#define CCSTYLEFLAG CCSTYLEFLAGA
#define LPCCSTYLEFLAG LPCCSTYLEFLAGA
#endif // UNICODE
/*
* CCF_* defines. These flags are used for the flOptions field of the
* CCINFO structure, and describe some basic characteristics of the
* custom control.
*/
#define CCF_NOTEXT 0x00000001 // Control cannot have text.
/*
* CCINFO - Custom Control Info structure. This structure provides
* the dialog editor with information about the control types that the
* DLL supports.
*/
typedef struct tagCCINFOA {
CHAR szClass[CCHCCCLASS]; // Class name for the control.
DWORD flOptions; // Option flags (CCF_* defines).
CHAR szDesc[CCHCCDESC]; // Short, descriptive text for the ctrl.
UINT cxDefault; // Default width (in dialog units).
UINT cyDefault; // Default height (in dialog units).
DWORD flStyleDefault; // Default style (WS_CHILD | WS_VISIBLE).
DWORD flExtStyleDefault; // Default extended style.
DWORD flCtrlTypeMask; // Mask for control type styles.
CHAR szTextDefault[CCHCCTEXT]; // Default text.
INT cStyleFlags; // Entries in the following style table.
LPCCSTYLEFLAGA aStyleFlags; // Points to style flag table.
LPFNCCSTYLEA lpfnStyle; // Pointer to the Styles function.
LPFNCCSIZETOTEXTA lpfnSizeToText; // Pointer to the SizeToText function.
DWORD dwReserved1; // Reserved. Must be zero.
DWORD dwReserved2; // Reserved. Must be zero.
} CCINFOA, *LPCCINFOA;
typedef struct tagCCINFOW {
WCHAR szClass[CCHCCCLASS]; // Class name for the control.
DWORD flOptions; // Option flags (CCF_* defines).
WCHAR szDesc[CCHCCDESC]; // Short, descriptive text for the ctrl.
UINT cxDefault; // Default width (in dialog units).
UINT cyDefault; // Default height (in dialog units).
DWORD flStyleDefault; // Default style (WS_CHILD | WS_VISIBLE).
DWORD flExtStyleDefault; // Default extended style.
DWORD flCtrlTypeMask; // Mask for control type styles.
INT cStyleFlags; // Entries in the following style table.
LPCCSTYLEFLAGW aStyleFlags; // Points to style flag table.
WCHAR szTextDefault[CCHCCTEXT]; // Default text.
LPFNCCSTYLEW lpfnStyle; // Pointer to the Styles function.
LPFNCCSIZETOTEXTW lpfnSizeToText; // Pointer to the SizeToText function.
DWORD dwReserved1; // Reserved. Must be zero.
DWORD dwReserved2; // Reserved. Must be zero.
} CCINFOW, *LPCCINFOW;
#ifdef UNICODE
#define CCINFO CCINFOW
#define LPCCINFO LPCCINFOW
#else
#define CCINFO CCINFOA
#define LPCCINFO LPCCINFOA
#endif // UNICODE
/*
* The Info function prototype. This function is the first one
* called by the dialog editor. Custom control DLL's must export
* one or both of the following functions by name (the ordinal
* used for the export does not matter):
*
* UINT CALLBACK CustomControlInfoA(LPCCINFOA acci)
* UINT CALLBACK CustomControlInfoW(LPCCINFOW acci)
*
* This function must return the number of controls that the DLL
* supports, or NULL if an error occurs. If the acci parameter is
* not NULL, it will be pointing to an array of CCINFOA or CCINFOW
* structures that should be filled in with the information about
* the different control types supported by the DLL.
*
* If both functions are present, the CustomControlInfoW function
* will be used by the dialog editor.
*/
typedef UINT (CALLBACK* LPFNCCINFOA)(LPCCINFOA acci);
typedef UINT (CALLBACK* LPFNCCINFOW)(LPCCINFOW acci);
#ifdef UNICODE
#define LPFNCCINFO LPFNCCINFOW
#else
#define LPFNCCINFO LPFNCCINFOA
#endif // UNICODE
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* _INC_CUSTCNTL */

View File

@ -0,0 +1,104 @@
#ifndef __CUSTOMAW_H__
#define __CUSTOMAW_H__
#if _MSC_VER > 1000
#pragma once
#endif
/////////////////////////////////////////////////////////////////////////////
// customaw.h -- Header file to be included by all custom AppWizards.
// Link to the AppWizard import library
#pragma comment(lib, "mfcapwz.lib")
/////////////////////////////////////////////////////////////////////////////
// Class CAppWizStepDlg-- all custom AppWizard steps must derive from
// this class
class CAppWizStepDlg : public CDialog
{
public:
CAppWizStepDlg(UINT nIDTemplate);
~CAppWizStepDlg();
virtual BOOL OnDismiss();
// You will probably not want to override or call this function. It is
// overriden (for CAppWizStepDlg) in MFCAPWZ.DLL to handle tabbing from
// the dialog controls in CAppWizStepDlg to the outer AppWizard dialog's
// controls.
virtual BOOL PreTranslateMessage(MSG* pMsg);
// You will probably not want to override or call this function. It is
// overriden (for CAppWizStepDlg) in MFCAPWZ.DLL to dynamically change
// the dialog template's font to match the rest of the IDE.
virtual BOOL Create(UINT nIDTemplate, CWnd* pParentWnd = NULL);
UINT m_nIDTemplate;
};
/////////////////////////////////////////////////////////////////////////////
// class OutputStream-- this abstract class is used to funnel output while
// parsing templates.
class OutputStream
{
public:
virtual void WriteLine(LPCTSTR lpsz) = 0;
virtual void WriteBlock(LPCTSTR pBlock, DWORD dwSize) = 0;
};
/////////////////////////////////////////////////////////////////////////////
// Class CCustomAppWiz-- all custom AppWizards must have a class derived from
// this. MFCAPWZ.DLL talks to the custom AppWizard by calling these virtual
// functions.
class CCustomAppWiz : public CObject
{
public:
CMapStringToString m_Dictionary;
virtual void GetPlatforms(CStringList& rPlatforms) {}
virtual CAppWizStepDlg* Next(CAppWizStepDlg* pDlg) { return NULL; }
virtual CAppWizStepDlg* Back(CAppWizStepDlg* pDlg) { return NULL; }
virtual void InitCustomAppWiz() { m_Dictionary.RemoveAll(); }
virtual void ExitCustomAppWiz() {}
virtual LPCTSTR LoadTemplate(LPCTSTR lpszTemplateName,
DWORD& rdwSize, HINSTANCE hInstance = NULL);
virtual void CopyTemplate(LPCTSTR lpszInput, DWORD dwSize, OutputStream* pOutput);
virtual void ProcessTemplate(LPCTSTR lpszInput, DWORD dwSize, OutputStream* pOutput);
virtual void PostProcessTemplate(LPCTSTR szTemplate) {}
};
/////////////////////////////////////////////////////////////////////////////
// C API's exported by AppWizard. The custom AppWizard talks to MFCAPWZ.DLL
// by calling these functions.
// Values to be passed to GetDialog()
enum AppWizDlgID
{
APWZDLG_APPTYPE = 1,
APWZDLG_DATABASE,
APWZDLG_OLE,
APWZDLG_DOCAPPOPTIONS,
APWZDLG_PROJOPTIONS,
APWZDLG_CLASSES,
APWZDLG_DLGAPPOPTIONS,
APWZDLG_DLLPROJOPTIONS,
};
void SetCustomAppWizClass(CCustomAppWiz* pAW);
CAppWizStepDlg* GetDialog(AppWizDlgID nID);
void SetNumberOfSteps(int nSteps);
BOOL ScanForAvailableLanguages(CStringList& rLanguages);
void SetSupportedLanguages(LPCTSTR szSupportedLangs);
#endif //__CUSTOMAW_H__

View File

@ -0,0 +1,301 @@
//////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// File: D3D10_1Shader.h
// Content: D3D10.1 Shader Types and APIs
//
//////////////////////////////////////////////////////////////////////////////
#ifndef __D3D10_1SHADER_H__
#define __D3D10_1SHADER_H__
#include "d3d10shader.h"
//----------------------------------------------------------------------------
// Shader debugging structures
//----------------------------------------------------------------------------
typedef enum _D3D10_SHADER_DEBUG_REGTYPE
{
D3D10_SHADER_DEBUG_REG_INPUT,
D3D10_SHADER_DEBUG_REG_OUTPUT,
D3D10_SHADER_DEBUG_REG_CBUFFER,
D3D10_SHADER_DEBUG_REG_TBUFFER,
D3D10_SHADER_DEBUG_REG_TEMP,
D3D10_SHADER_DEBUG_REG_TEMPARRAY,
D3D10_SHADER_DEBUG_REG_TEXTURE,
D3D10_SHADER_DEBUG_REG_SAMPLER,
D3D10_SHADER_DEBUG_REG_IMMEDIATECBUFFER,
D3D10_SHADER_DEBUG_REG_LITERAL,
D3D10_SHADER_DEBUG_REG_UNUSED,
D3D11_SHADER_DEBUG_REG_INTERFACE_POINTERS,
D3D10_SHADER_DEBUG_REG_FORCE_DWORD = 0x7fffffff,
} D3D10_SHADER_DEBUG_REGTYPE;
typedef enum _D3D10_SHADER_DEBUG_SCOPETYPE
{
D3D10_SHADER_DEBUG_SCOPE_GLOBAL,
D3D10_SHADER_DEBUG_SCOPE_BLOCK,
D3D10_SHADER_DEBUG_SCOPE_FORLOOP,
D3D10_SHADER_DEBUG_SCOPE_STRUCT,
D3D10_SHADER_DEBUG_SCOPE_FUNC_PARAMS,
D3D10_SHADER_DEBUG_SCOPE_STATEBLOCK,
D3D10_SHADER_DEBUG_SCOPE_NAMESPACE,
D3D10_SHADER_DEBUG_SCOPE_ANNOTATION,
D3D10_SHADER_DEBUG_SCOPE_FORCE_DWORD = 0x7fffffff,
} D3D10_SHADER_DEBUG_SCOPETYPE;
typedef enum _D3D10_SHADER_DEBUG_VARTYPE
{
D3D10_SHADER_DEBUG_VAR_VARIABLE,
D3D10_SHADER_DEBUG_VAR_FUNCTION,
D3D10_SHADER_DEBUG_VAR_FORCE_DWORD = 0x7fffffff,
} D3D10_SHADER_DEBUG_VARTYPE;
/////////////////////////////////////////////////////////////////////
// These are the serialized structures that get written to the file
/////////////////////////////////////////////////////////////////////
typedef struct _D3D10_SHADER_DEBUG_TOKEN_INFO
{
UINT File; // offset into file list
UINT Line; // line #
UINT Column; // column #
UINT TokenLength;
UINT TokenId; // offset to LPCSTR of length TokenLength in string datastore
} D3D10_SHADER_DEBUG_TOKEN_INFO;
// Variable list
typedef struct _D3D10_SHADER_DEBUG_VAR_INFO
{
// Index into token list for declaring identifier
UINT TokenId;
D3D10_SHADER_VARIABLE_TYPE Type;
// register and component for this variable, only valid/necessary for arrays
UINT Register;
UINT Component;
// gives the original variable that declared this variable
UINT ScopeVar;
// this variable's offset in its ScopeVar
UINT ScopeVarOffset;
} D3D10_SHADER_DEBUG_VAR_INFO;
typedef struct _D3D10_SHADER_DEBUG_INPUT_INFO
{
// index into array of variables of variable to initialize
UINT Var;
// input, cbuffer, tbuffer
D3D10_SHADER_DEBUG_REGTYPE InitialRegisterSet;
// set to cbuffer or tbuffer slot, geometry shader input primitive #,
// identifying register for indexable temp, or -1
UINT InitialBank;
// -1 if temp, otherwise gives register in register set
UINT InitialRegister;
// -1 if temp, otherwise gives component
UINT InitialComponent;
// initial value if literal
UINT InitialValue;
} D3D10_SHADER_DEBUG_INPUT_INFO;
typedef struct _D3D10_SHADER_DEBUG_SCOPEVAR_INFO
{
// Index into variable token
UINT TokenId;
D3D10_SHADER_DEBUG_VARTYPE VarType; // variable or function (different namespaces)
D3D10_SHADER_VARIABLE_CLASS Class;
UINT Rows; // number of rows (matrices)
UINT Columns; // number of columns (vectors and matrices)
// In an array of structures, one struct member scope is provided, and
// you'll have to add the array stride times the index to the variable
// index you find, then find that variable in this structure's list of
// variables.
// gives a scope to look up struct members. -1 if not a struct
UINT StructMemberScope;
// number of array indices
UINT uArrayIndices; // a[3][2][1] has 3 indices
// maximum array index for each index
// offset to UINT[uArrayIndices] in UINT datastore
UINT ArrayElements; // a[3][2][1] has {3, 2, 1}
// how many variables each array index moves
// offset to UINT[uArrayIndices] in UINT datastore
UINT ArrayStrides; // a[3][2][1] has {2, 1, 1}
UINT uVariables;
// index of the first variable, later variables are offsets from this one
UINT uFirstVariable;
} D3D10_SHADER_DEBUG_SCOPEVAR_INFO;
// scope data, this maps variable names to debug variables (useful for the watch window)
typedef struct _D3D10_SHADER_DEBUG_SCOPE_INFO
{
D3D10_SHADER_DEBUG_SCOPETYPE ScopeType;
UINT Name; // offset to name of scope in strings list
UINT uNameLen; // length of name string
UINT uVariables;
UINT VariableData; // Offset to UINT[uVariables] indexing the Scope Variable list
} D3D10_SHADER_DEBUG_SCOPE_INFO;
// instruction outputs
typedef struct _D3D10_SHADER_DEBUG_OUTPUTVAR
{
// index variable being written to, if -1 it's not going to a variable
UINT Var;
// range data that the compiler expects to be true
UINT uValueMin, uValueMax;
INT iValueMin, iValueMax;
FLOAT fValueMin, fValueMax;
BOOL bNaNPossible, bInfPossible;
} D3D10_SHADER_DEBUG_OUTPUTVAR;
typedef struct _D3D10_SHADER_DEBUG_OUTPUTREG_INFO
{
// Only temp, indexable temp, and output are valid here
D3D10_SHADER_DEBUG_REGTYPE OutputRegisterSet;
// -1 means no output
UINT OutputReg;
// if a temp array, identifier for which one
UINT TempArrayReg;
// -1 means masked out
UINT OutputComponents[4];
D3D10_SHADER_DEBUG_OUTPUTVAR OutputVars[4];
// when indexing the output, get the value of this register, then add
// that to uOutputReg. If uIndexReg is -1, then there is no index.
// find the variable whose register is the sum (by looking in the ScopeVar)
// and component matches, then set it. This should only happen for indexable
// temps and outputs.
UINT IndexReg;
UINT IndexComp;
} D3D10_SHADER_DEBUG_OUTPUTREG_INFO;
// per instruction data
typedef struct _D3D10_SHADER_DEBUG_INST_INFO
{
UINT Id; // Which instruction this is in the bytecode
UINT Opcode; // instruction type
// 0, 1, or 2
UINT uOutputs;
// up to two outputs per instruction
D3D10_SHADER_DEBUG_OUTPUTREG_INFO pOutputs[2];
// index into the list of tokens for this instruction's token
UINT TokenId;
// how many function calls deep this instruction is
UINT NestingLevel;
// list of scopes from outer-most to inner-most
// Number of scopes
UINT Scopes;
UINT ScopeInfo; // Offset to UINT[uScopes] specifying indices of the ScopeInfo Array
// list of variables accessed by this instruction
// Number of variables
UINT AccessedVars;
UINT AccessedVarsInfo; // Offset to UINT[AccessedVars] specifying indices of the ScopeVariableInfo Array
} D3D10_SHADER_DEBUG_INST_INFO;
typedef struct _D3D10_SHADER_DEBUG_FILE_INFO
{
UINT FileName; // Offset to LPCSTR for file name
UINT FileNameLen; // Length of file name
UINT FileData; // Offset to LPCSTR of length FileLen
UINT FileLen; // Length of file
} D3D10_SHADER_DEBUG_FILE_INFO;
typedef struct _D3D10_SHADER_DEBUG_INFO
{
UINT Size; // sizeof(D3D10_SHADER_DEBUG_INFO)
UINT Creator; // Offset to LPCSTR for compiler version
UINT EntrypointName; // Offset to LPCSTR for Entry point name
UINT ShaderTarget; // Offset to LPCSTR for shader target
UINT CompileFlags; // flags used to compile
UINT Files; // number of included files
UINT FileInfo; // Offset to D3D10_SHADER_DEBUG_FILE_INFO[Files]
UINT Instructions; // number of instructions
UINT InstructionInfo; // Offset to D3D10_SHADER_DEBUG_INST_INFO[Instructions]
UINT Variables; // number of variables
UINT VariableInfo; // Offset to D3D10_SHADER_DEBUG_VAR_INFO[Variables]
UINT InputVariables; // number of variables to initialize before running
UINT InputVariableInfo; // Offset to D3D10_SHADER_DEBUG_INPUT_INFO[InputVariables]
UINT Tokens; // number of tokens to initialize
UINT TokenInfo; // Offset to D3D10_SHADER_DEBUG_TOKEN_INFO[Tokens]
UINT Scopes; // number of scopes
UINT ScopeInfo; // Offset to D3D10_SHADER_DEBUG_SCOPE_INFO[Scopes]
UINT ScopeVariables; // number of variables declared
UINT ScopeVariableInfo; // Offset to D3D10_SHADER_DEBUG_SCOPEVAR_INFO[Scopes]
UINT UintOffset; // Offset to the UINT datastore, all UINT offsets are from this offset
UINT StringOffset; // Offset to the string datastore, all string offsets are from this offset
} D3D10_SHADER_DEBUG_INFO;
//----------------------------------------------------------------------------
// ID3D10ShaderReflection1:
//----------------------------------------------------------------------------
//
// Interface definitions
//
typedef interface ID3D10ShaderReflection1 ID3D10ShaderReflection1;
typedef interface ID3D10ShaderReflection1 *LPD3D10SHADERREFLECTION1;
// {C3457783-A846-47CE-9520-CEA6F66E7447}
DEFINE_GUID(IID_ID3D10ShaderReflection1,
0xc3457783, 0xa846, 0x47ce, 0x95, 0x20, 0xce, 0xa6, 0xf6, 0x6e, 0x74, 0x47);
#undef INTERFACE
#define INTERFACE ID3D10ShaderReflection1
DECLARE_INTERFACE_(ID3D10ShaderReflection1, IUnknown)
{
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
STDMETHOD(GetDesc)(THIS_ D3D10_SHADER_DESC *pDesc) PURE;
STDMETHOD_(ID3D10ShaderReflectionConstantBuffer*, GetConstantBufferByIndex)(THIS_ UINT Index) PURE;
STDMETHOD_(ID3D10ShaderReflectionConstantBuffer*, GetConstantBufferByName)(THIS_ LPCSTR Name) PURE;
STDMETHOD(GetResourceBindingDesc)(THIS_ UINT ResourceIndex, D3D10_SHADER_INPUT_BIND_DESC *pDesc) PURE;
STDMETHOD(GetInputParameterDesc)(THIS_ UINT ParameterIndex, D3D10_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
STDMETHOD(GetOutputParameterDesc)(THIS_ UINT ParameterIndex, D3D10_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
STDMETHOD_(ID3D10ShaderReflectionVariable*, GetVariableByName)(THIS_ LPCSTR Name) PURE;
STDMETHOD(GetResourceBindingDescByName)(THIS_ LPCSTR Name, D3D10_SHADER_INPUT_BIND_DESC *pDesc) PURE;
STDMETHOD(GetMovInstructionCount)(THIS_ UINT* pCount) PURE;
STDMETHOD(GetMovcInstructionCount)(THIS_ UINT* pCount) PURE;
STDMETHOD(GetConversionInstructionCount)(THIS_ UINT* pCount) PURE;
STDMETHOD(GetBitwiseInstructionCount)(THIS_ UINT* pCount) PURE;
STDMETHOD(GetGSInputPrimitive)(THIS_ D3D10_PRIMITIVE* pPrim) PURE;
STDMETHOD(IsLevel9Shader)(THIS_ BOOL* pbLevel9Shader) PURE;
STDMETHOD(IsSampleFrequencyShader)(THIS_ BOOL* pbSampleFrequency) PURE;
};
//////////////////////////////////////////////////////////////////////////////
// APIs //////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
#ifdef __cplusplus
}
#endif //__cplusplus
#endif //__D3D10_1SHADER_H__

View File

@ -0,0 +1,96 @@
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 7.00.0555 */
/* Compiler settings for d3dcommon.idl:
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING( ) */
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 500
#endif
/* verify that the <rpcsal.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCSAL_H_VERSION__
#define __REQUIRED_RPCSAL_H_VERSION__ 100
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__
#ifndef __d3dcommon_h__
#define __d3dcommon_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
/* header files for imported files */
#include "oaidl.h"
#include "ocidl.h"
#ifdef __cplusplus
extern "C"{
#endif
/* interface __MIDL_itf_d3dcommon_0000_0000 */
/* [local] */
typedef
enum D3D_DRIVER_TYPE
{ D3D_DRIVER_TYPE_UNKNOWN = 0,
D3D_DRIVER_TYPE_HARDWARE = ( D3D_DRIVER_TYPE_UNKNOWN + 1 ) ,
D3D_DRIVER_TYPE_REFERENCE = ( D3D_DRIVER_TYPE_HARDWARE + 1 ) ,
D3D_DRIVER_TYPE_NULL = ( D3D_DRIVER_TYPE_REFERENCE + 1 ) ,
D3D_DRIVER_TYPE_SOFTWARE = ( D3D_DRIVER_TYPE_NULL + 1 ) ,
D3D_DRIVER_TYPE_WARP = ( D3D_DRIVER_TYPE_SOFTWARE + 1 )
} D3D_DRIVER_TYPE;
typedef
enum D3D_FEATURE_LEVEL
{ D3D_FEATURE_LEVEL_9_1 = 0x9100,
D3D_FEATURE_LEVEL_9_2 = 0x9200,
D3D_FEATURE_LEVEL_9_3 = 0x9300,
D3D_FEATURE_LEVEL_10_0 = 0xa000,
D3D_FEATURE_LEVEL_10_1 = 0xa100,
D3D_FEATURE_LEVEL_11_0 = 0xb000
} D3D_FEATURE_LEVEL;
DEFINE_GUID(WKPDID_D3DDebugObjectName,0x429b8c22,0x9188,0x4b0c,0x87,0x42,0xac,0xb0,0xbf,0x85,0xc2,0x00);
extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0000_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0000_v0_0_s_ifspec;
/* Additional Prototypes for ALL interfaces */
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif

Some files were not shown because too many files have changed in this diff Show More