added everything

This commit is contained in:
Metario
2017-04-17 06:17:10 -06:00
commit 9c6ff74f19
6121 changed files with 1625704 additions and 0 deletions

133
lib/MSPlatformSDK/Include/CGuid.h Executable file
View File

@ -0,0 +1,133 @@
//+-------------------------------------------------------------------------
//
// 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
#ifdef __cplusplus
extern "C" {
#endif
extern const IID GUID_NULL;
extern const IID CATID_MARSHALER;
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_StdGlobalInterfaceTable;
extern const CLSID CLSID_ComBinding;
extern const CLSID CLSID_StdEvent;
extern const CLSID CLSID_ManualResetEvent;
extern const CLSID CLSID_SynchronizeContainer;
extern const CLSID CLSID_AddrControl;
//********************************************
//
// 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
#endif // __CGUID_H__

View File

@ -0,0 +1,62 @@
/*****************************************************************************\
* *
* 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 */

10516
lib/MSPlatformSDK/Include/CommCtrl.h Executable file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,263 @@
/*++ 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 >= 0x501)
#define HDS_FLAT 0x0200
#endif
#if (_WIN32_IE >= 0x0400)
#define RBS_TOOLTIPS 0x0100
#define RBS_VARHEIGHT 0x0200
#define RBS_BANDBORDERS 0x0400
#define RBS_FIXEDORDER 0x0800
#define RBS_REGISTERDROP 0x1000
#define RBS_AUTOSIZE 0x2000
#define RBS_VERTICALGRIPPER 0x4000 // this always has the vertical gripper (default for horizontal mode)
#define RBS_DBLCLKTOGGLE 0x8000
#else
#define RBS_TOOLTIPS 0x00000100
#define RBS_VARHEIGHT 0x00000200
#define RBS_BANDBORDERS 0x00000400
#define RBS_FIXEDORDER 0x00000800
#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
#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
#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
//====== 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 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_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
#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

File diff suppressed because it is too large Load Diff

195
lib/MSPlatformSDK/Include/Dde.h Executable file
View File

@ -0,0 +1,195 @@
/*****************************************************************************\
* *
* dde.h - Dynamic Data Exchange structures and definitions *
* *
* Copyright (c) 1993-1999, Microsoft Corp. All rights reserved *
* *
\*****************************************************************************/
#ifndef _DDEHEADER_INCLUDED_
#define _DDEHEADER_INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif
#ifndef _WINDEF_
#include <windef.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
// begin_r_dde
/* DDE window messages */
#define WM_DDE_FIRST 0x03E0
#define WM_DDE_INITIATE (WM_DDE_FIRST)
#define WM_DDE_TERMINATE (WM_DDE_FIRST+1)
#define WM_DDE_ADVISE (WM_DDE_FIRST+2)
#define WM_DDE_UNADVISE (WM_DDE_FIRST+3)
#define WM_DDE_ACK (WM_DDE_FIRST+4)
#define WM_DDE_DATA (WM_DDE_FIRST+5)
#define WM_DDE_REQUEST (WM_DDE_FIRST+6)
#define WM_DDE_POKE (WM_DDE_FIRST+7)
#define WM_DDE_EXECUTE (WM_DDE_FIRST+8)
#define WM_DDE_LAST (WM_DDE_FIRST+8)
// end_r_dde
/*----------------------------------------------------------------------------
| DDEACK structure
|
| Structure of wStatus (LOWORD(lParam)) in WM_DDE_ACK message
| sent in response to a WM_DDE_DATA, WM_DDE_REQUEST, WM_DDE_POKE,
| WM_DDE_ADVISE, or WM_DDE_UNADVISE message.
|
----------------------------------------------------------------------------*/
typedef struct {
#ifndef _MAC
unsigned short bAppReturnCode:8,
reserved:6,
fBusy:1,
fAck:1;
#else
unsigned short usFlags;
#endif
} DDEACK;
/*----------------------------------------------------------------------------
| DDEADVISE structure
|
| WM_DDE_ADVISE parameter structure for hOptions (LOWORD(lParam))
|
----------------------------------------------------------------------------*/
typedef struct {
#ifndef _MAC
unsigned short reserved:14,
fDeferUpd:1,
fAckReq:1;
#else
unsigned short usFlags;
#endif
short cfFormat;
} DDEADVISE;
/*----------------------------------------------------------------------------
| DDEDATA structure
|
| WM_DDE_DATA parameter structure for hData (LOWORD(lParam)).
| The actual size of this structure depends on the size of
| the Value array.
|
----------------------------------------------------------------------------*/
typedef struct {
#ifndef _MAC
unsigned short unused:12,
fResponse:1,
fRelease:1,
reserved:1,
fAckReq:1;
#else
unsigned short usFlags;
#endif
short cfFormat;
BYTE Value[1];
} DDEDATA;
/*----------------------------------------------------------------------------
| DDEPOKE structure
|
| WM_DDE_POKE parameter structure for hData (LOWORD(lParam)).
| The actual size of this structure depends on the size of
| the Value array.
|
----------------------------------------------------------------------------*/
typedef struct {
#ifndef _MAC
unsigned short unused:13, /* Earlier versions of DDE.H incorrectly */
/* 12 unused bits. */
fRelease:1,
fReserved:2;
#else
unsigned short usFlags;
#endif
short cfFormat;
BYTE Value[1]; /* This member was named rgb[1] in previous */
/* versions of DDE.H */
} DDEPOKE;
/*----------------------------------------------------------------------------
The following typedef's were used in previous versions of the Windows SDK.
They are still valid. The above typedef's define exactly the same structures
as those below. The above typedef names are recommended, however, as they
are more meaningful.
Note that the DDEPOKE structure typedef'ed in earlier versions of DDE.H did
not correctly define the bit positions.
----------------------------------------------------------------------------*/
typedef struct {
#ifndef _MAC
unsigned short unused:13,
fRelease:1,
fDeferUpd:1,
fAckReq:1;
#else
unsigned short usFlags;
#endif
short cfFormat;
} DDELN;
typedef struct {
#ifndef _MAC
unsigned short unused:12,
fAck:1,
fRelease:1,
fReserved:1,
fAckReq:1;
#else
unsigned short usFlags;
#endif
short cfFormat;
BYTE rgb[1];
} DDEUP;
/*
* DDE SECURITY
*/
BOOL
WINAPI
DdeSetQualityOfService(
HWND hwndClient,
CONST SECURITY_QUALITY_OF_SERVICE *pqosNew,
PSECURITY_QUALITY_OF_SERVICE pqosPrev);
BOOL
WINAPI
ImpersonateDdeClientWindow(
HWND hWndClient,
HWND hWndServer);
/*
* DDE message packing APIs
*/
LPARAM APIENTRY PackDDElParam(UINT msg, UINT_PTR uiLo, UINT_PTR uiHi);
BOOL APIENTRY UnpackDDElParam(UINT msg, LPARAM lParam, PUINT_PTR puiLo, PUINT_PTR puiHi);
BOOL APIENTRY FreeDDElParam(UINT msg, LPARAM lParam);
LPARAM APIENTRY ReuseDDElParam(LPARAM lParam, UINT msgIn, UINT msgOut, UINT_PTR uiLo, UINT_PTR uiHi);
#ifdef __cplusplus
}
#endif
#endif // _DDEHEADER_INCLUDED_

View File

@ -0,0 +1,30 @@
/*++ BUILD Version: 0000 Increment this if a change has global effects
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
dde.rh
Abstract:
This module defines the 32-Bit Windows resource codes from dde.h.
Revision History:
--*/
/* DDE window messages */
#define WM_DDE_FIRST 0x03E0
#define WM_DDE_INITIATE (WM_DDE_FIRST)
#define WM_DDE_TERMINATE (WM_DDE_FIRST+1)
#define WM_DDE_ADVISE (WM_DDE_FIRST+2)
#define WM_DDE_UNADVISE (WM_DDE_FIRST+3)
#define WM_DDE_ACK (WM_DDE_FIRST+4)
#define WM_DDE_DATA (WM_DDE_FIRST+5)
#define WM_DDE_REQUEST (WM_DDE_FIRST+6)
#define WM_DDE_POKE (WM_DDE_FIRST+7)
#define WM_DDE_EXECUTE (WM_DDE_FIRST+8)
#define WM_DDE_LAST (WM_DDE_FIRST+8)

494
lib/MSPlatformSDK/Include/Ddeml.h Executable file
View File

@ -0,0 +1,494 @@
/*++ BUILD Version: 0001 // Increment this if a change has global effects --*/
/*****************************************************************************\
* *
* ddeml.h - DDEML API header file *
* *
* Version 3.10 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
\*****************************************************************************/
#ifndef _INC_DDEMLH
#define _INC_DDEMLH
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/******** public types ********/
DECLARE_HANDLE(HCONVLIST);
DECLARE_HANDLE(HCONV);
DECLARE_HANDLE(HSZ);
DECLARE_HANDLE(HDDEDATA);
#define EXPENTRY CALLBACK
/* the following structure is for use with XTYP_WILDCONNECT processing. */
typedef struct tagHSZPAIR {
HSZ hszSvc;
HSZ hszTopic;
} HSZPAIR;
typedef HSZPAIR FAR *PHSZPAIR;
/* The following structure is used by DdeConnect() and DdeConnectList() and
by XTYP_CONNECT and XTYP_WILDCONNECT callbacks. */
typedef struct tagCONVCONTEXT {
UINT cb; /* set to sizeof(CONVCONTEXT) */
UINT wFlags; /* none currently defined. */
UINT wCountryID; /* country code for topic/item strings used. */
int iCodePage; /* codepage used for topic/item strings. */
DWORD dwLangID; /* language ID for topic/item strings. */
DWORD dwSecurity; /* Private security code. */
SECURITY_QUALITY_OF_SERVICE qos; /* client side's quality of service */
} CONVCONTEXT;
typedef CONVCONTEXT FAR *PCONVCONTEXT;
/* The following structure is used by DdeQueryConvInfo(): */
typedef struct tagCONVINFO {
DWORD cb; /* sizeof(CONVINFO) */
DWORD_PTR hUser; /* user specified field */
HCONV hConvPartner; /* hConv on other end or 0 if non-ddemgr partner */
HSZ hszSvcPartner; /* app name of partner if obtainable */
HSZ hszServiceReq; /* AppName requested for connection */
HSZ hszTopic; /* Topic name for conversation */
HSZ hszItem; /* transaction item name or NULL if quiescent */
UINT wFmt; /* transaction format or NULL if quiescent */
UINT wType; /* XTYP_ for current transaction */
UINT wStatus; /* ST_ constant for current conversation */
UINT wConvst; /* XST_ constant for current transaction */
UINT wLastError; /* last transaction error. */
HCONVLIST hConvList; /* parent hConvList if this conversation is in a list */
CONVCONTEXT ConvCtxt; /* conversation context */
HWND hwnd; /* window handle for this conversation */
HWND hwndPartner; /* partner window handle for this conversation */
} CONVINFO;
typedef CONVINFO FAR *PCONVINFO;
/***** conversation states (usState) *****/
#define XST_NULL 0 /* quiescent states */
#define XST_INCOMPLETE 1
#define XST_CONNECTED 2
#define XST_INIT1 3 /* mid-initiation states */
#define XST_INIT2 4
#define XST_REQSENT 5 /* active conversation states */
#define XST_DATARCVD 6
#define XST_POKESENT 7
#define XST_POKEACKRCVD 8
#define XST_EXECSENT 9
#define XST_EXECACKRCVD 10
#define XST_ADVSENT 11
#define XST_UNADVSENT 12
#define XST_ADVACKRCVD 13
#define XST_UNADVACKRCVD 14
#define XST_ADVDATASENT 15
#define XST_ADVDATAACKRCVD 16
/* used in LOWORD(dwData1) of XTYP_ADVREQ callbacks... */
#define CADV_LATEACK 0xFFFF
/***** conversation status bits (fsStatus) *****/
#define ST_CONNECTED 0x0001
#define ST_ADVISE 0x0002
#define ST_ISLOCAL 0x0004
#define ST_BLOCKED 0x0008
#define ST_CLIENT 0x0010
#define ST_TERMINATED 0x0020
#define ST_INLIST 0x0040
#define ST_BLOCKNEXT 0x0080
#define ST_ISSELF 0x0100
/* DDE constants for wStatus field */
#define DDE_FACK 0x8000
#define DDE_FBUSY 0x4000
#define DDE_FDEFERUPD 0x4000
#define DDE_FACKREQ 0x8000
#define DDE_FRELEASE 0x2000
#define DDE_FREQUESTED 0x1000
#define DDE_FAPPSTATUS 0x00ff
#define DDE_FNOTPROCESSED 0x0000
#define DDE_FACKRESERVED (~(DDE_FACK | DDE_FBUSY | DDE_FAPPSTATUS))
#define DDE_FADVRESERVED (~(DDE_FACKREQ | DDE_FDEFERUPD))
#define DDE_FDATRESERVED (~(DDE_FACKREQ | DDE_FRELEASE | DDE_FREQUESTED))
#define DDE_FPOKRESERVED (~(DDE_FRELEASE))
/***** message filter hook types *****/
#define MSGF_DDEMGR 0x8001
/***** codepage constants ****/
#define CP_WINANSI 1004 /* default codepage for windows & old DDE convs. */
#define CP_WINUNICODE 1200
#ifdef UNICODE
#define CP_WINNEUTRAL CP_WINUNICODE
#else // !UNICODE
#define CP_WINNEUTRAL CP_WINANSI
#endif // !UNICODE
/***** transaction types *****/
#define XTYPF_NOBLOCK 0x0002 /* CBR_BLOCK will not work */
#define XTYPF_NODATA 0x0004 /* DDE_FDEFERUPD */
#define XTYPF_ACKREQ 0x0008 /* DDE_FACKREQ */
#define XCLASS_MASK 0xFC00
#define XCLASS_BOOL 0x1000
#define XCLASS_DATA 0x2000
#define XCLASS_FLAGS 0x4000
#define XCLASS_NOTIFICATION 0x8000
#define XTYP_ERROR (0x0000 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK )
#define XTYP_ADVDATA (0x0010 | XCLASS_FLAGS )
#define XTYP_ADVREQ (0x0020 | XCLASS_DATA | XTYPF_NOBLOCK )
#define XTYP_ADVSTART (0x0030 | XCLASS_BOOL )
#define XTYP_ADVSTOP (0x0040 | XCLASS_NOTIFICATION)
#define XTYP_EXECUTE (0x0050 | XCLASS_FLAGS )
#define XTYP_CONNECT (0x0060 | XCLASS_BOOL | XTYPF_NOBLOCK)
#define XTYP_CONNECT_CONFIRM (0x0070 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
#define XTYP_XACT_COMPLETE (0x0080 | XCLASS_NOTIFICATION )
#define XTYP_POKE (0x0090 | XCLASS_FLAGS )
#define XTYP_REGISTER (0x00A0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
#define XTYP_REQUEST (0x00B0 | XCLASS_DATA )
#define XTYP_DISCONNECT (0x00C0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
#define XTYP_UNREGISTER (0x00D0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
#define XTYP_WILDCONNECT (0x00E0 | XCLASS_DATA | XTYPF_NOBLOCK)
#define XTYP_MASK 0x00F0
#define XTYP_SHIFT 4 /* shift to turn XTYP_ into an index */
/***** Timeout constants *****/
#define TIMEOUT_ASYNC 0xFFFFFFFF
/***** Transaction ID constants *****/
#define QID_SYNC 0xFFFFFFFF
/****** public strings used in DDE ******/
#ifdef UNICODE
#define SZDDESYS_TOPIC L"System"
#define SZDDESYS_ITEM_TOPICS L"Topics"
#define SZDDESYS_ITEM_SYSITEMS L"SysItems"
#define SZDDESYS_ITEM_RTNMSG L"ReturnMessage"
#define SZDDESYS_ITEM_STATUS L"Status"
#define SZDDESYS_ITEM_FORMATS L"Formats"
#define SZDDESYS_ITEM_HELP L"Help"
#define SZDDE_ITEM_ITEMLIST L"TopicItemList"
#else
#define SZDDESYS_TOPIC "System"
#define SZDDESYS_ITEM_TOPICS "Topics"
#define SZDDESYS_ITEM_SYSITEMS "SysItems"
#define SZDDESYS_ITEM_RTNMSG "ReturnMessage"
#define SZDDESYS_ITEM_STATUS "Status"
#define SZDDESYS_ITEM_FORMATS "Formats"
#define SZDDESYS_ITEM_HELP "Help"
#define SZDDE_ITEM_ITEMLIST "TopicItemList"
#endif
/****** API entry points ******/
typedef HDDEDATA CALLBACK FNCALLBACK(UINT wType, UINT wFmt, HCONV hConv,
HSZ hsz1, HSZ hsz2, HDDEDATA hData, ULONG_PTR dwData1, ULONG_PTR dwData2);
typedef HDDEDATA (CALLBACK *PFNCALLBACK)(UINT wType, UINT wFmt, HCONV hConv,
HSZ hsz1, HSZ hsz2, HDDEDATA hData, ULONG_PTR dwData1, ULONG_PTR dwData2);
#define CBR_BLOCK ((HDDEDATA)-1)
/* DLL registration functions */
UINT WINAPI DdeInitializeA( IN OUT LPDWORD pidInst, IN PFNCALLBACK pfnCallback,
IN DWORD afCmd, IN DWORD ulRes);
UINT WINAPI DdeInitializeW( IN OUT LPDWORD pidInst, IN PFNCALLBACK pfnCallback,
IN DWORD afCmd, IN DWORD ulRes);
#ifdef UNICODE
#define DdeInitialize DdeInitializeW
#else
#define DdeInitialize DdeInitializeA
#endif // !UNICODE
/*
* Callback filter flags for use with standard apps.
*/
#define CBF_FAIL_SELFCONNECTIONS 0x00001000
#define CBF_FAIL_CONNECTIONS 0x00002000
#define CBF_FAIL_ADVISES 0x00004000
#define CBF_FAIL_EXECUTES 0x00008000
#define CBF_FAIL_POKES 0x00010000
#define CBF_FAIL_REQUESTS 0x00020000
#define CBF_FAIL_ALLSVRXACTIONS 0x0003f000
#define CBF_SKIP_CONNECT_CONFIRMS 0x00040000
#define CBF_SKIP_REGISTRATIONS 0x00080000
#define CBF_SKIP_UNREGISTRATIONS 0x00100000
#define CBF_SKIP_DISCONNECTS 0x00200000
#define CBF_SKIP_ALLNOTIFICATIONS 0x003c0000
/*
* Application command flags
*/
#define APPCMD_CLIENTONLY 0x00000010L
#define APPCMD_FILTERINITS 0x00000020L
#define APPCMD_MASK 0x00000FF0L
/*
* Application classification flags
*/
#define APPCLASS_STANDARD 0x00000000L
#define APPCLASS_MASK 0x0000000FL
BOOL WINAPI DdeUninitialize( IN DWORD idInst);
/*
* conversation enumeration functions
*/
HCONVLIST WINAPI DdeConnectList( IN DWORD idInst, IN HSZ hszService, IN HSZ hszTopic,
IN HCONVLIST hConvList, IN PCONVCONTEXT pCC);
HCONV WINAPI DdeQueryNextServer( IN HCONVLIST hConvList, IN HCONV hConvPrev);
BOOL WINAPI DdeDisconnectList( IN HCONVLIST hConvList);
/*
* conversation control functions
*/
HCONV WINAPI DdeConnect( IN DWORD idInst, IN HSZ hszService, IN HSZ hszTopic,
IN PCONVCONTEXT pCC);
BOOL WINAPI DdeDisconnect( IN OUT HCONV hConv);
HCONV WINAPI DdeReconnect( IN HCONV hConv);
UINT WINAPI DdeQueryConvInfo( IN HCONV hConv, IN DWORD idTransaction, IN OUT PCONVINFO pConvInfo);
BOOL WINAPI DdeSetUserHandle( IN HCONV hConv, IN DWORD id, IN DWORD_PTR hUser);
BOOL WINAPI DdeAbandonTransaction( IN DWORD idInst, IN HCONV hConv, IN DWORD idTransaction);
/*
* app server interface functions
*/
BOOL WINAPI DdePostAdvise( IN DWORD idInst, IN HSZ hszTopic, IN HSZ hszItem);
BOOL WINAPI DdeEnableCallback( IN DWORD idInst, IN HCONV hConv, IN UINT wCmd);
BOOL WINAPI DdeImpersonateClient( IN HCONV hConv);
#define EC_ENABLEALL 0
#define EC_ENABLEONE ST_BLOCKNEXT
#define EC_DISABLE ST_BLOCKED
#define EC_QUERYWAITING 2
HDDEDATA WINAPI DdeNameService( IN DWORD idInst, IN HSZ hsz1, IN HSZ hsz2, IN UINT afCmd);
#define DNS_REGISTER 0x0001
#define DNS_UNREGISTER 0x0002
#define DNS_FILTERON 0x0004
#define DNS_FILTEROFF 0x0008
/*
* app client interface functions
*/
HDDEDATA WINAPI DdeClientTransaction( IN LPBYTE pData, IN DWORD cbData,
IN HCONV hConv, IN HSZ hszItem, IN UINT wFmt, IN UINT wType,
IN DWORD dwTimeout, OUT LPDWORD pdwResult);
/*
*data transfer functions
*/
HDDEDATA WINAPI DdeCreateDataHandle( IN DWORD idInst, IN LPBYTE pSrc, IN DWORD cb,
IN DWORD cbOff, IN HSZ hszItem, IN UINT wFmt, IN UINT afCmd);
HDDEDATA WINAPI DdeAddData( IN HDDEDATA hData, IN LPBYTE pSrc, IN DWORD cb, IN DWORD cbOff);
DWORD WINAPI DdeGetData( IN HDDEDATA hData, OUT LPBYTE pDst, IN DWORD cbMax, IN DWORD cbOff);
LPBYTE WINAPI DdeAccessData( IN HDDEDATA hData, OUT LPDWORD pcbDataSize);
BOOL WINAPI DdeUnaccessData( IN HDDEDATA hData);
BOOL WINAPI DdeFreeDataHandle( IN OUT HDDEDATA hData);
#define HDATA_APPOWNED 0x0001
UINT WINAPI DdeGetLastError( IN DWORD idInst);
#define DMLERR_NO_ERROR 0 /* must be 0 */
#define DMLERR_FIRST 0x4000
#define DMLERR_ADVACKTIMEOUT 0x4000
#define DMLERR_BUSY 0x4001
#define DMLERR_DATAACKTIMEOUT 0x4002
#define DMLERR_DLL_NOT_INITIALIZED 0x4003
#define DMLERR_DLL_USAGE 0x4004
#define DMLERR_EXECACKTIMEOUT 0x4005
#define DMLERR_INVALIDPARAMETER 0x4006
#define DMLERR_LOW_MEMORY 0x4007
#define DMLERR_MEMORY_ERROR 0x4008
#define DMLERR_NOTPROCESSED 0x4009
#define DMLERR_NO_CONV_ESTABLISHED 0x400a
#define DMLERR_POKEACKTIMEOUT 0x400b
#define DMLERR_POSTMSG_FAILED 0x400c
#define DMLERR_REENTRANCY 0x400d
#define DMLERR_SERVER_DIED 0x400e
#define DMLERR_SYS_ERROR 0x400f
#define DMLERR_UNADVACKTIMEOUT 0x4010
#define DMLERR_UNFOUND_QUEUE_ID 0x4011
#define DMLERR_LAST 0x4011
HSZ WINAPI DdeCreateStringHandleA( IN DWORD idInst, IN LPCSTR psz, IN int iCodePage);
HSZ WINAPI DdeCreateStringHandleW( IN DWORD idInst, IN LPCWSTR psz, IN int iCodePage);
#ifdef UNICODE
#define DdeCreateStringHandle DdeCreateStringHandleW
#else
#define DdeCreateStringHandle DdeCreateStringHandleA
#endif // !UNICODE
DWORD WINAPI DdeQueryStringA( IN DWORD idInst, IN HSZ hsz, IN OUT LPSTR psz, IN DWORD cchMax, IN int iCodePage);
DWORD WINAPI DdeQueryStringW( IN DWORD idInst, IN HSZ hsz, IN OUT LPWSTR psz, IN DWORD cchMax, IN int iCodePage);
#ifdef UNICODE
#define DdeQueryString DdeQueryStringW
#else
#define DdeQueryString DdeQueryStringA
#endif // !UNICODE
BOOL WINAPI DdeFreeStringHandle( IN DWORD idInst, IN OUT HSZ hsz);
BOOL WINAPI DdeKeepStringHandle( IN DWORD idInst, IN OUT HSZ hsz);
int WINAPI DdeCmpStringHandles( IN HSZ hsz1, IN HSZ hsz2);
#ifndef NODDEMLSPY
/*
* DDEML public debugging header file info
*/
typedef struct tagDDEML_MSG_HOOK_DATA { // new for NT
UINT_PTR uiLo; // unpacked lo and hi parts of lParam
UINT_PTR uiHi;
DWORD cbData; // amount of data in message, if any. May be > than 32 bytes.
DWORD Data[8]; // data peeking by DDESPY is limited to 32 bytes.
} DDEML_MSG_HOOK_DATA, *PDDEML_MSG_HOOK_DATA;
typedef struct tagMONMSGSTRUCT {
UINT cb;
HWND hwndTo;
DWORD dwTime;
HANDLE hTask;
UINT wMsg;
WPARAM wParam;
LPARAM lParam;
DDEML_MSG_HOOK_DATA dmhd; // new for NT
} MONMSGSTRUCT, *PMONMSGSTRUCT;
typedef struct tagMONCBSTRUCT {
UINT cb;
DWORD dwTime;
HANDLE hTask;
DWORD dwRet;
UINT wType;
UINT wFmt;
HCONV hConv;
HSZ hsz1;
HSZ hsz2;
HDDEDATA hData;
ULONG_PTR dwData1;
ULONG_PTR dwData2;
CONVCONTEXT cc; // new for NT for XTYP_CONNECT callbacks
DWORD cbData; // new for NT for data peeking
DWORD Data[8]; // new for NT for data peeking
} MONCBSTRUCT, *PMONCBSTRUCT;
typedef struct tagMONHSZSTRUCTA {
UINT cb;
BOOL fsAction; /* MH_ value */
DWORD dwTime;
HSZ hsz;
HANDLE hTask;
CHAR str[1];
} MONHSZSTRUCTA, *PMONHSZSTRUCTA;
typedef struct tagMONHSZSTRUCTW {
UINT cb;
BOOL fsAction; /* MH_ value */
DWORD dwTime;
HSZ hsz;
HANDLE hTask;
WCHAR str[1];
} MONHSZSTRUCTW, *PMONHSZSTRUCTW;
#ifdef UNICODE
typedef MONHSZSTRUCTW MONHSZSTRUCT;
typedef PMONHSZSTRUCTW PMONHSZSTRUCT;
#else
typedef MONHSZSTRUCTA MONHSZSTRUCT;
typedef PMONHSZSTRUCTA PMONHSZSTRUCT;
#endif // UNICODE
#define MH_CREATE 1
#define MH_KEEP 2
#define MH_DELETE 3
#define MH_CLEANUP 4
typedef struct tagMONERRSTRUCT {
UINT cb;
UINT wLastError;
DWORD dwTime;
HANDLE hTask;
} MONERRSTRUCT, *PMONERRSTRUCT;
typedef struct tagMONLINKSTRUCT {
UINT cb;
DWORD dwTime;
HANDLE hTask;
BOOL fEstablished;
BOOL fNoData;
HSZ hszSvc;
HSZ hszTopic;
HSZ hszItem;
UINT wFmt;
BOOL fServer;
HCONV hConvServer;
HCONV hConvClient;
} MONLINKSTRUCT, *PMONLINKSTRUCT;
typedef struct tagMONCONVSTRUCT {
UINT cb;
BOOL fConnect;
DWORD dwTime;
HANDLE hTask;
HSZ hszSvc;
HSZ hszTopic;
HCONV hConvClient; // Globally unique value != apps local hConv
HCONV hConvServer; // Globally unique value != apps local hConv
} MONCONVSTRUCT, *PMONCONVSTRUCT;
#define MAX_MONITORS 4
#define APPCLASS_MONITOR 0x00000001L
#define XTYP_MONITOR (0x00F0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
/*
* Callback filter flags for use with MONITOR apps - 0 implies no monitor
* callbacks.
*/
#define MF_HSZ_INFO 0x01000000
#define MF_SENDMSGS 0x02000000
#define MF_POSTMSGS 0x04000000
#define MF_CALLBACKS 0x08000000
#define MF_ERRORS 0x10000000
#define MF_LINKS 0x20000000
#define MF_CONV 0x40000000
#define MF_MASK 0xFF000000
#endif /* NODDEMLSPY */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* _INC_DDEMLH */

272
lib/MSPlatformSDK/Include/Dlgs.h Executable file
View File

@ -0,0 +1,272 @@
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
dlgs.h
Abstract:
This module contains the UI dialog header information.
--*/
#ifndef _DLGSH_INCLUDED_
#define _DLGSH_INCLUDED_
//
// Constant Declarations.
//
#define ctlFirst 0x0400
#define ctlLast 0x04ff
//
// Push buttons.
//
#define psh1 0x0400
#define psh2 0x0401
#define psh3 0x0402
#define psh4 0x0403
#define psh5 0x0404
#define psh6 0x0405
#define psh7 0x0406
#define psh8 0x0407
#define psh9 0x0408
#define psh10 0x0409
#define psh11 0x040a
#define psh12 0x040b
#define psh13 0x040c
#define psh14 0x040d
#define psh15 0x040e
#define pshHelp psh15
#define psh16 0x040f
//
// Checkboxes.
//
#define chx1 0x0410
#define chx2 0x0411
#define chx3 0x0412
#define chx4 0x0413
#define chx5 0x0414
#define chx6 0x0415
#define chx7 0x0416
#define chx8 0x0417
#define chx9 0x0418
#define chx10 0x0419
#define chx11 0x041a
#define chx12 0x041b
#define chx13 0x041c
#define chx14 0x041d
#define chx15 0x041e
#define chx16 0x041f
//
// Radio buttons.
//
#define rad1 0x0420
#define rad2 0x0421
#define rad3 0x0422
#define rad4 0x0423
#define rad5 0x0424
#define rad6 0x0425
#define rad7 0x0426
#define rad8 0x0427
#define rad9 0x0428
#define rad10 0x0429
#define rad11 0x042a
#define rad12 0x042b
#define rad13 0x042c
#define rad14 0x042d
#define rad15 0x042e
#define rad16 0x042f
//
// Groups, frames, rectangles, and icons.
//
#define grp1 0x0430
#define grp2 0x0431
#define grp3 0x0432
#define grp4 0x0433
#define frm1 0x0434
#define frm2 0x0435
#define frm3 0x0436
#define frm4 0x0437
#define rct1 0x0438
#define rct2 0x0439
#define rct3 0x043a
#define rct4 0x043b
#define ico1 0x043c
#define ico2 0x043d
#define ico3 0x043e
#define ico4 0x043f
//
// Static text.
//
#define stc1 0x0440
#define stc2 0x0441
#define stc3 0x0442
#define stc4 0x0443
#define stc5 0x0444
#define stc6 0x0445
#define stc7 0x0446
#define stc8 0x0447
#define stc9 0x0448
#define stc10 0x0449
#define stc11 0x044a
#define stc12 0x044b
#define stc13 0x044c
#define stc14 0x044d
#define stc15 0x044e
#define stc16 0x044f
#define stc17 0x0450
#define stc18 0x0451
#define stc19 0x0452
#define stc20 0x0453
#define stc21 0x0454
#define stc22 0x0455
#define stc23 0x0456
#define stc24 0x0457
#define stc25 0x0458
#define stc26 0x0459
#define stc27 0x045a
#define stc28 0x045b
#define stc29 0x045c
#define stc30 0x045d
#define stc31 0x045e
#define stc32 0x045f
//
// Listboxes.
//
#define lst1 0x0460
#define lst2 0x0461
#define lst3 0x0462
#define lst4 0x0463
#define lst5 0x0464
#define lst6 0x0465
#define lst7 0x0466
#define lst8 0x0467
#define lst9 0x0468
#define lst10 0x0469
#define lst11 0x046a
#define lst12 0x046b
#define lst13 0x046c
#define lst14 0x046d
#define lst15 0x046e
#define lst16 0x046f
//
// Combo boxes.
//
#define cmb1 0x0470
#define cmb2 0x0471
#define cmb3 0x0472
#define cmb4 0x0473
#define cmb5 0x0474
#define cmb6 0x0475
#define cmb7 0x0476
#define cmb8 0x0477
#define cmb9 0x0478
#define cmb10 0x0479
#define cmb11 0x047a
#define cmb12 0x047b
#define cmb13 0x047c
#define cmb14 0x047d
#define cmb15 0x047e
#define cmb16 0x047f
//
// Edit controls.
//
#define edt1 0x0480
#define edt2 0x0481
#define edt3 0x0482
#define edt4 0x0483
#define edt5 0x0484
#define edt6 0x0485
#define edt7 0x0486
#define edt8 0x0487
#define edt9 0x0488
#define edt10 0x0489
#define edt11 0x048a
#define edt12 0x048b
#define edt13 0x048c
#define edt14 0x048d
#define edt15 0x048e
#define edt16 0x048f
//
// Scroll bars.
//
#define scr1 0x0490
#define scr2 0x0491
#define scr3 0x0492
#define scr4 0x0493
#define scr5 0x0494
#define scr6 0x0495
#define scr7 0x0496
#define scr8 0x0497
//
// Controls
//
#define ctl1 0x04A0
//
// These dialog resource ordinals really start at 0x0600, but the
// RC Compiler can't handle hex for resource IDs, hence the decimal.
//
#ifdef UNIX
#define MW_BIG_FILEOPENORD 10000
#define MW_BIG_MULTIFILEOPENORD 10001
#define FILEOPENORDMOTIF 10003
#define PRINTDLGORDMOTIF 10004
#define FINDDLGORDMOTIF 10005
#endif
#define FILEOPENORD 1536
#define MULTIFILEOPENORD 1537
#define PRINTDLGORD 1538
#define PRNSETUPDLGORD 1539
#define FINDDLGORD 1540
#define REPLACEDLGORD 1541
#define FONTDLGORD 1542
#define FORMATDLGORD31 1543
#define FORMATDLGORD30 1544
#define RUNDLGORD 1545
#if (WINVER >= 0x400)
#define PAGESETUPDLGORD 1546
#define NEWFILEOPENORD 1547
#define PRINTDLGEXORD 1549
#define PAGESETUPDLGORDMOTIF 1550
#define COLORMGMTDLGORD 1551
#define NEWFILEOPENV2ORD 1552
#endif /* WINVER >= 0x400) */
//
// Typedef Declarations.
//
typedef struct tagCRGB
{
BYTE bRed;
BYTE bGreen;
BYTE bBlue;
BYTE bExtra;
} CRGB; /* RGB Color */
#endif // _DLGSH_INCLUDED_

View File

@ -0,0 +1,205 @@
//+---------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// File: guiddef.h
//
// Contents: GUID definition
//
//----------------------------------------------------------------------------
#ifndef GUID_DEFINED
#define GUID_DEFINED
#if defined(__midl)
typedef struct {
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
byte Data4[ 8 ];
} GUID;
#else
typedef struct _GUID {
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[ 8 ];
} GUID;
#endif
#endif
#ifndef FAR
#ifdef _WIN32
#define FAR
#else
#define FAR _far
#endif
#endif
#ifndef DECLSPEC_SELECTANY
#if (_MSC_VER >= 1100)
#define DECLSPEC_SELECTANY __declspec(selectany)
#else
#define DECLSPEC_SELECTANY
#endif
#endif
#ifndef EXTERN_C
#ifdef __cplusplus
#define EXTERN_C extern "C"
#else
#define EXTERN_C extern
#endif
#endif
#ifdef DEFINE_GUID
#undef DEFINE_GUID
#endif
#ifdef INITGUID
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
EXTERN_C const GUID DECLSPEC_SELECTANY name \
= { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
#else
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
EXTERN_C const GUID FAR name
#endif // INITGUID
#define DEFINE_OLEGUID(name, l, w1, w2) DEFINE_GUID(name, l, w1, w2, 0xC0,0,0,0,0,0,0,0x46)
#ifndef _GUIDDEF_H_
#define _GUIDDEF_H_
#ifndef __LPGUID_DEFINED__
#define __LPGUID_DEFINED__
typedef GUID *LPGUID;
#endif
#ifndef __LPCGUID_DEFINED__
#define __LPCGUID_DEFINED__
typedef const GUID *LPCGUID;
#endif
#ifndef __IID_DEFINED__
#define __IID_DEFINED__
typedef GUID IID;
typedef IID *LPIID;
#define IID_NULL GUID_NULL
#define IsEqualIID(riid1, riid2) IsEqualGUID(riid1, riid2)
typedef GUID CLSID;
typedef CLSID *LPCLSID;
#define CLSID_NULL GUID_NULL
#define IsEqualCLSID(rclsid1, rclsid2) IsEqualGUID(rclsid1, rclsid2)
typedef GUID FMTID;
typedef FMTID *LPFMTID;
#define FMTID_NULL GUID_NULL
#define IsEqualFMTID(rfmtid1, rfmtid2) IsEqualGUID(rfmtid1, rfmtid2)
#ifdef __midl_proxy
#define __MIDL_CONST
#else
#define __MIDL_CONST const
#endif
#ifndef _REFGUID_DEFINED
#define _REFGUID_DEFINED
#ifdef __cplusplus
#define REFGUID const GUID &
#else
#define REFGUID const GUID * __MIDL_CONST
#endif
#endif
#ifndef _REFIID_DEFINED
#define _REFIID_DEFINED
#ifdef __cplusplus
#define REFIID const IID &
#else
#define REFIID const IID * __MIDL_CONST
#endif
#endif
#ifndef _REFCLSID_DEFINED
#define _REFCLSID_DEFINED
#ifdef __cplusplus
#define REFCLSID const IID &
#else
#define REFCLSID const IID * __MIDL_CONST
#endif
#endif
#ifndef _REFFMTID_DEFINED
#define _REFFMTID_DEFINED
#ifdef __cplusplus
#define REFFMTID const IID &
#else
#define REFFMTID const IID * __MIDL_CONST
#endif
#endif
#endif // !__IID_DEFINED__
#if !defined (__midl)
#if !defined (_SYS_GUID_OPERATORS_)
#define _SYS_GUID_OPERATORS_
#include <string.h>
// Faster (but makes code fatter) inline version...use sparingly
#ifdef __cplusplus
__inline int InlineIsEqualGUID(REFGUID rguid1, REFGUID rguid2)
{
return (
((unsigned long *) &rguid1)[0] == ((unsigned long *) &rguid2)[0] &&
((unsigned long *) &rguid1)[1] == ((unsigned long *) &rguid2)[1] &&
((unsigned long *) &rguid1)[2] == ((unsigned long *) &rguid2)[2] &&
((unsigned long *) &rguid1)[3] == ((unsigned long *) &rguid2)[3]);
}
__inline int IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
{
return !memcmp(&rguid1, &rguid2, sizeof(GUID));
}
#else // ! __cplusplus
#define InlineIsEqualGUID(rguid1, rguid2) \
(((unsigned long *) rguid1)[0] == ((unsigned long *) rguid2)[0] && \
((unsigned long *) rguid1)[1] == ((unsigned long *) rguid2)[1] && \
((unsigned long *) rguid1)[2] == ((unsigned long *) rguid2)[2] && \
((unsigned long *) rguid1)[3] == ((unsigned long *) rguid2)[3])
#define IsEqualGUID(rguid1, rguid2) (!memcmp(rguid1, rguid2, sizeof(GUID)))
#endif // __cplusplus
#ifdef __INLINE_ISEQUAL_GUID
#undef IsEqualGUID
#define IsEqualGUID(rguid1, rguid2) InlineIsEqualGUID(rguid1, rguid2)
#endif
// Same type, different name
#define IsEqualIID(riid1, riid2) IsEqualGUID(riid1, riid2)
#define IsEqualCLSID(rclsid1, rclsid2) IsEqualGUID(rclsid1, rclsid2)
#if !defined _SYS_GUID_OPERATOR_EQ_ && !defined _NO_SYS_GUID_OPERATOR_EQ_
#define _SYS_GUID_OPERATOR_EQ_
// A couple of C++ helpers
#ifdef __cplusplus
__inline int operator==(REFGUID guidOne, REFGUID guidOther)
{
return IsEqualGUID(guidOne,guidOther);
}
__inline int operator!=(REFGUID guidOne, REFGUID guidOther)
{
return !(guidOne == guidOther);
}
#endif
#endif // _SYS_GUID_OPERATOR_EQ_
#endif // _SYS_GUID_OPERATORS_
#endif // __midl
#endif // _GUIDDEF_H_

718
lib/MSPlatformSDK/Include/Imm.h Executable file
View File

@ -0,0 +1,718 @@
/**********************************************************************/
/* imm.h - Input Method Manager definitions */
/* */
/* Copyright (c) Microsoft Corporation. All rights reserved. */
/**********************************************************************/
#ifndef _IMM_
#define _IMM_
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _IMM_SDK_DEFINED_
#define _IMM_SDK_DEFINED_
#if (WINVER >= 0x040A)
DECLARE_HANDLE(HIMC);
DECLARE_HANDLE(HIMCC);
#else
typedef DWORD HIMC;
typedef DWORD HIMCC;
#endif /* WINVER >= 0x040A */
typedef HKL FAR *LPHKL;
typedef UINT FAR *LPUINT;
typedef struct tagCOMPOSITIONFORM {
DWORD dwStyle;
POINT ptCurrentPos;
RECT rcArea;
} COMPOSITIONFORM, *PCOMPOSITIONFORM, NEAR *NPCOMPOSITIONFORM, FAR *LPCOMPOSITIONFORM;
typedef struct tagCANDIDATEFORM {
DWORD dwIndex;
DWORD dwStyle;
POINT ptCurrentPos;
RECT rcArea;
} CANDIDATEFORM, *PCANDIDATEFORM, NEAR *NPCANDIDATEFORM, FAR *LPCANDIDATEFORM;
typedef struct tagCANDIDATELIST {
DWORD dwSize;
DWORD dwStyle;
DWORD dwCount;
DWORD dwSelection;
DWORD dwPageStart;
DWORD dwPageSize;
DWORD dwOffset[1];
} CANDIDATELIST, *PCANDIDATELIST, NEAR *NPCANDIDATELIST, FAR *LPCANDIDATELIST;
typedef struct tagREGISTERWORDA {
LPSTR lpReading;
LPSTR lpWord;
} REGISTERWORDA, *PREGISTERWORDA, NEAR *NPREGISTERWORDA, FAR *LPREGISTERWORDA;
typedef struct tagREGISTERWORDW {
LPWSTR lpReading;
LPWSTR lpWord;
} REGISTERWORDW, *PREGISTERWORDW, NEAR *NPREGISTERWORDW, FAR *LPREGISTERWORDW;
#ifdef UNICODE
typedef REGISTERWORDW REGISTERWORD;
typedef PREGISTERWORDW PREGISTERWORD;
typedef NPREGISTERWORDW NPREGISTERWORD;
typedef LPREGISTERWORDW LPREGISTERWORD;
#else
typedef REGISTERWORDA REGISTERWORD;
typedef PREGISTERWORDA PREGISTERWORD;
typedef NPREGISTERWORDA NPREGISTERWORD;
typedef LPREGISTERWORDA LPREGISTERWORD;
#endif // UNICODE
#if (WINVER >= 0x040A)
typedef struct tagRECONVERTSTRING {
DWORD dwSize;
DWORD dwVersion;
DWORD dwStrLen;
DWORD dwStrOffset;
DWORD dwCompStrLen;
DWORD dwCompStrOffset;
DWORD dwTargetStrLen;
DWORD dwTargetStrOffset;
} RECONVERTSTRING, *PRECONVERTSTRING, NEAR *NPRECONVERTSTRING, FAR *LPRECONVERTSTRING;
#endif /* WINVER >= 0x040A */
#define STYLE_DESCRIPTION_SIZE 32
typedef struct tagSTYLEBUFA {
DWORD dwStyle;
CHAR szDescription[STYLE_DESCRIPTION_SIZE];
} STYLEBUFA, *PSTYLEBUFA, NEAR *NPSTYLEBUFA, FAR *LPSTYLEBUFA;
typedef struct tagSTYLEBUFW {
DWORD dwStyle;
WCHAR szDescription[STYLE_DESCRIPTION_SIZE];
} STYLEBUFW, *PSTYLEBUFW, NEAR *NPSTYLEBUFW, FAR *LPSTYLEBUFW;
#ifdef UNICODE
typedef STYLEBUFW STYLEBUF;
typedef PSTYLEBUFW PSTYLEBUF;
typedef NPSTYLEBUFW NPSTYLEBUF;
typedef LPSTYLEBUFW LPSTYLEBUF;
#else
typedef STYLEBUFA STYLEBUF;
typedef PSTYLEBUFA PSTYLEBUF;
typedef NPSTYLEBUFA NPSTYLEBUF;
typedef LPSTYLEBUFA LPSTYLEBUF;
#endif // UNICODE
#if (WINVER >= 0x040A)
#define IMEMENUITEM_STRING_SIZE 80
typedef struct tagIMEMENUITEMINFOA {
UINT cbSize;
UINT fType;
UINT fState;
UINT wID;
HBITMAP hbmpChecked;
HBITMAP hbmpUnchecked;
DWORD dwItemData;
CHAR szString[IMEMENUITEM_STRING_SIZE];
HBITMAP hbmpItem;
} IMEMENUITEMINFOA, *PIMEMENUITEMINFOA, NEAR *NPIMEMENUITEMINFOA, FAR *LPIMEMENUITEMINFOA;
typedef struct tagIMEMENUITEMINFOW {
UINT cbSize;
UINT fType;
UINT fState;
UINT wID;
HBITMAP hbmpChecked;
HBITMAP hbmpUnchecked;
DWORD dwItemData;
WCHAR szString[IMEMENUITEM_STRING_SIZE];
HBITMAP hbmpItem;
} IMEMENUITEMINFOW, *PIMEMENUITEMINFOW, NEAR *NPIMEMENUITEMINFOW, FAR *LPIMEMENUITEMINFOW;
#ifdef UNICODE
typedef IMEMENUITEMINFOW IMEMENUITEMINFO;
typedef PIMEMENUITEMINFOW PIMEMENUITEMINFO;
typedef NPIMEMENUITEMINFOW NPIMEMENUITEMINFO;
typedef LPIMEMENUITEMINFOW LPIMEMENUITEMINFO;
#else
typedef IMEMENUITEMINFOA IMEMENUITEMINFO;
typedef PIMEMENUITEMINFOA PIMEMENUITEMINFO;
typedef NPIMEMENUITEMINFOA NPIMEMENUITEMINFO;
typedef LPIMEMENUITEMINFOA LPIMEMENUITEMINFO;
#endif // UNICODE
typedef struct tagIMECHARPOSITION {
DWORD dwSize;
DWORD dwCharPos;
POINT pt;
UINT cLineHeight;
RECT rcDocument;
} IMECHARPOSITION, *PIMECHARPOSITION, NEAR *NPIMECHARPOSITION, FAR *LPIMECHARPOSITION;
typedef BOOL (CALLBACK* IMCENUMPROC)(HIMC, LPARAM);
#endif /* WINVER >= 0x040A */
// prototype of IMM API
HKL WINAPI ImmInstallIMEA(IN LPCSTR lpszIMEFileName, IN LPCSTR lpszLayoutText);
HKL WINAPI ImmInstallIMEW(IN LPCWSTR lpszIMEFileName, IN LPCWSTR lpszLayoutText);
#ifdef UNICODE
#define ImmInstallIME ImmInstallIMEW
#else
#define ImmInstallIME ImmInstallIMEA
#endif // !UNICODE
HWND WINAPI ImmGetDefaultIMEWnd(IN HWND);
UINT WINAPI ImmGetDescriptionA(IN HKL, OUT LPSTR, IN UINT uBufLen);
UINT WINAPI ImmGetDescriptionW(IN HKL, OUT LPWSTR, IN UINT uBufLen);
#ifdef UNICODE
#define ImmGetDescription ImmGetDescriptionW
#else
#define ImmGetDescription ImmGetDescriptionA
#endif // !UNICODE
UINT WINAPI ImmGetIMEFileNameA(IN HKL, OUT LPSTR, IN UINT uBufLen);
UINT WINAPI ImmGetIMEFileNameW(IN HKL, OUT LPWSTR, IN UINT uBufLen);
#ifdef UNICODE
#define ImmGetIMEFileName ImmGetIMEFileNameW
#else
#define ImmGetIMEFileName ImmGetIMEFileNameA
#endif // !UNICODE
DWORD WINAPI ImmGetProperty(IN HKL, IN DWORD);
BOOL WINAPI ImmIsIME(IN HKL);
BOOL WINAPI ImmSimulateHotKey(IN HWND, IN DWORD);
HIMC WINAPI ImmCreateContext(void);
BOOL WINAPI ImmDestroyContext(IN HIMC);
HIMC WINAPI ImmGetContext(IN HWND);
BOOL WINAPI ImmReleaseContext(IN HWND, IN HIMC);
HIMC WINAPI ImmAssociateContext(IN HWND, IN HIMC);
#if (WINVER >= 0x040A)
BOOL WINAPI ImmAssociateContextEx(IN HWND, IN HIMC, IN DWORD);
#endif /* WINVER >= 0x040A */
LONG WINAPI ImmGetCompositionStringA(IN HIMC, IN DWORD, OUT LPVOID, IN DWORD);
LONG WINAPI ImmGetCompositionStringW(IN HIMC, IN DWORD, OUT LPVOID, IN DWORD);
#ifdef UNICODE
#define ImmGetCompositionString ImmGetCompositionStringW
#else
#define ImmGetCompositionString ImmGetCompositionStringA
#endif // !UNICODE
BOOL WINAPI ImmSetCompositionStringA(IN HIMC, IN DWORD dwIndex, IN LPVOID lpComp, IN DWORD, IN LPVOID lpRead, IN DWORD);
BOOL WINAPI ImmSetCompositionStringW(IN HIMC, IN DWORD dwIndex, IN LPVOID lpComp, IN DWORD, IN LPVOID lpRead, IN DWORD);
#ifdef UNICODE
#define ImmSetCompositionString ImmSetCompositionStringW
#else
#define ImmSetCompositionString ImmSetCompositionStringA
#endif // !UNICODE
DWORD WINAPI ImmGetCandidateListCountA(IN HIMC, OUT LPDWORD lpdwListCount);
DWORD WINAPI ImmGetCandidateListCountW(IN HIMC, OUT LPDWORD lpdwListCount);
#ifdef UNICODE
#define ImmGetCandidateListCount ImmGetCandidateListCountW
#else
#define ImmGetCandidateListCount ImmGetCandidateListCountA
#endif // !UNICODE
DWORD WINAPI ImmGetCandidateListA(IN HIMC, IN DWORD deIndex, OUT LPCANDIDATELIST, IN DWORD dwBufLen);
DWORD WINAPI ImmGetCandidateListW(IN HIMC, IN DWORD deIndex, OUT LPCANDIDATELIST, IN DWORD dwBufLen);
#ifdef UNICODE
#define ImmGetCandidateList ImmGetCandidateListW
#else
#define ImmGetCandidateList ImmGetCandidateListA
#endif // !UNICODE
DWORD WINAPI ImmGetGuideLineA(IN HIMC, IN DWORD dwIndex, OUT LPSTR, IN DWORD dwBufLen);
DWORD WINAPI ImmGetGuideLineW(IN HIMC, IN DWORD dwIndex, OUT LPWSTR, IN DWORD dwBufLen);
#ifdef UNICODE
#define ImmGetGuideLine ImmGetGuideLineW
#else
#define ImmGetGuideLine ImmGetGuideLineA
#endif // !UNICODE
BOOL WINAPI ImmGetConversionStatus(IN HIMC, OUT LPDWORD, OUT LPDWORD);
BOOL WINAPI ImmSetConversionStatus(IN HIMC, IN DWORD, IN DWORD);
BOOL WINAPI ImmGetOpenStatus(IN HIMC);
BOOL WINAPI ImmSetOpenStatus(IN HIMC, IN BOOL);
#if defined(_WINGDI_) && !defined(NOGDI)
BOOL WINAPI ImmGetCompositionFontA(IN HIMC, OUT LPLOGFONTA);
BOOL WINAPI ImmGetCompositionFontW(IN HIMC, OUT LPLOGFONTW);
#ifdef UNICODE
#define ImmGetCompositionFont ImmGetCompositionFontW
#else
#define ImmGetCompositionFont ImmGetCompositionFontA
#endif // !UNICODE
BOOL WINAPI ImmSetCompositionFontA(IN HIMC, IN LPLOGFONTA);
BOOL WINAPI ImmSetCompositionFontW(IN HIMC, IN LPLOGFONTW);
#ifdef UNICODE
#define ImmSetCompositionFont ImmSetCompositionFontW
#else
#define ImmSetCompositionFont ImmSetCompositionFontA
#endif // !UNICODE
#endif // defined(_WINGDI_) && !defined(NOGDI)
BOOL WINAPI ImmConfigureIMEA(IN HKL, IN HWND, IN DWORD, IN LPVOID);
BOOL WINAPI ImmConfigureIMEW(IN HKL, IN HWND, IN DWORD, IN LPVOID);
#ifdef UNICODE
#define ImmConfigureIME ImmConfigureIMEW
#else
#define ImmConfigureIME ImmConfigureIMEA
#endif // !UNICODE
LRESULT WINAPI ImmEscapeA(IN HKL, IN HIMC, IN UINT, IN LPVOID);
LRESULT WINAPI ImmEscapeW(IN HKL, IN HIMC, IN UINT, IN LPVOID);
#ifdef UNICODE
#define ImmEscape ImmEscapeW
#else
#define ImmEscape ImmEscapeA
#endif // !UNICODE
DWORD WINAPI ImmGetConversionListA(IN HKL, IN HIMC, IN LPCSTR, OUT LPCANDIDATELIST, IN DWORD dwBufLen, IN UINT uFlag);
DWORD WINAPI ImmGetConversionListW(IN HKL, IN HIMC, IN LPCWSTR, OUT LPCANDIDATELIST, IN DWORD dwBufLen, IN UINT uFlag);
#ifdef UNICODE
#define ImmGetConversionList ImmGetConversionListW
#else
#define ImmGetConversionList ImmGetConversionListA
#endif // !UNICODE
BOOL WINAPI ImmNotifyIME(IN HIMC, IN DWORD dwAction, IN DWORD dwIndex, IN DWORD dwValue);
BOOL WINAPI ImmGetStatusWindowPos(IN HIMC, OUT LPPOINT);
BOOL WINAPI ImmSetStatusWindowPos(IN HIMC, IN LPPOINT);
BOOL WINAPI ImmGetCompositionWindow(IN HIMC, OUT LPCOMPOSITIONFORM);
BOOL WINAPI ImmSetCompositionWindow(IN HIMC, IN LPCOMPOSITIONFORM);
BOOL WINAPI ImmGetCandidateWindow(IN HIMC, IN DWORD, OUT LPCANDIDATEFORM);
BOOL WINAPI ImmSetCandidateWindow(IN HIMC, IN LPCANDIDATEFORM);
BOOL WINAPI ImmIsUIMessageA(IN HWND, IN UINT, IN WPARAM, IN LPARAM);
BOOL WINAPI ImmIsUIMessageW(IN HWND, IN UINT, IN WPARAM, IN LPARAM);
#ifdef UNICODE
#define ImmIsUIMessage ImmIsUIMessageW
#else
#define ImmIsUIMessage ImmIsUIMessageA
#endif // !UNICODE
UINT WINAPI ImmGetVirtualKey(IN HWND);
typedef int (CALLBACK *REGISTERWORDENUMPROCA)(LPCSTR, DWORD, LPCSTR, LPVOID);
typedef int (CALLBACK *REGISTERWORDENUMPROCW)(LPCWSTR, DWORD, LPCWSTR, LPVOID);
#ifdef UNICODE
#define REGISTERWORDENUMPROC REGISTERWORDENUMPROCW
#else
#define REGISTERWORDENUMPROC REGISTERWORDENUMPROCA
#endif // !UNICODE
BOOL WINAPI ImmRegisterWordA(IN HKL, IN LPCSTR lpszReading, IN DWORD, IN LPCSTR lpszRegister);
BOOL WINAPI ImmRegisterWordW(IN HKL, IN LPCWSTR lpszReading, IN DWORD, IN LPCWSTR lpszRegister);
#ifdef UNICODE
#define ImmRegisterWord ImmRegisterWordW
#else
#define ImmRegisterWord ImmRegisterWordA
#endif // !UNICODE
BOOL WINAPI ImmUnregisterWordA(IN HKL, IN LPCSTR lpszReading, IN DWORD, IN LPCSTR lpszUnregister);
BOOL WINAPI ImmUnregisterWordW(IN HKL, IN LPCWSTR lpszReading, IN DWORD, IN LPCWSTR lpszUnregister);
#ifdef UNICODE
#define ImmUnregisterWord ImmUnregisterWordW
#else
#define ImmUnregisterWord ImmUnregisterWordA
#endif // !UNICODE
UINT WINAPI ImmGetRegisterWordStyleA(IN HKL, IN UINT nItem, OUT LPSTYLEBUFA);
UINT WINAPI ImmGetRegisterWordStyleW(IN HKL, IN UINT nItem, OUT LPSTYLEBUFW);
#ifdef UNICODE
#define ImmGetRegisterWordStyle ImmGetRegisterWordStyleW
#else
#define ImmGetRegisterWordStyle ImmGetRegisterWordStyleA
#endif // !UNICODE
UINT WINAPI ImmEnumRegisterWordA(IN HKL, IN REGISTERWORDENUMPROCA, IN LPCSTR lpszReading, IN DWORD, IN LPCSTR lpszRegister, IN LPVOID);
UINT WINAPI ImmEnumRegisterWordW(IN HKL, IN REGISTERWORDENUMPROCW, IN LPCWSTR lpszReading, IN DWORD, IN LPCWSTR lpszRegister, IN LPVOID);
#ifdef UNICODE
#define ImmEnumRegisterWord ImmEnumRegisterWordW
#else
#define ImmEnumRegisterWord ImmEnumRegisterWordA
#endif // !UNICODE
#if (WINVER >= 0x040A)
BOOL WINAPI ImmDisableIME(IN DWORD);
BOOL WINAPI ImmEnumInputContext(DWORD idThread, IMCENUMPROC lpfn, LPARAM lParam);
DWORD WINAPI ImmGetImeMenuItemsA(IN HIMC, IN DWORD, IN DWORD, OUT LPIMEMENUITEMINFOA, OUT LPIMEMENUITEMINFOA, IN DWORD);
DWORD WINAPI ImmGetImeMenuItemsW(IN HIMC, IN DWORD, IN DWORD, OUT LPIMEMENUITEMINFOW, OUT LPIMEMENUITEMINFOW, IN DWORD);
#ifdef UNICODE
#define ImmGetImeMenuItems ImmGetImeMenuItemsW
#else
#define ImmGetImeMenuItems ImmGetImeMenuItemsA
#endif // !UNICODE
BOOL WINAPI ImmDisableTextFrameService(DWORD idThread);
#endif /* WINVER >= 0x040A */
// wParam for WM_IME_CONTROL
#define IMC_GETCANDIDATEPOS 0x0007
#define IMC_SETCANDIDATEPOS 0x0008
#define IMC_GETCOMPOSITIONFONT 0x0009
#define IMC_SETCOMPOSITIONFONT 0x000A
#define IMC_GETCOMPOSITIONWINDOW 0x000B
#define IMC_SETCOMPOSITIONWINDOW 0x000C
#define IMC_GETSTATUSWINDOWPOS 0x000F
#define IMC_SETSTATUSWINDOWPOS 0x0010
#define IMC_CLOSESTATUSWINDOW 0x0021
#define IMC_OPENSTATUSWINDOW 0x0022
// dwAction for ImmNotifyIME
#define NI_OPENCANDIDATE 0x0010
#define NI_CLOSECANDIDATE 0x0011
#define NI_SELECTCANDIDATESTR 0x0012
#define NI_CHANGECANDIDATELIST 0x0013
#define NI_FINALIZECONVERSIONRESULT 0x0014
#define NI_COMPOSITIONSTR 0x0015
#define NI_SETCANDIDATE_PAGESTART 0x0016
#define NI_SETCANDIDATE_PAGESIZE 0x0017
#define NI_IMEMENUSELECTED 0x0018
// lParam for WM_IME_SETCONTEXT
#define ISC_SHOWUICANDIDATEWINDOW 0x00000001
#define ISC_SHOWUICOMPOSITIONWINDOW 0x80000000
#define ISC_SHOWUIGUIDELINE 0x40000000
#define ISC_SHOWUIALLCANDIDATEWINDOW 0x0000000F
#define ISC_SHOWUIALL 0xC000000F
// dwIndex for ImmNotifyIME/NI_COMPOSITIONSTR
#define CPS_COMPLETE 0x0001
#define CPS_CONVERT 0x0002
#define CPS_REVERT 0x0003
#define CPS_CANCEL 0x0004
// the modifiers of hot key
#define MOD_ALT 0x0001
#define MOD_CONTROL 0x0002
#define MOD_SHIFT 0x0004
#define MOD_LEFT 0x8000
#define MOD_RIGHT 0x4000
#define MOD_ON_KEYUP 0x0800
#define MOD_IGNORE_ALL_MODIFIER 0x0400
// Windows for Simplified Chinese Edition hot key ID from 0x10 - 0x2F
#define IME_CHOTKEY_IME_NONIME_TOGGLE 0x10
#define IME_CHOTKEY_SHAPE_TOGGLE 0x11
#define IME_CHOTKEY_SYMBOL_TOGGLE 0x12
// Windows for Japanese Edition hot key ID from 0x30 - 0x4F
#define IME_JHOTKEY_CLOSE_OPEN 0x30
// Windows for Korean Edition hot key ID from 0x50 - 0x6F
#define IME_KHOTKEY_SHAPE_TOGGLE 0x50
#define IME_KHOTKEY_HANJACONVERT 0x51
#define IME_KHOTKEY_ENGLISH 0x52
// Windows for Traditional Chinese Edition hot key ID from 0x70 - 0x8F
#define IME_THOTKEY_IME_NONIME_TOGGLE 0x70
#define IME_THOTKEY_SHAPE_TOGGLE 0x71
#define IME_THOTKEY_SYMBOL_TOGGLE 0x72
// direct switch hot key ID from 0x100 - 0x11F
#define IME_HOTKEY_DSWITCH_FIRST 0x100
#define IME_HOTKEY_DSWITCH_LAST 0x11F
// IME private hot key from 0x200 - 0x21F
#define IME_HOTKEY_PRIVATE_FIRST 0x200
#define IME_ITHOTKEY_RESEND_RESULTSTR 0x200
#define IME_ITHOTKEY_PREVIOUS_COMPOSITION 0x201
#define IME_ITHOTKEY_UISTYLE_TOGGLE 0x202
#define IME_ITHOTKEY_RECONVERTSTRING 0x203
#define IME_HOTKEY_PRIVATE_LAST 0x21F
// parameter of ImmGetCompositionString
#define GCS_COMPREADSTR 0x0001
#define GCS_COMPREADATTR 0x0002
#define GCS_COMPREADCLAUSE 0x0004
#define GCS_COMPSTR 0x0008
#define GCS_COMPATTR 0x0010
#define GCS_COMPCLAUSE 0x0020
#define GCS_CURSORPOS 0x0080
#define GCS_DELTASTART 0x0100
#define GCS_RESULTREADSTR 0x0200
#define GCS_RESULTREADCLAUSE 0x0400
#define GCS_RESULTSTR 0x0800
#define GCS_RESULTCLAUSE 0x1000
// style bit flags for WM_IME_COMPOSITION
#define CS_INSERTCHAR 0x2000
#define CS_NOMOVECARET 0x4000
// IME version constants
#define IMEVER_0310 0x0003000A
#define IMEVER_0400 0x00040000
// IME property bits
#define IME_PROP_AT_CARET 0x00010000
#define IME_PROP_SPECIAL_UI 0x00020000
#define IME_PROP_CANDLIST_START_FROM_1 0x00040000
#define IME_PROP_UNICODE 0x00080000
#define IME_PROP_COMPLETE_ON_UNSELECT 0x00100000
// IME UICapability bits
#define UI_CAP_2700 0x00000001
#define UI_CAP_ROT90 0x00000002
#define UI_CAP_ROTANY 0x00000004
// ImmSetCompositionString Capability bits
#define SCS_CAP_COMPSTR 0x00000001
#define SCS_CAP_MAKEREAD 0x00000002
#define SCS_CAP_SETRECONVERTSTRING 0x00000004
// IME WM_IME_SELECT inheritance Capability bits
#define SELECT_CAP_CONVERSION 0x00000001
#define SELECT_CAP_SENTENCE 0x00000002
// ID for deIndex of ImmGetGuideLine
#define GGL_LEVEL 0x00000001
#define GGL_INDEX 0x00000002
#define GGL_STRING 0x00000003
#define GGL_PRIVATE 0x00000004
// ID for dwLevel of GUIDELINE Structure
#define GL_LEVEL_NOGUIDELINE 0x00000000
#define GL_LEVEL_FATAL 0x00000001
#define GL_LEVEL_ERROR 0x00000002
#define GL_LEVEL_WARNING 0x00000003
#define GL_LEVEL_INFORMATION 0x00000004
// ID for dwIndex of GUIDELINE Structure
#define GL_ID_UNKNOWN 0x00000000
#define GL_ID_NOMODULE 0x00000001
#define GL_ID_NODICTIONARY 0x00000010
#define GL_ID_CANNOTSAVE 0x00000011
#define GL_ID_NOCONVERT 0x00000020
#define GL_ID_TYPINGERROR 0x00000021
#define GL_ID_TOOMANYSTROKE 0x00000022
#define GL_ID_READINGCONFLICT 0x00000023
#define GL_ID_INPUTREADING 0x00000024
#define GL_ID_INPUTRADICAL 0x00000025
#define GL_ID_INPUTCODE 0x00000026
#define GL_ID_INPUTSYMBOL 0x00000027
#define GL_ID_CHOOSECANDIDATE 0x00000028
#define GL_ID_REVERSECONVERSION 0x00000029
#define GL_ID_PRIVATE_FIRST 0x00008000
#define GL_ID_PRIVATE_LAST 0x0000FFFF
// ID for dwIndex of ImmGetProperty
#define IGP_GETIMEVERSION (DWORD)(-4)
#define IGP_PROPERTY 0x00000004
#define IGP_CONVERSION 0x00000008
#define IGP_SENTENCE 0x0000000c
#define IGP_UI 0x00000010
#define IGP_SETCOMPSTR 0x00000014
#define IGP_SELECT 0x00000018
// dwIndex for ImmSetCompositionString API
#define SCS_SETSTR (GCS_COMPREADSTR|GCS_COMPSTR)
#define SCS_CHANGEATTR (GCS_COMPREADATTR|GCS_COMPATTR)
#define SCS_CHANGECLAUSE (GCS_COMPREADCLAUSE|GCS_COMPCLAUSE)
#define SCS_SETRECONVERTSTRING 0x00010000
#define SCS_QUERYRECONVERTSTRING 0x00020000
// attribute for COMPOSITIONSTRING Structure
#define ATTR_INPUT 0x00
#define ATTR_TARGET_CONVERTED 0x01
#define ATTR_CONVERTED 0x02
#define ATTR_TARGET_NOTCONVERTED 0x03
#define ATTR_INPUT_ERROR 0x04
#define ATTR_FIXEDCONVERTED 0x05
// bit field for IMC_SETCOMPOSITIONWINDOW, IMC_SETCANDIDATEWINDOW
#define CFS_DEFAULT 0x0000
#define CFS_RECT 0x0001
#define CFS_POINT 0x0002
#define CFS_FORCE_POSITION 0x0020
#define CFS_CANDIDATEPOS 0x0040
#define CFS_EXCLUDE 0x0080
// conversion direction for ImmGetConversionList
#define GCL_CONVERSION 0x0001
#define GCL_REVERSECONVERSION 0x0002
#define GCL_REVERSE_LENGTH 0x0003
// bit field for conversion mode
#define IME_CMODE_ALPHANUMERIC 0x0000
#define IME_CMODE_NATIVE 0x0001
#define IME_CMODE_CHINESE IME_CMODE_NATIVE
// IME_CMODE_HANGEUL is old name of IME_CMODE_HANGUL. It will be gone eventually.
#define IME_CMODE_HANGEUL IME_CMODE_NATIVE
#define IME_CMODE_HANGUL IME_CMODE_NATIVE
#define IME_CMODE_JAPANESE IME_CMODE_NATIVE
#define IME_CMODE_KATAKANA 0x0002 // only effect under IME_CMODE_NATIVE
#define IME_CMODE_LANGUAGE 0x0003
#define IME_CMODE_FULLSHAPE 0x0008
#define IME_CMODE_ROMAN 0x0010
#define IME_CMODE_CHARCODE 0x0020
#define IME_CMODE_HANJACONVERT 0x0040
#define IME_CMODE_SOFTKBD 0x0080
#define IME_CMODE_NOCONVERSION 0x0100
#define IME_CMODE_EUDC 0x0200
#define IME_CMODE_SYMBOL 0x0400
#define IME_CMODE_FIXED 0x0800
#define IME_CMODE_RESERVED 0xF0000000
// bit field for sentence mode
#define IME_SMODE_NONE 0x0000
#define IME_SMODE_PLAURALCLAUSE 0x0001
#define IME_SMODE_SINGLECONVERT 0x0002
#define IME_SMODE_AUTOMATIC 0x0004
#define IME_SMODE_PHRASEPREDICT 0x0008
#define IME_SMODE_CONVERSATION 0x0010
#define IME_SMODE_RESERVED 0x0000F000
// style of candidate
#define IME_CAND_UNKNOWN 0x0000
#define IME_CAND_READ 0x0001
#define IME_CAND_CODE 0x0002
#define IME_CAND_MEANING 0x0003
#define IME_CAND_RADICAL 0x0004
#define IME_CAND_STROKE 0x0005
// wParam of report message WM_IME_NOTIFY
#define IMN_CLOSESTATUSWINDOW 0x0001
#define IMN_OPENSTATUSWINDOW 0x0002
#define IMN_CHANGECANDIDATE 0x0003
#define IMN_CLOSECANDIDATE 0x0004
#define IMN_OPENCANDIDATE 0x0005
#define IMN_SETCONVERSIONMODE 0x0006
#define IMN_SETSENTENCEMODE 0x0007
#define IMN_SETOPENSTATUS 0x0008
#define IMN_SETCANDIDATEPOS 0x0009
#define IMN_SETCOMPOSITIONFONT 0x000A
#define IMN_SETCOMPOSITIONWINDOW 0x000B
#define IMN_SETSTATUSWINDOWPOS 0x000C
#define IMN_GUIDELINE 0x000D
#define IMN_PRIVATE 0x000E
#if (WINVER >= 0x040A)
// wParam of report message WM_IME_REQUEST
#define IMR_COMPOSITIONWINDOW 0x0001
#define IMR_CANDIDATEWINDOW 0x0002
#define IMR_COMPOSITIONFONT 0x0003
#define IMR_RECONVERTSTRING 0x0004
#define IMR_CONFIRMRECONVERTSTRING 0x0005
#define IMR_QUERYCHARPOSITION 0x0006
#define IMR_DOCUMENTFEED 0x0007
#endif /* WINVER >= 0x040A */
// error code of ImmGetCompositionString
#define IMM_ERROR_NODATA (-1)
#define IMM_ERROR_GENERAL (-2)
// dialog mode of ImmConfigureIME
#define IME_CONFIG_GENERAL 1
#define IME_CONFIG_REGISTERWORD 2
#define IME_CONFIG_SELECTDICTIONARY 3
// flags for ImmEscape
#define IME_ESC_QUERY_SUPPORT 0x0003
#define IME_ESC_RESERVED_FIRST 0x0004
#define IME_ESC_RESERVED_LAST 0x07FF
#define IME_ESC_PRIVATE_FIRST 0x0800
#define IME_ESC_PRIVATE_LAST 0x0FFF
#define IME_ESC_SEQUENCE_TO_INTERNAL 0x1001
#define IME_ESC_GET_EUDC_DICTIONARY 0x1003
#define IME_ESC_SET_EUDC_DICTIONARY 0x1004
#define IME_ESC_MAX_KEY 0x1005
#define IME_ESC_IME_NAME 0x1006
#define IME_ESC_SYNC_HOTKEY 0x1007
#define IME_ESC_HANJA_MODE 0x1008
#define IME_ESC_AUTOMATA 0x1009
#define IME_ESC_PRIVATE_HOTKEY 0x100a
#define IME_ESC_GETHELPFILENAME 0x100b
// style of word registration
#define IME_REGWORD_STYLE_EUDC 0x00000001
#define IME_REGWORD_STYLE_USER_FIRST 0x80000000
#define IME_REGWORD_STYLE_USER_LAST 0xFFFFFFFF
#if (WINVER >= 0x040A)
// dwFlags for ImmAssociateContextEx
#define IACE_CHILDREN 0x0001
#define IACE_DEFAULT 0x0010
#define IACE_IGNORENOCONTEXT 0x0020
// dwFlags for ImmGetImeMenuItems
#define IGIMIF_RIGHTMENU 0x0001
// dwType for ImmGetImeMenuItems
#define IGIMII_CMODE 0x0001
#define IGIMII_SMODE 0x0002
#define IGIMII_CONFIGURE 0x0004
#define IGIMII_TOOLS 0x0008
#define IGIMII_HELP 0x0010
#define IGIMII_OTHER 0x0020
#define IGIMII_INPUTTOOLS 0x0040
// fType of IMEMENUITEMINFO structure
#define IMFT_RADIOCHECK 0x00001
#define IMFT_SEPARATOR 0x00002
#define IMFT_SUBMENU 0x00004
// fState of IMEMENUITEMINFO structure
#define IMFS_GRAYED MFS_GRAYED
#define IMFS_DISABLED MFS_DISABLED
#define IMFS_CHECKED MFS_CHECKED
#define IMFS_HILITE MFS_HILITE
#define IMFS_ENABLED MFS_ENABLED
#define IMFS_UNCHECKED MFS_UNCHECKED
#define IMFS_UNHILITE MFS_UNHILITE
#define IMFS_DEFAULT MFS_DEFAULT
#endif /* WINVER >= 0x040A */
// type of soft keyboard
// for Windows Tranditional Chinese Edition
#define SOFTKEYBOARD_TYPE_T1 0x0001
// for Windows Simplified Chinese Edition
#define SOFTKEYBOARD_TYPE_C1 0x0002
#endif // _IMM_SDK_DEFINED_
#ifdef __cplusplus
}
#endif
#endif // _IMM_

View File

@ -0,0 +1,142 @@
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
lzdos.h
Abstract:
Public interface to LZEXP?.LIB.
Author:
Revision History:
--*/
#ifndef _LZEXPAND_
#define _LZEXPAND_
#ifdef __cplusplus
extern "C" {
#endif
/*
** Error Return Codes
*/
#define LZERROR_BADINHANDLE (-1) /* invalid input handle */
#define LZERROR_BADOUTHANDLE (-2) /* invalid output handle */
#define LZERROR_READ (-3) /* corrupt compressed file format */
#define LZERROR_WRITE (-4) /* out of space for output file */
#define LZERROR_GLOBALLOC (-5) /* insufficient memory for LZFile struct */
#define LZERROR_GLOBLOCK (-6) /* bad global handle */
#define LZERROR_BADVALUE (-7) /* input parameter out of acceptable range*/
#define LZERROR_UNKNOWNALG (-8) /* compression algorithm not recognized */
/*
** Prototypes
*/
INT
APIENTRY
LZStart(
VOID
);
VOID
APIENTRY
LZDone(
VOID
);
LONG
APIENTRY
CopyLZFile(
INT,
INT
);
LONG
APIENTRY
LZCopy(
INT,
INT
);
INT
APIENTRY
LZInit(
INT
);
INT
APIENTRY
GetExpandedNameA(
LPSTR,
LPSTR
);
INT
APIENTRY
GetExpandedNameW(
LPWSTR,
LPWSTR
);
#ifdef UNICODE
#define GetExpandedName GetExpandedNameW
#else
#define GetExpandedName GetExpandedNameA
#endif // !UNICODE
INT
APIENTRY
LZOpenFileA(
LPSTR,
LPOFSTRUCT,
WORD
);
INT
APIENTRY
LZOpenFileW(
LPWSTR,
LPOFSTRUCT,
WORD
);
#ifdef UNICODE
#define LZOpenFile LZOpenFileW
#else
#define LZOpenFile LZOpenFileA
#endif // !UNICODE
LONG
APIENTRY
LZSeek(
INT,
LONG,
INT
);
INT
APIENTRY
LZRead(
INT,
LPSTR,
INT
);
VOID
APIENTRY
LZClose(
INT
);
#ifdef __cplusplus
}
#endif
#endif // _LZEXPAND_

3289
lib/MSPlatformSDK/Include/MMReg.h Executable file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1940
lib/MSPlatformSDK/Include/MSAcm.h Executable file

File diff suppressed because it is too large Load Diff

722
lib/MSPlatformSDK/Include/Mcx.h Executable file
View File

@ -0,0 +1,722 @@
/************************************************************************
* *
* mcx.h -- This module defines the 32-Bit Windows MCX APIs *
* *
* Copyright (c) 1990-1999, Microsoft Corp. All rights reserved. *
* *
************************************************************************/
#ifndef _MCX_H_
#define _MCX_H_
#if _MSC_VER > 1000
#pragma once
#endif
typedef struct _MODEMDEVCAPS {
DWORD dwActualSize;
DWORD dwRequiredSize;
DWORD dwDevSpecificOffset;
DWORD dwDevSpecificSize;
// product and version identification
DWORD dwModemProviderVersion;
DWORD dwModemManufacturerOffset;
DWORD dwModemManufacturerSize;
DWORD dwModemModelOffset;
DWORD dwModemModelSize;
DWORD dwModemVersionOffset;
DWORD dwModemVersionSize;
// local option capabilities
DWORD dwDialOptions; // bitmap of supported values
DWORD dwCallSetupFailTimer; // maximum in seconds
DWORD dwInactivityTimeout; // maximum in seconds
DWORD dwSpeakerVolume; // bitmap of supported values
DWORD dwSpeakerMode; // bitmap of supported values
DWORD dwModemOptions; // bitmap of supported values
DWORD dwMaxDTERate; // maximum value in bit/s
DWORD dwMaxDCERate; // maximum value in bit/s
// Variable portion for proprietary expansion
BYTE abVariablePortion [1];
} MODEMDEVCAPS, *PMODEMDEVCAPS, *LPMODEMDEVCAPS;
typedef struct _MODEMSETTINGS {
DWORD dwActualSize;
DWORD dwRequiredSize;
DWORD dwDevSpecificOffset;
DWORD dwDevSpecificSize;
// static local options (read/write)
DWORD dwCallSetupFailTimer; // seconds
DWORD dwInactivityTimeout; // seconds
DWORD dwSpeakerVolume; // level
DWORD dwSpeakerMode; // mode
DWORD dwPreferredModemOptions; // bitmap
// negotiated options (read only) for current or last call
DWORD dwNegotiatedModemOptions; // bitmap
DWORD dwNegotiatedDCERate; // bit/s
// Variable portion for proprietary expansion
BYTE abVariablePortion [1];
} MODEMSETTINGS, *PMODEMSETTINGS, *LPMODEMSETTINGS;
// Dial Options
#define DIALOPTION_BILLING 0x00000040 // Supports wait for bong "$"
#define DIALOPTION_QUIET 0x00000080 // Supports wait for quiet "@"
#define DIALOPTION_DIALTONE 0x00000100 // Supports wait for dial tone "W"
// SpeakerVolume for MODEMDEVCAPS
#define MDMVOLFLAG_LOW 0x00000001
#define MDMVOLFLAG_MEDIUM 0x00000002
#define MDMVOLFLAG_HIGH 0x00000004
// SpeakerVolume for MODEMSETTINGS
#define MDMVOL_LOW 0x00000000
#define MDMVOL_MEDIUM 0x00000001
#define MDMVOL_HIGH 0x00000002
// SpeakerMode for MODEMDEVCAPS
#define MDMSPKRFLAG_OFF 0x00000001
#define MDMSPKRFLAG_DIAL 0x00000002
#define MDMSPKRFLAG_ON 0x00000004
#define MDMSPKRFLAG_CALLSETUP 0x00000008
// SpeakerMode for MODEMSETTINGS
#define MDMSPKR_OFF 0x00000000
#define MDMSPKR_DIAL 0x00000001
#define MDMSPKR_ON 0x00000002
#define MDMSPKR_CALLSETUP 0x00000003
// Modem Options
#define MDM_COMPRESSION 0x00000001
#define MDM_ERROR_CONTROL 0x00000002
#define MDM_FORCED_EC 0x00000004
#define MDM_CELLULAR 0x00000008
#define MDM_FLOWCONTROL_HARD 0x00000010
#define MDM_FLOWCONTROL_SOFT 0x00000020
#define MDM_CCITT_OVERRIDE 0x00000040
#define MDM_SPEED_ADJUST 0x00000080
#define MDM_TONE_DIAL 0x00000100
#define MDM_BLIND_DIAL 0x00000200
#define MDM_V23_OVERRIDE 0x00000400
#define MDM_DIAGNOSTICS 0x00000800
//=========================================================================
//
//
// EXTENDED MODEM OPTIONS INFORMATION
//
// THE following macros define additional bits in dwPreferredModemOptions.
//
// These bits specify information relevant to making ISDN and GSM
// calls, such as which protocol to use.
//
//=========================================================================
#define MDM_MASK_BEARERMODE 0x0000f000
#define MDM_SHIFT_BEARERMODE 12
#define MDM_MASK_PROTOCOLID 0x000f0000
#define MDM_SHIFT_PROTOCOLID 16
#define MDM_MASK_PROTOCOLDATA 0x0ff00000
#define MDM_SHIFT_PROTOCOLDATA 20
//
// PROTOCOLINFO is the union of PROTOCOLID and PROTOCOLDATA ...
//
#define MDM_MASK_PROTOCOLINFO (MDM_MASK_PROTOCOLID|MDM_MASK_PROTOCOLDATA)
#define MDM_SHIFT_PROTOCOLINFO MDM_SHIFT_PROTOCOLID
//
// EXTENDEDINFO is the union of BEARERMODE and PROTOCOLINFO
//
#define MDM_MASK_EXTENDEDINFO (MDM_MASK_BEARERMODE|MDM_MASK_PROTOCOLINFO)
#define MDM_SHIFT_EXTENDEDINFO MDM_SHIFT_BEARERMODE
#define MDM_GET_BEARERMODE(_dwOptions) \
(((_dwOptions)&MDM_MASK_BEARERMODE) >> MDM_SHIFT_BEARERMODE)
#define MDM_SET_BEARERMODE(_dwOptions,_bm) \
(((_dwOptions) &= ~MDM_MASK_BEARERMODE), \
((_dwOptions) |= (((_bm)<<MDM_SHIFT_BEARERMODE)&MDM_MASK_BEARERMODE)))
#define MDM_GET_PROTOCOLID(_dwOptions) \
(((_dwOptions)&MDM_MASK_PROTOCOLID) >> MDM_SHIFT_PROTOCOLID)
#define MDM_SET_PROTOCOLID(_dwOptions,_prot) \
(((_dwOptions) &= ~MDM_MASK_PROTOCOLID), \
((_dwOptions) |= (((_prot)<<MDM_SHIFT_PROTOCOLID)&MDM_MASK_PROTOCOLID)))
#define MDM_GET_PROTOCOLDATA(_dwOptions) \
(((_dwOptions)&MDM_MASK_PROTOCOLDATA) >> MDM_SHIFT_PROTOCOLDATA)
#define MDM_SET_PROTOCOLDATA(_dwOptions,_pd) \
(((_dwOptions) &= ~MDM_MASK_PROTOCOLDATA), \
((_dwOptions) |= (((_pd)<<MDM_SHIFT_PROTOCOLDATA)&MDM_MASK_PROTOCOLDATA)))
//
// MDM_GET_PROTOCOLINFO gets the protocol-id and info bits in
// their IN-PLACE form (preserving their place in dwModemPreferredOptions)
//
#define MDM_GET_PROTOCOLINFO(_dwOptions) \
((_dwOptions)&MDM_MASK_PROTOCOLINFO)
//
// MDM_SET_PROTOCOLINFO takes as its argument the protocol-id and info bits in
// their IN-PLACE form (final position within dwModemPreferredOptions)
//
#define MDM_SET_PROTOCOLINFO(_dwOptions,_pinfo) \
(((_dwOptions) &= ~MDM_MASK_PROTOCOLINFO), \
((_dwOptions) |= ((_pinfo)&MDM_MASK_PROTOCOLINFO)))
//
// MDM_GEN_PROTOCOLINFO generates the the protocol-id and info bits in
// their IN-PLACE form (final position within dwModemPreferredOptions).
//
#define MDM_GEN_PROTOCOLINFO(_pid, _pdata) \
((((_pid )<<MDM_SHIFT_PROTOCOLID )&MDM_MASK_PROTOCOLID ) \
|(((_pdata)<<MDM_SHIFT_PROTOCOLDATA)&MDM_MASK_PROTOCOLDATA))
//
// MDM_GET_EXTENDEDIONFO gets the bearermode and protocol information in
// their IN-PLACE form (preserving their place in dwModemPreferredOptions)
//
#define MDM_GET_EXTENDEDINFO(_dwOptions) \
((_dwOptions)&MDM_MASK_EXTENDEDINFO)
//
// MDM_SET_PROTOCOLINFO takes as its argument the bearermode and
// protocol bits in their IN-PLACE form (final position within
// dwModemPreferredOptions)
//
#define MDM_SET_EXTENDEDINFO(_dwOptions,_extinfo) \
(((_dwOptions) &= ~MDM_MASK_EXTENDEDINFO), \
((_dwOptions) |= ((_extinfo) & MDM_MASK_EXTENDEDINFO)))
//
// MDM_GEN_EXTENDEDINFO generates the bearermode and protocol information
// in their IN-PLACE form (final position within dwModemPreferredOptions0.
//
#define MDM_GEN_EXTENDEDINFO(_bearermode, _pinfo) \
(((_pinfo)&MDM_MASK_PROTOCOLINFO ) \
|(((_bearermode)<<MDM_SHIFT_BEARERMODE)&MDM_MASK_BEARERMODE))
//=========================================================================
// BEARER MODES
//=========================================================================
//
#define MDM_BEARERMODE_ANALOG 0x0
#define MDM_BEARERMODE_ISDN 0x1
#define MDM_BEARERMODE_GSM 0x2
//=========================================================================
// PROTOCOL IDs
//=========================================================================
//
#define MDM_PROTOCOLID_DEFAULT 0x0
#define MDM_PROTOCOLID_HDLCPPP 0x1
#define MDM_PROTOCOLID_V128 0x2
#define MDM_PROTOCOLID_X75 0x3
#define MDM_PROTOCOLID_V110 0x4
#define MDM_PROTOCOLID_V120 0x5
#define MDM_PROTOCOLID_AUTO 0x6 // Auto protocol detection.
#define MDM_PROTOCOLID_ANALOG 0x7 // Applicable only to GSM
#define MDM_PROTOCOLID_GPRS 0x8
#define MDM_PROTOCOLID_PIAFS 0x9
//=========================================================================
// HDLC PPP PROTOCOL INFORMATION
//=========================================================================
//
// Following are specific to the HDLC-PPP protocol.
// The shifts are w.r.t. the start of the PROTOCOLDATA field.
#define MDM_SHIFT_HDLCPPP_SPEED 0x0
#define MDM_MASK_HDLCPPP_SPEED 0x7 // 3 bits
#define MDM_HDLCPPP_SPEED_DEFAULT 0x0
#define MDM_HDLCPPP_SPEED_64K 0x1
#define MDM_HDLCPPP_SPEED_56K 0x2
#define MDM_SHIFT_HDLCPPP_AUTH 0x3
#define MDM_MASK_HDLCPPP_AUTH (0x7<<3) // 3 bits
#define MDM_HDLCPPP_AUTH_DEFAULT 0x0
#define MDM_HDLCPPP_AUTH_NONE 0x1
#define MDM_HDLCPPP_AUTH_PAP 0x2
#define MDM_HDLCPPP_AUTH_CHAP 0x3
#define MDM_HDLCPPP_AUTH_MSCHAP 0x4
#define MDM_SHIFT_HDLCPPP_ML 0x6
#define MDM_MASK_HDLCPPP_ML (0x3<<6) // 2 bits
#define MDM_HDLCPPP_ML_DEFAULT 0x0
#define MDM_HDLCPPP_ML_NONE 0x1
#define MDM_HDLCPPP_ML_2 0x2
#define MDM_GEN_HDLCPPP_PROTOCOL_DATA(_speed, _auth, _ml) \
((((_speed)<<MDM_SHIFT_HDLCPPP_SPEED)&MDM_MASK_HDLCPPP_SPEED) \
|(((_auth )<<MDM_SHIFT_HDLCPPP_AUTH )&MDM_MASK_HDLCPPP_AUTH ) \
|(((_ml )<<MDM_SHIFT_HDLCPPP_ML )&MDM_MASK_HDLCPPP_ML ))
#define MDM_PROTOCOL_HDLCPPP_64K \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_HDLCPPP, \
MDM_GEN_HDLCPPP_PROTOCOL_DATA ( \
MDM_HDLCPPP_SPEED_64K, \
MDM_HDLCPPP_AUTH_DEFAULT, \
MDM_HDLCPPP_ML_DEFAULT \
) \
)
#define MDM_PROTOCOL_HDLCPPP_56K \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_HDLCPPP, \
MDM_GEN_HDLCPPP_PROTOCOL_DATA ( \
MDM_HDLCPPP_SPEED_56K, \
MDM_HDLCPPP_AUTH_DEFAULT, \
MDM_HDLCPPP_ML_DEFAULT \
) \
)
#define MDM_PROTOCOL_HDLCPPP_112K \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_HDLCPPP, \
MDM_GEN_HDLCPPP_PROTOCOL_DATA ( \
MDM_HDLCPPP_SPEED_56K, \
MDM_HDLCPPP_AUTH_DEFAULT, \
MDM_HDLCPPP_ML_2 \
) \
)
#define MDM_PROTOCOL_HDLCPPP_112K_PAP \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_HDLCPPP, \
MDM_GEN_HDLCPPP_PROTOCOL_DATA ( \
MDM_HDLCPPP_SPEED_56K, \
MDM_HDLCPPP_AUTH_PAP, \
MDM_HDLCPPP_ML_2 \
) \
)
#define MDM_PROTOCOL_HDLCPPP_112K_CHAP \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_HDLCPPP, \
MDM_GEN_HDLCPPP_PROTOCOL_DATA ( \
MDM_HDLCPPP_SPEED_56K, \
MDM_HDLCPPP_AUTH_CHAP, \
MDM_HDLCPPP_ML_2 \
) \
)
#define MDM_PROTOCOL_HDLCPPP_112K_MSCHAP\
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_HDLCPPP, \
MDM_GEN_HDLCPPP_PROTOCOL_DATA ( \
MDM_HDLCPPP_SPEED_56K, \
MDM_HDLCPPP_AUTH_MSCHAP, \
MDM_HDLCPPP_ML_2 \
) \
)
#define MDM_PROTOCOL_HDLCPPP_128K \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_HDLCPPP, \
MDM_GEN_HDLCPPP_PROTOCOL_DATA ( \
MDM_HDLCPPP_SPEED_64K, \
MDM_HDLCPPP_AUTH_DEFAULT, \
MDM_HDLCPPP_ML_2 \
) \
)
#define MDM_PROTOCOL_HDLCPPP_128K_PAP \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_HDLCPPP, \
MDM_GEN_HDLCPPP_PROTOCOL_DATA ( \
MDM_HDLCPPP_SPEED_64K, \
MDM_HDLCPPP_AUTH_PAP, \
MDM_HDLCPPP_ML_2 \
) \
)
#define MDM_PROTOCOL_HDLCPPP_128K_CHAP \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_HDLCPPP, \
MDM_GEN_HDLCPPP_PROTOCOL_DATA ( \
MDM_HDLCPPP_SPEED_64K, \
MDM_HDLCPPP_AUTH_CHAP, \
MDM_HDLCPPP_ML_2 \
) \
)
#define MDM_PROTOCOL_HDLCPPP_128K_MSCHAP\
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_HDLCPPP, \
MDM_GEN_HDLCPPP_PROTOCOL_DATA ( \
MDM_HDLCPPP_SPEED_64K, \
MDM_HDLCPPP_AUTH_MSCHAP, \
MDM_HDLCPPP_ML_2 \
) \
)
//=========================================================================
// V120 PROTOCOL INFORMATION
//
// The shifts are w.r.t. the start of the PROTOCOLDATA field.
//
//=========================================================================
#define MDM_SHIFT_V120_SPEED 0x0
#define MDM_MASK_V120_SPEED 0x7 // 3 bits
#define MDM_V120_SPEED_DEFAULT 0x0
#define MDM_V120_SPEED_64K 0x1
#define MDM_V120_SPEED_56K 0x2
#define MDM_SHIFT_V120_ML 0x6
#define MDM_MASK_V120_ML (0x3<<6) // 2 bits
#define MDM_V120_ML_DEFAULT 0x0
#define MDM_V120_ML_NONE 0x1
#define MDM_V120_ML_2 0x2
#define MDM_GEN_V120_PROTOCOL_DATA(_speed, _ml) \
((((_speed)<<MDM_SHIFT_V120_SPEED)&MDM_MASK_V120_SPEED) \
|(((_ml )<<MDM_SHIFT_V120_ML )&MDM_MASK_V120_ML ))
#define MDM_PROTOCOL_V120_64K \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_V120, \
MDM_GEN_V120_PROTOCOL_DATA (\
MDM_V120_SPEED_64K, \
MDM_V120_ML_NONE \
) \
)
#define MDM_PROTOCOL_V120_56K \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_V120, \
MDM_GEN_V120_PROTOCOL_DATA (\
MDM_V120_SPEED_56K, \
MDM_V120_ML_NONE \
) \
)
#define MDM_PROTOCOL_V120_112K \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_V120, \
MDM_GEN_V120_PROTOCOL_DATA (\
MDM_V120_SPEED_56K, \
MDM_V120_ML_2 \
) \
)
#define MDM_PROTOCOL_V120_128K \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_V120, \
MDM_GEN_V120_PROTOCOL_DATA (\
MDM_V120_SPEED_64K, \
MDM_V120_ML_2 \
) \
)
//=========================================================================
// X75 PROTOCOL INFORMATION
//
// The shifts are w.r.t. the start of the PROTOCOLDATA field.
//
//=========================================================================
#define MDM_SHIFT_X75_DATA 0x0
#define MDM_MASK_X75_DATA 0x7 // 3 bits
#define MDM_X75_DATA_DEFAULT 0x0
#define MDM_X75_DATA_64K 0x1
#define MDM_X75_DATA_128K 0x2
#define MDM_X75_DATA_T_70 0x3
#define MDM_X75_DATA_BTX 0x4
#define MDM_GEN_X75_PROTOCOL_DATA(_data) \
(((_data)<<MDM_SHIFT_X75_DATA)&MDM_MASK_X75_DATA)
#define MDM_PROTOCOL_X75_64K \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_X75, \
MDM_GEN_X75_PROTOCOL_DATA ( \
MDM_X75_DATA_64K \
) \
)
#define MDM_PROTOCOL_X75_128K \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_X75, \
MDM_GEN_X75_PROTOCOL_DATA ( \
MDM_X75_DATA_128K \
) \
)
#define MDM_PROTOCOL_X75_T_70 \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_X75, \
MDM_GEN_X75_PROTOCOL_DATA ( \
MDM_X75_DATA_T_70 \
) \
) \
#define MDM_PROTOCOL_X75_BTX \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_X75, \
MDM_GEN_X75_PROTOCOL_DATA ( \
MDM_X75_DATA_BTX \
) \
)
//=========================================================================
// V110 PROTOCOL INFORMATION
//
// The shifts are w.r.t. the start of the PROTOCOLDATA field.
//
//=========================================================================
#define MDM_SHIFT_V110_SPEED 0x0
#define MDM_MASK_V110_SPEED 0xf // 4 bits
#define MDM_V110_SPEED_DEFAULT 0x0
#define MDM_V110_SPEED_1DOT2K 0x1
#define MDM_V110_SPEED_2DOT4K 0x2
#define MDM_V110_SPEED_4DOT8K 0x3
#define MDM_V110_SPEED_9DOT6K 0x4
#define MDM_V110_SPEED_12DOT0K 0x5
#define MDM_V110_SPEED_14DOT4K 0x6
#define MDM_V110_SPEED_19DOT2K 0x7
#define MDM_V110_SPEED_28DOT8K 0x8
#define MDM_V110_SPEED_38DOT4K 0x9
#define MDM_V110_SPEED_57DOT6K 0xA
#define MDM_GEN_V110_PROTOCOL_DATA(_data) \
(((_data)<<MDM_SHIFT_V110_SPEED)&MDM_MASK_V110_SPEED)
#define MDM_PROTOCOL_V110_1DOT2K \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_V110, \
MDM_GEN_V110_PROTOCOL_DATA (\
MDM_V110_SPEED_1DOT2K \
) \
)
#define MDM_PROTOCOL_V110_2DOT4K \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_V110, \
MDM_GEN_V110_PROTOCOL_DATA (\
MDM_V110_SPEED_2DOT4K \
) \
)
#define MDM_PROTOCOL_V110_4DOT8K \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_V110, \
MDM_GEN_V110_PROTOCOL_DATA (\
MDM_V110_SPEED_4DOT8K \
) \
)
#define MDM_PROTOCOL_V110_9DOT6K \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_V110, \
MDM_GEN_V110_PROTOCOL_DATA (\
MDM_V110_SPEED_9DOT6K \
) \
)
#define MDM_PROTOCOL_V110_12DOT0K \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_V110, \
MDM_GEN_V110_PROTOCOL_DATA (\
MDM_V110_SPEED_12DOT0K \
) \
)
#define MDM_PROTOCOL_V110_14DOT4K \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_V110, \
MDM_GEN_V110_PROTOCOL_DATA (\
MDM_V110_SPEED_14DOT4K \
) \
)
#define MDM_PROTOCOL_V110_19DOT2K \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_V110, \
MDM_GEN_V110_PROTOCOL_DATA (\
MDM_V110_SPEED_19DOT2K \
) \
)
#define MDM_PROTOCOL_V110_28DOT8K \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_V110, \
MDM_GEN_V110_PROTOCOL_DATA (\
MDM_V110_SPEED_28DOT8K \
) \
)
#define MDM_PROTOCOL_V110_38DOT4K \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_V110, \
MDM_GEN_V110_PROTOCOL_DATA (\
MDM_V110_SPEED_38DOT4K \
) \
)
#define MDM_PROTOCOL_V110_57DOT6K \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_V110, \
MDM_GEN_V110_PROTOCOL_DATA (\
MDM_V110_SPEED_57DOT6K \
) \
)
//=========================================================================
// AUTO PROTOCOL INFORMATION (ie, when the protocol is detected automatically)
//
// The shifts are w.r.t. the start of the PROTOCOLDATA field.
//
//=========================================================================
//
// Following are specific to the AUTO-protocol
//
#define MDM_SHIFT_AUTO_SPEED 0x0
#define MDM_MASK_AUTO_SPEED 0x7 // 3 bits
#define MDM_AUTO_SPEED_DEFAULT 0x0
#define MDM_SHIFT_AUTO_ML 0x6
#define MDM_MASK_AUTO_ML (0x3<<6) // 2 bits
#define MDM_AUTO_ML_DEFAULT 0x0
#define MDM_AUTO_ML_NONE 0x1
#define MDM_AUTO_ML_2 0x2
#define MDM_GEN_AUTO_PROTOCOL_DATA(_speed, _ml) \
((((_speed)<<MDM_SHIFT_AUTO_SPEED)&MDM_MASK_AUTO_SPEED) \
|(((_ml )<<MDM_SHIFT_AUTO_ML )&MDM_MASK_AUTO_ML))
#define MDM_PROTOCOL_AUTO_1CH \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_AUTO, \
MDM_GEN_AUTO_PROTOCOL_DATA (\
MDM_AUTO_SPEED_DEFAULT, \
MDM_AUTO_ML_NONE \
) \
)
#define MDM_PROTOCOL_AUTO_2CH \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_AUTO, \
MDM_GEN_AUTO_PROTOCOL_DATA (\
MDM_AUTO_SPEED_DEFAULT, \
MDM_AUTO_ML_2 \
) \
)
//=========================================================================
// ANALOG PROTOCOL INFORMATION (Applicable only to GSM)
//=========================================================================
//
// Following are specific to GSM Analog protocol
//
#define MDM_ANALOG_RLP_ON 0x0
#define MDM_ANALOG_RLP_OFF 0x1
#define MDM_ANALOG_V34 0x2
#define MDM_GEN_ANALOG_PROTOCOL_DATA(_rlp) \
(_rlp)
#define MDM_PROTOCOL_ANALOG_RLP \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_ANALOG, \
MDM_GEN_ANALOG_PROTOCOL_DATA ( \
MDM_ANALOG_RLP_ON \
) \
)
#define MDM_PROTOCOL_ANALOG_NRLP \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_ANALOG, \
MDM_GEN_ANALOG_PROTOCOL_DATA ( \
MDM_ANALOG_RLP_OFF \
) \
)
//
// v34 anolog for isdn
//
#define MDM_PROTOCOL_ANALOG_V34 \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_ANALOG, \
MDM_GEN_ANALOG_PROTOCOL_DATA ( \
MDM_ANALOG_V34 \
) \
)
//=========================================================================
// GPRS PROTOCOL INFORMATION (Applicable only to GSM)
//=========================================================================
//
// Following are specific to GPRS protocol
//
#define MDM_PROTOCOL_GPRS \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_GPRS, \
0 \
)
//=========================================================================
// PIAFS PROTOCOL INFORMATION
//=========================================================================
//
// Following are specific to PIAFS protocol
//
#define MDM_PIAFS_INCOMING 0
#define MDM_PIAFS_OUTGOING 1
#define MDM_PROTOCOL_PIAFS_INCOMING \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_PIAFS, \
MDM_PIAFS_INCOMING \
)
#define MDM_PROTOCOL_PIAFS_OUTGOING \
MDM_GEN_PROTOCOLINFO( \
MDM_PROTOCOLID_PIAFS, \
MDM_PIAFS_OUTGOING \
)
#endif /* _MCX_H_ */

12427
lib/MSPlatformSDK/Include/MsXml.h Executable file

File diff suppressed because it is too large Load Diff

316
lib/MSPlatformSDK/Include/Nb30.h Executable file
View File

@ -0,0 +1,316 @@
//*++
//
// Copyright (c) 1991-1999 Microsoft Corporation
//
// Module Name:
//
// nb30.h
//
// Abstract:
//
// This module contains the definitions for portable NetBIOS 3.0
// support.
//
//--*/
#ifndef NCB_INCLUDED
#define NCB_INCLUDED
#if _MSC_VER > 1000
#pragma once
#endif
#ifdef __cplusplus
extern "C" {
#endif
/****************************************************************
* *
* Data structure templates *
* *
****************************************************************/
#define NCBNAMSZ 16 /* absolute length of a net name */
#define MAX_LANA 254 /* lana's in range 0 to MAX_LANA inclusive */
/*
* Network Control Block
*/
typedef struct _NCB {
UCHAR ncb_command; /* command code */
UCHAR ncb_retcode; /* return code */
UCHAR ncb_lsn; /* local session number */
UCHAR ncb_num; /* number of our network name */
PUCHAR ncb_buffer; /* address of message buffer */
WORD ncb_length; /* size of message buffer */
UCHAR ncb_callname[NCBNAMSZ]; /* blank-padded name of remote */
UCHAR ncb_name[NCBNAMSZ]; /* our blank-padded netname */
UCHAR ncb_rto; /* rcv timeout/retry count */
UCHAR ncb_sto; /* send timeout/sys timeout */
void (CALLBACK *ncb_post)( struct _NCB * ); /* POST routine address */
UCHAR ncb_lana_num; /* lana (adapter) number */
UCHAR ncb_cmd_cplt; /* 0xff => commmand pending */
#ifdef _WIN64
UCHAR ncb_reserve[18]; /* reserved, used by BIOS */
#else
UCHAR ncb_reserve[10]; /* reserved, used by BIOS */
#endif
HANDLE ncb_event; /* HANDLE to Win32 event which */
/* will be set to the signalled */
/* state when an ASYNCH command */
/* completes */
} NCB, *PNCB;
/*
* Structure returned to the NCB command NCBASTAT is ADAPTER_STATUS followed
* by an array of NAME_BUFFER structures.
*/
typedef struct _ADAPTER_STATUS {
UCHAR adapter_address[6];
UCHAR rev_major;
UCHAR reserved0;
UCHAR adapter_type;
UCHAR rev_minor;
WORD duration;
WORD frmr_recv;
WORD frmr_xmit;
WORD iframe_recv_err;
WORD xmit_aborts;
DWORD xmit_success;
DWORD recv_success;
WORD iframe_xmit_err;
WORD recv_buff_unavail;
WORD t1_timeouts;
WORD ti_timeouts;
DWORD reserved1;
WORD free_ncbs;
WORD max_cfg_ncbs;
WORD max_ncbs;
WORD xmit_buf_unavail;
WORD max_dgram_size;
WORD pending_sess;
WORD max_cfg_sess;
WORD max_sess;
WORD max_sess_pkt_size;
WORD name_count;
} ADAPTER_STATUS, *PADAPTER_STATUS;
typedef struct _NAME_BUFFER {
UCHAR name[NCBNAMSZ];
UCHAR name_num;
UCHAR name_flags;
} NAME_BUFFER, *PNAME_BUFFER;
// values for name_flags bits.
#define NAME_FLAGS_MASK 0x87
#define GROUP_NAME 0x80
#define UNIQUE_NAME 0x00
#define REGISTERING 0x00
#define REGISTERED 0x04
#define DEREGISTERED 0x05
#define DUPLICATE 0x06
#define DUPLICATE_DEREG 0x07
/*
* Structure returned to the NCB command NCBSSTAT is SESSION_HEADER followed
* by an array of SESSION_BUFFER structures. If the NCB_NAME starts with an
* asterisk then an array of these structures is returned containing the
* status for all names.
*/
typedef struct _SESSION_HEADER {
UCHAR sess_name;
UCHAR num_sess;
UCHAR rcv_dg_outstanding;
UCHAR rcv_any_outstanding;
} SESSION_HEADER, *PSESSION_HEADER;
typedef struct _SESSION_BUFFER {
UCHAR lsn;
UCHAR state;
UCHAR local_name[NCBNAMSZ];
UCHAR remote_name[NCBNAMSZ];
UCHAR rcvs_outstanding;
UCHAR sends_outstanding;
} SESSION_BUFFER, *PSESSION_BUFFER;
// Values for state
#define LISTEN_OUTSTANDING 0x01
#define CALL_PENDING 0x02
#define SESSION_ESTABLISHED 0x03
#define HANGUP_PENDING 0x04
#define HANGUP_COMPLETE 0x05
#define SESSION_ABORTED 0x06
/*
* Structure returned to the NCB command NCBENUM.
*
* On a system containing lana's 0, 2 and 3, a structure with
* length =3, lana[0]=0, lana[1]=2 and lana[2]=3 will be returned.
*/
typedef struct _LANA_ENUM {
UCHAR length; // Number of valid entries in lana[]
UCHAR lana[MAX_LANA+1];
} LANA_ENUM, *PLANA_ENUM;
/*
* Structure returned to the NCB command NCBFINDNAME is FIND_NAME_HEADER followed
* by an array of FIND_NAME_BUFFER structures.
*/
typedef struct _FIND_NAME_HEADER {
WORD node_count;
UCHAR reserved;
UCHAR unique_group;
} FIND_NAME_HEADER, *PFIND_NAME_HEADER;
typedef struct _FIND_NAME_BUFFER {
UCHAR length;
UCHAR access_control;
UCHAR frame_control;
UCHAR destination_addr[6];
UCHAR source_addr[6];
UCHAR routing_info[18];
} FIND_NAME_BUFFER, *PFIND_NAME_BUFFER;
/*
* Structure provided with NCBACTION. The purpose of NCBACTION is to provide
* transport specific extensions to netbios.
*/
typedef struct _ACTION_HEADER {
ULONG transport_id;
USHORT action_code;
USHORT reserved;
} ACTION_HEADER, *PACTION_HEADER;
// Values for transport_id
#define ALL_TRANSPORTS "M\0\0\0"
#define MS_NBF "MNBF"
/****************************************************************
* *
* Special values and constants *
* *
****************************************************************/
/*
* NCB Command codes
*/
#define NCBCALL 0x10 /* NCB CALL */
#define NCBLISTEN 0x11 /* NCB LISTEN */
#define NCBHANGUP 0x12 /* NCB HANG UP */
#define NCBSEND 0x14 /* NCB SEND */
#define NCBRECV 0x15 /* NCB RECEIVE */
#define NCBRECVANY 0x16 /* NCB RECEIVE ANY */
#define NCBCHAINSEND 0x17 /* NCB CHAIN SEND */
#define NCBDGSEND 0x20 /* NCB SEND DATAGRAM */
#define NCBDGRECV 0x21 /* NCB RECEIVE DATAGRAM */
#define NCBDGSENDBC 0x22 /* NCB SEND BROADCAST DATAGRAM */
#define NCBDGRECVBC 0x23 /* NCB RECEIVE BROADCAST DATAGRAM */
#define NCBADDNAME 0x30 /* NCB ADD NAME */
#define NCBDELNAME 0x31 /* NCB DELETE NAME */
#define NCBRESET 0x32 /* NCB RESET */
#define NCBASTAT 0x33 /* NCB ADAPTER STATUS */
#define NCBSSTAT 0x34 /* NCB SESSION STATUS */
#define NCBCANCEL 0x35 /* NCB CANCEL */
#define NCBADDGRNAME 0x36 /* NCB ADD GROUP NAME */
#define NCBENUM 0x37 /* NCB ENUMERATE LANA NUMBERS */
#define NCBUNLINK 0x70 /* NCB UNLINK */
#define NCBSENDNA 0x71 /* NCB SEND NO ACK */
#define NCBCHAINSENDNA 0x72 /* NCB CHAIN SEND NO ACK */
#define NCBLANSTALERT 0x73 /* NCB LAN STATUS ALERT */
#define NCBACTION 0x77 /* NCB ACTION */
#define NCBFINDNAME 0x78 /* NCB FIND NAME */
#define NCBTRACE 0x79 /* NCB TRACE */
#define ASYNCH 0x80 /* high bit set == asynchronous */
/*
* NCB Return codes
*/
#define NRC_GOODRET 0x00 /* good return */
/* also returned when ASYNCH request accepted */
#define NRC_BUFLEN 0x01 /* illegal buffer length */
#define NRC_ILLCMD 0x03 /* illegal command */
#define NRC_CMDTMO 0x05 /* command timed out */
#define NRC_INCOMP 0x06 /* message incomplete, issue another command */
#define NRC_BADDR 0x07 /* illegal buffer address */
#define NRC_SNUMOUT 0x08 /* session number out of range */
#define NRC_NORES 0x09 /* no resource available */
#define NRC_SCLOSED 0x0a /* session closed */
#define NRC_CMDCAN 0x0b /* command cancelled */
#define NRC_DUPNAME 0x0d /* duplicate name */
#define NRC_NAMTFUL 0x0e /* name table full */
#define NRC_ACTSES 0x0f /* no deletions, name has active sessions */
#define NRC_LOCTFUL 0x11 /* local session table full */
#define NRC_REMTFUL 0x12 /* remote session table full */
#define NRC_ILLNN 0x13 /* illegal name number */
#define NRC_NOCALL 0x14 /* no callname */
#define NRC_NOWILD 0x15 /* cannot put * in NCB_NAME */
#define NRC_INUSE 0x16 /* name in use on remote adapter */
#define NRC_NAMERR 0x17 /* name deleted */
#define NRC_SABORT 0x18 /* session ended abnormally */
#define NRC_NAMCONF 0x19 /* name conflict detected */
#define NRC_IFBUSY 0x21 /* interface busy, IRET before retrying */
#define NRC_TOOMANY 0x22 /* too many commands outstanding, retry later */
#define NRC_BRIDGE 0x23 /* ncb_lana_num field invalid */
#define NRC_CANOCCR 0x24 /* command completed while cancel occurring */
#define NRC_CANCEL 0x26 /* command not valid to cancel */
#define NRC_DUPENV 0x30 /* name defined by anther local process */
#define NRC_ENVNOTDEF 0x34 /* environment undefined. RESET required */
#define NRC_OSRESNOTAV 0x35 /* required OS resources exhausted */
#define NRC_MAXAPPS 0x36 /* max number of applications exceeded */
#define NRC_NOSAPS 0x37 /* no saps available for netbios */
#define NRC_NORESOURCES 0x38 /* requested resources are not available */
#define NRC_INVADDRESS 0x39 /* invalid ncb address or length > segment */
#define NRC_INVDDID 0x3B /* invalid NCB DDID */
#define NRC_LOCKFAIL 0x3C /* lock of user area failed */
#define NRC_OPENERR 0x3f /* NETBIOS not loaded */
#define NRC_SYSTEM 0x40 /* system error */
#define NRC_PENDING 0xff /* asynchronous command is not yet finished */
/****************************************************************
* *
* main user entry point for NetBIOS 3.0 *
* *
* Usage: result = Netbios( pncb ); *
****************************************************************/
UCHAR
APIENTRY
Netbios(
PNCB pncb
);
/****************************************************************
* *
* Prefix for callback routines *
* *
* Usage in a declaration: NCB_POST MyPostRoutine( PNCB pncb ); *
****************************************************************/
#define NCB_POST void CALLBACK
#ifdef __cplusplus
}
#endif
#endif /* NCB_INCLUDED */

7013
lib/MSPlatformSDK/Include/OAIdl.h Executable file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,998 @@
/*#!perl
MapHeaderToDll("objbase.h", "ole32.dll");
ActivateAroundFunctionCall("ole32.dll");
#IgnoreFunction("CreateDataAdviseHolder"); # this function occurs in ole2.h and objbase.h
# The wrapped one is in objbase.h
IgnoreFunction("CoBuildVersion"); # deprecated
IgnoreFunction("CoGetCurrentProcess"); # never fails => hard to wrap well
IgnoreFunction("CoAddRefServerProcess"); # never fails => hard to wrap well
IgnoreFunction("CoReleaseServerProcess"); # never fails => hard to wrap well
IgnoreFunction("DebugCoGetRpcFault"); # not documented
IgnoreFunction("DebugCoSetRpcFault"); # not documented
IgnoreFunction("wIsEqualGUID");
DeclareFunctionErrorValue("CoLoadLibrary", "NULL");
DeclareFunctionErrorValue("StringFromGUID2" , "0");
DeclareFunctionErrorValue("CoTaskMemAlloc", "NULL");
DeclareFunctionErrorValue("CoTaskMemRealloc", "NULL");
IgnoreFunction("DllGetClassObject"); # client function prototyped (like WinMain)
IgnoreFunction("DllCanUnloadNow"); # client function prototyped (like WinMain)
*/
//+---------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// File: objbase.h
//
// Contents: Component object model defintions.
//
//----------------------------------------------------------------------------
#include <rpc.h>
#include <rpcndr.h>
#if !defined( _OBJBASE_H_ )
#define _OBJBASE_H_
#if _MSC_VER > 1000
#pragma once
#endif
#include <pshpack8.h>
#ifdef _MAC
#ifndef _WLM_NOFORCE_LIBS
#ifdef _WLMDLL
#ifdef _DEBUG
#pragma comment(lib, "oledlgd.lib")
#pragma comment(lib, "msvcoled.lib")
#else
#pragma comment(lib, "oledlg.lib")
#pragma comment(lib, "msvcole.lib")
#endif
#else
#ifdef _DEBUG
#pragma comment(lib, "wlmoled.lib")
#pragma comment(lib, "ole2uid.lib")
#else
#pragma comment(lib, "wlmole.lib")
#pragma comment(lib, "ole2ui.lib")
#endif
#pragma data_seg(".drectve")
static char _gszWlmOLEUIResourceDirective[] = "/macres:ole2ui.rsc";
#pragma data_seg()
#endif
#pragma comment(lib, "uuid.lib")
#ifdef _DEBUG
#pragma comment(lib, "ole2d.lib")
#pragma comment(lib, "ole2autd.lib")
#else
#pragma comment(lib, "ole2.lib")
#pragma comment(lib, "ole2auto.lib")
#endif
#endif // !_WLM_NOFORCE_LIBS
#endif // _MAC
#ifdef _OLE32_
#define WINOLEAPI STDAPI
#define WINOLEAPI_(type) STDAPI_(type)
#else
#ifdef _68K_
#ifndef REQUIRESAPPLEPASCAL
#define WINOLEAPI EXTERN_C DECLSPEC_IMPORT HRESULT PASCAL
#define WINOLEAPI_(type) EXTERN_C DECLSPEC_IMPORT type PASCAL
#else
#define WINOLEAPI EXTERN_C DECLSPEC_IMPORT PASCAL HRESULT
#define WINOLEAPI_(type) EXTERN_C DECLSPEC_IMPORT PASCAL type
#endif
#else
#define WINOLEAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
#define WINOLEAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
#endif
#endif
/****** 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
#define __STRUCT__ struct
#define interface __STRUCT__
#define STDMETHOD(method) virtual HRESULT STDMETHODCALLTYPE method
#define STDMETHOD_(type,method) virtual type STDMETHODCALLTYPE method
#define STDMETHODV(method) virtual HRESULT STDMETHODVCALLTYPE method
#define STDMETHODV_(type,method) virtual 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
#if !defined(BEGIN_INTERFACE)
#if defined(_MPPC_) && \
( (defined(_MSC_VER) || defined(__SC__) || defined(__MWERKS__)) && \
!defined(NO_NULL_VTABLE_ENTRY) )
#define BEGIN_INTERFACE virtual void a() {}
#define END_INTERFACE
#else
#define BEGIN_INTERFACE
#define END_INTERFACE
#endif
#endif
#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)
#if !defined(BEGIN_INTERFACE)
#if defined(_MPPC_)
#define BEGIN_INTERFACE void *b;
#define END_INTERFACE
#else
#define BEGIN_INTERFACE
#define END_INTERFACE
#endif
#endif
#define PURE
#define THIS_ INTERFACE FAR* This,
#define THIS INTERFACE FAR* This
#ifdef CONST_VTABLE
#undef CONST_VTBL
#define CONST_VTBL const
#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
#undef CONST_VTBL
#define CONST_VTBL
#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
/****** Additional basic types **********************************************/
#ifndef FARSTRUCT
#ifdef __cplusplus
#define FARSTRUCT FAR
#else
#define FARSTRUCT
#endif // __cplusplus
#endif // FARSTRUCT
#ifndef HUGEP
#if defined(_WIN32) || defined(_MPPC_)
#define HUGEP
#else
#define HUGEP __huge
#endif // WIN32
#endif // HUGEP
#ifdef _MAC
#if !defined(OLE2ANSI)
#define OLE2ANSI
#endif
#endif
#include <stdlib.h>
#define LISet32(li, v) ((li).HighPart = ((LONG) (v)) < 0 ? -1 : 0, (li).LowPart = (v))
#define ULISet32(li, v) ((li).HighPart = 0, (li).LowPart = (v))
#define CLSCTX_INPROC (CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER)
// With DCOM, CLSCTX_REMOTE_SERVER should be included
#if (_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM) // DCOM
#define CLSCTX_ALL (CLSCTX_INPROC_SERVER| \
CLSCTX_INPROC_HANDLER| \
CLSCTX_LOCAL_SERVER| \
CLSCTX_REMOTE_SERVER)
#define CLSCTX_SERVER (CLSCTX_INPROC_SERVER|CLSCTX_LOCAL_SERVER|CLSCTX_REMOTE_SERVER)
#else
#define CLSCTX_ALL (CLSCTX_INPROC_SERVER| \
CLSCTX_INPROC_HANDLER| \
CLSCTX_LOCAL_SERVER )
#define CLSCTX_SERVER (CLSCTX_INPROC_SERVER|CLSCTX_LOCAL_SERVER)
#endif
// class registration flags; passed to CoRegisterClassObject
typedef enum tagREGCLS
{
REGCLS_SINGLEUSE = 0, // class object only generates one instance
REGCLS_MULTIPLEUSE = 1, // same class object genereates multiple inst.
// and local automatically goes into inproc tbl.
REGCLS_MULTI_SEPARATE = 2, // multiple use, but separate control over each
// context.
REGCLS_SUSPENDED = 4, // register is as suspended, will be activated
// when app calls CoResumeClassObjects
REGCLS_SURROGATE = 8 // must be used when a surrogate process
// is registering a class object that will be
// loaded in the surrogate
} REGCLS;
// interface marshaling definitions
#define MARSHALINTERFACE_MIN 500 // minimum number of bytes for interface marshl
//
// Common typedefs for paramaters used in Storage API's, gleamed from storage.h
// Also contains Storage error codes, which should be moved into the storage
// idl files.
//
#define CWCSTORAGENAME 32
/* Storage instantiation modes */
#define STGM_DIRECT 0x00000000L
#define STGM_TRANSACTED 0x00010000L
#define STGM_SIMPLE 0x08000000L
#define STGM_READ 0x00000000L
#define STGM_WRITE 0x00000001L
#define STGM_READWRITE 0x00000002L
#define STGM_SHARE_DENY_NONE 0x00000040L
#define STGM_SHARE_DENY_READ 0x00000030L
#define STGM_SHARE_DENY_WRITE 0x00000020L
#define STGM_SHARE_EXCLUSIVE 0x00000010L
#define STGM_PRIORITY 0x00040000L
#define STGM_DELETEONRELEASE 0x04000000L
#if (WINVER >= 400)
#define STGM_NOSCRATCH 0x00100000L
#endif /* WINVER */
#define STGM_CREATE 0x00001000L
#define STGM_CONVERT 0x00020000L
#define STGM_FAILIFTHERE 0x00000000L
#define STGM_NOSNAPSHOT 0x00200000L
#if (_WIN32_WINNT >= 0x0500)
#define STGM_DIRECT_SWMR 0x00400000L
#endif
/* flags for internet asyncronous and layout docfile */
#define ASYNC_MODE_COMPATIBILITY 0x00000001L
#define ASYNC_MODE_DEFAULT 0x00000000L
#define STGTY_REPEAT 0x00000100L
#define STG_TOEND 0xFFFFFFFFL
#define STG_LAYOUT_SEQUENTIAL 0x00000000L
#define STG_LAYOUT_INTERLEAVED 0x00000001L
#define STGFMT_STORAGE 0
#define STGFMT_NATIVE 1
#define STGFMT_FILE 3
#define STGFMT_ANY 4
#define STGFMT_DOCFILE 5
// This is a legacy define to allow old component to builds
#define STGFMT_DOCUMENT 0
/* here is where we pull in the MIDL generated headers for the interfaces */
typedef interface IRpcStubBuffer IRpcStubBuffer;
typedef interface IRpcChannelBuffer IRpcChannelBuffer;
#include <wtypes.h>
#include <unknwn.h>
#include <objidl.h>
#ifdef _OLE32_
#ifdef _OLE32PRIV_
BOOL _fastcall wIsEqualGUID(REFGUID rguid1, REFGUID rguid2);
#define IsEqualGUID(rguid1, rguid2) wIsEqualGUID(rguid1, rguid2)
#else
#define __INLINE_ISEQUAL_GUID
#endif // _OLE32PRIV_
#endif // _OLE32_
#include <guiddef.h>
#ifndef INITGUID
#include <cguid.h>
#endif
// COM initialization flags; passed to CoInitialize.
typedef enum tagCOINIT
{
COINIT_APARTMENTTHREADED = 0x2, // Apartment model
#if (_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM) // DCOM
// These constants are only valid on Windows NT 4.0
COINIT_MULTITHREADED = 0x0, // OLE calls objects on any thread.
COINIT_DISABLE_OLE1DDE = 0x4, // Don't use DDE for Ole1 support.
COINIT_SPEED_OVER_MEMORY = 0x8, // Trade memory for speed.
#endif // DCOM
} COINIT;
/****** STD Object API Prototypes *****************************************/
WINOLEAPI_(DWORD) CoBuildVersion( VOID );
/* init/uninit */
WINOLEAPI CoInitialize(IN LPVOID pvReserved);
WINOLEAPI_(void) CoUninitialize(void);
WINOLEAPI CoGetMalloc(IN DWORD dwMemContext, OUT LPMALLOC FAR* ppMalloc);
WINOLEAPI_(DWORD) CoGetCurrentProcess(void);
WINOLEAPI CoRegisterMallocSpy(IN LPMALLOCSPY pMallocSpy);
WINOLEAPI CoRevokeMallocSpy(void);
WINOLEAPI CoCreateStandardMalloc(IN DWORD memctx, OUT IMalloc FAR* FAR* ppMalloc);
#if (_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM) // DCOM
/* #!perl PoundIf("CoInitializeEx", "(_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM)");
*/
WINOLEAPI CoInitializeEx(IN LPVOID pvReserved, IN DWORD dwCoInit);
/* #!perl PoundIf("CoGetCallerTID", "(_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM)");
*/
WINOLEAPI CoGetCallerTID( LPDWORD lpdwTID );
#endif // DCOM
#if (_WIN32_WINNT >= 0x0501)
/* #!perl
PoundIf("CoRegisterInitializeSpy", "_WIN32_WINNT >= 0x0501");
PoundIf("CoRevokeInitializeSpy", "_WIN32_WINNT >= 0x0501");
*/
WINOLEAPI CoRegisterInitializeSpy(IN LPINITIALIZESPY pSpy, OUT ULARGE_INTEGER *puliCookie);
WINOLEAPI CoRevokeInitializeSpy(IN ULARGE_INTEGER uliCookie);
WINOLEAPI CoGetContextToken(ULONG_PTR* pToken);
// COM System Security Descriptors (used when the corresponding registry
// entries are absent)
typedef enum tagCOMSD
{
SD_LAUNCHPERMISSIONS = 0, // Machine wide launch permissions
SD_ACCESSPERMISSIONS = 1, // Machine wide acesss permissions
SD_LAUNCHRESTRICTIONS = 2, // Machine wide launch limits
SD_ACCESSRESTRICTIONS = 3 // Machine wide access limits
} COMSD;
WINOLEAPI CoGetSystemSecurityPermissions(COMSD comSDType, PSECURITY_DESCRIPTOR *ppSD);
#endif
#if DBG == 1
WINOLEAPI_(ULONG) DebugCoGetRpcFault( void );
WINOLEAPI_(void) DebugCoSetRpcFault( ULONG );
#endif
#if (_WIN32_WINNT >= 0x0500)
typedef struct tagSOleTlsDataPublic
{
void *pvReserved0[2];
DWORD dwReserved0[3];
void *pvReserved1[1];
DWORD dwReserved1[3];
void *pvReserved2[4];
DWORD dwReserved2[1];
void *pCurrentCtx;
} SOleTlsDataPublic;
#endif
/* COM+ APIs */
WINOLEAPI CoGetObjectContext(IN REFIID riid, OUT LPVOID FAR* ppv);
/* register/revoke/get class objects */
WINOLEAPI CoGetClassObject(IN REFCLSID rclsid, IN DWORD dwClsContext, IN LPVOID pvReserved,
IN REFIID riid, OUT LPVOID FAR* ppv);
WINOLEAPI CoRegisterClassObject(IN REFCLSID rclsid, IN LPUNKNOWN pUnk,
IN DWORD dwClsContext, IN DWORD flags, OUT LPDWORD lpdwRegister);
WINOLEAPI CoRevokeClassObject(IN DWORD dwRegister);
WINOLEAPI CoResumeClassObjects(void);
WINOLEAPI CoSuspendClassObjects(void);
WINOLEAPI_(ULONG) CoAddRefServerProcess(void);
WINOLEAPI_(ULONG) CoReleaseServerProcess(void);
WINOLEAPI CoGetPSClsid(IN REFIID riid, OUT CLSID *pClsid);
WINOLEAPI CoRegisterPSClsid(IN REFIID riid, IN REFCLSID rclsid);
// Registering surrogate processes
WINOLEAPI CoRegisterSurrogate(IN LPSURROGATE pSurrogate);
/* marshaling interface pointers */
WINOLEAPI CoGetMarshalSizeMax(OUT ULONG *pulSize, IN REFIID riid, IN LPUNKNOWN pUnk,
IN DWORD dwDestContext, IN LPVOID pvDestContext, IN DWORD mshlflags);
WINOLEAPI CoMarshalInterface(IN LPSTREAM pStm, IN REFIID riid, IN LPUNKNOWN pUnk,
IN DWORD dwDestContext, IN LPVOID pvDestContext, IN DWORD mshlflags);
WINOLEAPI CoUnmarshalInterface(IN LPSTREAM pStm, IN REFIID riid, OUT LPVOID FAR* ppv);
WINOLEAPI CoMarshalHresult(IN LPSTREAM pstm, IN HRESULT hresult);
WINOLEAPI CoUnmarshalHresult(IN LPSTREAM pstm, OUT HRESULT FAR * phresult);
WINOLEAPI CoReleaseMarshalData(IN LPSTREAM pStm);
WINOLEAPI CoDisconnectObject(IN LPUNKNOWN pUnk, IN DWORD dwReserved);
WINOLEAPI CoLockObjectExternal(IN LPUNKNOWN pUnk, IN BOOL fLock, IN BOOL fLastUnlockReleases);
WINOLEAPI CoGetStandardMarshal(IN REFIID riid, IN LPUNKNOWN pUnk,
IN DWORD dwDestContext, IN LPVOID pvDestContext, IN DWORD mshlflags,
OUT LPMARSHAL FAR* ppMarshal);
WINOLEAPI CoGetStdMarshalEx(IN LPUNKNOWN pUnkOuter, IN DWORD smexflags,
OUT LPUNKNOWN FAR* ppUnkInner);
/* flags for CoGetStdMarshalEx */
typedef enum tagSTDMSHLFLAGS
{
SMEXF_SERVER = 0x01, // server side aggregated std marshaler
SMEXF_HANDLER = 0x02 // client side (handler) agg std marshaler
} STDMSHLFLAGS;
WINOLEAPI_(BOOL) CoIsHandlerConnected(IN LPUNKNOWN pUnk);
// Apartment model inter-thread interface passing helpers
WINOLEAPI CoMarshalInterThreadInterfaceInStream(IN REFIID riid, IN LPUNKNOWN pUnk,
OUT LPSTREAM *ppStm);
WINOLEAPI CoGetInterfaceAndReleaseStream(IN LPSTREAM pStm, IN REFIID iid,
OUT LPVOID FAR* ppv);
WINOLEAPI CoCreateFreeThreadedMarshaler(IN LPUNKNOWN punkOuter,
OUT LPUNKNOWN *ppunkMarshal);
/* dll loading helpers; keeps track of ref counts and unloads all on exit */
WINOLEAPI_(HINSTANCE) CoLoadLibrary(IN LPOLESTR lpszLibName, IN BOOL bAutoFree);
WINOLEAPI_(void) CoFreeLibrary(IN HINSTANCE hInst);
WINOLEAPI_(void) CoFreeAllLibraries(void);
WINOLEAPI_(void) CoFreeUnusedLibraries(void);
#if (_WIN32_WINNT >= 0x0501)
/* #!perl PoundIf("CoFreeUnusedLibrariesEx", "(_WIN32_WINNT >= 0x0501)");
*/
WINOLEAPI_(void) CoFreeUnusedLibrariesEx(IN DWORD dwUnloadDelay, IN DWORD dwReserved);
#endif
#if (_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM) // DCOM
/* Call Security. */
/* #!perl PoundIf("CoInitializeSecurity", "(_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM)");
*/
WINOLEAPI CoInitializeSecurity(
IN PSECURITY_DESCRIPTOR pSecDesc,
IN LONG cAuthSvc,
IN SOLE_AUTHENTICATION_SERVICE *asAuthSvc,
IN void *pReserved1,
IN DWORD dwAuthnLevel,
IN DWORD dwImpLevel,
IN void *pAuthList,
IN DWORD dwCapabilities,
IN void *pReserved3 );
/* #!perl PoundIf("CoGetCallContext", "(_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM)");
*/
WINOLEAPI CoGetCallContext( IN REFIID riid, OUT void **ppInterface );
/* #!perl PoundIf("CoQueryProxyBlanket", "(_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM)");
*/
WINOLEAPI CoQueryProxyBlanket(
IN IUnknown *pProxy,
OUT DWORD *pwAuthnSvc,
OUT DWORD *pAuthzSvc,
OUT OLECHAR **pServerPrincName,
OUT DWORD *pAuthnLevel,
OUT DWORD *pImpLevel,
OUT RPC_AUTH_IDENTITY_HANDLE *pAuthInfo,
OUT DWORD *pCapabilites );
/* #!perl PoundIf("CoSetProxyBlanket", "(_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM)");
*/
WINOLEAPI CoSetProxyBlanket(
IN IUnknown *pProxy,
IN DWORD dwAuthnSvc,
IN DWORD dwAuthzSvc,
IN OLECHAR *pServerPrincName,
IN DWORD dwAuthnLevel,
IN DWORD dwImpLevel,
IN RPC_AUTH_IDENTITY_HANDLE pAuthInfo,
IN DWORD dwCapabilities );
/* #!perl PoundIf("CoCopyProxy", "(_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM)");
*/
WINOLEAPI CoCopyProxy(
IN IUnknown *pProxy,
OUT IUnknown **ppCopy );
/* #!perl PoundIf("CoQueryClientBlanket", "(_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM)");
*/
WINOLEAPI CoQueryClientBlanket(
OUT DWORD *pAuthnSvc,
OUT DWORD *pAuthzSvc,
OUT OLECHAR **pServerPrincName,
OUT DWORD *pAuthnLevel,
OUT DWORD *pImpLevel,
OUT RPC_AUTHZ_HANDLE *pPrivs,
OUT DWORD *pCapabilities );
/* #!perl PoundIf("CoImpersonateClient", "(_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM)");
*/
WINOLEAPI CoImpersonateClient();
/* #!perl PoundIf("CoRevertToSelf", "(_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM)");
*/
WINOLEAPI CoRevertToSelf();
/* #!perl PoundIf("CoQueryAuthenticationServices", "(_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM)");
*/
WINOLEAPI CoQueryAuthenticationServices(
OUT DWORD *pcAuthSvc,
OUT SOLE_AUTHENTICATION_SERVICE **asAuthSvc );
/* #!perl PoundIf("CoSwitchCallContext", "(_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM)");
*/
WINOLEAPI CoSwitchCallContext( IN IUnknown *pNewObject, OUT IUnknown **ppOldObject );
#define COM_RIGHTS_EXECUTE 1
#define COM_RIGHTS_EXECUTE_LOCAL 2
#define COM_RIGHTS_EXECUTE_REMOTE 4
#define COM_RIGHTS_ACTIVATE_LOCAL 8
#define COM_RIGHTS_ACTIVATE_REMOTE 16
#endif // DCOM
/* helper for creating instances */
WINOLEAPI CoCreateInstance(IN REFCLSID rclsid, IN LPUNKNOWN pUnkOuter,
IN DWORD dwClsContext, IN REFIID riid, OUT LPVOID FAR* ppv);
#if (_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM) // DCOM
/* #!perl PoundIf("CoGetInstanceFromFile", "(_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM)");
*/
WINOLEAPI CoGetInstanceFromFile(
IN COSERVERINFO * pServerInfo,
IN CLSID * pClsid,
IN IUnknown * punkOuter, // only relevant locally
IN DWORD dwClsCtx,
IN DWORD grfMode,
IN OLECHAR * pwszName,
IN DWORD dwCount,
IN OUT MULTI_QI * pResults );
/* #!perl PoundIf("CoGetInstanceFromIStorage", "(_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM)");
*/
WINOLEAPI CoGetInstanceFromIStorage(
IN COSERVERINFO * pServerInfo,
IN CLSID * pClsid,
IN IUnknown * punkOuter, // only relevant locally
IN DWORD dwClsCtx,
IN struct IStorage * pstg,
IN DWORD dwCount,
IN OUT MULTI_QI * pResults );
/* #!perl PoundIf("CoCreateInstanceEx", "(_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM)");
*/
WINOLEAPI CoCreateInstanceEx(
IN REFCLSID Clsid,
IN IUnknown * punkOuter, // only relevant locally
IN DWORD dwClsCtx,
IN COSERVERINFO * pServerInfo,
IN DWORD dwCount,
IN OUT MULTI_QI * pResults );
#endif // DCOM
/* Call related APIs */
#if (_WIN32_WINNT >= 0x0500 ) || defined(_WIN32_DCOM) // DCOM
/* #!perl PoundIf("CoGetCancelObject", "(_WIN32_WINNT >= 0x0500 ) || defined(_WIN32_DCOM)");
*/
WINOLEAPI CoGetCancelObject(IN DWORD dwThreadId, IN REFIID iid, OUT void **ppUnk);
/* #!perl PoundIf("CoSetCancelObject", "(_WIN32_WINNT >= 0x0500 ) || defined(_WIN32_DCOM)");
*/
WINOLEAPI CoSetCancelObject(IN IUnknown *pUnk);
/* #!perl PoundIf("CoCancelCall", "(_WIN32_WINNT >= 0x0500 ) || defined(_WIN32_DCOM)");
*/
WINOLEAPI CoCancelCall(IN DWORD dwThreadId, IN ULONG ulTimeout);
/* #!perl PoundIf("CoTestCancel", "(_WIN32_WINNT >= 0x0500 ) || defined(_WIN32_DCOM)");
*/
WINOLEAPI CoTestCancel();
/* #!perl PoundIf("CoEnableCallCancellation", "(_WIN32_WINNT >= 0x0500 ) || defined(_WIN32_DCOM)");
*/
WINOLEAPI CoEnableCallCancellation(IN LPVOID pReserved);
/* #!perl PoundIf("CoDisableCallCancellation", "(_WIN32_WINNT >= 0x0500 ) || defined(_WIN32_DCOM)");
*/
WINOLEAPI CoDisableCallCancellation(IN LPVOID pReserved);
/* #!perl PoundIf("CoAllowSetForegroundWindow", "(_WIN32_WINNT >= 0x0500 ) || defined(_WIN32_DCOM)");
*/
WINOLEAPI CoAllowSetForegroundWindow(IN IUnknown *pUnk, IN LPVOID lpvReserved);
/* #!perl PoundIf("DcomChannelSetHResult", "(_WIN32_WINNT >= 0x0500 ) || defined(_WIN32_DCOM)");
*/
WINOLEAPI DcomChannelSetHResult(IN LPVOID pvReserved, IN ULONG* pulReserved, IN HRESULT appsHR);
#endif
/* other helpers */
WINOLEAPI StringFromCLSID(IN REFCLSID rclsid, OUT LPOLESTR FAR* lplpsz);
WINOLEAPI CLSIDFromString(IN LPOLESTR lpsz, OUT LPCLSID pclsid);
WINOLEAPI StringFromIID(IN REFIID rclsid, OUT LPOLESTR FAR* lplpsz);
WINOLEAPI IIDFromString(IN LPOLESTR lpsz, OUT LPIID lpiid);
WINOLEAPI_(BOOL) CoIsOle1Class(IN REFCLSID rclsid);
WINOLEAPI ProgIDFromCLSID (IN REFCLSID clsid, OUT LPOLESTR FAR* lplpszProgID);
WINOLEAPI CLSIDFromProgID (IN LPCOLESTR lpszProgID, OUT LPCLSID lpclsid);
WINOLEAPI CLSIDFromProgIDEx (IN LPCOLESTR lpszProgID, OUT LPCLSID lpclsid);
WINOLEAPI_(int) StringFromGUID2(IN REFGUID rguid, OUT LPOLESTR lpsz, IN int cchMax);
WINOLEAPI CoCreateGuid(OUT GUID FAR *pguid);
WINOLEAPI_(BOOL) CoFileTimeToDosDateTime(
IN FILETIME FAR* lpFileTime, OUT LPWORD lpDosDate, OUT LPWORD lpDosTime);
WINOLEAPI_(BOOL) CoDosDateTimeToFileTime(
IN WORD nDosDate, IN WORD nDosTime, OUT FILETIME FAR* lpFileTime);
WINOLEAPI CoFileTimeNow( OUT FILETIME FAR* lpFileTime );
WINOLEAPI CoRegisterMessageFilter( IN LPMESSAGEFILTER lpMessageFilter,
OUT LPMESSAGEFILTER FAR* lplpMessageFilter );
#if (_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM) // DCOM
/* #!perl PoundIf("CoRegisterChannelHook", "(_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM)");
*/
WINOLEAPI CoRegisterChannelHook( IN REFGUID ExtensionUuid, IN IChannelHook *pChannelHook );
#endif // DCOM
#if (_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM) // DCOM
/* Synchronization API */
/* #!perl PoundIf("CoWaitForMultipleHandles", "(_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM)");
*/
WINOLEAPI CoWaitForMultipleHandles (IN DWORD dwFlags,
IN DWORD dwTimeout,
IN ULONG cHandles,
IN LPHANDLE pHandles,
OUT LPDWORD lpdwindex);
/* Flags for Synchronization API and Classes */
typedef enum tagCOWAIT_FLAGS
{
COWAIT_WAITALL = 1,
COWAIT_ALERTABLE = 2,
COWAIT_INPUTAVAILABLE = 4
}COWAIT_FLAGS;
#endif // DCOM
/* for flushing OLESCM remote binding handles */
#if (_WIN32_WINNT >= 0x0501)
/* #!perl
PoundIf("CoInvalidateRemoteMachineBindings", "_WIN32_WINNT >= 0x0501");
*/
WINOLEAPI CoInvalidateRemoteMachineBindings(LPOLESTR pszMachineName);
#endif
/* TreatAs APIS */
WINOLEAPI CoGetTreatAsClass(IN REFCLSID clsidOld, OUT LPCLSID pClsidNew);
WINOLEAPI CoTreatAsClass(IN REFCLSID clsidOld, IN REFCLSID clsidNew);
/* the server dlls must define their DllGetClassObject and DllCanUnloadNow
* to match these; the typedefs are located here to ensure all are changed at
* the same time.
*/
//#ifdef _MAC
//typedef STDAPICALLTYPE HRESULT (* LPFNGETCLASSOBJECT) (REFCLSID, REFIID, LPVOID *);
//#else
typedef HRESULT (STDAPICALLTYPE * LPFNGETCLASSOBJECT) (REFCLSID, REFIID, LPVOID *);
//#endif
//#ifdef _MAC
//typedef STDAPICALLTYPE HRESULT (* LPFNCANUNLOADNOW)(void);
//#else
typedef HRESULT (STDAPICALLTYPE * LPFNCANUNLOADNOW)(void);
//#endif
STDAPI DllGetClassObject(IN REFCLSID rclsid, IN REFIID riid, OUT LPVOID FAR* ppv);
STDAPI DllCanUnloadNow(void);
/****** Default Memory Allocation ******************************************/
WINOLEAPI_(LPVOID) CoTaskMemAlloc(IN SIZE_T cb);
WINOLEAPI_(LPVOID) CoTaskMemRealloc(IN LPVOID pv, IN SIZE_T cb);
WINOLEAPI_(void) CoTaskMemFree(IN LPVOID pv);
/****** DV APIs ***********************************************************/
/* This function is declared in objbase.h and ole2.h */
WINOLEAPI CreateDataAdviseHolder(OUT LPDATAADVISEHOLDER FAR* ppDAHolder);
WINOLEAPI CreateDataCache(IN LPUNKNOWN pUnkOuter, IN REFCLSID rclsid,
IN REFIID iid, OUT LPVOID FAR* ppv);
/****** Storage API Prototypes ********************************************/
WINOLEAPI StgCreateDocfile(IN const OLECHAR FAR* pwcsName,
IN DWORD grfMode,
IN DWORD reserved,
OUT IStorage FAR * FAR *ppstgOpen);
WINOLEAPI StgCreateDocfileOnILockBytes(IN ILockBytes FAR *plkbyt,
IN DWORD grfMode,
IN DWORD reserved,
OUT IStorage FAR * FAR *ppstgOpen);
WINOLEAPI StgOpenStorage(IN const OLECHAR FAR* pwcsName,
IN IStorage FAR *pstgPriority,
IN DWORD grfMode,
IN SNB snbExclude,
IN DWORD reserved,
OUT IStorage FAR * FAR *ppstgOpen);
WINOLEAPI StgOpenStorageOnILockBytes(IN ILockBytes FAR *plkbyt,
IN IStorage FAR *pstgPriority,
IN DWORD grfMode,
IN SNB snbExclude,
IN DWORD reserved,
OUT IStorage FAR * FAR *ppstgOpen);
WINOLEAPI StgIsStorageFile(IN const OLECHAR FAR* pwcsName);
WINOLEAPI StgIsStorageILockBytes(IN ILockBytes FAR* plkbyt);
WINOLEAPI StgSetTimes(IN OLECHAR const FAR* lpszName,
IN FILETIME const FAR* pctime,
IN FILETIME const FAR* patime,
IN FILETIME const FAR* pmtime);
WINOLEAPI StgOpenAsyncDocfileOnIFillLockBytes( IN IFillLockBytes *pflb,
IN DWORD grfMode,
IN DWORD asyncFlags,
OUT IStorage **ppstgOpen);
WINOLEAPI StgGetIFillLockBytesOnILockBytes( IN ILockBytes *pilb,
OUT IFillLockBytes **ppflb);
WINOLEAPI StgGetIFillLockBytesOnFile(IN OLECHAR const *pwcsName,
OUT IFillLockBytes **ppflb);
WINOLEAPI StgOpenLayoutDocfile(IN OLECHAR const *pwcsDfName,
IN DWORD grfMode,
IN DWORD reserved,
OUT IStorage **ppstgOpen);
// STG initialization options for StgCreateStorageEx and StgOpenStorageEx
#if _WIN32_WINNT == 0x500
#define STGOPTIONS_VERSION 1
#elif _WIN32_WINNT > 0x500
#define STGOPTIONS_VERSION 2
#else
#define STGOPTIONS_VERSION 0
#endif
typedef struct tagSTGOPTIONS
{
USHORT usVersion; // Versions 1 and 2 supported
USHORT reserved; // must be 0 for padding
ULONG ulSectorSize; // docfile header sector size (512)
#if STGOPTIONS_VERSION >= 2
const WCHAR *pwcsTemplateFile; // version 2 or above
#endif
} STGOPTIONS;
WINOLEAPI StgCreateStorageEx (IN const WCHAR* pwcsName,
IN DWORD grfMode,
IN DWORD stgfmt, // enum
IN DWORD grfAttrs, // reserved
IN STGOPTIONS * pStgOptions,
IN void * reserved,
IN REFIID riid,
OUT void ** ppObjectOpen);
WINOLEAPI StgOpenStorageEx (IN const WCHAR* pwcsName,
IN DWORD grfMode,
IN DWORD stgfmt, // enum
IN DWORD grfAttrs, // reserved
IN STGOPTIONS * pStgOptions,
IN void * reserved,
IN REFIID riid,
OUT void ** ppObjectOpen);
//
// Moniker APIs
//
WINOLEAPI BindMoniker(IN LPMONIKER pmk, IN DWORD grfOpt, IN REFIID iidResult, OUT LPVOID FAR* ppvResult);
WINOLEAPI CoInstall(
IN IBindCtx * pbc,
IN DWORD dwFlags,
IN uCLSSPEC * pClassSpec,
IN QUERYCONTEXT * pQuery,
IN LPWSTR pszCodeBase);
WINOLEAPI CoGetObject(IN LPCWSTR pszName, IN BIND_OPTS *pBindOptions, IN REFIID riid, OUT void **ppv);
WINOLEAPI MkParseDisplayName(IN LPBC pbc, IN LPCOLESTR szUserName,
OUT ULONG FAR * pchEaten, OUT LPMONIKER FAR * ppmk);
WINOLEAPI MonikerRelativePathTo(IN LPMONIKER pmkSrc, IN LPMONIKER pmkDest, OUT LPMONIKER
FAR* ppmkRelPath, IN BOOL dwReserved);
WINOLEAPI MonikerCommonPrefixWith(IN LPMONIKER pmkThis, IN LPMONIKER pmkOther,
OUT LPMONIKER FAR* ppmkCommon);
WINOLEAPI CreateBindCtx(IN DWORD reserved, OUT LPBC FAR* ppbc);
WINOLEAPI CreateGenericComposite(IN LPMONIKER pmkFirst, IN LPMONIKER pmkRest,
OUT LPMONIKER FAR* ppmkComposite);
WINOLEAPI GetClassFile (IN LPCOLESTR szFilename, OUT CLSID FAR* pclsid);
WINOLEAPI CreateClassMoniker(IN REFCLSID rclsid, OUT LPMONIKER FAR* ppmk);
WINOLEAPI CreateFileMoniker(IN LPCOLESTR lpszPathName, OUT LPMONIKER FAR* ppmk);
WINOLEAPI CreateItemMoniker(IN LPCOLESTR lpszDelim, IN LPCOLESTR lpszItem,
OUT LPMONIKER FAR* ppmk);
WINOLEAPI CreateAntiMoniker(OUT LPMONIKER FAR* ppmk);
WINOLEAPI CreatePointerMoniker(IN LPUNKNOWN punk, OUT LPMONIKER FAR* ppmk);
WINOLEAPI CreateObjrefMoniker(IN LPUNKNOWN punk, OUT LPMONIKER FAR * ppmk);
WINOLEAPI GetRunningObjectTable( IN DWORD reserved, OUT LPRUNNINGOBJECTTABLE FAR* pprot);
#include <urlmon.h>
#include <propidl.h>
//
// Standard Progress Indicator impolementation
//
WINOLEAPI CreateStdProgressIndicator(IN HWND hwndParent,
IN LPCOLESTR pszTitle,
IN IBindStatusCallback * pIbscCaller,
OUT IBindStatusCallback ** ppIbsc);
//12ea2135-0f75-4d97-821a-c78c710d42b8
/*#!perl
SetInsertionPoint("objbase.h", "12ea2135-0f75-4d97-821a-c78c710d42b8");
*/
#ifndef RC_INVOKED
#include <poppack.h>
#endif // RC_INVOKED
#endif // __OBJBASE_H__

16198
lib/MSPlatformSDK/Include/ObjIdl.h Executable file

File diff suppressed because it is too large Load Diff

460
lib/MSPlatformSDK/Include/Ole2.h Executable file
View File

@ -0,0 +1,460 @@
/*#!perl
MapHeaderToDll("ole2.h", "ole32.dll");
ActivateAroundFunctionCall("ole32.dll");
IgnoreFunction("CreateDataAdviseHolder"); # this function occurs in ole2.h and objbase.h
# The wrapped one is in objbase.h
IgnoreFunction("OleBuildVersion"); # not documented
DeclareFunctionErrorValue("OleCreateMenuDescriptor", "NULL");
DeclareFunctionErrorValue("OleDuplicateData", "NULL");
DeclareFunctionErrorValue("OleGetIconOfFile", "NULL");
DeclareFunctionErrorValue("OleGetIconOfClass", "NULL");
DeclareFunctionErrorValue("OleMetafilePictFromIconAndLabel", "NULL");
IgnoreFunction("WlmOleCheckoutMacInterface"); # Macintosh stuff
IgnoreFunction("WlmOleCheckinMacInterface"); # Macintosh stuff
IgnoreFunction("WlmOleWrapMacInterface"); # Macintosh stuff
IgnoreFunction("WlmOleUnwrapMacInterface"); # Macintosh stuff
IgnoreFunction("WlmOleCheckoutWinInterface"); # Macintosh stuff
IgnoreFunction("WlmOleCheckinWinInterface"); # Macintosh stuff
IgnoreFunction("WlmOleWrapWinInterface"); # Macintosh stuff
IgnoreFunction("WlmOleUnwrapWinInterface"); # Macintosh stuff
IgnoreFunction("WlmOleVersion"); # Macintosh stuff
IgnoreFunction("WlmOleSetInPlaceWindow"); # Macintosh stuff
IgnoreFunction("WlmOleRegisterUserWrap"); # Macintosh stuff
*/
//+---------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// File: OLE2.h
// Contents: Main OLE2 header; Defines Linking and Emmebbeding interfaces, and API's.
// Also includes .h files for the compobj, and oleauto subcomponents.
//
//----------------------------------------------------------------------------
#if !defined( _OLE2_H_ )
#define _OLE2_H_
#if _MSC_VER > 1000
#pragma once
#endif
#ifndef _MAC
// Set packing to 8
#include <pshpack8.h>
// Make 100% sure WIN32 is defined
#ifndef WIN32
#define WIN32 100 // 100 == NT version 1.0
#endif
#else //_MAC
#ifdef _WIN32
#include "macname1.h"
#endif // _WIN32
#endif //_MAC
// SET to remove _export from interface definitions
#include <winerror.h>
#ifdef _MAC
#if !defined(__MACPUB__)
#include <macpub.h>
#endif
#endif //_MAC
#include <objbase.h>
#include <oleauto.h>
// View OBJECT Error Codes
#define E_DRAW VIEW_E_DRAW
// IDataObject Error Codes
#define DATA_E_FORMATETC DV_E_FORMATETC
#ifdef _MAC
/****** Standard Object Definitions *****************************************/
//#ifndef __COMPOBJ__
//#include <compobj.h>
//#endif
typedef enum {
OLE_E_NOEXTENSION = OLE_E_NOSTORAGE +1, // no extension at startup
OLE_E_VERSEXTENSION, // extension has wrong version #
OLE_E_IPBUSY, // cannot get inplace resource
OLE_E_NOT_FRONT_PROCESS, // inplace container unexpectedly in background
OLE_E_WRONG_MENU, // holemenu != prev holemenu
OLE_E_MENU_NOT_PATCHED, // menubar is not hashed
OLE_E_MENUID_NOT_HASHED, // id was never hashed
OLE_E_foo
} inplace_errors;
// DoDragDropMac()
typedef struct tagDRAG_FLAVORINFO {
unsigned long cfFormat;
unsigned long FlavorFlags; // Flavor Flags as specified by the DragManager
OLEBOOL fAddData; // If true, the data is added with the flavor
long reserved; // must be NULL
} DRAG_FLAVORINFO;
#endif //_MAC
// Common stuff gleamed from OLE.2,
/* verbs */
#define OLEIVERB_PRIMARY (0L)
#define OLEIVERB_SHOW (-1L)
#define OLEIVERB_OPEN (-2L)
#define OLEIVERB_HIDE (-3L)
#define OLEIVERB_UIACTIVATE (-4L)
#define OLEIVERB_INPLACEACTIVATE (-5L)
#define OLEIVERB_DISCARDUNDOSTATE (-6L)
// for OleCreateEmbeddingHelper flags; roles in low word; options in high word
#define EMBDHLP_INPROC_HANDLER 0x0000L
#define EMBDHLP_INPROC_SERVER 0x0001L
#define EMBDHLP_CREATENOW 0x00000000L
#define EMBDHLP_DELAYCREATE 0x00010000L
/* extended create function flags */
#define OLECREATE_LEAVERUNNING 0x00000001
/* pull in the MIDL generated header */
#include <oleidl.h>
#ifdef _MAC
typedef struct tagOleMBarRec
{
long reserved;
} OleMBarRec, *OleMBarPtr, **OleMBarHandle;
#define noAxis 3 // indicates no grow or size in any direction
// see mac #defines noConstraint, hAxisOnly, vAxisOnly
#endif //_MAC
/****** DV APIs ***********************************************************/
/* This function is declared in objbase.h and ole2.h.
IsolationAware support is via objbase.h.
*/
#if !defined(ISOLATION_AWARE_ENABLED) \
|| !ISOLATION_AWARE_ENABLED \
|| !defined(_OBJBASE_H_) \
|| !defined(CreateDataAdviseHolder)
WINOLEAPI CreateDataAdviseHolder(OUT LPDATAADVISEHOLDER FAR* ppDAHolder);
#endif
/****** OLE API Prototypes ************************************************/
WINOLEAPI_(DWORD) OleBuildVersion( VOID );
/* helper functions */
WINOLEAPI ReadClassStg(IN LPSTORAGE pStg, OUT CLSID FAR* pclsid);
WINOLEAPI WriteClassStg(IN LPSTORAGE pStg, IN REFCLSID rclsid);
WINOLEAPI ReadClassStm(IN LPSTREAM pStm, OUT CLSID FAR* pclsid);
WINOLEAPI WriteClassStm(IN LPSTREAM pStm, IN REFCLSID rclsid);
WINOLEAPI WriteFmtUserTypeStg (IN LPSTORAGE pstg, IN CLIPFORMAT cf, IN LPOLESTR lpszUserType);
WINOLEAPI ReadFmtUserTypeStg (IN LPSTORAGE pstg, OUT CLIPFORMAT FAR* pcf, OUT LPOLESTR FAR* lplpszUserType);
/* init/term */
WINOLEAPI OleInitialize(IN LPVOID pvReserved);
WINOLEAPI_(void) OleUninitialize(void);
/* APIs to query whether (Embedded/Linked) object can be created from
the data object */
WINOLEAPI OleQueryLinkFromData(IN LPDATAOBJECT pSrcDataObject);
WINOLEAPI OleQueryCreateFromData(IN LPDATAOBJECT pSrcDataObject);
/* Object creation APIs */
WINOLEAPI OleCreate(IN REFCLSID rclsid, IN REFIID riid, IN DWORD renderopt,
IN LPFORMATETC pFormatEtc, IN LPOLECLIENTSITE pClientSite,
IN LPSTORAGE pStg, OUT LPVOID FAR* ppvObj);
WINOLEAPI OleCreateEx(IN REFCLSID rclsid, IN REFIID riid, IN DWORD dwFlags,
IN DWORD renderopt, IN ULONG cFormats, IN DWORD* rgAdvf,
IN LPFORMATETC rgFormatEtc, IN IAdviseSink FAR* lpAdviseSink,
OUT DWORD FAR* rgdwConnection, IN LPOLECLIENTSITE pClientSite,
IN LPSTORAGE pStg, OUT LPVOID FAR* ppvObj);
WINOLEAPI OleCreateFromData(IN LPDATAOBJECT pSrcDataObj, IN REFIID riid,
IN DWORD renderopt, IN LPFORMATETC pFormatEtc,
IN LPOLECLIENTSITE pClientSite, IN LPSTORAGE pStg,
OUT LPVOID FAR* ppvObj);
WINOLEAPI OleCreateFromDataEx(IN LPDATAOBJECT pSrcDataObj, IN REFIID riid,
IN DWORD dwFlags, IN DWORD renderopt, IN ULONG cFormats, IN DWORD* rgAdvf,
IN LPFORMATETC rgFormatEtc, IN IAdviseSink FAR* lpAdviseSink,
OUT DWORD FAR* rgdwConnection, IN LPOLECLIENTSITE pClientSite,
IN LPSTORAGE pStg, OUT LPVOID FAR* ppvObj);
WINOLEAPI OleCreateLinkFromData(IN LPDATAOBJECT pSrcDataObj, IN REFIID riid,
IN DWORD renderopt, IN LPFORMATETC pFormatEtc,
IN LPOLECLIENTSITE pClientSite, IN LPSTORAGE pStg,
OUT LPVOID FAR* ppvObj);
WINOLEAPI OleCreateLinkFromDataEx(IN LPDATAOBJECT pSrcDataObj, IN REFIID riid,
IN DWORD dwFlags, IN DWORD renderopt, IN ULONG cFormats, IN DWORD* rgAdvf,
IN LPFORMATETC rgFormatEtc, IN IAdviseSink FAR* lpAdviseSink,
OUT IN DWORD FAR* rgdwConnection, IN LPOLECLIENTSITE pClientSite,
IN LPSTORAGE pStg, OUT LPVOID FAR* ppvObj);
WINOLEAPI OleCreateStaticFromData(IN LPDATAOBJECT pSrcDataObj, IN REFIID iid,
IN DWORD renderopt, IN LPFORMATETC pFormatEtc,
IN LPOLECLIENTSITE pClientSite, IN LPSTORAGE pStg,
OUT LPVOID FAR* ppvObj);
WINOLEAPI OleCreateLink(IN LPMONIKER pmkLinkSrc, IN REFIID riid,
IN DWORD renderopt, IN LPFORMATETC lpFormatEtc,
IN LPOLECLIENTSITE pClientSite, IN LPSTORAGE pStg, OUT LPVOID FAR* ppvObj);
WINOLEAPI OleCreateLinkEx(IN LPMONIKER pmkLinkSrc, IN REFIID riid,
IN DWORD dwFlags, IN DWORD renderopt, IN ULONG cFormats, IN DWORD* rgAdvf,
IN LPFORMATETC rgFormatEtc, IN IAdviseSink FAR* lpAdviseSink,
OUT DWORD FAR* rgdwConnection, IN LPOLECLIENTSITE pClientSite,
IN LPSTORAGE pStg, OUT LPVOID FAR* ppvObj);
WINOLEAPI OleCreateLinkToFile(IN LPCOLESTR lpszFileName, IN REFIID riid,
IN DWORD renderopt, IN LPFORMATETC lpFormatEtc,
IN LPOLECLIENTSITE pClientSite, IN LPSTORAGE pStg, OUT LPVOID FAR* ppvObj);
WINOLEAPI OleCreateLinkToFileEx(IN LPCOLESTR lpszFileName, IN REFIID riid,
IN DWORD dwFlags, IN DWORD renderopt, IN ULONG cFormats, IN DWORD* rgAdvf,
IN LPFORMATETC rgFormatEtc, IN IAdviseSink FAR* lpAdviseSink,
OUT DWORD FAR* rgdwConnection, IN LPOLECLIENTSITE pClientSite,
IN LPSTORAGE pStg, OUT LPVOID FAR* ppvObj);
WINOLEAPI OleCreateFromFile(IN REFCLSID rclsid, IN LPCOLESTR lpszFileName, IN REFIID riid,
IN DWORD renderopt, IN LPFORMATETC lpFormatEtc,
IN LPOLECLIENTSITE pClientSite, IN LPSTORAGE pStg, OUT LPVOID FAR* ppvObj);
WINOLEAPI OleCreateFromFileEx(IN REFCLSID rclsid, IN LPCOLESTR lpszFileName, IN REFIID riid,
IN DWORD dwFlags, IN DWORD renderopt, IN ULONG cFormats, IN DWORD* rgAdvf,
IN LPFORMATETC rgFormatEtc, IN IAdviseSink FAR* lpAdviseSink,
OUT DWORD FAR* rgdwConnection, IN LPOLECLIENTSITE pClientSite,
IN LPSTORAGE pStg, OUT LPVOID FAR* ppvObj);
WINOLEAPI OleLoad(IN LPSTORAGE pStg, IN REFIID riid, IN LPOLECLIENTSITE pClientSite,
OUT LPVOID FAR* ppvObj);
WINOLEAPI OleSave(IN LPPERSISTSTORAGE pPS, IN LPSTORAGE pStg, IN BOOL fSameAsLoad);
WINOLEAPI OleLoadFromStream( IN LPSTREAM pStm, IN REFIID iidInterface, OUT LPVOID FAR* ppvObj);
WINOLEAPI OleSaveToStream( IN LPPERSISTSTREAM pPStm, IN LPSTREAM pStm );
WINOLEAPI OleSetContainedObject(IN LPUNKNOWN pUnknown, IN BOOL fContained);
WINOLEAPI OleNoteObjectVisible(IN LPUNKNOWN pUnknown, IN BOOL fVisible);
/* Drag/Drop APIs */
WINOLEAPI RegisterDragDrop(IN HWND hwnd, IN LPDROPTARGET pDropTarget);
WINOLEAPI RevokeDragDrop(IN HWND hwnd);
WINOLEAPI DoDragDrop(IN LPDATAOBJECT pDataObj, IN LPDROPSOURCE pDropSource,
IN DWORD dwOKEffects, OUT LPDWORD pdwEffect);
/* Clipboard APIs */
WINOLEAPI OleSetClipboard(IN LPDATAOBJECT pDataObj);
WINOLEAPI OleGetClipboard(OUT LPDATAOBJECT FAR* ppDataObj);
WINOLEAPI OleFlushClipboard(void);
WINOLEAPI OleIsCurrentClipboard(IN LPDATAOBJECT pDataObj);
/* InPlace Editing APIs */
WINOLEAPI_(HOLEMENU) OleCreateMenuDescriptor (IN HMENU hmenuCombined,
IN LPOLEMENUGROUPWIDTHS lpMenuWidths);
WINOLEAPI OleSetMenuDescriptor (IN HOLEMENU holemenu, IN HWND hwndFrame,
IN HWND hwndActiveObject,
IN LPOLEINPLACEFRAME lpFrame,
IN LPOLEINPLACEACTIVEOBJECT lpActiveObj);
WINOLEAPI OleDestroyMenuDescriptor (IN HOLEMENU holemenu);
WINOLEAPI OleTranslateAccelerator (IN LPOLEINPLACEFRAME lpFrame,
IN LPOLEINPLACEFRAMEINFO lpFrameInfo, IN LPMSG lpmsg);
/* Helper APIs */
WINOLEAPI_(HANDLE) OleDuplicateData (IN HANDLE hSrc, IN CLIPFORMAT cfFormat,
IN UINT uiFlags);
WINOLEAPI OleDraw (IN LPUNKNOWN pUnknown, IN DWORD dwAspect, IN HDC hdcDraw,
IN LPCRECT lprcBounds);
WINOLEAPI OleRun(IN LPUNKNOWN pUnknown);
WINOLEAPI_(BOOL) OleIsRunning(IN LPOLEOBJECT pObject);
WINOLEAPI OleLockRunning(IN LPUNKNOWN pUnknown, IN BOOL fLock, IN BOOL fLastUnlockCloses);
WINOLEAPI_(void) ReleaseStgMedium(IN LPSTGMEDIUM);
WINOLEAPI CreateOleAdviseHolder(OUT LPOLEADVISEHOLDER FAR* ppOAHolder);
WINOLEAPI OleCreateDefaultHandler(IN REFCLSID clsid, IN LPUNKNOWN pUnkOuter,
IN REFIID riid, OUT LPVOID FAR* lplpObj);
WINOLEAPI OleCreateEmbeddingHelper(IN REFCLSID clsid, IN LPUNKNOWN pUnkOuter,
IN DWORD flags, IN LPCLASSFACTORY pCF,
IN REFIID riid, OUT LPVOID FAR* lplpObj);
WINOLEAPI_(BOOL) IsAccelerator(IN HACCEL hAccel, IN int cAccelEntries, IN LPMSG lpMsg,
OUT WORD FAR* lpwCmd);
/* Icon extraction Helper APIs */
WINOLEAPI_(HGLOBAL) OleGetIconOfFile(IN LPOLESTR lpszPath, IN BOOL fUseFileAsLabel);
WINOLEAPI_(HGLOBAL) OleGetIconOfClass(IN REFCLSID rclsid, IN LPOLESTR lpszLabel,
IN BOOL fUseTypeAsLabel);
WINOLEAPI_(HGLOBAL) OleMetafilePictFromIconAndLabel(IN HICON hIcon, IN LPOLESTR lpszLabel,
IN LPOLESTR lpszSourceFile, IN UINT iIconIndex);
/* Registration Database Helper APIs */
WINOLEAPI OleRegGetUserType (IN REFCLSID clsid, IN DWORD dwFormOfType,
OUT LPOLESTR FAR* pszUserType);
WINOLEAPI OleRegGetMiscStatus (IN REFCLSID clsid, IN DWORD dwAspect,
OUT DWORD FAR* pdwStatus);
WINOLEAPI OleRegEnumFormatEtc (IN REFCLSID clsid, IN DWORD dwDirection,
OUT LPENUMFORMATETC FAR* ppenum);
WINOLEAPI OleRegEnumVerbs (IN REFCLSID clsid, OUT LPENUMOLEVERB FAR* ppenum);
#ifdef _MAC
/* WlmOLE helper APIs */
WINOLEAPI WlmOleCheckoutMacInterface(LPUNKNOWN pUnk, LPVOID* ppv);
WINOLEAPI WlmOleCheckinMacInterface(LPUNKNOWN pUnk);
WINOLEAPI WlmOleWrapMacInterface(LPUNKNOWN pUnk, REFIID riid, LPVOID* ppv);
WINOLEAPI WlmOleUnwrapMacInterface(LPVOID pv);
WINOLEAPI WlmOleCheckoutWinInterface(LPVOID pUnk, LPUNKNOWN* ppv);
WINOLEAPI WlmOleCheckinWinInterface(LPVOID pUnk);
WINOLEAPI WlmOleWrapWinInterface(LPVOID pUnk, REFIID riid, LPUNKNOWN* ppv);
WINOLEAPI WlmOleUnwrapWinInterface(LPVOID pv);
WINOLEAPI_(void) WlmOleVersion(void);
WINOLEAPI_(void) WlmOleSetInPlaceWindow(HWND hwnd);
typedef HRESULT (STDAPICALLTYPE* OLEWRAPPROC) (REFIID riid, LPVOID* ppvWin, LPVOID* ppvMac);
WINOLEAPI WlmOleRegisterUserWrap(OLEWRAPPROC procNew, OLEWRAPPROC* pprocOld);
#endif
/* OLE 1.0 conversion APIS */
/***** OLE 1.0 OLESTREAM declarations *************************************/
typedef struct _OLESTREAM FAR* LPOLESTREAM;
typedef struct _OLESTREAMVTBL
{
DWORD (CALLBACK* Get)(LPOLESTREAM, void FAR*, DWORD);
DWORD (CALLBACK* Put)(LPOLESTREAM, const void FAR*, DWORD);
} OLESTREAMVTBL;
typedef OLESTREAMVTBL FAR* LPOLESTREAMVTBL;
typedef struct _OLESTREAM
{
LPOLESTREAMVTBL lpstbl;
} OLESTREAM;
WINOLEAPI OleConvertOLESTREAMToIStorage
(IN LPOLESTREAM lpolestream,
OUT LPSTORAGE pstg,
IN const DVTARGETDEVICE FAR* ptd);
WINOLEAPI OleConvertIStorageToOLESTREAM
(IN LPSTORAGE pstg,
OUT LPOLESTREAM lpolestream);
/* Storage Utility APIs */
WINOLEAPI GetHGlobalFromILockBytes (IN LPLOCKBYTES plkbyt, OUT HGLOBAL FAR* phglobal);
WINOLEAPI CreateILockBytesOnHGlobal (IN HGLOBAL hGlobal, IN BOOL fDeleteOnRelease,
OUT LPLOCKBYTES FAR* pplkbyt);
WINOLEAPI GetHGlobalFromStream (IN LPSTREAM pstm, OUT HGLOBAL FAR* phglobal);
WINOLEAPI CreateStreamOnHGlobal (IN HGLOBAL hGlobal, IN BOOL fDeleteOnRelease,
OUT LPSTREAM FAR* ppstm);
/* ConvertTo APIS */
WINOLEAPI OleDoAutoConvert(IN LPSTORAGE pStg, OUT LPCLSID pClsidNew);
WINOLEAPI OleGetAutoConvert(IN REFCLSID clsidOld, OUT LPCLSID pClsidNew);
WINOLEAPI OleSetAutoConvert(IN REFCLSID clsidOld, IN REFCLSID clsidNew);
WINOLEAPI GetConvertStg(IN LPSTORAGE pStg);
WINOLEAPI SetConvertStg(IN LPSTORAGE pStg, IN BOOL fConvert);
WINOLEAPI OleConvertIStorageToOLESTREAMEx
(IN LPSTORAGE pstg,
// Presentation data to OLESTREAM
IN CLIPFORMAT cfFormat, // format
IN LONG lWidth, // width
IN LONG lHeight, // height
IN DWORD dwSize, // size in bytes
IN LPSTGMEDIUM pmedium, // bits
OUT LPOLESTREAM polestm);
WINOLEAPI OleConvertOLESTREAMToIStorageEx
(IN LPOLESTREAM polestm,
OUT LPSTORAGE pstg,
// Presentation data from OLESTREAM
OUT CLIPFORMAT FAR* pcfFormat, // format
OUT LONG FAR* plwWidth, // width
OUT LONG FAR* plHeight, // height
OUT DWORD FAR* pdwSize, // size in bytes
OUT LPSTGMEDIUM pmedium); // bits
#ifndef _MAC
#ifndef RC_INVOKED
#include <poppack.h>
#endif // RC_INVOKED
#else // _MAC
#ifndef __MACAPI__
#include <macapi.h>
#endif
#ifdef _WIN32
#include "macname2.h"
#endif // _WIN32
#endif // _MAC
//d308927f-ca94-4c96-8d87-2692a3dadff6
/*#!perl
SetInsertionPoint("ole2.h", "d308927f-ca94-4c96-8d87-2692a3dadff6");
*/
#endif // __OLE2_H__

File diff suppressed because it is too large Load Diff

4954
lib/MSPlatformSDK/Include/OleIdl.h Executable file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,36 @@
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
poppack.h
Abstract:
This file turns packing of structures off. (That is, it enables
automatic alignment of structure fields.) An include file is needed
because various compilers do this in different ways.
poppack.h is the complement to pshpack?.h. An inclusion of poppack.h
MUST ALWAYS be preceded by an inclusion of one of pshpack?.h, in one-to-one
correspondence.
For Microsoft compatible compilers, this file uses the pop option
to the pack pragma so that it can restore the previous saved by the
pshpack?.h include file.
--*/
#if ! (defined(lint) || defined(RC_INVOKED))
#if ( _MSC_VER >= 800 && !defined(_M_I86)) || defined(_PUSHPOP_SUPPORTED)
#pragma warning(disable:4103)
#if !(defined( MIDL_PASS )) || defined( __midl )
#pragma pack(pop)
#else
#pragma pack()
#endif
#else
#pragma pack()
#endif
#endif // ! (defined(lint) || defined(RC_INVOKED))

1079
lib/MSPlatformSDK/Include/PrSht.h Executable 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,33 @@
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
pshpack1.h
Abstract:
This file turns 1 byte packing of structures on. (That is, it disables
automatic alignment of structure fields.) An include file is needed
because various compilers do this in different ways. For Microsoft
compatible compilers, this files uses the push option to the pack pragma
so that the poppack.h include file can restore the previous packing
reliably.
The file poppack.h is the complement to this file.
--*/
#if ! (defined(lint) || defined(RC_INVOKED))
#if ( _MSC_VER >= 800 && !defined(_M_I86)) || defined(_PUSHPOP_SUPPORTED)
#pragma warning(disable:4103)
#if !(defined( MIDL_PASS )) || defined( __midl )
#pragma pack(push,1)
#else
#pragma pack(1)
#endif
#else
#pragma pack(1)
#endif
#endif // ! (defined(lint) || defined(RC_INVOKED))

View File

@ -0,0 +1,33 @@
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
pshpack2.h
Abstract:
This file turns 2 byte packing of structures on. (That is, it disables
automatic alignment of structure fields.) An include file is needed
because various compilers do this in different ways. For Microsoft
compatible compilers, this files uses the push option to the pack pragma
so that the poppack.h include file can restore the previous packing
reliably.
The file poppack.h is the complement to this file.
--*/
#if ! (defined(lint) || defined(RC_INVOKED))
#if ( _MSC_VER >= 800 && !defined(_M_I86)) || defined(_PUSHPOP_SUPPORTED)
#pragma warning(disable:4103)
#if !(defined( MIDL_PASS )) || defined( __midl )
#pragma pack(push,2)
#else
#pragma pack(2)
#endif
#else
#pragma pack(2)
#endif
#endif // ! (defined(lint) || defined(RC_INVOKED))

View File

@ -0,0 +1,33 @@
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
pshpack4.h
Abstract:
This file turns 4 byte packing of structures on. (That is, it disables
automatic alignment of structure fields.) An include file is needed
because various compilers do this in different ways. For Microsoft
compatible compilers, this files uses the push option to the pack pragma
so that the poppack.h include file can restore the previous packing
reliably.
The file poppack.h is the complement to this file.
--*/
#if ! (defined(lint) || defined(RC_INVOKED))
#if ( _MSC_VER >= 800 && !defined(_M_I86)) || defined(_PUSHPOP_SUPPORTED)
#pragma warning(disable:4103)
#if !(defined( MIDL_PASS )) || defined( __midl )
#pragma pack(push,4)
#else
#pragma pack(4)
#endif
#else
#pragma pack(4)
#endif
#endif // ! (defined(lint) || defined(RC_INVOKED))

View File

@ -0,0 +1,33 @@
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
pshpack8.h
Abstract:
This file turns 8 byte packing of structures on. (That is, it disables
automatic alignment of structure fields.) An include file is needed
because various compilers do this in different ways. For Microsoft
compatible compilers, this files uses the push option to the pack pragma
so that the poppack.h include file can restore the previous packing
reliably.
The file poppack.h is the complement to this file.
--*/
#if ! (defined(lint) || defined(RC_INVOKED))
#if ( _MSC_VER >= 800 && !defined(_M_I86)) || defined(_PUSHPOP_SUPPORTED)
#pragma warning(disable:4103)
#if !(defined( MIDL_PASS )) || defined( __midl )
#pragma pack(push,8)
#else
#pragma pack(8)
#endif
#else
#pragma pack(8)
#endif
#endif // ! (defined(lint) || defined(RC_INVOKED))

View File

@ -0,0 +1,116 @@
//+-------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// File: reason.h
//
// Contents: Shutdown reason code values.
//
// History: 8-00 Created Hughleat
//
//--------------------------------------------------------------------
#if !defined SENTINEL_Reason
# define SENTINEL_Reason
// Reason flags
// Flags used by the various UIs.
#define SHTDN_REASON_FLAG_COMMENT_REQUIRED 0x01000000
#define SHTDN_REASON_FLAG_DIRTY_PROBLEM_ID_REQUIRED 0x02000000
#define SHTDN_REASON_FLAG_CLEAN_UI 0x04000000
#define SHTDN_REASON_FLAG_DIRTY_UI 0x08000000
// Flags that end up in the event log code.
#define SHTDN_REASON_FLAG_USER_DEFINED 0x40000000
#define SHTDN_REASON_FLAG_PLANNED 0x80000000
// Microsoft major reasons.
#define SHTDN_REASON_MAJOR_OTHER 0x00000000
#define SHTDN_REASON_MAJOR_NONE 0x00000000
#define SHTDN_REASON_MAJOR_HARDWARE 0x00010000
#define SHTDN_REASON_MAJOR_OPERATINGSYSTEM 0x00020000
#define SHTDN_REASON_MAJOR_SOFTWARE 0x00030000
#define SHTDN_REASON_MAJOR_APPLICATION 0x00040000
#define SHTDN_REASON_MAJOR_SYSTEM 0x00050000
#define SHTDN_REASON_MAJOR_POWER 0x00060000
#define SHTDN_REASON_MAJOR_LEGACY_API 0x00070000
// Microsoft minor reasons.
#define SHTDN_REASON_MINOR_OTHER 0x00000000
#define SHTDN_REASON_MINOR_NONE 0x000000ff
#define SHTDN_REASON_MINOR_MAINTENANCE 0x00000001
#define SHTDN_REASON_MINOR_INSTALLATION 0x00000002
#define SHTDN_REASON_MINOR_UPGRADE 0x00000003
#define SHTDN_REASON_MINOR_RECONFIG 0x00000004
#define SHTDN_REASON_MINOR_HUNG 0x00000005
#define SHTDN_REASON_MINOR_UNSTABLE 0x00000006
#define SHTDN_REASON_MINOR_DISK 0x00000007
#define SHTDN_REASON_MINOR_PROCESSOR 0x00000008
#define SHTDN_REASON_MINOR_NETWORKCARD 0x00000009
#define SHTDN_REASON_MINOR_POWER_SUPPLY 0x0000000a
#define SHTDN_REASON_MINOR_CORDUNPLUGGED 0x0000000b
#define SHTDN_REASON_MINOR_ENVIRONMENT 0x0000000c
#define SHTDN_REASON_MINOR_HARDWARE_DRIVER 0x0000000d
#define SHTDN_REASON_MINOR_OTHERDRIVER 0x0000000e
#define SHTDN_REASON_MINOR_BLUESCREEN 0x0000000F
#define SHTDN_REASON_MINOR_SERVICEPACK 0x00000010
#define SHTDN_REASON_MINOR_HOTFIX 0x00000011
#define SHTDN_REASON_MINOR_SECURITYFIX 0x00000012
#define SHTDN_REASON_MINOR_SECURITY 0x00000013
#define SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY 0x00000014
#define SHTDN_REASON_MINOR_WMI 0x00000015
#define SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL 0x00000016
#define SHTDN_REASON_MINOR_HOTFIX_UNINSTALL 0x00000017
#define SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL 0x00000018
#define SHTDN_REASON_MINOR_MMC 0x00000019
#define SHTDN_REASON_MINOR_SYSTEMRESTORE 0x0000001a
#define SHTDN_REASON_MINOR_TERMSRV 0x00000020
#define SHTDN_REASON_MINOR_DC_PROMOTION 0x00000021
#define SHTDN_REASON_MINOR_DC_DEMOTION 0x00000022
#define SHTDN_REASON_UNKNOWN SHTDN_REASON_MINOR_NONE
#define SHTDN_REASON_LEGACY_API (SHTDN_REASON_MAJOR_LEGACY_API | SHTDN_REASON_FLAG_PLANNED)
// This mask cuts out UI flags.
#define SHTDN_REASON_VALID_BIT_MASK 0xc0ffffff
// Convenience flags.
#define PCLEANUI (SHTDN_REASON_FLAG_PLANNED | SHTDN_REASON_FLAG_CLEAN_UI)
#define UCLEANUI (SHTDN_REASON_FLAG_CLEAN_UI)
#define PDIRTYUI (SHTDN_REASON_FLAG_PLANNED | SHTDN_REASON_FLAG_DIRTY_UI)
#define UDIRTYUI (SHTDN_REASON_FLAG_DIRTY_UI)
/*
* Maximum character lengths for reason name, description, problem id, and
* comment respectively.
*/
#define MAX_REASON_NAME_LEN 64
#define MAX_REASON_DESC_LEN 256
#define MAX_REASON_BUGID_LEN 32
#define MAX_REASON_COMMENT_LEN 512
#define SHUTDOWN_TYPE_LEN 32
/*
* S.E.T. policy value
*
*/
#define POLICY_SHOWREASONUI_NEVER 0
#define POLICY_SHOWREASONUI_ALWAYS 1
#define POLICY_SHOWREASONUI_WORKSTATIONONLY 2
#define POLICY_SHOWREASONUI_SERVERONLY 3
/*
* Snapshot policy values
*/
#define SNAPSHOT_POLICY_NEVER 0
#define SNAPSHOT_POLICY_ALWAYS 1
#define SNAPSHOT_POLICY_UNPLANNED 2
/*
* Maximue user defined reasons
*/
#define MAX_NUM_REASONS 256
#endif // !defined SENTINEL_Reason

199
lib/MSPlatformSDK/Include/Rpc.h Executable file
View File

@ -0,0 +1,199 @@
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
rpc.h
Abstract:
Master include file for RPC applications.
--*/
#if !defined( RPC_NO_WINDOWS_H ) && !defined( MAC ) && !defined( _MAC )
#include <windows.h>
#endif // RPC_NO_WINDOWS_H
#ifndef __RPC_H__
#define __RPC_H__
#if _MSC_VER > 1000
#pragma once
#endif
#ifdef __cplusplus
extern "C" {
#endif
//-------------------------------------------------------------
// platform specific defines
//-------------------------------------------------------------
//------------------- MAC ---------------------------
#if defined( MAC ) || defined( _MAC )
#define __RPC_MAC__
// Set the packing level for RPC structures.
#include <pshpack2.h>
//------------------- WIN32 ---------------------------
#else // win32 platforms
#include <basetsd.h>
#if defined(_M_IA64) || defined(_M_AMD64)
#define __RPC_WIN64__
#else
#define __RPC_WIN32__
#endif
#endif
#if defined(__RPC_WIN64__)
#include <pshpack8.h>
#endif
#ifndef __MIDL_USER_DEFINED
#define midl_user_allocate MIDL_user_allocate
#define midl_user_free MIDL_user_free
#define __MIDL_USER_DEFINED
#endif
typedef void * I_RPC_HANDLE;
typedef long RPC_STATUS;
#if defined(__RPC_WIN32__) || defined(__RPC_WIN64__)
#define RPC_UNICODE_SUPPORTED
#endif
#if !defined(__RPC_MAC__) && ( (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) )
# define __RPC_API __stdcall
# define __RPC_USER __stdcall
# define __RPC_STUB __stdcall
# define RPC_ENTRY __stdcall
#else // Not Win32/Win64
# define __RPC_API
# define __RPC_USER
# define __RPC_STUB
# define RPC_ENTRY
#endif
#define __RPC_FAR
// Some RPC platforms don't define DECLSPEC_IMPORT
#if !defined(DECLSPEC_IMPORT)
#if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_IA64) || defined(_M_AMD64)) && !defined(MIDL_PASS)
#define DECLSPEC_IMPORT __declspec(dllimport)
#else
#define DECLSPEC_IMPORT
#endif
#endif
#if !defined(_RPCRT4_)
#define RPCRTAPI DECLSPEC_IMPORT
#else
#define RPCRTAPI
#endif
#if !defined(_RPCNS4_)
#define RPCNSAPI DECLSPEC_IMPORT
#else
#define RPCNSAPI
#endif
#ifdef __RPC_MAC__
#include <setjmp.h>
#define RPCXCWORD (sizeof(jmp_buf)/sizeof(int))
#if _MSC_VER >= 1200
#pragma warning(push)
#endif
#pragma warning( disable: 4005 )
#include <rpcdce.h>
#include <rpcnsi.h>
#include <rpcerr.h>
#include <rpcmac.h>
#if _MSC_VER >= 1200
#pragma warning(pop)
#else
#pragma warning( default : 4005 )
#endif
typedef void (RPC_ENTRY *MACYIELDCALLBACK)(/*OSErr*/ short *) ;
RPC_STATUS RPC_ENTRY
RpcMacSetYieldInfo(
MACYIELDCALLBACK pfnCallback) ;
#if !defined(UNALIGNED)
#define UNALIGNED
#endif
#include <poppack.h>
#else // __RPC_MAC__
#include <rpcdce.h>
#include <rpcnsi.h>
#include <rpcnterr.h>
#include <excpt.h>
#include <winerror.h>
#define RpcTryExcept \
__try \
{
// trystmts
#define RpcExcept(expr) \
} \
__except (expr) \
{
// exceptstmts
#define RpcEndExcept \
}
#define RpcTryFinally \
__try \
{
// trystmts
#define RpcFinally \
} \
__finally \
{
// finallystmts
#define RpcEndFinally \
}
#define RpcExceptionCode() GetExceptionCode()
#define RpcAbnormalTermination() AbnormalTermination()
#endif // __RPC_MAC__
// Definitions which depend on windows.h
#if !defined( RPC_NO_WINDOWS_H ) && !defined(__RPC_MAC__)
#include <rpcasync.h>
#endif // RPC_NO_WINDOWS_H
#if defined(__RPC_WIN64__)
#include <poppack.h>
#endif
#ifdef __cplusplus
}
#endif
#endif // __RPC_H__

View File

@ -0,0 +1,433 @@
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
rpcasync.h
Abstract:
This module contains the RPC runtime APIs needed to use
[async] RPC features.
--*/
#ifndef __RPCASYNC_H__
#define __RPCASYNC_H__
#if _MSC_VER > 1000
#pragma once
#endif
#if defined(__RPC_WIN64__)
#include <pshpack8.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define RPC_ASYNC_VERSION_1_0 sizeof(RPC_ASYNC_STATE)
typedef
enum _RPC_NOTIFICATION_TYPES
{
RpcNotificationTypeNone,
RpcNotificationTypeEvent,
RpcNotificationTypeApc,
RpcNotificationTypeIoc,
RpcNotificationTypeHwnd,
RpcNotificationTypeCallback
} RPC_NOTIFICATION_TYPES;
typedef
enum _RPC_ASYNC_EVENT {
RpcCallComplete,
RpcSendComplete,
RpcReceiveComplete
} RPC_ASYNC_EVENT;
struct _RPC_ASYNC_STATE;
typedef void RPC_ENTRY
RPCNOTIFICATION_ROUTINE (
struct _RPC_ASYNC_STATE *pAsync,
void *Context,
RPC_ASYNC_EVENT Event);
typedef RPCNOTIFICATION_ROUTINE *PFN_RPCNOTIFICATION_ROUTINE;
typedef struct _RPC_ASYNC_STATE {
unsigned int Size; // size of this structure
unsigned long Signature;
long Lock;
unsigned long Flags;
void *StubInfo;
void *UserInfo;
void *RuntimeInfo;
RPC_ASYNC_EVENT Event;
RPC_NOTIFICATION_TYPES NotificationType;
union {
//
// Notification by APC
//
struct {
PFN_RPCNOTIFICATION_ROUTINE NotificationRoutine;
HANDLE hThread;
} APC;
//
// Notification by IO completion port
//
struct {
HANDLE hIOPort;
DWORD dwNumberOfBytesTransferred;
DWORD_PTR dwCompletionKey;
LPOVERLAPPED lpOverlapped;
} IOC;
//
// Notification by window message
//
struct {
HWND hWnd;
UINT Msg;
} HWND;
//
// Notification by event
//
HANDLE hEvent;
//
// Notification by callback function
//
// This option is available only to OLE
//
PFN_RPCNOTIFICATION_ROUTINE NotificationRoutine;
} u;
LONG_PTR Reserved[4];
} RPC_ASYNC_STATE, *PRPC_ASYNC_STATE;
// Possible values for Flags
#define RPC_C_NOTIFY_ON_SEND_COMPLETE 0x1
#define RPC_C_INFINITE_TIMEOUT INFINITE
#define RpcAsyncGetCallHandle(pAsync) (((PRPC_ASYNC_STATE) pAsync)->RuntimeInfo)
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcAsyncInitializeHandle (
PRPC_ASYNC_STATE pAsync,
unsigned int Size
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcAsyncRegisterInfo (
PRPC_ASYNC_STATE pAsync
) ;
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcAsyncGetCallStatus (
PRPC_ASYNC_STATE pAsync
) ;
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcAsyncCompleteCall (
PRPC_ASYNC_STATE pAsync,
void *Reply
) ;
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcAsyncAbortCall (
PRPC_ASYNC_STATE pAsync,
unsigned long ExceptionCode
) ;
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcAsyncCancelCall (
IN PRPC_ASYNC_STATE pAsync,
IN BOOL fAbort
) ;
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcAsyncCleanupThread (
IN DWORD dwTimeout
);
typedef enum tagExtendedErrorParamTypes
{
eeptAnsiString = 1,
eeptUnicodeString,
eeptLongVal,
eeptShortVal,
eeptPointerVal,
eeptNone,
eeptBinary
} ExtendedErrorParamTypes;
#define MaxNumberOfEEInfoParams 4
#define RPC_EEINFO_VERSION 1
typedef struct tagBinaryParam
{
void *Buffer;
short Size;
} BinaryParam;
typedef struct tagRPC_EE_INFO_PARAM
{
ExtendedErrorParamTypes ParameterType;
union
{
LPSTR AnsiString;
LPWSTR UnicodeString;
long LVal;
short SVal;
ULONGLONG PVal;
BinaryParam BVal;
} u;
} RPC_EE_INFO_PARAM;
#define EEInfoPreviousRecordsMissing 1
#define EEInfoNextRecordsMissing 2
#define EEInfoUseFileTime 4
#define EEInfoGCCOM 11
#define EEInfoGCFRS 12
typedef struct tagRPC_EXTENDED_ERROR_INFO
{
ULONG Version;
LPWSTR ComputerName;
ULONG ProcessID;
union
{
SYSTEMTIME SystemTime;
FILETIME FileTime;
} u;
ULONG GeneratingComponent;
ULONG Status;
USHORT DetectionLocation;
USHORT Flags;
int NumberOfParameters;
RPC_EE_INFO_PARAM Parameters[MaxNumberOfEEInfoParams];
} RPC_EXTENDED_ERROR_INFO;
typedef struct tagRPC_ERROR_ENUM_HANDLE
{
ULONG Signature;
void *CurrentPos;
void *Head;
} RPC_ERROR_ENUM_HANDLE;
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcErrorStartEnumeration (
IN OUT RPC_ERROR_ENUM_HANDLE *EnumHandle
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcErrorGetNextRecord (
IN RPC_ERROR_ENUM_HANDLE *EnumHandle,
IN BOOL CopyStrings,
OUT RPC_EXTENDED_ERROR_INFO *ErrorInfo
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcErrorEndEnumeration (
IN OUT RPC_ERROR_ENUM_HANDLE *EnumHandle
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcErrorResetEnumeration (
IN OUT RPC_ERROR_ENUM_HANDLE *EnumHandle
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcErrorGetNumberOfRecords (
IN RPC_ERROR_ENUM_HANDLE *EnumHandle,
OUT int *Records
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcErrorSaveErrorInfo (
IN RPC_ERROR_ENUM_HANDLE *EnumHandle,
OUT PVOID *ErrorBlob,
OUT size_t *BlobSize
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcErrorLoadErrorInfo (
IN PVOID ErrorBlob,
IN size_t BlobSize,
OUT RPC_ERROR_ENUM_HANDLE *EnumHandle
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcErrorAddRecord (
IN RPC_EXTENDED_ERROR_INFO *ErrorInfo
);
RPCRTAPI
void
RPC_ENTRY
RpcErrorClearInformation (
void
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcGetAuthorizationContextForClient (
IN RPC_BINDING_HANDLE ClientBinding OPTIONAL,
IN BOOL ImpersonateOnReturn,
IN PVOID Reserved1,
IN PLARGE_INTEGER pExpirationTime OPTIONAL,
IN LUID Reserved2,
IN DWORD Reserved3,
IN PVOID Reserved4,
OUT PVOID *pAuthzClientContext
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcFreeAuthorizationContext (
IN OUT PVOID *pAuthzClientContext
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcSsContextLockExclusive (
IN RPC_BINDING_HANDLE ServerBindingHandle,
IN PVOID UserContext
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcSsContextLockShared (
IN RPC_BINDING_HANDLE ServerBindingHandle,
IN PVOID UserContext
);
#define RPC_CALL_ATTRIBUTES_VERSION (1)
#define RPC_QUERY_SERVER_PRINCIPAL_NAME (2)
#define RPC_QUERY_CLIENT_PRINCIPAL_NAME (4)
typedef struct tagRPC_CALL_ATTRIBUTES_V1_W
{
unsigned int Version;
unsigned long Flags;
unsigned long ServerPrincipalNameBufferLength;
unsigned short *ServerPrincipalName;
unsigned long ClientPrincipalNameBufferLength;
unsigned short *ClientPrincipalName;
unsigned long AuthenticationLevel;
unsigned long AuthenticationService;
BOOL NullSession;
} RPC_CALL_ATTRIBUTES_V1_W;
typedef struct tagRPC_CALL_ATTRIBUTES_V1_A
{
unsigned int Version;
unsigned long Flags;
unsigned long ServerPrincipalNameBufferLength;
unsigned char *ServerPrincipalName;
unsigned long ClientPrincipalNameBufferLength;
unsigned char *ClientPrincipalName;
unsigned long AuthenticationLevel;
unsigned long AuthenticationService;
BOOL NullSession;
} RPC_CALL_ATTRIBUTES_V1_A;
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcServerInqCallAttributesW (
IN RPC_BINDING_HANDLE ClientBinding, OPTIONAL
IN OUT void *RpcCallAttributes
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcServerInqCallAttributesA (
IN RPC_BINDING_HANDLE ClientBinding, OPTIONAL
IN OUT void *RpcCallAttributes
);
#ifdef UNICODE
# define RPC_CALL_ATTRIBUTES_V1 RPC_CALL_ATTRIBUTES_V1_W
# define RpcServerInqCallAttributes RpcServerInqCallAttributesW
#else
# define RPC_CALL_ATTRIBUTES_V1 RPC_CALL_ATTRIBUTES_V1_A
# define RpcServerInqCallAttributes RpcServerInqCallAttributesA
#endif // !UNICODE
typedef RPC_CALL_ATTRIBUTES_V1 RPC_CALL_ATTRIBUTES;
//
// Internal APIs
//
RPC_STATUS RPC_ENTRY
I_RpcAsyncSetHandle (
IN PRPC_MESSAGE Message,
IN PRPC_ASYNC_STATE pAsync
);
RPC_STATUS RPC_ENTRY
I_RpcAsyncAbortCall (
IN PRPC_ASYNC_STATE pAsync,
IN unsigned long ExceptionCode
) ;
int
RPC_ENTRY
I_RpcExceptionFilter (
unsigned long ExceptionCode
);
#ifdef __cplusplus
}
#endif
#if defined(__RPC_WIN64__)
#include <poppack.h>
#endif
#endif /* __RPCASYNC_H__ */

2234
lib/MSPlatformSDK/Include/RpcDce.h Executable file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,902 @@
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
rpcdcep.h
Abstract:
This module contains the private RPC runtime APIs for use by the
stubs and by support libraries. Applications must not call these
routines.
--*/
#ifndef __RPCDCEP_H__
#define __RPCDCEP_H__
#if _MSC_VER > 1000
#pragma once
#endif
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _RPC_VERSION {
unsigned short MajorVersion;
unsigned short MinorVersion;
} RPC_VERSION;
typedef struct _RPC_SYNTAX_IDENTIFIER {
GUID SyntaxGUID;
RPC_VERSION SyntaxVersion;
} RPC_SYNTAX_IDENTIFIER, __RPC_FAR * PRPC_SYNTAX_IDENTIFIER;
typedef struct _RPC_MESSAGE
{
RPC_BINDING_HANDLE Handle;
unsigned long DataRepresentation;
void __RPC_FAR * Buffer;
unsigned int BufferLength;
unsigned int ProcNum;
PRPC_SYNTAX_IDENTIFIER TransferSyntax;
void __RPC_FAR * RpcInterfaceInformation;
void __RPC_FAR * ReservedForRuntime;
RPC_MGR_EPV __RPC_FAR * ManagerEpv;
void __RPC_FAR * ImportContext;
unsigned long RpcFlags;
} RPC_MESSAGE, __RPC_FAR * PRPC_MESSAGE;
typedef RPC_STATUS
RPC_ENTRY RPC_FORWARD_FUNCTION(
IN UUID __RPC_FAR * InterfaceId,
IN RPC_VERSION __RPC_FAR * InterfaceVersion,
IN UUID __RPC_FAR * ObjectId,
IN unsigned char __RPC_FAR * Rpcpro,
IN void __RPC_FAR * __RPC_FAR * ppDestEndpoint);
enum RPC_ADDRESS_CHANGE_TYPE
{
PROTOCOL_NOT_LOADED = 1,
PROTOCOL_LOADED,
PROTOCOL_ADDRESS_CHANGE
};
typedef void
RPC_ENTRY RPC_ADDRESS_CHANGE_FN(
IN void * arg
);
/*
* New context handle flavors.
*/
#define RPC_CONTEXT_HANDLE_DEFAULT_GUARD ((void *) -4083) /* FFFFF00D */
#define RPC_CONTEXT_HANDLE_DEFAULT_FLAGS 0x00000000UL
#define RPC_CONTEXT_HANDLE_FLAGS 0x30000000UL
#define RPC_CONTEXT_HANDLE_SERIALIZE 0x10000000UL
#define RPC_CONTEXT_HANDLE_DONT_SERIALIZE 0x20000000UL
/*
* Types of function calls for datagram rpc
*/
#define RPC_NCA_FLAGS_DEFAULT 0x00000000 /* 0b000...000 */
#define RPC_NCA_FLAGS_IDEMPOTENT 0x00000001 /* 0b000...001 */
#define RPC_NCA_FLAGS_BROADCAST 0x00000002 /* 0b000...010 */
#define RPC_NCA_FLAGS_MAYBE 0x00000004 /* 0b000...100 */
#define RPC_BUFFER_COMPLETE 0x00001000 /* used by pipes */
#define RPC_BUFFER_PARTIAL 0x00002000 /* used by pipes */
#define RPC_BUFFER_EXTRA 0x00004000 /* used by pipes */
#define RPC_BUFFER_ASYNC 0x00008000 /* used by async rpc */
#define RPC_BUFFER_NONOTIFY 0x00010000 /* used by async pipes */
#define RPCFLG_MESSAGE 0x01000000UL
#define RPCFLG_AUTO_COMPLETE 0x08000000UL
#define RPCFLG_LOCAL_CALL 0x10000000UL
#define RPCFLG_INPUT_SYNCHRONOUS 0x20000000UL
#define RPCFLG_ASYNCHRONOUS 0x40000000UL
#define RPCFLG_NON_NDR 0x80000000UL
#define RPCFLG_HAS_MULTI_SYNTAXES 0x02000000UL
#define RPCFLG_HAS_CALLBACK 0x04000000UL
#define RPC_FLAGS_VALID_BIT 0x00008000
typedef
void
(__RPC_STUB __RPC_FAR * RPC_DISPATCH_FUNCTION) (
IN OUT PRPC_MESSAGE Message
);
typedef struct {
unsigned int DispatchTableCount;
RPC_DISPATCH_FUNCTION __RPC_FAR * DispatchTable;
LONG_PTR Reserved;
} RPC_DISPATCH_TABLE, __RPC_FAR * PRPC_DISPATCH_TABLE;
typedef struct _RPC_PROTSEQ_ENDPOINT
{
unsigned char __RPC_FAR * RpcProtocolSequence;
unsigned char __RPC_FAR * Endpoint;
} RPC_PROTSEQ_ENDPOINT, __RPC_FAR * PRPC_PROTSEQ_ENDPOINT;
/*
Both of these types MUST start with the InterfaceId and TransferSyntax.
Look at RpcIfInqId and I_RpcIfInqTransferSyntaxes to see why.
*/
#define NT351_INTERFACE_SIZE 0x40
#define RPC_INTERFACE_HAS_PIPES 0x0001
typedef struct _RPC_SERVER_INTERFACE
{
unsigned int Length;
RPC_SYNTAX_IDENTIFIER InterfaceId;
RPC_SYNTAX_IDENTIFIER TransferSyntax;
PRPC_DISPATCH_TABLE DispatchTable;
unsigned int RpcProtseqEndpointCount;
PRPC_PROTSEQ_ENDPOINT RpcProtseqEndpoint;
RPC_MGR_EPV __RPC_FAR *DefaultManagerEpv;
void const __RPC_FAR *InterpreterInfo;
unsigned int Flags ;
} RPC_SERVER_INTERFACE, __RPC_FAR * PRPC_SERVER_INTERFACE;
typedef struct _RPC_CLIENT_INTERFACE
{
unsigned int Length;
RPC_SYNTAX_IDENTIFIER InterfaceId;
RPC_SYNTAX_IDENTIFIER TransferSyntax;
PRPC_DISPATCH_TABLE DispatchTable;
unsigned int RpcProtseqEndpointCount;
PRPC_PROTSEQ_ENDPOINT RpcProtseqEndpoint;
ULONG_PTR Reserved;
void const __RPC_FAR * InterpreterInfo;
unsigned int Flags ;
} RPC_CLIENT_INTERFACE, __RPC_FAR * PRPC_CLIENT_INTERFACE;
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcNegotiateTransferSyntax (
IN OUT RPC_MESSAGE __RPC_FAR * Message
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcGetBuffer (
IN OUT RPC_MESSAGE __RPC_FAR * Message
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcGetBufferWithObject (
IN OUT RPC_MESSAGE __RPC_FAR * Message,
IN UUID * ObjectUuid
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcSendReceive (
IN OUT RPC_MESSAGE __RPC_FAR * Message
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcFreeBuffer (
IN OUT RPC_MESSAGE __RPC_FAR * Message
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcSend (
IN OUT PRPC_MESSAGE Message
) ;
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcReceive (
IN OUT PRPC_MESSAGE Message,
IN unsigned int Size
) ;
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcFreePipeBuffer (
IN OUT RPC_MESSAGE __RPC_FAR * Message
) ;
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcReallocPipeBuffer (
IN PRPC_MESSAGE Message,
IN unsigned int NewSize
) ;
typedef void * I_RPC_MUTEX;
RPCRTAPI
void
RPC_ENTRY
I_RpcRequestMutex (
IN OUT I_RPC_MUTEX * Mutex
);
RPCRTAPI
void
RPC_ENTRY
I_RpcClearMutex (
IN I_RPC_MUTEX Mutex
);
RPCRTAPI
void
RPC_ENTRY
I_RpcDeleteMutex (
IN I_RPC_MUTEX Mutex
);
RPCRTAPI
void __RPC_FAR *
RPC_ENTRY
I_RpcAllocate (
IN unsigned int Size
);
RPCRTAPI
void
RPC_ENTRY
I_RpcFree (
IN void __RPC_FAR * Object
);
RPCRTAPI
void
RPC_ENTRY
I_RpcPauseExecution (
IN unsigned long Milliseconds
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcGetExtendedError (
);
typedef
void
(__RPC_USER __RPC_FAR * PRPC_RUNDOWN) (
void __RPC_FAR * AssociationContext
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcMonitorAssociation (
IN RPC_BINDING_HANDLE Handle,
IN PRPC_RUNDOWN RundownRoutine,
IN void * Context
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcStopMonitorAssociation (
IN RPC_BINDING_HANDLE Handle
);
RPCRTAPI
RPC_BINDING_HANDLE
RPC_ENTRY
I_RpcGetCurrentCallHandle(
void
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcGetAssociationContext (
IN RPC_BINDING_HANDLE BindingHandle,
OUT void __RPC_FAR * __RPC_FAR * AssociationContext
);
RPCRTAPI
void *
RPC_ENTRY
I_RpcGetServerContextList (
IN RPC_BINDING_HANDLE BindingHandle
);
RPCRTAPI
void
RPC_ENTRY
I_RpcSetServerContextList (
IN RPC_BINDING_HANDLE BindingHandle,
OUT void * ServerContextList
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcNsInterfaceExported (
IN unsigned long EntryNameSyntax,
IN unsigned short *EntryName,
IN RPC_SERVER_INTERFACE * RpcInterfaceInformation
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcNsInterfaceUnexported (
IN unsigned long EntryNameSyntax,
IN unsigned short *EntryName,
IN RPC_SERVER_INTERFACE * RpcInterfaceInformation
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcBindingToStaticStringBindingW (
IN RPC_BINDING_HANDLE Binding,
OUT unsigned short **StringBinding
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcBindingInqSecurityContext (
IN RPC_BINDING_HANDLE Binding,
OUT void **SecurityContextHandle
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcBindingInqWireIdForSnego (
__in RPC_BINDING_HANDLE Binding,
__out RPC_CSTR WireId
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcBindingInqMarshalledTargetInfo (
__in RPC_BINDING_HANDLE Binding,
__out unsigned long *MarshalledTargetInfoLength,
__deref_out_bcount(*MarshalledTargetInfoLength) RPC_CSTR *MarshalledTargetInfo
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcBindingInqLocalClientPID (
IN RPC_BINDING_HANDLE Binding,
OUT unsigned long *Pid
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcBindingHandleToAsyncHandle (
IN RPC_BINDING_HANDLE Binding,
OUT void **AsyncHandle
);
#ifdef RPC_UNICODE_SUPPORTED
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcNsBindingSetEntryNameW (
__in RPC_BINDING_HANDLE Binding,
__in unsigned long EntryNameSyntax,
__in RPC_WSTR EntryName
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcNsBindingSetEntryNameA (
__in RPC_BINDING_HANDLE Binding,
__in unsigned long EntryNameSyntax,
__in RPC_CSTR EntryName
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcServerUseProtseqEp2A (
__in RPC_CSTR NetworkAddress,
__in RPC_CSTR Protseq,
__in unsigned int MaxCalls,
__in RPC_CSTR Endpoint,
__in void __RPC_FAR * SecurityDescriptor,
__in void *Policy
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcServerUseProtseqEp2W (
__in RPC_WSTR NetworkAddress,
__in RPC_WSTR Protseq,
__in unsigned int MaxCalls,
__in RPC_WSTR Endpoint,
__in void __RPC_FAR *SecurityDescriptor,
__in void *Policy
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcServerUseProtseq2W (
__in RPC_WSTR NetworkAddress,
__in RPC_WSTR Protseq,
__in unsigned int MaxCalls,
__in void __RPC_FAR *SecurityDescriptor,
__in void *Policy
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcServerUseProtseq2A (
__in RPC_CSTR NetworkAddress,
__in RPC_CSTR Protseq,
__in unsigned int MaxCalls,
__in void __RPC_FAR *SecurityDescriptor,
__in void *Policy
);
#ifdef UNICODE
#define I_RpcNsBindingSetEntryName I_RpcNsBindingSetEntryNameW
#define I_RpcServerUseProtseqEp2 I_RpcServerUseProtseqEp2W
#define I_RpcServerUseProtseq2 I_RpcServerUseProtseq2W
#else
#define I_RpcNsBindingSetEntryName I_RpcNsBindingSetEntryNameA
#define I_RpcServerUseProtseqEp2 I_RpcServerUseProtseqEp2A
#define I_RpcServerUseProtseq2 I_RpcServerUseProtseq2A
#endif
#else
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcNsBindingSetEntryName (
__in RPC_BINDING_HANDLE Binding,
__in unsigned long EntryNameSyntax,
__in RPC_CSTR EntryName
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcServerUseProtseq2 (
__in RPC_CSTR NetworkAddress,
__in RPC_CSTR Protseq,
__in unsigned int MaxCalls,
__in void __RPC_FAR *SecurityDescriptor,
__in void *Policy
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcServerUseProtseqEp2 (
__in RPC_CSTR NetworkAddress,
__in RPC_CSTR Protseq,
__in unsigned int MaxCalls,
__in RPC_CSTR Endpoint,
__in void __RPC_FAR *SecurityDescriptor,
__in void *Policy
);
#endif
#ifdef RPC_UNICODE_SUPPORTED
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcBindingInqDynamicEndpointW (
__in RPC_BINDING_HANDLE Binding,
__deref_out_opt RPC_WSTR __RPC_FAR *DynamicEndpoint
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcBindingInqDynamicEndpointA (
__in RPC_BINDING_HANDLE Binding,
__deref_out_opt RPC_CSTR __RPC_FAR *DynamicEndpoint
);
#ifdef UNICODE
#define I_RpcBindingInqDynamicEndpoint I_RpcBindingInqDynamicEndpointW
#else
#define I_RpcBindingInqDynamicEndpoint I_RpcBindingInqDynamicEndpointA
#endif
#else
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcBindingInqDynamicEndpoint (
__in RPC_BINDING_HANDLE Binding,
__deref_out_opt RPC_CSTR __RPC_FAR *DynamicEndpoint
);
#endif
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcServerCheckClientRestriction (
IN RPC_BINDING_HANDLE Context
);
#define TRANSPORT_TYPE_CN 0x01
#define TRANSPORT_TYPE_DG 0x02
#define TRANSPORT_TYPE_LPC 0x04
#define TRANSPORT_TYPE_WMSG 0x08
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcBindingInqTransportType (
IN RPC_BINDING_HANDLE Binding,
OUT unsigned int __RPC_FAR * Type
);
typedef struct _RPC_TRANSFER_SYNTAX
{
UUID Uuid;
unsigned short VersMajor;
unsigned short VersMinor;
} RPC_TRANSFER_SYNTAX;
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcIfInqTransferSyntaxes (
IN RPC_IF_HANDLE RpcIfHandle,
OUT RPC_TRANSFER_SYNTAX __RPC_FAR * TransferSyntaxes,
IN unsigned int TransferSyntaxSize,
OUT unsigned int __RPC_FAR * TransferSyntaxCount
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_UuidCreate (
OUT UUID __RPC_FAR * Uuid
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcBindingCopy (
IN RPC_BINDING_HANDLE SourceBinding,
OUT RPC_BINDING_HANDLE __RPC_FAR * DestinationBinding
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcBindingIsClientLocal (
IN RPC_BINDING_HANDLE BindingHandle OPTIONAL,
OUT unsigned int __RPC_FAR * ClientLocalFlag
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcBindingInqConnId (
IN RPC_BINDING_HANDLE Binding,
OUT void **ConnId,
OUT int *pfFirstCall
);
RPCRTAPI
void
RPC_ENTRY
I_RpcSsDontSerializeContext (
void
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcLaunchDatagramReceiveThread(
void __RPC_FAR * pAddress
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcServerRegisterForwardFunction (
IN RPC_FORWARD_FUNCTION * pForwardFunction
);
RPC_ADDRESS_CHANGE_FN * RPC_ENTRY
I_RpcServerInqAddressChangeFn();
RPC_STATUS RPC_ENTRY
I_RpcServerSetAddressChangeFn(
IN RPC_ADDRESS_CHANGE_FN * pAddressChangeFn
);
/* The return buffer will contain SOCKADDR_IN for IPv4 */
#define RPC_P_ADDR_FORMAT_TCP_IPV4 1
/* The return buffer will contain SOCKADDR_STORAGE for IPv6 */
#define RPC_P_ADDR_FORMAT_TCP_IPV6 2
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcServerInqLocalConnAddress (
IN RPC_BINDING_HANDLE Binding,
IN OUT void *Buffer,
IN OUT unsigned long *BufferSize,
OUT unsigned long *AddressFormat
);
RPCRTAPI
void
RPC_ENTRY
I_RpcSessionStrictContextHandle (
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcTurnOnEEInfoPropagation (
void
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcConnectionInqSockBuffSize(
OUT unsigned long __RPC_FAR * RecvBuffSize,
OUT unsigned long __RPC_FAR * SendBuffSize
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcConnectionSetSockBuffSize(
IN unsigned long RecvBuffSize,
IN unsigned long SendBuffSize
);
typedef
void
(*RPCLT_PDU_FILTER_FUNC) (
IN void *Buffer,
IN unsigned int BufferLength,
IN int fDatagram
);
typedef
void
(__cdecl *RPC_SETFILTER_FUNC) (
IN RPCLT_PDU_FILTER_FUNC pfnFilter
);
#ifndef WINNT
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcServerStartListening(
void * hWnd
) ;
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcServerStopListening(
) ;
typedef RPC_STATUS (*RPC_BLOCKING_FN) (
IN void * hWnd,
IN void * Context,
IN OPTIONAL void * hSyncEvent
) ;
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcBindingSetAsync(
IN RPC_BINDING_HANDLE Binding,
IN RPC_BLOCKING_FN BlockingFn,
IN unsigned long ServerTid
) ;
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcSetThreadParams(
IN int fClientFree,
IN OPTIONAL void *Context,
IN OPTIONAL void * hWndClient
);
RPCRTAPI
unsigned int
RPC_ENTRY
I_RpcWindowProc(
IN void * hWnd,
IN unsigned int Message,
IN unsigned int wParam,
IN unsigned long lParam
) ;
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcServerUnregisterEndpointA (
__in RPC_CSTR Protseq,
__in RPC_CSTR Endpoint
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcServerUnregisterEndpointW (
__in RPC_WSTR Protseq,
__in RPC_WSTR Endpoint
);
#ifdef UNICODE
#define I_RpcServerUnregisterEndpoint I_RpcServerUnregisterEndpointW
#else
#define I_RpcServerUnregisterEndpoint I_RpcServerUnregisterEndpointA
#endif
#endif // WINNT
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcServerInqTransportType(
OUT unsigned int __RPC_FAR * Type
) ;
RPCRTAPI
long
RPC_ENTRY
I_RpcMapWin32Status (
IN RPC_STATUS Status
);
typedef struct _RPC_C_OPT_METADATA_DESCRIPTOR
{
unsigned long BufferSize; // Length of the buffer in bytes
char *Buffer; // Zero-terminated string
} RPC_C_OPT_METADATA_DESCRIPTOR;
typedef struct _RDR_CALLOUT_STATE
{
// LastError is used for debugging only - don't use it for processing
RPC_STATUS LastError;
void *LastEEInfo;
RPC_HTTP_REDIRECTOR_STAGE LastCalledStage;
// the information accumulated throughout the stages
unsigned short *ServerName; // Allocated with MemAllocate
unsigned short *ServerPort; // Allocated with MemAllocate
unsigned short *RemoteUser; // Allocated with MemAllocate
unsigned short *AuthType; // Allocated with MemAllocate
unsigned char ResourceTypePresent;
unsigned char MetadataPresent;
unsigned char SessionIdPresent;
unsigned char InterfacePresent;
UUID ResourceType;
RPC_C_OPT_METADATA_DESCRIPTOR Metadata; // Allocated with MemAllocate
UUID SessionId;
RPC_SYNTAX_IDENTIFIER Interface;
void *CertContext; // Contains PCCERT_CONTEXT if cert is used for authentication.
// NULL otherwise. If allocated, CertFreeCertificateContext
// needs to be called on it when done
} RDR_CALLOUT_STATE;
typedef RPC_STATUS
(RPC_ENTRY *I_RpcProxyIsValidMachineFn)
(
IN char *pszMachine,
IN char *pszDotMachine,
IN unsigned long dwPortNumber
);
typedef RPC_STATUS
(RPC_ENTRY *I_RpcProxyGetClientAddressFn)
(
IN void *Context,
OUT char *Buffer,
OUT unsigned long *BufferLength
);
typedef RPC_STATUS
(RPC_ENTRY *I_RpcProxyGetConnectionTimeoutFn)
(
OUT unsigned long *ConnectionTimeout
);
typedef RPC_STATUS
(RPC_ENTRY *I_RpcPerformCalloutFn)
(
IN void *Context,
IN RDR_CALLOUT_STATE *CallOutState,
IN RPC_HTTP_REDIRECTOR_STAGE Stage
);
typedef void
(RPC_ENTRY *I_RpcFreeCalloutStateFn)
(
IN RDR_CALLOUT_STATE *CallOutState
);
typedef struct tagI_RpcProxyCallbackInterface
{
I_RpcProxyIsValidMachineFn IsValidMachineFn;
I_RpcProxyGetClientAddressFn GetClientAddressFn;
I_RpcProxyGetConnectionTimeoutFn GetConnectionTimeoutFn;
I_RpcPerformCalloutFn PerformCalloutFn;
I_RpcFreeCalloutStateFn FreeCalloutStateFn;
} I_RpcProxyCallbackInterface;
#define RPC_PROXY_CONNECTION_TYPE_IN_PROXY 0
#define RPC_PROXY_CONNECTION_TYPE_OUT_PROXY 1
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcProxyNewConnection (
IN unsigned long ConnectionType,
IN unsigned short *ServerAddress,
IN unsigned short *ServerPort,
IN unsigned short *MinConnTimeout,
IN void *ConnectionParameter,
IN OPTIONAL RDR_CALLOUT_STATE *CallOutState,
IN I_RpcProxyCallbackInterface *ProxyCallbackInterface
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
I_RpcReplyToClientWithStatus (
IN void *ConnectionParameter,
IN RPC_STATUS RpcStatus
);
RPCRTAPI
void
RPC_ENTRY
I_RpcRecordCalloutFailure (
IN RPC_STATUS RpcStatus,
IN RDR_CALLOUT_STATE *CallOutState,
IN unsigned short *DllName
);
#ifdef __cplusplus
}
#endif
#endif /* __RPCDCEP_H__ */

3244
lib/MSPlatformSDK/Include/RpcNdr.h Executable file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,555 @@
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
rpcnsi.h
Abstract:
This file contains the types and function definitions to use the
Name Service Independent APIs.
--*/
#ifndef __RPCNSI_H__
#define __RPCNSI_H__
#if _MSC_VER > 1000
#pragma once
#endif
typedef void __RPC_FAR * RPC_NS_HANDLE;
#define RPC_C_NS_SYNTAX_DEFAULT 0
#define RPC_C_NS_SYNTAX_DCE 3
#define RPC_C_PROFILE_DEFAULT_ELT 0
#define RPC_C_PROFILE_ALL_ELT 1
#define RPC_C_PROFILE_ALL_ELTS RPC_C_PROFILE_ALL_ELT
#define RPC_C_PROFILE_MATCH_BY_IF 2
#define RPC_C_PROFILE_MATCH_BY_MBR 3
#define RPC_C_PROFILE_MATCH_BY_BOTH 4
#define RPC_C_NS_DEFAULT_EXP_AGE -1
/* Server APIs */
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsBindingExportA(
__in unsigned long EntryNameSyntax,
__in_opt RPC_CSTR EntryName,
__in_opt RPC_IF_HANDLE IfSpec,
__in_opt RPC_BINDING_VECTOR __RPC_FAR *BindingVec,
__in_opt UUID_VECTOR __RPC_FAR *ObjectUuidVec
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsBindingUnexportA(
__in unsigned long EntryNameSyntax,
__in_opt RPC_CSTR EntryName,
__in_opt RPC_IF_HANDLE IfSpec,
__in_opt UUID_VECTOR __RPC_FAR *ObjectUuidVec
);
#ifdef RPC_UNICODE_SUPPORTED
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsBindingExportW(
__in unsigned long EntryNameSyntax,
__in_opt RPC_WSTR EntryName,
__in_opt RPC_IF_HANDLE IfSpec,
__in_opt RPC_BINDING_VECTOR __RPC_FAR *BindingVec,
__in_opt UUID_VECTOR __RPC_FAR *ObjectUuidVec
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsBindingUnexportW(
__in unsigned long EntryNameSyntax,
__in_opt RPC_WSTR EntryName,
__in_opt RPC_IF_HANDLE IfSpec,
__in_opt UUID_VECTOR __RPC_FAR *ObjectUuidVec
);
#endif
/* Server PnP APIs */
RPC_STATUS RPC_ENTRY
RpcNsBindingExportPnPA(
__in unsigned long EntryNameSyntax,
__in_opt RPC_CSTR EntryName,
__in_opt RPC_IF_HANDLE IfSpec,
__in_opt UUID_VECTOR *ObjectVector
);
RPC_STATUS RPC_ENTRY
RpcNsBindingUnexportPnPA(
__in unsigned long EntryNameSyntax,
__in_opt RPC_CSTR EntryName,
__in_opt RPC_IF_HANDLE IfSpec,
__in_opt UUID_VECTOR *ObjectVector
);
#ifdef RPC_UNICODE_SUPPORTED
RPC_STATUS RPC_ENTRY
RpcNsBindingExportPnPW(
__in unsigned long EntryNameSyntax,
__in_opt RPC_WSTR EntryName,
__in_opt RPC_IF_HANDLE IfSpec,
__in_opt UUID_VECTOR *ObjectVector
);
RPC_STATUS RPC_ENTRY
RpcNsBindingUnexportPnPW(
__in unsigned long EntryNameSyntax,
__in_opt RPC_WSTR EntryName,
__in_opt RPC_IF_HANDLE IfSpec,
__in_opt UUID_VECTOR *ObjectVector
);
#endif
/* Client APIs */
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsBindingLookupBeginA(
__in unsigned long EntryNameSyntax,
__in_opt RPC_CSTR EntryName,
__in_opt RPC_IF_HANDLE IfSpec,
__in_opt UUID __RPC_FAR *ObjUuid,
__in unsigned long BindingMaxCount,
__out RPC_NS_HANDLE __RPC_FAR *LookupContext
);
#ifdef RPC_UNICODE_SUPPORTED
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsBindingLookupBeginW(
__in unsigned long EntryNameSyntax,
__in_opt RPC_WSTR EntryName,
__in_opt RPC_IF_HANDLE IfSpec,
__in_opt UUID __RPC_FAR *ObjUuid,
__in unsigned long BindingMaxCount,
__out RPC_NS_HANDLE __RPC_FAR *LookupContext
);
#endif
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsBindingLookupNext(
IN RPC_NS_HANDLE LookupContext,
OUT RPC_BINDING_VECTOR __RPC_FAR * __RPC_FAR * BindingVec
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsBindingLookupDone(
IN OUT RPC_NS_HANDLE __RPC_FAR * LookupContext
);
/* Group APIs */
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsGroupDeleteA(
__in unsigned long GroupNameSyntax,
__in_opt RPC_CSTR GroupName
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsGroupMbrAddA(
__in unsigned long GroupNameSyntax,
__in RPC_CSTR GroupName,
__in unsigned long MemberNameSyntax,
__in RPC_CSTR MemberName
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsGroupMbrRemoveA(
__in unsigned long GroupNameSyntax,
__in RPC_CSTR GroupName,
__in unsigned long MemberNameSyntax,
__in RPC_CSTR MemberName
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsGroupMbrInqBeginA(
__in unsigned long GroupNameSyntax,
__in RPC_CSTR GroupName,
__in unsigned long MemberNameSyntax,
__out RPC_NS_HANDLE __RPC_FAR *InquiryContext
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsGroupMbrInqNextA(
__inout RPC_NS_HANDLE InquiryContext,
__deref_out RPC_CSTR __RPC_FAR *MemberName
);
#ifdef RPC_UNICODE_SUPPORTED
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsGroupDeleteW(
__in unsigned long GroupNameSyntax,
__in_opt RPC_WSTR GroupName
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsGroupMbrAddW(
__in unsigned long GroupNameSyntax,
__in RPC_WSTR GroupName,
__in unsigned long MemberNameSyntax,
__in RPC_WSTR MemberName
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsGroupMbrRemoveW(
__in unsigned long GroupNameSyntax,
__in RPC_WSTR GroupName,
__in unsigned long MemberNameSyntax,
__in RPC_WSTR MemberName
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsGroupMbrInqBeginW(
__in unsigned long GroupNameSyntax,
__in RPC_WSTR GroupName,
__in unsigned long MemberNameSyntax,
__out RPC_NS_HANDLE __RPC_FAR *InquiryContext
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsGroupMbrInqNextW(
__inout RPC_NS_HANDLE InquiryContext,
__deref_out RPC_WSTR __RPC_FAR *MemberName
);
#endif
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsGroupMbrInqDone(
IN OUT RPC_NS_HANDLE __RPC_FAR * InquiryContext
);
/* Profile APIs */
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsProfileDeleteA(
__in unsigned long ProfileNameSyntax,
__in RPC_CSTR ProfileName
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsProfileEltAddA(
__in unsigned long ProfileNameSyntax,
__in RPC_CSTR ProfileName,
__in_opt RPC_IF_ID __RPC_FAR *IfId,
__in unsigned long MemberNameSyntax,
__in RPC_CSTR MemberName,
__in unsigned long Priority,
__in_opt RPC_CSTR Annotation
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsProfileEltRemoveA(
__in unsigned long ProfileNameSyntax,
__in RPC_CSTR ProfileName,
__in_opt RPC_IF_ID __RPC_FAR *IfId,
__in unsigned long MemberNameSyntax,
__in RPC_CSTR MemberName
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsProfileEltInqBeginA(
__in unsigned long ProfileNameSyntax,
__in RPC_CSTR ProfileName,
__in unsigned long InquiryType,
__in_opt RPC_IF_ID __RPC_FAR *IfId,
__in unsigned long VersOption,
__in unsigned long MemberNameSyntax,
__in_opt RPC_CSTR MemberName,
__out RPC_NS_HANDLE __RPC_FAR *InquiryContext
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsProfileEltInqNextA(
__in RPC_NS_HANDLE InquiryContext,
__out_opt RPC_IF_ID __RPC_FAR *IfId,
__out RPC_CSTR __RPC_FAR *MemberName,
__out unsigned long __RPC_FAR *Priority,
__out RPC_CSTR __RPC_FAR *Annotation
);
#ifdef RPC_UNICODE_SUPPORTED
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsProfileDeleteW(
__in unsigned long ProfileNameSyntax,
__in RPC_WSTR ProfileName
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsProfileEltAddW(
__in unsigned long ProfileNameSyntax,
__in RPC_WSTR ProfileName,
__in_opt RPC_IF_ID __RPC_FAR *IfId,
__in unsigned long MemberNameSyntax,
__in RPC_WSTR MemberName,
__in unsigned long Priority,
__in_opt RPC_WSTR Annotation
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsProfileEltRemoveW(
__in unsigned long ProfileNameSyntax,
__in RPC_WSTR ProfileName,
__in_opt RPC_IF_ID __RPC_FAR *IfId,
__in unsigned long MemberNameSyntax,
__in RPC_WSTR MemberName
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsProfileEltInqBeginW(
__in unsigned long ProfileNameSyntax,
__in RPC_WSTR ProfileName,
__in unsigned long InquiryType,
__in_opt RPC_IF_ID __RPC_FAR *IfId,
__in unsigned long VersOption,
__in unsigned long MemberNameSyntax,
__in_opt RPC_WSTR MemberName,
__out RPC_NS_HANDLE __RPC_FAR *InquiryContext
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsProfileEltInqNextW(
__in RPC_NS_HANDLE InquiryContext,
__out_opt RPC_IF_ID __RPC_FAR *IfId,
__out RPC_WSTR __RPC_FAR *MemberName,
__out unsigned long __RPC_FAR *Priority,
__out RPC_WSTR __RPC_FAR *Annotation
);
#endif
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsProfileEltInqDone(
IN OUT RPC_NS_HANDLE __RPC_FAR * InquiryContext
);
/* Entry object APIs */
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsEntryObjectInqBeginA(
__in unsigned long EntryNameSyntax,
__in RPC_CSTR EntryName,
__out RPC_NS_HANDLE __RPC_FAR *InquiryContext
);
#ifdef RPC_UNICODE_SUPPORTED
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsEntryObjectInqBeginW(
__in unsigned long EntryNameSyntax,
__in RPC_WSTR EntryName,
__out RPC_NS_HANDLE __RPC_FAR *InquiryContext
);
#endif
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsEntryObjectInqNext(
IN RPC_NS_HANDLE InquiryContext,
OUT UUID __RPC_FAR * ObjUuid
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsEntryObjectInqDone(
IN OUT RPC_NS_HANDLE __RPC_FAR * InquiryContext
);
/* Management and MISC APIs */
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsEntryExpandNameA(
__in unsigned long EntryNameSyntax,
__in RPC_CSTR EntryName,
__out RPC_CSTR __RPC_FAR *ExpandedName
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsMgmtBindingUnexportA(
__in unsigned long EntryNameSyntax,
__in RPC_CSTR EntryName,
__in_opt RPC_IF_ID __RPC_FAR *IfId,
__in unsigned long VersOption,
__in_opt UUID_VECTOR __RPC_FAR *ObjectUuidVec
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsMgmtEntryCreateA(
__in unsigned long EntryNameSyntax,
__in RPC_CSTR EntryName
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsMgmtEntryDeleteA(
__in unsigned long EntryNameSyntax,
__in RPC_CSTR EntryName
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsMgmtEntryInqIfIdsA(
__in unsigned long EntryNameSyntax,
__in RPC_CSTR EntryName,
__out RPC_IF_ID_VECTOR __RPC_FAR * __RPC_FAR *IfIdVec
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsMgmtHandleSetExpAge(
IN RPC_NS_HANDLE NsHandle,
IN unsigned long ExpirationAge
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsMgmtInqExpAge(
OUT unsigned long __RPC_FAR * ExpirationAge
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsMgmtSetExpAge(
IN unsigned long ExpirationAge
);
#ifdef RPC_UNICODE_SUPPORTED
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsEntryExpandNameW(
__in unsigned long EntryNameSyntax,
__in RPC_WSTR EntryName,
__out RPC_WSTR __RPC_FAR *ExpandedName
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsMgmtBindingUnexportW(
__in unsigned long EntryNameSyntax,
__in RPC_WSTR EntryName,
__in_opt RPC_IF_ID __RPC_FAR *IfId,
__in unsigned long VersOption,
__in_opt UUID_VECTOR __RPC_FAR *ObjectUuidVec
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsMgmtEntryCreateW(
__in unsigned long EntryNameSyntax,
__in RPC_WSTR EntryName
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsMgmtEntryDeleteW(
__in unsigned long EntryNameSyntax,
__in RPC_WSTR EntryName
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsMgmtEntryInqIfIdsW(
__in unsigned long EntryNameSyntax,
__in RPC_WSTR EntryName,
__out RPC_IF_ID_VECTOR __RPC_FAR * __RPC_FAR *IfIdVec
);
#endif
/* Client API's implemented in wrappers. */
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsBindingImportBeginA(
__in unsigned long EntryNameSyntax,
__in_opt RPC_CSTR EntryName,
__in_opt RPC_IF_HANDLE IfSpec,
__in_opt UUID __RPC_FAR *ObjUuid,
__out RPC_NS_HANDLE __RPC_FAR *ImportContext
);
#ifdef RPC_UNICODE_SUPPORTED
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsBindingImportBeginW(
__in unsigned long EntryNameSyntax,
__in_opt RPC_WSTR EntryName,
__in_opt RPC_IF_HANDLE IfSpec,
__in_opt UUID __RPC_FAR *ObjUuid,
__out RPC_NS_HANDLE __RPC_FAR *ImportContext
);
#endif
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsBindingImportNext(
IN RPC_NS_HANDLE ImportContext,
OUT RPC_BINDING_HANDLE __RPC_FAR * Binding
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsBindingImportDone(
IN OUT RPC_NS_HANDLE __RPC_FAR * ImportContext
);
RPCNSAPI RPC_STATUS RPC_ENTRY
RpcNsBindingSelect(
IN OUT RPC_BINDING_VECTOR __RPC_FAR * BindingVec,
OUT RPC_BINDING_HANDLE __RPC_FAR * Binding
);
#ifdef UNICODE
#define RpcNsBindingLookupBegin RpcNsBindingLookupBeginW
#define RpcNsBindingImportBegin RpcNsBindingImportBeginW
#define RpcNsBindingExport RpcNsBindingExportW
#define RpcNsBindingUnexport RpcNsBindingUnexportW
#define RpcNsGroupDelete RpcNsGroupDeleteW
#define RpcNsGroupMbrAdd RpcNsGroupMbrAddW
#define RpcNsGroupMbrRemove RpcNsGroupMbrRemoveW
#define RpcNsGroupMbrInqBegin RpcNsGroupMbrInqBeginW
#define RpcNsGroupMbrInqNext RpcNsGroupMbrInqNextW
#define RpcNsEntryExpandName RpcNsEntryExpandNameW
#define RpcNsEntryObjectInqBegin RpcNsEntryObjectInqBeginW
#define RpcNsMgmtBindingUnexport RpcNsMgmtBindingUnexportW
#define RpcNsMgmtEntryCreate RpcNsMgmtEntryCreateW
#define RpcNsMgmtEntryDelete RpcNsMgmtEntryDeleteW
#define RpcNsMgmtEntryInqIfIds RpcNsMgmtEntryInqIfIdsW
#define RpcNsProfileDelete RpcNsProfileDeleteW
#define RpcNsProfileEltAdd RpcNsProfileEltAddW
#define RpcNsProfileEltRemove RpcNsProfileEltRemoveW
#define RpcNsProfileEltInqBegin RpcNsProfileEltInqBeginW
#define RpcNsProfileEltInqNext RpcNsProfileEltInqNextW
#define RpcNsBindingExportPnP RpcNsBindingExportPnPW
#define RpcNsBindingUnexportPnP RpcNsBindingUnexportPnPW
#else
#define RpcNsBindingLookupBegin RpcNsBindingLookupBeginA
#define RpcNsBindingImportBegin RpcNsBindingImportBeginA
#define RpcNsBindingExport RpcNsBindingExportA
#define RpcNsBindingUnexport RpcNsBindingUnexportA
#define RpcNsGroupDelete RpcNsGroupDeleteA
#define RpcNsGroupMbrAdd RpcNsGroupMbrAddA
#define RpcNsGroupMbrRemove RpcNsGroupMbrRemoveA
#define RpcNsGroupMbrInqBegin RpcNsGroupMbrInqBeginA
#define RpcNsGroupMbrInqNext RpcNsGroupMbrInqNextA
#define RpcNsEntryExpandName RpcNsEntryExpandNameA
#define RpcNsEntryObjectInqBegin RpcNsEntryObjectInqBeginA
#define RpcNsMgmtBindingUnexport RpcNsMgmtBindingUnexportA
#define RpcNsMgmtEntryCreate RpcNsMgmtEntryCreateA
#define RpcNsMgmtEntryDelete RpcNsMgmtEntryDeleteA
#define RpcNsMgmtEntryInqIfIds RpcNsMgmtEntryInqIfIdsA
#define RpcNsProfileDelete RpcNsProfileDeleteA
#define RpcNsProfileEltAdd RpcNsProfileEltAddA
#define RpcNsProfileEltRemove RpcNsProfileEltRemoveA
#define RpcNsProfileEltInqBegin RpcNsProfileEltInqBeginA
#define RpcNsProfileEltInqNext RpcNsProfileEltInqNextA
#define RpcNsBindingExportPnP RpcNsBindingExportPnPA
#define RpcNsBindingUnexportPnP RpcNsBindingUnexportPnPA
#endif /* UNICODE */
#endif /* __RPCNSI_H__ */

View File

@ -0,0 +1,90 @@
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
rpcnsip.h
Abstract:
This file contains the types and function definitions to use the
to implement the autohandle features of the runtime.
--*/
#ifndef __RPCNSIP_H__
#define __RPCNSIP_H__
#if _MSC_VER > 1000
#pragma once
#endif
#ifdef __cplusplus
extern "C" {
#endif
typedef struct
{
RPC_NS_HANDLE LookupContext;
RPC_BINDING_HANDLE ProposedHandle;
RPC_BINDING_VECTOR * Bindings;
} RPC_IMPORT_CONTEXT_P, * PRPC_IMPORT_CONTEXT_P;
/* Stub Auto Binding routines. */
RPCNSAPI
RPC_STATUS
RPC_ENTRY
I_RpcNsGetBuffer(
IN PRPC_MESSAGE Message
);
RPCNSAPI
RPC_STATUS
RPC_ENTRY
I_RpcNsSendReceive(
IN PRPC_MESSAGE Message,
OUT RPC_BINDING_HANDLE __RPC_FAR * Handle
);
RPCNSAPI
void
RPC_ENTRY
I_RpcNsRaiseException(
IN PRPC_MESSAGE Message,
IN RPC_STATUS Status
);
RPCNSAPI
RPC_STATUS
RPC_ENTRY
I_RpcReBindBuffer(
IN PRPC_MESSAGE Message
);
RPCNSAPI
RPC_STATUS
RPC_ENTRY
I_NsServerBindSearch(
);
RPCNSAPI
RPC_STATUS
RPC_ENTRY
I_NsClientBindSearch(
);
RPCNSAPI
void
RPC_ENTRY
I_NsClientBindDone(
);
#ifdef __cplusplus
}
#endif
#endif /* __RPCNSIP_H__ */

View File

@ -0,0 +1,42 @@
/*********************************************************/
/** Microsoft LAN Manager **/
/** Copyright (c) Microsoft Corporation. All rights reserved.
/** **/
/** Rpc Error Codes from the compiler and runtime **/
/** **/
/*********************************************************/
/*
If you change this file, you must also change rpcerr.h.
*/
#ifndef __RPCNTERR_H__
#define __RPCNTERR_H__
#if _MSC_VER > 1000
#pragma once
#endif
#define RPC_S_OK ERROR_SUCCESS
#define RPC_S_INVALID_ARG ERROR_INVALID_PARAMETER
#define RPC_S_OUT_OF_MEMORY ERROR_OUTOFMEMORY
#define RPC_S_OUT_OF_THREADS ERROR_MAX_THRDS_REACHED
#define RPC_S_INVALID_LEVEL ERROR_INVALID_PARAMETER
#define RPC_S_BUFFER_TOO_SMALL ERROR_INSUFFICIENT_BUFFER
#define RPC_S_INVALID_SECURITY_DESC ERROR_INVALID_SECURITY_DESCR
#define RPC_S_ACCESS_DENIED ERROR_ACCESS_DENIED
#define RPC_S_SERVER_OUT_OF_MEMORY ERROR_NOT_ENOUGH_SERVER_MEMORY
#define RPC_S_ASYNC_CALL_PENDING ERROR_IO_PENDING
#define RPC_S_UNKNOWN_PRINCIPAL ERROR_NONE_MAPPED
#define RPC_S_TIMEOUT ERROR_TIMEOUT
#define RPC_X_NO_MEMORY RPC_S_OUT_OF_MEMORY
#define RPC_X_INVALID_BOUND RPC_S_INVALID_BOUND
#define RPC_X_INVALID_TAG RPC_S_INVALID_TAG
#define RPC_X_ENUM_VALUE_TOO_LARGE RPC_X_ENUM_VALUE_OUT_OF_RANGE
#define RPC_X_SS_CONTEXT_MISMATCH ERROR_INVALID_HANDLE
#define RPC_X_INVALID_BUFFER ERROR_INVALID_USER_BUFFER
#define RPC_X_PIPE_APP_MEMORY ERROR_OUTOFMEMORY
#define RPC_X_INVALID_PIPE_OPERATION RPC_X_WRONG_PIPE_ORDER
#endif /* __RPCNTERR_H__ */

View File

@ -0,0 +1,253 @@
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 6.00.0366 */
/* Compiler settings for servprov.idl:
Oicf, W1, Zp8, env=Win32 (32b run)
protocol : dce , ms_ext, c_ext
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__ 440
#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 __servprov_h__
#define __servprov_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifndef __IServiceProvider_FWD_DEFINED__
#define __IServiceProvider_FWD_DEFINED__
typedef interface IServiceProvider IServiceProvider;
#endif /* __IServiceProvider_FWD_DEFINED__ */
/* header files for imported files */
#include "objidl.h"
#ifdef __cplusplus
extern "C"{
#endif
void * __RPC_USER MIDL_user_allocate(size_t);
void __RPC_USER MIDL_user_free( void * );
/* interface __MIDL_itf_servprov_0000 */
/* [local] */
//=--------------------------------------------------------------------------=
// ServProv.h
//=--------------------------------------------------------------------------=
// (C) Copyright 1995-1999 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")
//---------------------------------------------------------------------------=
// IServiceProvider Interfaces.
extern RPC_IF_HANDLE __MIDL_itf_servprov_0000_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_servprov_0000_v0_0_s_ifspec;
#ifndef __IServiceProvider_INTERFACE_DEFINED__
#define __IServiceProvider_INTERFACE_DEFINED__
/* interface IServiceProvider */
/* [unique][uuid][object] */
typedef /* [unique] */ IServiceProvider *LPSERVICEPROVIDER;
#if (_MSC_VER >= 1100) && defined(__cplusplus) && !defined(CINTERFACE)
EXTERN_C const IID IID_IServiceProvider;
extern "C++"
{
MIDL_INTERFACE("6d5140c1-7436-11ce-8034-00aa006009fa")
IServiceProvider : public IUnknown
{
public:
virtual /* [local] */ HRESULT STDMETHODCALLTYPE QueryService(
/* [in] */ REFGUID guidService,
/* [in] */ REFIID riid,
/* [out] */ void __RPC_FAR *__RPC_FAR *ppvObject) = 0;
template <class Q>
HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, Q** pp)
{
return QueryService(guidService, __uuidof(Q), (void **)pp);
}
};
}
/* [call_as] */ HRESULT STDMETHODCALLTYPE IServiceProvider_RemoteQueryService_Proxy(
IServiceProvider __RPC_FAR * This,
/* [in] */ REFGUID guidService,
/* [in] */ REFIID riid,
/* [iid_is][out] */ IUnknown __RPC_FAR *__RPC_FAR *ppvObject);
void __RPC_STUB IServiceProvider_RemoteQueryService_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#else // VC6 Hack
EXTERN_C const IID IID_IServiceProvider;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("6d5140c1-7436-11ce-8034-00aa006009fa")
IServiceProvider : public IUnknown
{
public:
virtual /* [local] */ HRESULT STDMETHODCALLTYPE QueryService(
/* [in] */ REFGUID guidService,
/* [in] */ REFIID riid,
/* [out] */ void **ppvObject) = 0;
};
#else /* C style interface */
typedef struct IServiceProviderVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IServiceProvider * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IServiceProvider * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IServiceProvider * This);
/* [local] */ HRESULT ( STDMETHODCALLTYPE *QueryService )(
IServiceProvider * This,
/* [in] */ REFGUID guidService,
/* [in] */ REFIID riid,
/* [out] */ void **ppvObject);
END_INTERFACE
} IServiceProviderVtbl;
interface IServiceProvider
{
CONST_VTBL struct IServiceProviderVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IServiceProvider_QueryInterface(This,riid,ppvObject) \
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
#define IServiceProvider_AddRef(This) \
(This)->lpVtbl -> AddRef(This)
#define IServiceProvider_Release(This) \
(This)->lpVtbl -> Release(This)
#define IServiceProvider_QueryService(This,guidService,riid,ppvObject) \
(This)->lpVtbl -> QueryService(This,guidService,riid,ppvObject)
#endif /* COBJMACROS */
#endif /* C style interface */
/* [call_as] */ HRESULT STDMETHODCALLTYPE IServiceProvider_RemoteQueryService_Proxy(
IServiceProvider * This,
/* [in] */ REFGUID guidService,
/* [in] */ REFIID riid,
/* [iid_is][out] */ IUnknown **ppvObject);
void __RPC_STUB IServiceProvider_RemoteQueryService_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IServiceProvider_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_servprov_0093 */
/* [local] */
#endif // VC6 Hack
extern RPC_IF_HANDLE __MIDL_itf_servprov_0093_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_servprov_0093_v0_0_s_ifspec;
/* Additional Prototypes for ALL interfaces */
/* [local] */ HRESULT STDMETHODCALLTYPE IServiceProvider_QueryService_Proxy(
IServiceProvider * This,
/* [in] */ REFGUID guidService,
/* [in] */ REFIID riid,
/* [out] */ void **ppvObject);
/* [call_as] */ HRESULT STDMETHODCALLTYPE IServiceProvider_QueryService_Stub(
IServiceProvider * This,
/* [in] */ REFGUID guidService,
/* [in] */ REFIID riid,
/* [iid_is][out] */ IUnknown **ppvObject);
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,982 @@
/*****************************************************************************\
* *
* shellapi.h - SHELL.DLL functions, types, and definitions *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
\*****************************************************************************/
#ifndef _INC_SHELLAPI
#define _INC_SHELLAPI
//
// Define API decoration for direct importing of DLL references.
//
#ifndef WINSHELLAPI
#if !defined(_SHELL32_)
#define WINSHELLAPI DECLSPEC_IMPORT
#else
#define WINSHELLAPI
#endif
#endif // WINSHELLAPI
#ifndef SHSTDAPI
#if !defined(_SHELL32_)
#define SHSTDAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
#define SHSTDAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
#else
#define SHSTDAPI STDAPI
#define SHSTDAPI_(type) STDAPI_(type)
#endif
#endif // SHSTDAPI
#ifndef SHDOCAPI
#if !defined(_SHDOCVW_)
#define SHDOCAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
#define SHDOCAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
#else
#define SHDOCAPI STDAPI
#define SHDOCAPI_(type) STDAPI_(type)
#endif
#endif // SHDOCAPI
#if !defined(_WIN64)
#include <pshpack1.h>
#endif
#ifdef __cplusplus
extern "C" { /* Assume C declarations for C++ */
#endif /* __cplusplus */
DECLARE_HANDLE(HDROP);
SHSTDAPI_(UINT) DragQueryFileA(HDROP,UINT,LPSTR,UINT);
SHSTDAPI_(UINT) DragQueryFileW(HDROP,UINT,LPWSTR,UINT);
#ifdef UNICODE
#define DragQueryFile DragQueryFileW
#else
#define DragQueryFile DragQueryFileA
#endif // !UNICODE
SHSTDAPI_(BOOL) DragQueryPoint(HDROP,LPPOINT);
SHSTDAPI_(void) DragFinish(HDROP);
SHSTDAPI_(void) DragAcceptFiles(HWND,BOOL);
SHSTDAPI_(HINSTANCE) ShellExecuteA(HWND hwnd, LPCSTR lpOperation, LPCSTR lpFile, LPCSTR lpParameters, LPCSTR lpDirectory, INT nShowCmd);
SHSTDAPI_(HINSTANCE) ShellExecuteW(HWND hwnd, LPCWSTR lpOperation, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd);
#ifdef UNICODE
#define ShellExecute ShellExecuteW
#else
#define ShellExecute ShellExecuteA
#endif // !UNICODE
SHSTDAPI_(HINSTANCE) FindExecutableA(LPCSTR lpFile, LPCSTR lpDirectory, LPSTR lpResult);
SHSTDAPI_(HINSTANCE) FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory, LPWSTR lpResult);
#ifdef UNICODE
#define FindExecutable FindExecutableW
#else
#define FindExecutable FindExecutableA
#endif // !UNICODE
SHSTDAPI_(LPWSTR *) CommandLineToArgvW(LPCWSTR lpCmdLine, int*pNumArgs);
SHSTDAPI_(INT) ShellAboutA(HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff, HICON hIcon);
SHSTDAPI_(INT) ShellAboutW(HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon);
#ifdef UNICODE
#define ShellAbout ShellAboutW
#else
#define ShellAbout ShellAboutA
#endif // !UNICODE
SHSTDAPI_(HICON) DuplicateIcon(HINSTANCE hInst, HICON hIcon);
SHSTDAPI_(HICON) ExtractAssociatedIconA(HINSTANCE hInst, LPSTR lpIconPath, LPWORD lpiIcon);
SHSTDAPI_(HICON) ExtractAssociatedIconW(HINSTANCE hInst, LPWSTR lpIconPath, LPWORD lpiIcon);
#ifdef UNICODE
#define ExtractAssociatedIcon ExtractAssociatedIconW
#else
#define ExtractAssociatedIcon ExtractAssociatedIconA
#endif // !UNICODE
#if (_WIN32_IE >= 0x0601)
SHSTDAPI_(HICON) ExtractAssociatedIconExA(HINSTANCE hInst,LPSTR lpIconPath,LPWORD lpiIconIndex, LPWORD lpiIconId);
SHSTDAPI_(HICON) ExtractAssociatedIconExW(HINSTANCE hInst,LPWSTR lpIconPath,LPWORD lpiIconIndex, LPWORD lpiIconId);
#ifdef UNICODE
#define ExtractAssociatedIconEx ExtractAssociatedIconExW
#else
#define ExtractAssociatedIconEx ExtractAssociatedIconExA
#endif // !UNICODE
#endif // (_WIN32_IE >= 0x0601)
SHSTDAPI_(HICON) ExtractIconA(HINSTANCE hInst, LPCSTR lpszExeFileName, UINT nIconIndex);
SHSTDAPI_(HICON) ExtractIconW(HINSTANCE hInst, LPCWSTR lpszExeFileName, UINT nIconIndex);
#ifdef UNICODE
#define ExtractIcon ExtractIconW
#else
#define ExtractIcon ExtractIconA
#endif // !UNICODE
#if(WINVER >= 0x0400)
typedef struct _DRAGINFOA {
UINT uSize; /* init with sizeof(DRAGINFO) */
POINT pt;
BOOL fNC;
LPSTR lpFileList;
DWORD grfKeyState;
} DRAGINFOA, *LPDRAGINFOA;
typedef struct _DRAGINFOW {
UINT uSize; /* init with sizeof(DRAGINFO) */
POINT pt;
BOOL fNC;
LPWSTR lpFileList;
DWORD grfKeyState;
} DRAGINFOW, *LPDRAGINFOW;
#ifdef UNICODE
typedef DRAGINFOW DRAGINFO;
typedef LPDRAGINFOW LPDRAGINFO;
#else
typedef DRAGINFOA DRAGINFO;
typedef LPDRAGINFOA LPDRAGINFO;
#endif // UNICODE
////
//// AppBar stuff
////
#define ABM_NEW 0x00000000
#define ABM_REMOVE 0x00000001
#define ABM_QUERYPOS 0x00000002
#define ABM_SETPOS 0x00000003
#define ABM_GETSTATE 0x00000004
#define ABM_GETTASKBARPOS 0x00000005
#define ABM_ACTIVATE 0x00000006 // lParam == TRUE/FALSE means activate/deactivate
#define ABM_GETAUTOHIDEBAR 0x00000007
#define ABM_SETAUTOHIDEBAR 0x00000008 // this can fail at any time. MUST check the result
// lParam = TRUE/FALSE Set/Unset
// uEdge = what edge
#define ABM_WINDOWPOSCHANGED 0x0000009
#define ABM_SETSTATE 0x0000000a
// these are put in the wparam of callback messages
#define ABN_STATECHANGE 0x0000000
#define ABN_POSCHANGED 0x0000001
#define ABN_FULLSCREENAPP 0x0000002
#define ABN_WINDOWARRANGE 0x0000003 // lParam == TRUE means hide
// flags for get state
#define ABS_AUTOHIDE 0x0000001
#define ABS_ALWAYSONTOP 0x0000002
#define ABE_LEFT 0
#define ABE_TOP 1
#define ABE_RIGHT 2
#define ABE_BOTTOM 3
typedef struct _AppBarData
{
DWORD cbSize;
HWND hWnd;
UINT uCallbackMessage;
UINT uEdge;
RECT rc;
LPARAM lParam; // message specific
} APPBARDATA, *PAPPBARDATA;
SHSTDAPI_(UINT_PTR) SHAppBarMessage(DWORD dwMessage, PAPPBARDATA pData);
////
//// EndAppBar
////
SHSTDAPI_(DWORD) DoEnvironmentSubstA(LPSTR szString, UINT cchString);
SHSTDAPI_(DWORD) DoEnvironmentSubstW(LPWSTR szString, UINT cchString);
#ifdef UNICODE
#define DoEnvironmentSubst DoEnvironmentSubstW
#else
#define DoEnvironmentSubst DoEnvironmentSubstA
#endif // !UNICODE
#define EIRESID(x) (-1 * (int)(x))
SHSTDAPI_(UINT) ExtractIconExA(LPCSTR lpszFile, int nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIcons);
SHSTDAPI_(UINT) ExtractIconExW(LPCWSTR lpszFile, int nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIcons);
#ifdef UNICODE
#define ExtractIconEx ExtractIconExW
#else
#define ExtractIconEx ExtractIconExA
#endif // !UNICODE
////
//// Shell File Operations
////
#ifndef FO_MOVE //these need to be kept in sync with the ones in shlobj.h
#define FO_MOVE 0x0001
#define FO_COPY 0x0002
#define FO_DELETE 0x0003
#define FO_RENAME 0x0004
#define FOF_MULTIDESTFILES 0x0001
#define FOF_CONFIRMMOUSE 0x0002
#define FOF_SILENT 0x0004 // don't create progress/report
#define FOF_RENAMEONCOLLISION 0x0008
#define FOF_NOCONFIRMATION 0x0010 // Don't prompt the user.
#define FOF_WANTMAPPINGHANDLE 0x0020 // Fill in SHFILEOPSTRUCT.hNameMappings
// Must be freed using SHFreeNameMappings
#define FOF_ALLOWUNDO 0x0040
#define FOF_FILESONLY 0x0080 // on *.*, do only files
#define FOF_SIMPLEPROGRESS 0x0100 // means don't show names of files
#define FOF_NOCONFIRMMKDIR 0x0200 // don't confirm making any needed dirs
#define FOF_NOERRORUI 0x0400 // don't put up error UI
#define FOF_NOCOPYSECURITYATTRIBS 0x0800 // dont copy NT file Security Attributes
#define FOF_NORECURSION 0x1000 // don't recurse into directories.
#if (_WIN32_IE >= 0x0500)
#define FOF_NO_CONNECTED_ELEMENTS 0x2000 // don't operate on connected elements.
#define FOF_WANTNUKEWARNING 0x4000 // during delete operation, warn if nuking instead of recycling (partially overrides FOF_NOCONFIRMATION)
#endif // (_WIN32_IE >= 0x500)
#if (_WIN32_WINNT >= 0x0501)
#define FOF_NORECURSEREPARSE 0x8000 // treat reparse points as objects, not containers
#endif // (_WIN32_WINNT >= 0x501)
typedef WORD FILEOP_FLAGS;
#define PO_DELETE 0x0013 // printer is being deleted
#define PO_RENAME 0x0014 // printer is being renamed
#define PO_PORTCHANGE 0x0020 // port this printer connected to is being changed
// if this id is set, the strings received by
// the copyhook are a doubly-null terminated
// list of strings. The first is the printer
// name and the second is the printer port.
#define PO_REN_PORT 0x0034 // PO_RENAME and PO_PORTCHANGE at same time.
// no POF_ flags currently defined
typedef WORD PRINTEROP_FLAGS;
#endif // FO_MOVE
// implicit parameters are:
// if pFrom or pTo are unqualified names the current directories are
// taken from the global current drive/directory settings managed
// by Get/SetCurrentDrive/Directory
//
// the global confirmation settings
typedef struct _SHFILEOPSTRUCTA
{
HWND hwnd;
UINT wFunc;
LPCSTR pFrom;
LPCSTR pTo;
FILEOP_FLAGS fFlags;
BOOL fAnyOperationsAborted;
LPVOID hNameMappings;
LPCSTR lpszProgressTitle; // only used if FOF_SIMPLEPROGRESS
} SHFILEOPSTRUCTA, *LPSHFILEOPSTRUCTA;
typedef struct _SHFILEOPSTRUCTW
{
HWND hwnd;
UINT wFunc;
LPCWSTR pFrom;
LPCWSTR pTo;
FILEOP_FLAGS fFlags;
BOOL fAnyOperationsAborted;
LPVOID hNameMappings;
LPCWSTR lpszProgressTitle; // only used if FOF_SIMPLEPROGRESS
} SHFILEOPSTRUCTW, *LPSHFILEOPSTRUCTW;
#ifdef UNICODE
typedef SHFILEOPSTRUCTW SHFILEOPSTRUCT;
typedef LPSHFILEOPSTRUCTW LPSHFILEOPSTRUCT;
#else
typedef SHFILEOPSTRUCTA SHFILEOPSTRUCT;
typedef LPSHFILEOPSTRUCTA LPSHFILEOPSTRUCT;
#endif // UNICODE
SHSTDAPI_(int) SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp);
SHSTDAPI_(int) SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp);
#ifdef UNICODE
#define SHFileOperation SHFileOperationW
#else
#define SHFileOperation SHFileOperationA
#endif // !UNICODE
SHSTDAPI_(void) SHFreeNameMappings(HANDLE hNameMappings);
typedef struct _SHNAMEMAPPINGA
{
LPSTR pszOldPath;
LPSTR pszNewPath;
int cchOldPath;
int cchNewPath;
} SHNAMEMAPPINGA, *LPSHNAMEMAPPINGA;
typedef struct _SHNAMEMAPPINGW
{
LPWSTR pszOldPath;
LPWSTR pszNewPath;
int cchOldPath;
int cchNewPath;
} SHNAMEMAPPINGW, *LPSHNAMEMAPPINGW;
#ifdef UNICODE
typedef SHNAMEMAPPINGW SHNAMEMAPPING;
typedef LPSHNAMEMAPPINGW LPSHNAMEMAPPING;
#else
typedef SHNAMEMAPPINGA SHNAMEMAPPING;
typedef LPSHNAMEMAPPINGA LPSHNAMEMAPPING;
#endif // UNICODE
////
//// End Shell File Operations
////
////
//// Begin ShellExecuteEx and family
////
/* ShellExecute() and ShellExecuteEx() error codes */
/* regular WinExec() codes */
#define SE_ERR_FNF 2 // file not found
#define SE_ERR_PNF 3 // path not found
#define SE_ERR_ACCESSDENIED 5 // access denied
#define SE_ERR_OOM 8 // out of memory
#define SE_ERR_DLLNOTFOUND 32
#endif /* WINVER >= 0x0400 */
/* error values for ShellExecute() beyond the regular WinExec() codes */
#define SE_ERR_SHARE 26
#define SE_ERR_ASSOCINCOMPLETE 27
#define SE_ERR_DDETIMEOUT 28
#define SE_ERR_DDEFAIL 29
#define SE_ERR_DDEBUSY 30
#define SE_ERR_NOASSOC 31
#if(WINVER >= 0x0400)
// Note CLASSKEY overrides CLASSNAME
#define SEE_MASK_CLASSNAME 0x00000001
#define SEE_MASK_CLASSKEY 0x00000003
// Note INVOKEIDLIST overrides IDLIST
#define SEE_MASK_IDLIST 0x00000004
#define SEE_MASK_INVOKEIDLIST 0x0000000c
#define SEE_MASK_ICON 0x00000010
#define SEE_MASK_HOTKEY 0x00000020
#define SEE_MASK_NOCLOSEPROCESS 0x00000040
#define SEE_MASK_CONNECTNETDRV 0x00000080
#define SEE_MASK_FLAG_DDEWAIT 0x00000100
#define SEE_MASK_DOENVSUBST 0x00000200
#define SEE_MASK_FLAG_NO_UI 0x00000400
#define SEE_MASK_UNICODE 0x00004000
#define SEE_MASK_NO_CONSOLE 0x00008000
#define SEE_MASK_ASYNCOK 0x00100000
#define SEE_MASK_HMONITOR 0x00200000
#if (_WIN32_IE >= 0x0560)
#define SEE_MASK_NOZONECHECKS 0x00800000
#endif // (_WIN32_IE >= 0x560)
#if (_WIN32_IE >= 0x0500)
#define SEE_MASK_NOQUERYCLASSSTORE 0x01000000
#define SEE_MASK_WAITFORINPUTIDLE 0x02000000
#endif // (_WIN32_IE >= 0x500)
#if (_WIN32_IE >= 0x0560)
#define SEE_MASK_FLAG_LOG_USAGE 0x04000000
#endif // (_WIN32_IE >= 0x560)
//
// For compilers that don't support nameless unions
//
#ifndef DUMMYUNIONNAME
#ifdef NONAMELESSUNION
#define DUMMYUNIONNAME u
#define DUMMYUNIONNAME2 u2
#define DUMMYUNIONNAME3 u3
#define DUMMYUNIONNAME4 u4
#define DUMMYUNIONNAME5 u5
#else
#define DUMMYUNIONNAME
#define DUMMYUNIONNAME2
#define DUMMYUNIONNAME3
#define DUMMYUNIONNAME4
#define DUMMYUNIONNAME5
#endif
#endif // DUMMYUNIONNAME
typedef struct _SHELLEXECUTEINFOA
{
DWORD cbSize;
ULONG fMask;
HWND hwnd;
LPCSTR lpVerb;
LPCSTR lpFile;
LPCSTR lpParameters;
LPCSTR lpDirectory;
int nShow;
HINSTANCE hInstApp;
// Optional fields
LPVOID lpIDList;
LPCSTR lpClass;
HKEY hkeyClass;
DWORD dwHotKey;
union {
HANDLE hIcon;
HANDLE hMonitor;
} DUMMYUNIONNAME;
HANDLE hProcess;
} SHELLEXECUTEINFOA, *LPSHELLEXECUTEINFOA;
typedef struct _SHELLEXECUTEINFOW
{
DWORD cbSize;
ULONG fMask;
HWND hwnd;
LPCWSTR lpVerb;
LPCWSTR lpFile;
LPCWSTR lpParameters;
LPCWSTR lpDirectory;
int nShow;
HINSTANCE hInstApp;
// Optional fields
LPVOID lpIDList;
LPCWSTR lpClass;
HKEY hkeyClass;
DWORD dwHotKey;
union {
HANDLE hIcon;
HANDLE hMonitor;
} DUMMYUNIONNAME;
HANDLE hProcess;
} SHELLEXECUTEINFOW, *LPSHELLEXECUTEINFOW;
#ifdef UNICODE
typedef SHELLEXECUTEINFOW SHELLEXECUTEINFO;
typedef LPSHELLEXECUTEINFOW LPSHELLEXECUTEINFO;
#else
typedef SHELLEXECUTEINFOA SHELLEXECUTEINFO;
typedef LPSHELLEXECUTEINFOA LPSHELLEXECUTEINFO;
#endif // UNICODE
SHSTDAPI_(BOOL) ShellExecuteExA(LPSHELLEXECUTEINFOA lpExecInfo);
SHSTDAPI_(BOOL) ShellExecuteExW(LPSHELLEXECUTEINFOW lpExecInfo);
#ifdef UNICODE
#define ShellExecuteEx ShellExecuteExW
#else
#define ShellExecuteEx ShellExecuteExA
#endif // !UNICODE
SHSTDAPI_(void) WinExecErrorA(HWND hwnd, int error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
SHSTDAPI_(void) WinExecErrorW(HWND hwnd, int error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle);
#ifdef UNICODE
#define WinExecError WinExecErrorW
#else
#define WinExecError WinExecErrorA
#endif // !UNICODE
//
// SHCreateProcessAsUser()
typedef struct _SHCREATEPROCESSINFOW
{
DWORD cbSize;
ULONG fMask;
HWND hwnd;
LPCWSTR pszFile;
LPCWSTR pszParameters;
LPCWSTR pszCurrentDirectory;
IN HANDLE hUserToken;
IN LPSECURITY_ATTRIBUTES lpProcessAttributes;
IN LPSECURITY_ATTRIBUTES lpThreadAttributes;
IN BOOL bInheritHandles;
IN DWORD dwCreationFlags;
IN LPSTARTUPINFOW lpStartupInfo;
OUT LPPROCESS_INFORMATION lpProcessInformation;
} SHCREATEPROCESSINFOW, *PSHCREATEPROCESSINFOW;
SHSTDAPI_(BOOL) SHCreateProcessAsUserW(PSHCREATEPROCESSINFOW pscpi);
////
//// End ShellExecuteEx and family
////
//
// RecycleBin
//
// struct for query recycle bin info
typedef struct _SHQUERYRBINFO {
DWORD cbSize;
#if !defined(_MAC) || defined(_MAC_INT_64)
__int64 i64Size;
__int64 i64NumItems;
#else
DWORDLONG i64Size;
DWORDLONG i64NumItems;
#endif
} SHQUERYRBINFO, *LPSHQUERYRBINFO;
// flags for SHEmptyRecycleBin
//
#define SHERB_NOCONFIRMATION 0x00000001
#define SHERB_NOPROGRESSUI 0x00000002
#define SHERB_NOSOUND 0x00000004
SHSTDAPI SHQueryRecycleBinA(LPCSTR pszRootPath, LPSHQUERYRBINFO pSHQueryRBInfo);
SHSTDAPI SHQueryRecycleBinW(LPCWSTR pszRootPath, LPSHQUERYRBINFO pSHQueryRBInfo);
#ifdef UNICODE
#define SHQueryRecycleBin SHQueryRecycleBinW
#else
#define SHQueryRecycleBin SHQueryRecycleBinA
#endif // !UNICODE
SHSTDAPI SHEmptyRecycleBinA(HWND hwnd, LPCSTR pszRootPath, DWORD dwFlags);
SHSTDAPI SHEmptyRecycleBinW(HWND hwnd, LPCWSTR pszRootPath, DWORD dwFlags);
#ifdef UNICODE
#define SHEmptyRecycleBin SHEmptyRecycleBinW
#else
#define SHEmptyRecycleBin SHEmptyRecycleBinA
#endif // !UNICODE
////
//// end of RecycleBin
////
//// Tray notification definitions
////
typedef struct _NOTIFYICONDATAA {
DWORD cbSize;
HWND hWnd;
UINT uID;
UINT uFlags;
UINT uCallbackMessage;
HICON hIcon;
#if (_WIN32_IE < 0x0500)
CHAR szTip[64];
#else
CHAR szTip[128];
#endif
#if (_WIN32_IE >= 0x0500)
DWORD dwState;
DWORD dwStateMask;
CHAR szInfo[256];
union {
UINT uTimeout;
UINT uVersion;
} DUMMYUNIONNAME;
CHAR szInfoTitle[64];
DWORD dwInfoFlags;
#endif
#if (_WIN32_IE >= 0x600)
GUID guidItem;
#endif
} NOTIFYICONDATAA, *PNOTIFYICONDATAA;
typedef struct _NOTIFYICONDATAW {
DWORD cbSize;
HWND hWnd;
UINT uID;
UINT uFlags;
UINT uCallbackMessage;
HICON hIcon;
#if (_WIN32_IE < 0x0500)
WCHAR szTip[64];
#else
WCHAR szTip[128];
#endif
#if (_WIN32_IE >= 0x0500)
DWORD dwState;
DWORD dwStateMask;
WCHAR szInfo[256];
union {
UINT uTimeout;
UINT uVersion;
} DUMMYUNIONNAME;
WCHAR szInfoTitle[64];
DWORD dwInfoFlags;
#endif
#if (_WIN32_IE >= 0x600)
GUID guidItem;
#endif
} NOTIFYICONDATAW, *PNOTIFYICONDATAW;
#ifdef UNICODE
typedef NOTIFYICONDATAW NOTIFYICONDATA;
typedef PNOTIFYICONDATAW PNOTIFYICONDATA;
#else
typedef NOTIFYICONDATAA NOTIFYICONDATA;
typedef PNOTIFYICONDATAA PNOTIFYICONDATA;
#endif // UNICODE
#define NOTIFYICONDATAA_V1_SIZE FIELD_OFFSET(NOTIFYICONDATAA, szTip[64])
#define NOTIFYICONDATAW_V1_SIZE FIELD_OFFSET(NOTIFYICONDATAW, szTip[64])
#ifdef UNICODE
#define NOTIFYICONDATA_V1_SIZE NOTIFYICONDATAW_V1_SIZE
#else
#define NOTIFYICONDATA_V1_SIZE NOTIFYICONDATAA_V1_SIZE
#endif
#define NOTIFYICONDATAA_V2_SIZE FIELD_OFFSET(NOTIFYICONDATAA, guidItem)
#define NOTIFYICONDATAW_V2_SIZE FIELD_OFFSET(NOTIFYICONDATAW, guidItem)
#ifdef UNICODE
#define NOTIFYICONDATA_V2_SIZE NOTIFYICONDATAW_V2_SIZE
#else
#define NOTIFYICONDATA_V2_SIZE NOTIFYICONDATAA_V2_SIZE
#endif
#if (_WIN32_IE >= 0x0500)
#define NIN_SELECT (WM_USER + 0)
#define NINF_KEY 0x1
#define NIN_KEYSELECT (NIN_SELECT | NINF_KEY)
#endif
#if (_WIN32_IE >= 0x0501)
#define NIN_BALLOONSHOW (WM_USER + 2)
#define NIN_BALLOONHIDE (WM_USER + 3)
#define NIN_BALLOONTIMEOUT (WM_USER + 4)
#define NIN_BALLOONUSERCLICK (WM_USER + 5)
#endif
#define NIM_ADD 0x00000000
#define NIM_MODIFY 0x00000001
#define NIM_DELETE 0x00000002
#if (_WIN32_IE >= 0x0500)
#define NIM_SETFOCUS 0x00000003
#define NIM_SETVERSION 0x00000004
#define NOTIFYICON_VERSION 3
#endif
#define NIF_MESSAGE 0x00000001
#define NIF_ICON 0x00000002
#define NIF_TIP 0x00000004
#if (_WIN32_IE >= 0x0500)
#define NIF_STATE 0x00000008
#define NIF_INFO 0x00000010
#endif
#if (_WIN32_IE >= 0x600)
#define NIF_GUID 0x00000020
#endif
#if (_WIN32_IE >= 0x0500)
#define NIS_HIDDEN 0x00000001
#define NIS_SHAREDICON 0x00000002
// says this is the source of a shared icon
// Notify Icon Infotip flags
#define NIIF_NONE 0x00000000
// icon flags are mutually exclusive
// and take only the lowest 2 bits
#define NIIF_INFO 0x00000001
#define NIIF_WARNING 0x00000002
#define NIIF_ERROR 0x00000003
#if (_WIN32_IE >= 0x0600)
#define NIIF_USER 0x00000004
#endif
#define NIIF_ICON_MASK 0x0000000F
#if (_WIN32_IE >= 0x0501)
#define NIIF_NOSOUND 0x00000010
#endif
#endif
SHSTDAPI_(BOOL) Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA lpData);
SHSTDAPI_(BOOL) Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW lpData);
#ifdef UNICODE
#define Shell_NotifyIcon Shell_NotifyIconW
#else
#define Shell_NotifyIcon Shell_NotifyIconA
#endif // !UNICODE
////
//// End Tray Notification Icons
////
#ifndef SHFILEINFO_DEFINED
#define SHFILEINFO_DEFINED
////
//// Begin SHGetFileInfo
////
/*
* The SHGetFileInfo API provides an easy way to get attributes
* for a file given a pathname.
*
* PARAMETERS
*
* pszPath file name to get info about
* dwFileAttributes file attribs, only used with SHGFI_USEFILEATTRIBUTES
* psfi place to return file info
* cbFileInfo size of structure
* uFlags flags
*
* RETURN
* TRUE if things worked
*/
typedef struct _SHFILEINFOA
{
HICON hIcon; // out: icon
int iIcon; // out: icon index
DWORD dwAttributes; // out: SFGAO_ flags
CHAR szDisplayName[MAX_PATH]; // out: display name (or path)
CHAR szTypeName[80]; // out: type name
} SHFILEINFOA;
typedef struct _SHFILEINFOW
{
HICON hIcon; // out: icon
int iIcon; // out: icon index
DWORD dwAttributes; // out: SFGAO_ flags
WCHAR szDisplayName[MAX_PATH]; // out: display name (or path)
WCHAR szTypeName[80]; // out: type name
} SHFILEINFOW;
#ifdef UNICODE
typedef SHFILEINFOW SHFILEINFO;
#else
typedef SHFILEINFOA SHFILEINFO;
#endif // UNICODE
// NOTE: This is also in shlwapi.h. Please keep in synch.
#endif // !SHFILEINFO_DEFINED
#define SHGFI_ICON 0x000000100 // get icon
#define SHGFI_DISPLAYNAME 0x000000200 // get display name
#define SHGFI_TYPENAME 0x000000400 // get type name
#define SHGFI_ATTRIBUTES 0x000000800 // get attributes
#define SHGFI_ICONLOCATION 0x000001000 // get icon location
#define SHGFI_EXETYPE 0x000002000 // return exe type
#define SHGFI_SYSICONINDEX 0x000004000 // get system icon index
#define SHGFI_LINKOVERLAY 0x000008000 // put a link overlay on icon
#define SHGFI_SELECTED 0x000010000 // show icon in selected state
#define SHGFI_ATTR_SPECIFIED 0x000020000 // get only specified attributes
#define SHGFI_LARGEICON 0x000000000 // get large icon
#define SHGFI_SMALLICON 0x000000001 // get small icon
#define SHGFI_OPENICON 0x000000002 // get open icon
#define SHGFI_SHELLICONSIZE 0x000000004 // get shell size icon
#define SHGFI_PIDL 0x000000008 // pszPath is a pidl
#define SHGFI_USEFILEATTRIBUTES 0x000000010 // use passed dwFileAttribute
#if (_WIN32_IE >= 0x0500)
#define SHGFI_ADDOVERLAYS 0x000000020 // apply the appropriate overlays
#define SHGFI_OVERLAYINDEX 0x000000040 // Get the index of the overlay
// in the upper 8 bits of the iIcon
#endif
SHSTDAPI_(DWORD_PTR) SHGetFileInfoA(LPCSTR pszPath, DWORD dwFileAttributes, SHFILEINFOA *psfi, UINT cbFileInfo, UINT uFlags);
SHSTDAPI_(DWORD_PTR) SHGetFileInfoW(LPCWSTR pszPath, DWORD dwFileAttributes, SHFILEINFOW *psfi, UINT cbFileInfo, UINT uFlags);
#ifdef UNICODE
#define SHGetFileInfo SHGetFileInfoW
#else
#define SHGetFileInfo SHGetFileInfoA
#endif // !UNICODE
#define SHGetDiskFreeSpace SHGetDiskFreeSpaceEx
SHSTDAPI_(BOOL) SHGetDiskFreeSpaceExA(LPCSTR pszDirectoryName, ULARGE_INTEGER* pulFreeBytesAvailableToCaller, ULARGE_INTEGER* pulTotalNumberOfBytes, ULARGE_INTEGER* pulTotalNumberOfFreeBytes);
SHSTDAPI_(BOOL) SHGetDiskFreeSpaceExW(LPCWSTR pszDirectoryName, ULARGE_INTEGER* pulFreeBytesAvailableToCaller, ULARGE_INTEGER* pulTotalNumberOfBytes, ULARGE_INTEGER* pulTotalNumberOfFreeBytes);
#ifdef UNICODE
#define SHGetDiskFreeSpaceEx SHGetDiskFreeSpaceExW
#else
#define SHGetDiskFreeSpaceEx SHGetDiskFreeSpaceExA
#endif // !UNICODE
SHSTDAPI_(BOOL) SHGetNewLinkInfoA(LPCSTR pszLinkTo, LPCSTR pszDir, LPSTR pszName, BOOL *pfMustCopy, UINT uFlags);
SHSTDAPI_(BOOL) SHGetNewLinkInfoW(LPCWSTR pszLinkTo, LPCWSTR pszDir, LPWSTR pszName, BOOL *pfMustCopy, UINT uFlags);
#ifdef UNICODE
#define SHGetNewLinkInfo SHGetNewLinkInfoW
#else
#define SHGetNewLinkInfo SHGetNewLinkInfoA
#endif // !UNICODE
#define SHGNLI_PIDL 0x000000001 // pszLinkTo is a pidl
#define SHGNLI_PREFIXNAME 0x000000002 // Make name "Shortcut to xxx"
#define SHGNLI_NOUNIQUE 0x000000004 // don't do the unique name generation
#if (_WIN32_IE >= 0x0501)
#define SHGNLI_NOLNK 0x000000008 // don't add ".lnk" extension
#endif // _WIN2_IE >= 0x0501
////
//// End SHGetFileInfo
////
// Printer stuff
#define PRINTACTION_OPEN 0
#define PRINTACTION_PROPERTIES 1
#define PRINTACTION_NETINSTALL 2
#define PRINTACTION_NETINSTALLLINK 3
#define PRINTACTION_TESTPAGE 4
#define PRINTACTION_OPENNETPRN 5
#ifdef WINNT
#define PRINTACTION_DOCUMENTDEFAULTS 6
#define PRINTACTION_SERVERPROPERTIES 7
#endif
SHSTDAPI_(BOOL) SHInvokePrinterCommandA(HWND hwnd, UINT uAction, LPCSTR lpBuf1, LPCSTR lpBuf2, BOOL fModal);
SHSTDAPI_(BOOL) SHInvokePrinterCommandW(HWND hwnd, UINT uAction, LPCWSTR lpBuf1, LPCWSTR lpBuf2, BOOL fModal);
#ifdef UNICODE
#define SHInvokePrinterCommand SHInvokePrinterCommandW
#else
#define SHInvokePrinterCommand SHInvokePrinterCommandA
#endif // !UNICODE
#endif /* WINVER >= 0x0400 */
#if (_WIN32_WINNT >= 0x0500) || (_WIN32_WINDOWS >= 0x0500)
//
// The SHLoadNonloadedIconOverlayIdentifiers API causes the shell's
// icon overlay manager to load any registered icon overlay
// identifers that are not currently loaded. This is useful if an
// overlay identifier did not load at shell startup but is needed
// and can be loaded at a later time. Identifiers already loaded
// are not affected. Overlay identifiers implement the
// IShellIconOverlayIdentifier interface.
//
// Returns:
// S_OK
//
SHSTDAPI SHLoadNonloadedIconOverlayIdentifiers(void);
//
// The SHIsFileAvailableOffline API determines whether a file
// or folder is available for offline use.
//
// Parameters:
// pwszPath file name to get info about
// pdwStatus (optional) OFFLINE_STATUS_* flags returned here
//
// Returns:
// S_OK File/directory is available offline, unless
// OFFLINE_STATUS_INCOMPLETE is returned.
// E_INVALIDARG Path is invalid, or not a net path
// E_FAIL File/directory is not available offline
//
// Notes:
// OFFLINE_STATUS_INCOMPLETE is never returned for directories.
// Both OFFLINE_STATUS_LOCAL and OFFLINE_STATUS_REMOTE may be returned,
// indicating "open in both places." This is common when the server is online.
//
SHSTDAPI SHIsFileAvailableOffline(LPCWSTR pwszPath, LPDWORD pdwStatus);
#define OFFLINE_STATUS_LOCAL 0x0001 // If open, it's open locally
#define OFFLINE_STATUS_REMOTE 0x0002 // If open, it's open remotely
#define OFFLINE_STATUS_INCOMPLETE 0x0004 // The local copy is currently imcomplete.
// The file will not be available offline
// until it has been synchronized.
#endif
// sets the specified path to use the string resource
// as the UI instead of the file system name
SHSTDAPI SHSetLocalizedName(LPWSTR pszPath, LPCWSTR pszResModule, int idsRes);
//====== ShellMessageBox ================================================
// If lpcTitle is NULL, the title is taken from hWnd
// If lpcText is NULL, this is assumed to be an Out Of Memory message
// If the selector of lpcTitle or lpcText is NULL, the offset should be a
// string resource ID
// The variable arguments must all be 32-bit values (even if fewer bits
// are actually used)
// lpcText (or whatever string resource it causes to be loaded) should
// be a formatting string similar to wsprintf except that only the
// following formats are available:
// %% formats to a single '%'
// %nn%s the nn-th arg is a string which is inserted
// %nn%ld the nn-th arg is a DWORD, and formatted decimal
// %nn%lx the nn-th arg is a DWORD, and formatted hex
// note that lengths are allowed on the %s, %ld, and %lx, just
// like wsprintf
//
#if (_WIN32_IE >= 0x0601)
int _cdecl ShellMessageBoxA(
HINSTANCE hAppInst,
HWND hWnd,
LPCSTR lpcText,
LPCSTR lpcTitle,
UINT fuStyle,
...);
int _cdecl ShellMessageBoxW(
HINSTANCE hAppInst,
HWND hWnd,
LPCWSTR lpcText,
LPCWSTR lpcTitle,
UINT fuStyle,
...);
#ifdef UNICODE
#define ShellMessageBox ShellMessageBoxW
#else
#define ShellMessageBox ShellMessageBoxA
#endif // !UNICODE
#endif // (_WIN32_IE >= 0x0601)
#if (_WIN32_IE >= 0x0601)
SHSTDAPI_(BOOL) IsLFNDriveA(LPCSTR pszPath);
SHSTDAPI_(BOOL) IsLFNDriveW(LPCWSTR pszPath);
#ifdef UNICODE
#define IsLFNDrive IsLFNDriveW
#else
#define IsLFNDrive IsLFNDriveA
#endif // !UNICODE
#endif // (_WIN32_IE >= 0x0601)
#if _WIN32_IE >= 0x0600
STDAPI SHEnumerateUnreadMailAccountsA(HKEY hKeyUser, DWORD dwIndex, LPSTR pszMailAddress, int cchMailAddress);
STDAPI SHEnumerateUnreadMailAccountsW(HKEY hKeyUser, DWORD dwIndex, LPWSTR pszMailAddress, int cchMailAddress);
#ifdef UNICODE
#define SHEnumerateUnreadMailAccounts SHEnumerateUnreadMailAccountsW
#else
#define SHEnumerateUnreadMailAccounts SHEnumerateUnreadMailAccountsA
#endif // !UNICODE
STDAPI SHGetUnreadMailCountA(HKEY hKeyUser, LPCSTR pszMailAddress, DWORD *pdwCount, FILETIME *pFileTime, LPSTR pszShellExecuteCommand, int cchShellExecuteCommand);
STDAPI SHGetUnreadMailCountW(HKEY hKeyUser, LPCWSTR pszMailAddress, DWORD *pdwCount, FILETIME *pFileTime, LPWSTR pszShellExecuteCommand, int cchShellExecuteCommand);
#ifdef UNICODE
#define SHGetUnreadMailCount SHGetUnreadMailCountW
#else
#define SHGetUnreadMailCount SHGetUnreadMailCountA
#endif // !UNICODE
STDAPI SHSetUnreadMailCountA(LPCSTR pszMailAddress, DWORD dwCount, LPCSTR pszShellExecuteCommand);
STDAPI SHSetUnreadMailCountW(LPCWSTR pszMailAddress, DWORD dwCount, LPCWSTR pszShellExecuteCommand);
#ifdef UNICODE
#define SHSetUnreadMailCount SHSetUnreadMailCountW
#else
#define SHSetUnreadMailCount SHSetUnreadMailCountA
#endif // !UNICODE
#endif /* _WIN32_IE >= 0x0600 */
#if (_WIN32_IE >= 0x0601)
STDAPI_(BOOL) SHTestTokenMembership(HANDLE hToken, ULONG ulRID);
#endif // (_WIN32_IE >= 0x0601)
#if _WIN32_IE >= 0x0600
STDAPI SHGetImageList(int iImageList, REFIID riid, void **ppvObj);
#define SHIL_LARGE 0 // normally 32x32
#define SHIL_SMALL 1 // normally 16x16
#define SHIL_EXTRALARGE 2
#define SHIL_SYSSMALL 3 // like SHIL_SMALL, but tracks system small icon metric correctly
#define SHIL_LAST SHIL_SYSSMALL
// Function call types for ntshrui folder sharing helpers
typedef HRESULT (STDMETHODCALLTYPE *PFNCANSHAREFOLDERW)(IN LPCWSTR pszPath);
typedef HRESULT (STDMETHODCALLTYPE *PFNSHOWSHAREFOLDERUIW)(IN HWND hwndParent, IN LPCWSTR pszPath);
#endif /* _WIN32_IE >= 0x0600 */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#if !defined(_WIN64)
#include <poppack.h>
#endif
#endif /* _INC_SHELLAPI */

View File

@ -0,0 +1,655 @@
/*++
Copyright (c) 2000 Microsoft Corporation
Module Name:
stralign.h
Abstract:
This module contains macros and prototypes to expose the unaligned wide
character interfaces.
Public interfaces created or declared here include:
ua_CharUpper()
ua_CharUpperW()
ua_lstrcmp()
ua_lstrcmpW()
ua_lstrcmpi()
ua_lstrcmpiW()
ua_lstrlen()
ua_lstrlenW()
ua_tcscpy()
ua_tcscpy_s()
ua_wcschr()
ua_wcscpy()
ua_wcscpy_s()
ua_wcsicmp()
ua_wcslen()
ua_wcsrchr()
STRUC_ALIGNED_STACK_COPY()
TSTR_ALIGNED()
TSTR_ALIGNED_STACK_COPY()
WSTR_ALIGNED()
WSTR_ALIGNED_STACK_COPY()
Author:
Revision History:
--*/
#if !defined(__STRALIGN_H_) && !defined(MIDL_PASS)
#define __STRALIGN_H_
#ifndef _STRALIGN_USE_SECURE_CRT
#if defined(__GOT_SECURE_LIB__) && __GOT_SECURE_LIB__ >= 200402L
#define _STRALIGN_USE_SECURE_CRT 1
#else
#define _STRALIGN_USE_SECURE_CRT 0
#endif
#endif
#if !defined(_WINDOWS_INSECURE_DEPRECATE)
#if defined(_WINDOWS_SECURE_NO_DEPRECATE) || !_STRALIGN_USE_SECURE_CRT
#define _WINDOWS_INSECURE_DEPRECATE
#else
#define _WINDOWS_INSECURE_DEPRECATE __declspec(deprecated)
#endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if defined(_X86_)
//
// Alignment of unicode strings is not necessary on X86.
//
#define WSTR_ALIGNED(s) TRUE
#define ua_CharUpperW CharUpperW
#define ua_lstrcmpiW lstrcmpiW
#define ua_lstrcmpW lstrcmpW
#define ua_lstrlenW lstrlenW
#define ua_wcschr wcschr
#define ua_wcsicmp wcsicmp
#define ua_wcslen wcslen
#define ua_wcsrchr wcsrchr
#if _STRALIGN_USE_SECURE_CRT
#define ua_wcscpy_s wcscpy_s
#endif
__inline
PUWSTR
static
_WINDOWS_INSECURE_DEPRECATE
ua_wcscpy(
IN PUWSTR Destination,
IN PCUWSTR Source
)
{
#pragma warning(push)
#pragma warning(disable:4996)
return wcscpy(Destination, Source);
#pragma warning(pop)
}
#else
//
// The C runtime libraries expect aligned string pointers. Following are the
// prototypes for our own, slower worker functions that accept unaligned
// UNICODE strings.
//
//
// Macro to determine whether a pointer to a unicode character is naturally
// aligned.
//
#define WSTR_ALIGNED(s) (((DWORD_PTR)(s) & (sizeof(WCHAR)-1)) == 0)
//
// Platform-specific prototypes for worker functions exported from kernel32.
// Do not call these directly, they do not exist on all platforms. Instead
// use the equivalent ua_xxx() routines.
//
LPUWSTR
WINAPI
uaw_CharUpperW(
IN OUT LPUWSTR String
);
int
APIENTRY
uaw_lstrcmpW(
IN PCUWSTR String1,
IN PCUWSTR String2
);
int
APIENTRY
uaw_lstrcmpiW(
IN PCUWSTR String1,
IN PCUWSTR String2
);
int
WINAPI
uaw_lstrlenW(
IN LPCUWSTR String
);
PUWSTR
__cdecl
uaw_wcschr(
IN PCUWSTR String,
IN WCHAR Character
);
PUWSTR
_cdecl
uaw_wcscpy(
IN PUWSTR Destination,
IN PCUWSTR Source
);
int
__cdecl
uaw_wcsicmp(
IN PCUWSTR String1,
IN PCUWSTR String2
);
size_t
__cdecl
uaw_wcslen(
IN PCUWSTR String
);
PUWSTR
__cdecl
uaw_wcsrchr(
IN PCUWSTR String,
IN WCHAR Character
);
//
// Following are the inline wrappers that determine the optimal worker function
// to call based on the alignment of the UNICODE string arguments. Their
// behavior is otherwise identical to the corresponding standard run-time
// routiunes.
//
#if defined(CharUpper)
__inline
LPUWSTR
static
ua_CharUpperW(
LPUWSTR String
)
{
if (WSTR_ALIGNED(String)) {
return CharUpperW( (PWSTR)String );
} else {
return uaw_CharUpperW( String );
}
}
#endif
#if defined(lstrcmp)
__inline
int
static
ua_lstrcmpW(
IN LPCUWSTR String1,
IN LPCUWSTR String2
)
{
if (WSTR_ALIGNED(String1) && WSTR_ALIGNED(String2)) {
return lstrcmpW( (LPCWSTR)String1, (LPCWSTR)String2);
} else {
return uaw_lstrcmpW( String1, String2 );
}
}
#endif
#if defined(lstrcmpi)
__inline
int
static
ua_lstrcmpiW(
IN LPCUWSTR String1,
IN LPCUWSTR String2
)
{
if (WSTR_ALIGNED(String1) && WSTR_ALIGNED(String2)) {
return lstrcmpiW( (LPCWSTR)String1, (LPCWSTR)String2 );
} else {
return uaw_lstrcmpiW( String1, String2 );
}
}
#endif
#if defined(lstrlen)
__inline
int
static
ua_lstrlenW(
IN LPCUWSTR String
)
{
if (WSTR_ALIGNED(String)) {
return lstrlenW( (PCWSTR)String );
} else {
return uaw_lstrlenW( String );
}
}
#endif
#if defined(_WSTRING_DEFINED)
//
// Certain run-time string functions are overloaded in C++, to avoid
// inadvertent stripping of the const attribute.
//
// The functions of interest here include: wcschr and wcsrchr.
//
// There are three flavors of these functions:
//
// Flavor Returns Parameter
//
// 1 PWSTR PCWSTR
// 2 PCWSTR PCWSTR
// 3 PWSTR PWSTR
//
// string.h declares flavor 1 whether for C or C++. This is the non-ANSI,
// backward compatible mode.
//
// wchar.h declares flavor 1 if C, or flavors 2 and 3 if C++. This is the
// ANSI method.
//
// Our corresponding functions need to match what was declared. The way
// we can tell is by looking at _WConst_return... if it is defined then
// we want to match the prototypes in wchar.h, otherwise we'll match
// the prototypes in string.h.
//
#if defined(_WConst_return)
typedef _WConst_return WCHAR UNALIGNED *PUWSTR_C;
#else
typedef WCHAR UNALIGNED *PUWSTR_C;
#endif
//
// Here is flavor 1 or 2
//
__inline
PUWSTR_C
static
ua_wcschr(
IN PCUWSTR String,
IN WCHAR Character
)
{
if (WSTR_ALIGNED(String)) {
return wcschr((PCWSTR)String, Character);
} else {
return (PUWSTR_C)uaw_wcschr(String, Character);
}
}
__inline
PUWSTR_C
static
ua_wcsrchr(
IN PCUWSTR String,
IN WCHAR Character
)
{
if (WSTR_ALIGNED(String)) {
return wcsrchr((PCWSTR)String, Character);
} else {
return (PUWSTR_C)uaw_wcsrchr(String, Character);
}
}
#if defined(__cplusplus) && defined(_WConst_Return)
//
// Here is flavor 3
//
__inline
PUWSTR
static
_WINDOWS_INSECURE_DEPRECATE
ua_wcschr(
IN PUWSTR String,
IN WCHAR Character
)
{
if (WSTR_ALIGNED(String)) {
#pragma warning(push)
#pragma warning(disable:4996)
return wcscpy( (PWSTR)Destination, (PCWSTR)Source );
#pragma warning(pop)
} else {
return uaw_wcscpy( Destination, Source );
}
}
__inline
PUWSTR
static
ua_wcscpy_s(
IN PUWSTR Destination,
IN size_t DestinationSize,
IN PCUWSTR Source
)
{
if (WSTR_ALIGNED(Source) && WSTR_ALIGNED(Destination)) {
return (wcscpy_s( (PWSTR)Destination, DestinationSize, (PCWSTR)Source ) == 0 ? Destination : NULL);
} else {
/* TODO (alecont): Need to reference uaw_wcscpy_s */
return uaw_wcscpy((PCUWSTR)String, Character);
}
}
__inline
PUWSTR
static
ua_wcsrchr(
IN PUWSTR String,
IN WCHAR Character
)
{
if (WSTR_ALIGNED(String)) {
return wcsrchr(String, Character);
} else {
return uaw_wcsrchr((PCUWSTR)String, Character);
}
}
#endif // __cplusplus && _WConst_Return
__inline
PUWSTR
static
_WINDOWS_INSECURE_DEPRECATE
ua_wcscpy(
IN PUWSTR Destination,
IN PCUWSTR Source
)
{
if (WSTR_ALIGNED(Source) && WSTR_ALIGNED(Destination)) {
#pragma warning(push)
#pragma warning(disable:4996)
return wcscpy( (PWSTR)Destination, (PCWSTR)Source );
#pragma warning(pop)
} else {
return uaw_wcscpy( Destination, Source );
}
}
#if _STRALIGN_USE_SECURE_CRT
__inline
PUWSTR
static
ua_wcscpy_s(
IN PUWSTR Destination,
IN size_t DestinationSize,
IN PCUWSTR Source
)
{
if (WSTR_ALIGNED(Source) && WSTR_ALIGNED(Destination)) {
return (wcscpy_s( (PWSTR)Destination, DestinationSize, (PCWSTR)Source ) == 0 ? Destination : NULL);
} else {
/* TODO: Need to reference uaw_wcscpy_s */
return uaw_wcscpy( Destination, Source );
}
}
#endif
__inline
size_t
static
ua_wcslen(
IN PCUWSTR String
)
{
if (WSTR_ALIGNED(String)) {
return wcslen( (PCWSTR)String );
} else {
return uaw_wcslen( String );
}
}
#endif // _WSTRING_DEFINED
__inline
int
static
ua_wcsicmp(
IN LPCUWSTR String1,
IN LPCUWSTR String2
)
{
if (WSTR_ALIGNED(String1) && WSTR_ALIGNED(String2)) {
return _wcsicmp( (LPCWSTR)String1, (LPCWSTR)String2 );
} else {
return uaw_wcsicmp( String1, String2 );
}
}
#endif // _X86_
//++
//
// VOID
// WSTR_ALIGNED_STACK_COPY (
// OUT PCWSTR *TargetString,
// IN PCUWSTR SourceString OPTIONAL
// )
//
// VOID
// TSTR_ALIGNED_STACK_COPY (
// OUT PCTSTR *TargetString,
// IN PCUTSTR SourceString OPTIONAL
// )
//
// Routine Description:
//
// These macros set TargetString to an aligned pointer to the string
// represented by SourceString. If necessary, an aligned copy of
// SourceString is copied onto the stack.
//
// Arguments:
//
// TargetString - Supplies a pointer to a pointer to the resultant
// string. This may be the same as SourceString if
// that argument is aligned.
//
// SourceString - Supplies a pointer to the possibly unaligned UNICODE
// string.
//
// Return Value:
//
// None.
//
// Note:
//
// These macros may allocate memory on the stack via the CRT function
// _alloca(). This memory is "freed" when the calling function exits.
// As a result, do not use these macros inside of a loop that may execute
// a large number of times - instead, use a wrapper function, or use
// an explicit buffer like this:
//
// TCHAR AlignedStringBuffer[ MAX_FOOSTR_CHARS ];
// PTSTR AlignedString;
//
// while (a < b) {
// ...
// if (TSTR_ALIGNED(s) {
// AlignedString = s;
// } else {
// AlignedString = (PTSTR)ua_tcscpy(AlignedStringBuffer,s);
// }
// SomeSystemFunction(AlignedString);
// ...
// }
//
//
//--
//
// __UA_WSTRSIZE returns the number of bytes required to store the
// supplied null-terminated UNICODE string.
//
// __UA_LOCALCOPY accepts a pointer to unaligned data and a size. It
// allocates an aligned buffer on the stack and copies the data into
// it, returning a pointer to the buffer.
//
#if !defined(__UA_WCSLEN)
#define __UA_WCSLEN ua_wcslen
#endif
#define __UA_WSTRSIZE(s) ((__UA_WCSLEN(s)+1)*sizeof(WCHAR))
#define __UA_STACKCOPY(p,s) memcpy(_alloca(s),p,s)
//
// Note that NULL is aligned.
//
#if defined(_X86_)
#define WSTR_ALIGNED_STACK_COPY(d,s) (*(d) = (PCWSTR)(s))
#else
//
// Use of an inline function here is not possible, as the results of
// the _alloca() will not be preserved upon return from the function.
//
#define WSTR_ALIGNED_STACK_COPY(d,s) \
{ \
PCUWSTR __ua_src; \
ULONG __ua_size; \
PWSTR __ua_dst; \
\
__ua_src = (s); \
if (WSTR_ALIGNED(__ua_src)) { \
__ua_dst = (PWSTR)__ua_src; \
} else { \
__ua_size = __UA_WSTRSIZE(__ua_src); \
__ua_dst = (PWSTR)_alloca(__ua_size); \
memcpy(__ua_dst,__ua_src,__ua_size); \
} \
*(d) = (PCWSTR)__ua_dst; \
}
#endif
#define ASTR_ALIGNED_STACK_COPY(d,s) (*(d) = (PCSTR)(s))
//++
//
// <type> CONST *
// STRUC_ALIGNED_STACK_COPY (
// IN <type name>,
// IN PVOID Struc OPTIONAL
// )
//
// Routine Description:
//
// This macro returns an aligned pointer to Struc, creating a local
// copy on the stack if necessary.
//
// This should be used only for relatively small structures, and efforts
// should be made to align the structure properly in the first place. Use
// this macro only as a last resort.
//
// Arguments:
//
// <type> - The type specifier of Struc
//
// Struc - Supplies a pointer to the structure in question.
//
// Return Value:
//
// Returns a const pointer to Struc if it is properly aligned, or a pointer
// to a stack-allocated copy of Struc if it is not.
//
//--
#if !defined(_X86_)
#define __UA_STRUC_ALIGNED(t,s) \
(((DWORD_PTR)(s) & (TYPE_ALIGNMENT(t)-1)) == 0)
#define STRUC_ALIGNED_STACK_COPY(t,s) \
__UA_STRUC_ALIGNED(t,s) ? \
((t const *)(s)) : \
((t const *)__UA_STACKCOPY((s),sizeof(t)))
#else
#define STRUC_ALIGNED_STACK_COPY(t,s) ((CONST t *)(s))
#endif
#if defined(UNICODE)
#define TSTR_ALIGNED_STACK_COPY(d,s) WSTR_ALIGNED_STACK_COPY(d,s)
#define TSTR_ALIGNED(x) WSTR_ALIGNED(x)
#define ua_CharUpper ua_CharUpperW
#define ua_lstrcmp ua_lstrcmpW
#define ua_lstrcmpi ua_lstrcmpiW
#define ua_lstrlen ua_lstrlenW
#define ua_tcscpy ua_wcscpy
#if _STRALIGN_USE_SECURE_CRT
#define ua_tcscpy_s ua_wcscpy_s
#endif
#else
#define TSTR_ALIGNED_STACK_COPY(d,s) ASTR_ALIGNED_STACK_COPY(d,s)
#define TSTR_ALIGNED(x) TRUE
#define ua_CharUpper CharUpperA
#define ua_lstrcmp lstrcmpA
#define ua_lstrcmpi lstrcmpiA
#define ua_lstrlen lstrlenA
#define ua_tcscpy strcpy
#if _STRALIGN_USE_SECURE_CRT
#define ua_tcscpy_s strcpy_s
#endif
#endif // UNICODE
#ifdef __cplusplus
}
#endif
#endif // __STRALIGN_H_

View File

@ -0,0 +1,90 @@
/*++
Copyright (c) 1998-1999 Microsoft Corporation
*/
#ifndef __TVOUT__
#define __TVOUT__
#if _MSC_VER > 1000
#pragma once
#endif
#ifndef GUID_DEFINED
#include <guiddef.h>
#endif
typedef struct _VIDEOPARAMETERS {
GUID Guid; // GUID for this structure
ULONG dwOffset; // leave it 0 for now.
ULONG dwCommand; // VP_COMMAND_* SET or GET
ULONG dwFlags; // bitfield, defined below SET or GET
ULONG dwMode; // bitfield, defined below SET or GET
ULONG dwTVStandard; // bitfield, defined below SET or GET
ULONG dwAvailableModes; // bitfield, defined below GET
ULONG dwAvailableTVStandard; // bitfield, defined below GET
ULONG dwFlickerFilter; // value SET or GET
ULONG dwOverScanX; // value SET or GET
ULONG dwOverScanY; // SET or GET
ULONG dwMaxUnscaledX; // value SET or GET
ULONG dwMaxUnscaledY; // SET or GET
ULONG dwPositionX; // value SET or GET
ULONG dwPositionY; // SET or GET
ULONG dwBrightness; // value SET or GET
ULONG dwContrast; // value SET or GET
ULONG dwCPType; // copy protection type SET or GET
ULONG dwCPCommand; // VP_CP_CMD_
ULONG dwCPStandard; // what TV standards CP is available on. GET
ULONG dwCPKey;
ULONG bCP_APSTriggerBits; // (a dword for alignment) SET(bits 0 and 1 valid).
UCHAR bOEMCopyProtection[256]; // oem specific copy protection data SET or GET
} VIDEOPARAMETERS, *PVIDEOPARAMETERS, *LPVIDEOPARAMETERS;
#define VP_COMMAND_GET 0x0001 // size set, return caps.
// returned Flags = 0 if not supported.
#define VP_COMMAND_SET 0x0002 // size and params set.
#define VP_FLAGS_TV_MODE 0x0001
#define VP_FLAGS_TV_STANDARD 0x0002
#define VP_FLAGS_FLICKER 0x0004
#define VP_FLAGS_OVERSCAN 0x0008
#define VP_FLAGS_MAX_UNSCALED 0x0010 // do not use on SET
#define VP_FLAGS_POSITION 0x0020
#define VP_FLAGS_BRIGHTNESS 0x0040
#define VP_FLAGS_CONTRAST 0x0080
#define VP_FLAGS_COPYPROTECT 0x0100
#define VP_MODE_WIN_GRAPHICS 0x0001
#define VP_MODE_TV_PLAYBACK 0x0002 // optimize for TV video playback
#define VP_TV_STANDARD_NTSC_M 0x0001 // 75 IRE Setup
#define VP_TV_STANDARD_NTSC_M_J 0x0002 // Japan, 0 IRE Setup
#define VP_TV_STANDARD_PAL_B 0x0004
#define VP_TV_STANDARD_PAL_D 0x0008
#define VP_TV_STANDARD_PAL_H 0x0010
#define VP_TV_STANDARD_PAL_I 0x0020
#define VP_TV_STANDARD_PAL_M 0x0040
#define VP_TV_STANDARD_PAL_N 0x0080
#define VP_TV_STANDARD_SECAM_B 0x0100
#define VP_TV_STANDARD_SECAM_D 0x0200
#define VP_TV_STANDARD_SECAM_G 0x0400
#define VP_TV_STANDARD_SECAM_H 0x0800
#define VP_TV_STANDARD_SECAM_K 0x1000
#define VP_TV_STANDARD_SECAM_K1 0x2000
#define VP_TV_STANDARD_SECAM_L 0x4000
#define VP_TV_STANDARD_WIN_VGA 0x8000
// and the rest
#define VP_TV_STANDARD_NTSC_433 0x00010000
#define VP_TV_STANDARD_PAL_G 0x00020000
#define VP_TV_STANDARD_PAL_60 0x00040000
#define VP_TV_STANDARD_SECAM_L1 0x00080000
#define VP_CP_TYPE_APS_TRIGGER 0x0001 // DVD trigger bits only
#define VP_CP_TYPE_MACROVISION 0x0002 // full macrovision data available
#define VP_CP_CMD_ACTIVATE 0x0001 // CP command type
#define VP_CP_CMD_DEACTIVATE 0x0002
#define VP_CP_CMD_CHANGE 0x0004
#endif

View File

@ -0,0 +1,614 @@
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 6.00.0366 */
/* Compiler settings for unknwn.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
#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 __unknwn_h__
#define __unknwn_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifndef __IUnknown_FWD_DEFINED__
#define __IUnknown_FWD_DEFINED__
typedef interface IUnknown IUnknown;
#endif /* __IUnknown_FWD_DEFINED__ */
#ifndef __AsyncIUnknown_FWD_DEFINED__
#define __AsyncIUnknown_FWD_DEFINED__
typedef interface AsyncIUnknown AsyncIUnknown;
#endif /* __AsyncIUnknown_FWD_DEFINED__ */
#ifndef __IClassFactory_FWD_DEFINED__
#define __IClassFactory_FWD_DEFINED__
typedef interface IClassFactory IClassFactory;
#endif /* __IClassFactory_FWD_DEFINED__ */
/* header files for imported files */
#include "wtypes.h"
#ifdef __cplusplus
extern "C"{
#endif
void * __RPC_USER MIDL_user_allocate(size_t);
void __RPC_USER MIDL_user_free( void * );
/* interface __MIDL_itf_unknwn_0000 */
/* [local] */
//+-------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//--------------------------------------------------------------------------
#if ( _MSC_VER >= 1020 )
#pragma once
#endif
extern RPC_IF_HANDLE __MIDL_itf_unknwn_0000_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_unknwn_0000_v0_0_s_ifspec;
#ifndef __IUnknown_INTERFACE_DEFINED__
#define __IUnknown_INTERFACE_DEFINED__
/* interface IUnknown */
/* [unique][uuid][object][local] */
typedef /* [unique] */ IUnknown *LPUNKNOWN;
//////////////////////////////////////////////////////////////////
// IID_IUnknown and all other system IIDs are provided in UUID.LIB
// Link that library in with your proxies, clients and servers
//////////////////////////////////////////////////////////////////
#if (_MSC_VER >= 1100) && defined(__cplusplus) && !defined(CINTERFACE)
EXTERN_C const IID IID_IUnknown;
extern "C++"
{
MIDL_INTERFACE("00000000-0000-0000-C000-000000000046")
IUnknown
{
public:
BEGIN_INTERFACE
virtual HRESULT STDMETHODCALLTYPE QueryInterface(
/* [in] */ REFIID riid,
/* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject) = 0;
virtual ULONG STDMETHODCALLTYPE AddRef( void) = 0;
virtual ULONG STDMETHODCALLTYPE Release( void) = 0;
template<class Q>
HRESULT STDMETHODCALLTYPE QueryInterface(Q** pp)
{
return QueryInterface(__uuidof(Q), (void **)pp);
}
END_INTERFACE
};
} // extern C++
HRESULT STDMETHODCALLTYPE IUnknown_QueryInterface_Proxy(
IUnknown __RPC_FAR * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject);
void __RPC_STUB IUnknown_QueryInterface_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
ULONG STDMETHODCALLTYPE IUnknown_AddRef_Proxy(
IUnknown __RPC_FAR * This);
void __RPC_STUB IUnknown_AddRef_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
ULONG STDMETHODCALLTYPE IUnknown_Release_Proxy(
IUnknown __RPC_FAR * This);
void __RPC_STUB IUnknown_Release_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#else
EXTERN_C const IID IID_IUnknown;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("00000000-0000-0000-C000-000000000046")
IUnknown
{
public:
BEGIN_INTERFACE
virtual HRESULT STDMETHODCALLTYPE QueryInterface(
/* [in] */ REFIID riid,
/* [iid_is][out] */ void **ppvObject) = 0;
virtual ULONG STDMETHODCALLTYPE AddRef( void) = 0;
virtual ULONG STDMETHODCALLTYPE Release( void) = 0;
END_INTERFACE
};
#else /* C style interface */
typedef struct IUnknownVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IUnknown * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IUnknown * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IUnknown * This);
END_INTERFACE
} IUnknownVtbl;
interface IUnknown
{
CONST_VTBL struct IUnknownVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IUnknown_QueryInterface(This,riid,ppvObject) \
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
#define IUnknown_AddRef(This) \
(This)->lpVtbl -> AddRef(This)
#define IUnknown_Release(This) \
(This)->lpVtbl -> Release(This)
#endif /* COBJMACROS */
#endif /* C style interface */
HRESULT STDMETHODCALLTYPE IUnknown_QueryInterface_Proxy(
IUnknown * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void **ppvObject);
void __RPC_STUB IUnknown_QueryInterface_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
ULONG STDMETHODCALLTYPE IUnknown_AddRef_Proxy(
IUnknown * This);
void __RPC_STUB IUnknown_AddRef_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
ULONG STDMETHODCALLTYPE IUnknown_Release_Proxy(
IUnknown * This);
void __RPC_STUB IUnknown_Release_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IUnknown_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_unknwn_0005 */
/* [local] */
#endif
extern RPC_IF_HANDLE __MIDL_itf_unknwn_0005_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_unknwn_0005_v0_0_s_ifspec;
#ifndef __AsyncIUnknown_INTERFACE_DEFINED__
#define __AsyncIUnknown_INTERFACE_DEFINED__
/* interface AsyncIUnknown */
/* [unique][uuid][object][local] */
EXTERN_C const IID IID_AsyncIUnknown;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("000e0000-0000-0000-C000-000000000046")
AsyncIUnknown : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE Begin_QueryInterface(
/* [in] */ REFIID riid) = 0;
virtual HRESULT STDMETHODCALLTYPE Finish_QueryInterface(
/* [out] */ void **ppvObject) = 0;
virtual HRESULT STDMETHODCALLTYPE Begin_AddRef( void) = 0;
virtual ULONG STDMETHODCALLTYPE Finish_AddRef( void) = 0;
virtual HRESULT STDMETHODCALLTYPE Begin_Release( void) = 0;
virtual ULONG STDMETHODCALLTYPE Finish_Release( void) = 0;
};
#else /* C style interface */
typedef struct AsyncIUnknownVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
AsyncIUnknown * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
AsyncIUnknown * This);
ULONG ( STDMETHODCALLTYPE *Release )(
AsyncIUnknown * This);
HRESULT ( STDMETHODCALLTYPE *Begin_QueryInterface )(
AsyncIUnknown * This,
/* [in] */ REFIID riid);
HRESULT ( STDMETHODCALLTYPE *Finish_QueryInterface )(
AsyncIUnknown * This,
/* [out] */ void **ppvObject);
HRESULT ( STDMETHODCALLTYPE *Begin_AddRef )(
AsyncIUnknown * This);
ULONG ( STDMETHODCALLTYPE *Finish_AddRef )(
AsyncIUnknown * This);
HRESULT ( STDMETHODCALLTYPE *Begin_Release )(
AsyncIUnknown * This);
ULONG ( STDMETHODCALLTYPE *Finish_Release )(
AsyncIUnknown * This);
END_INTERFACE
} AsyncIUnknownVtbl;
interface AsyncIUnknown
{
CONST_VTBL struct AsyncIUnknownVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define AsyncIUnknown_QueryInterface(This,riid,ppvObject) \
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
#define AsyncIUnknown_AddRef(This) \
(This)->lpVtbl -> AddRef(This)
#define AsyncIUnknown_Release(This) \
(This)->lpVtbl -> Release(This)
#define AsyncIUnknown_Begin_QueryInterface(This,riid) \
(This)->lpVtbl -> Begin_QueryInterface(This,riid)
#define AsyncIUnknown_Finish_QueryInterface(This,ppvObject) \
(This)->lpVtbl -> Finish_QueryInterface(This,ppvObject)
#define AsyncIUnknown_Begin_AddRef(This) \
(This)->lpVtbl -> Begin_AddRef(This)
#define AsyncIUnknown_Finish_AddRef(This) \
(This)->lpVtbl -> Finish_AddRef(This)
#define AsyncIUnknown_Begin_Release(This) \
(This)->lpVtbl -> Begin_Release(This)
#define AsyncIUnknown_Finish_Release(This) \
(This)->lpVtbl -> Finish_Release(This)
#endif /* COBJMACROS */
#endif /* C style interface */
HRESULT STDMETHODCALLTYPE AsyncIUnknown_Begin_QueryInterface_Proxy(
AsyncIUnknown * This,
/* [in] */ REFIID riid);
void __RPC_STUB AsyncIUnknown_Begin_QueryInterface_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE AsyncIUnknown_Finish_QueryInterface_Proxy(
AsyncIUnknown * This,
/* [out] */ void **ppvObject);
void __RPC_STUB AsyncIUnknown_Finish_QueryInterface_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE AsyncIUnknown_Begin_AddRef_Proxy(
AsyncIUnknown * This);
void __RPC_STUB AsyncIUnknown_Begin_AddRef_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
ULONG STDMETHODCALLTYPE AsyncIUnknown_Finish_AddRef_Proxy(
AsyncIUnknown * This);
void __RPC_STUB AsyncIUnknown_Finish_AddRef_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE AsyncIUnknown_Begin_Release_Proxy(
AsyncIUnknown * This);
void __RPC_STUB AsyncIUnknown_Begin_Release_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
ULONG STDMETHODCALLTYPE AsyncIUnknown_Finish_Release_Proxy(
AsyncIUnknown * This);
void __RPC_STUB AsyncIUnknown_Finish_Release_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __AsyncIUnknown_INTERFACE_DEFINED__ */
#ifndef __IClassFactory_INTERFACE_DEFINED__
#define __IClassFactory_INTERFACE_DEFINED__
/* interface IClassFactory */
/* [unique][uuid][object] */
typedef /* [unique] */ IClassFactory *LPCLASSFACTORY;
EXTERN_C const IID IID_IClassFactory;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("00000001-0000-0000-C000-000000000046")
IClassFactory : public IUnknown
{
public:
virtual /* [local] */ HRESULT STDMETHODCALLTYPE CreateInstance(
/* [unique][in] */ IUnknown *pUnkOuter,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void **ppvObject) = 0;
virtual /* [local] */ HRESULT STDMETHODCALLTYPE LockServer(
/* [in] */ BOOL fLock) = 0;
};
#else /* C style interface */
typedef struct IClassFactoryVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IClassFactory * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IClassFactory * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IClassFactory * This);
/* [local] */ HRESULT ( STDMETHODCALLTYPE *CreateInstance )(
IClassFactory * This,
/* [unique][in] */ IUnknown *pUnkOuter,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void **ppvObject);
/* [local] */ HRESULT ( STDMETHODCALLTYPE *LockServer )(
IClassFactory * This,
/* [in] */ BOOL fLock);
END_INTERFACE
} IClassFactoryVtbl;
interface IClassFactory
{
CONST_VTBL struct IClassFactoryVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IClassFactory_QueryInterface(This,riid,ppvObject) \
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
#define IClassFactory_AddRef(This) \
(This)->lpVtbl -> AddRef(This)
#define IClassFactory_Release(This) \
(This)->lpVtbl -> Release(This)
#define IClassFactory_CreateInstance(This,pUnkOuter,riid,ppvObject) \
(This)->lpVtbl -> CreateInstance(This,pUnkOuter,riid,ppvObject)
#define IClassFactory_LockServer(This,fLock) \
(This)->lpVtbl -> LockServer(This,fLock)
#endif /* COBJMACROS */
#endif /* C style interface */
/* [call_as] */ HRESULT STDMETHODCALLTYPE IClassFactory_RemoteCreateInstance_Proxy(
IClassFactory * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ IUnknown **ppvObject);
void __RPC_STUB IClassFactory_RemoteCreateInstance_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
/* [call_as] */ HRESULT __stdcall IClassFactory_RemoteLockServer_Proxy(
IClassFactory * This,
/* [in] */ BOOL fLock);
void __RPC_STUB IClassFactory_RemoteLockServer_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IClassFactory_INTERFACE_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
/* [local] */ HRESULT STDMETHODCALLTYPE IClassFactory_CreateInstance_Proxy(
IClassFactory * This,
/* [unique][in] */ IUnknown *pUnkOuter,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void **ppvObject);
/* [call_as] */ HRESULT STDMETHODCALLTYPE IClassFactory_CreateInstance_Stub(
IClassFactory * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ IUnknown **ppvObject);
/* [local] */ HRESULT STDMETHODCALLTYPE IClassFactory_LockServer_Proxy(
IClassFactory * This,
/* [in] */ BOOL fLock);
/* [call_as] */ HRESULT __stdcall IClassFactory_LockServer_Stub(
IClassFactory * This,
/* [in] */ BOOL fLock);
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif

8200
lib/MSPlatformSDK/Include/UrlMon.h Executable file

File diff suppressed because it is too large Load Diff

3812
lib/MSPlatformSDK/Include/Vfw.h Executable file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,45 @@
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 Microsoft Corporation
// All rights reserved.
//
// This source code is only intended as a supplement to the
// Microsoft Foundation Classes Reference and related
// electronic documentation provided with the library.
// See these sources for detailed information regarding the
// Microsoft Foundation Classes product.
// winres.h - Windows resource definitions
// extracted from WINUSER.H and COMMCTRL.H
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, off)
#endif
#define VS_VERSION_INFO 1
#ifdef APSTUDIO_INVOKED
#define APSTUDIO_HIDDEN_SYMBOLS // Ignore following symbols
#endif
#ifndef WINVER
#define WINVER 0x0400 // default to Windows Version 4.0
#endif
#include <winresrc.h>
// operation messages sent to DLGINIT
#define LB_ADDSTRING (WM_USER+1)
#define CB_ADDSTRING (WM_USER+3)
#ifdef APSTUDIO_INVOKED
#undef APSTUDIO_HIDDEN_SYMBOLS
#endif
#ifdef IDC_STATIC
#undef IDC_STATIC
#endif
#define IDC_STATIC (-1)
#ifdef _AFX_MINREBUILD
#pragma component(minrebuild, on)
#endif

1329
lib/MSPlatformSDK/Include/WTypes.h Executable file

File diff suppressed because it is too large Load Diff

11299
lib/MSPlatformSDK/Include/WinBase.h Executable file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,953 @@
/*++ BUILD Version: 0002 // Increment this if a change has global effects
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
wincon.h
Abstract:
This module contains the public data structures, data types,
and procedures exported by the NT console subsystem.
Created:
26-Oct-1990
Revision History:
--*/
#ifndef _WINCON_
#define _WINCON_
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _COORD {
SHORT X;
SHORT Y;
} COORD, *PCOORD;
typedef struct _SMALL_RECT {
SHORT Left;
SHORT Top;
SHORT Right;
SHORT Bottom;
} SMALL_RECT, *PSMALL_RECT;
typedef struct _KEY_EVENT_RECORD {
BOOL bKeyDown;
WORD wRepeatCount;
WORD wVirtualKeyCode;
WORD wVirtualScanCode;
union {
WCHAR UnicodeChar;
CHAR AsciiChar;
} uChar;
DWORD dwControlKeyState;
} KEY_EVENT_RECORD, *PKEY_EVENT_RECORD;
//
// ControlKeyState flags
//
#define RIGHT_ALT_PRESSED 0x0001 // the right alt key is pressed.
#define LEFT_ALT_PRESSED 0x0002 // the left alt key is pressed.
#define RIGHT_CTRL_PRESSED 0x0004 // the right ctrl key is pressed.
#define LEFT_CTRL_PRESSED 0x0008 // the left ctrl key is pressed.
#define SHIFT_PRESSED 0x0010 // the shift key is pressed.
#define NUMLOCK_ON 0x0020 // the numlock light is on.
#define SCROLLLOCK_ON 0x0040 // the scrolllock light is on.
#define CAPSLOCK_ON 0x0080 // the capslock light is on.
#define ENHANCED_KEY 0x0100 // the key is enhanced.
#define NLS_DBCSCHAR 0x00010000 // DBCS for JPN: SBCS/DBCS mode.
#define NLS_ALPHANUMERIC 0x00000000 // DBCS for JPN: Alphanumeric mode.
#define NLS_KATAKANA 0x00020000 // DBCS for JPN: Katakana mode.
#define NLS_HIRAGANA 0x00040000 // DBCS for JPN: Hiragana mode.
#define NLS_ROMAN 0x00400000 // DBCS for JPN: Roman/Noroman mode.
#define NLS_IME_CONVERSION 0x00800000 // DBCS for JPN: IME conversion.
#define NLS_IME_DISABLE 0x20000000 // DBCS for JPN: IME enable/disable.
typedef struct _MOUSE_EVENT_RECORD {
COORD dwMousePosition;
DWORD dwButtonState;
DWORD dwControlKeyState;
DWORD dwEventFlags;
} MOUSE_EVENT_RECORD, *PMOUSE_EVENT_RECORD;
//
// ButtonState flags
//
#define FROM_LEFT_1ST_BUTTON_PRESSED 0x0001
#define RIGHTMOST_BUTTON_PRESSED 0x0002
#define FROM_LEFT_2ND_BUTTON_PRESSED 0x0004
#define FROM_LEFT_3RD_BUTTON_PRESSED 0x0008
#define FROM_LEFT_4TH_BUTTON_PRESSED 0x0010
//
// EventFlags
//
#define MOUSE_MOVED 0x0001
#define DOUBLE_CLICK 0x0002
#define MOUSE_WHEELED 0x0004
typedef struct _WINDOW_BUFFER_SIZE_RECORD {
COORD dwSize;
} WINDOW_BUFFER_SIZE_RECORD, *PWINDOW_BUFFER_SIZE_RECORD;
typedef struct _MENU_EVENT_RECORD {
UINT dwCommandId;
} MENU_EVENT_RECORD, *PMENU_EVENT_RECORD;
typedef struct _FOCUS_EVENT_RECORD {
BOOL bSetFocus;
} FOCUS_EVENT_RECORD, *PFOCUS_EVENT_RECORD;
typedef struct _INPUT_RECORD {
WORD EventType;
union {
KEY_EVENT_RECORD KeyEvent;
MOUSE_EVENT_RECORD MouseEvent;
WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent;
MENU_EVENT_RECORD MenuEvent;
FOCUS_EVENT_RECORD FocusEvent;
} Event;
} INPUT_RECORD, *PINPUT_RECORD;
//
// EventType flags:
//
#define KEY_EVENT 0x0001 // Event contains key event record
#define MOUSE_EVENT 0x0002 // Event contains mouse event record
#define WINDOW_BUFFER_SIZE_EVENT 0x0004 // Event contains window change event record
#define MENU_EVENT 0x0008 // Event contains menu event record
#define FOCUS_EVENT 0x0010 // event contains focus change
typedef struct _CHAR_INFO {
union {
WCHAR UnicodeChar;
CHAR AsciiChar;
} Char;
WORD Attributes;
} CHAR_INFO, *PCHAR_INFO;
//
// Attributes flags:
//
#define FOREGROUND_BLUE 0x0001 // text color contains blue.
#define FOREGROUND_GREEN 0x0002 // text color contains green.
#define FOREGROUND_RED 0x0004 // text color contains red.
#define FOREGROUND_INTENSITY 0x0008 // text color is intensified.
#define BACKGROUND_BLUE 0x0010 // background color contains blue.
#define BACKGROUND_GREEN 0x0020 // background color contains green.
#define BACKGROUND_RED 0x0040 // background color contains red.
#define BACKGROUND_INTENSITY 0x0080 // background color is intensified.
#define COMMON_LVB_LEADING_BYTE 0x0100 // Leading Byte of DBCS
#define COMMON_LVB_TRAILING_BYTE 0x0200 // Trailing Byte of DBCS
#define COMMON_LVB_GRID_HORIZONTAL 0x0400 // DBCS: Grid attribute: top horizontal.
#define COMMON_LVB_GRID_LVERTICAL 0x0800 // DBCS: Grid attribute: left vertical.
#define COMMON_LVB_GRID_RVERTICAL 0x1000 // DBCS: Grid attribute: right vertical.
#define COMMON_LVB_REVERSE_VIDEO 0x4000 // DBCS: Reverse fore/back ground attribute.
#define COMMON_LVB_UNDERSCORE 0x8000 // DBCS: Underscore.
#define COMMON_LVB_SBCSDBCS 0x0300 // SBCS or DBCS flag.
typedef struct _CONSOLE_SCREEN_BUFFER_INFO {
COORD dwSize;
COORD dwCursorPosition;
WORD wAttributes;
SMALL_RECT srWindow;
COORD dwMaximumWindowSize;
} CONSOLE_SCREEN_BUFFER_INFO, *PCONSOLE_SCREEN_BUFFER_INFO;
typedef struct _CONSOLE_CURSOR_INFO {
DWORD dwSize;
BOOL bVisible;
} CONSOLE_CURSOR_INFO, *PCONSOLE_CURSOR_INFO;
typedef struct _CONSOLE_FONT_INFO {
DWORD nFont;
COORD dwFontSize;
} CONSOLE_FONT_INFO, *PCONSOLE_FONT_INFO;
#if(_WIN32_WINNT >= 0x0500)
typedef struct _CONSOLE_SELECTION_INFO {
DWORD dwFlags;
COORD dwSelectionAnchor;
SMALL_RECT srSelection;
} CONSOLE_SELECTION_INFO, *PCONSOLE_SELECTION_INFO;
//
// Selection flags
//
#define CONSOLE_NO_SELECTION 0x0000
#define CONSOLE_SELECTION_IN_PROGRESS 0x0001 // selection has begun
#define CONSOLE_SELECTION_NOT_EMPTY 0x0002 // non-null select rectangle
#define CONSOLE_MOUSE_SELECTION 0x0004 // selecting with mouse
#define CONSOLE_MOUSE_DOWN 0x0008 // mouse is down
#endif /* _WIN32_WINNT >= 0x0500 */
//
// typedef for ctrl-c handler routines
//
typedef
BOOL
(WINAPI *PHANDLER_ROUTINE)(
DWORD CtrlType
);
#define CTRL_C_EVENT 0
#define CTRL_BREAK_EVENT 1
#define CTRL_CLOSE_EVENT 2
// 3 is reserved!
// 4 is reserved!
#define CTRL_LOGOFF_EVENT 5
#define CTRL_SHUTDOWN_EVENT 6
//
// Input Mode flags:
//
#define ENABLE_PROCESSED_INPUT 0x0001
#define ENABLE_LINE_INPUT 0x0002
#define ENABLE_ECHO_INPUT 0x0004
#define ENABLE_WINDOW_INPUT 0x0008
#define ENABLE_MOUSE_INPUT 0x0010
//
// Output Mode flags:
//
#define ENABLE_PROCESSED_OUTPUT 0x0001
#define ENABLE_WRAP_AT_EOL_OUTPUT 0x0002
//
// direct API definitions.
//
WINBASEAPI
BOOL
WINAPI
PeekConsoleInputA(
IN HANDLE hConsoleInput,
OUT PINPUT_RECORD lpBuffer,
IN DWORD nLength,
OUT LPDWORD lpNumberOfEventsRead
);
WINBASEAPI
BOOL
WINAPI
PeekConsoleInputW(
IN HANDLE hConsoleInput,
OUT PINPUT_RECORD lpBuffer,
IN DWORD nLength,
OUT LPDWORD lpNumberOfEventsRead
);
#ifdef UNICODE
#define PeekConsoleInput PeekConsoleInputW
#else
#define PeekConsoleInput PeekConsoleInputA
#endif // !UNICODE
WINBASEAPI
BOOL
WINAPI
ReadConsoleInputA(
IN HANDLE hConsoleInput,
OUT PINPUT_RECORD lpBuffer,
IN DWORD nLength,
OUT LPDWORD lpNumberOfEventsRead
);
WINBASEAPI
BOOL
WINAPI
ReadConsoleInputW(
IN HANDLE hConsoleInput,
OUT PINPUT_RECORD lpBuffer,
IN DWORD nLength,
OUT LPDWORD lpNumberOfEventsRead
);
#ifdef UNICODE
#define ReadConsoleInput ReadConsoleInputW
#else
#define ReadConsoleInput ReadConsoleInputA
#endif // !UNICODE
WINBASEAPI
BOOL
WINAPI
WriteConsoleInputA(
IN HANDLE hConsoleInput,
IN CONST INPUT_RECORD *lpBuffer,
IN DWORD nLength,
OUT LPDWORD lpNumberOfEventsWritten
);
WINBASEAPI
BOOL
WINAPI
WriteConsoleInputW(
IN HANDLE hConsoleInput,
IN CONST INPUT_RECORD *lpBuffer,
IN DWORD nLength,
OUT LPDWORD lpNumberOfEventsWritten
);
#ifdef UNICODE
#define WriteConsoleInput WriteConsoleInputW
#else
#define WriteConsoleInput WriteConsoleInputA
#endif // !UNICODE
WINBASEAPI
BOOL
WINAPI
ReadConsoleOutputA(
IN HANDLE hConsoleOutput,
OUT PCHAR_INFO lpBuffer,
IN COORD dwBufferSize,
IN COORD dwBufferCoord,
IN OUT PSMALL_RECT lpReadRegion
);
WINBASEAPI
BOOL
WINAPI
ReadConsoleOutputW(
IN HANDLE hConsoleOutput,
OUT PCHAR_INFO lpBuffer,
IN COORD dwBufferSize,
IN COORD dwBufferCoord,
IN OUT PSMALL_RECT lpReadRegion
);
#ifdef UNICODE
#define ReadConsoleOutput ReadConsoleOutputW
#else
#define ReadConsoleOutput ReadConsoleOutputA
#endif // !UNICODE
WINBASEAPI
BOOL
WINAPI
WriteConsoleOutputA(
IN HANDLE hConsoleOutput,
IN CONST CHAR_INFO *lpBuffer,
IN COORD dwBufferSize,
IN COORD dwBufferCoord,
IN OUT PSMALL_RECT lpWriteRegion
);
WINBASEAPI
BOOL
WINAPI
WriteConsoleOutputW(
IN HANDLE hConsoleOutput,
IN CONST CHAR_INFO *lpBuffer,
IN COORD dwBufferSize,
IN COORD dwBufferCoord,
IN OUT PSMALL_RECT lpWriteRegion
);
#ifdef UNICODE
#define WriteConsoleOutput WriteConsoleOutputW
#else
#define WriteConsoleOutput WriteConsoleOutputA
#endif // !UNICODE
WINBASEAPI
BOOL
WINAPI
ReadConsoleOutputCharacterA(
IN HANDLE hConsoleOutput,
OUT LPSTR lpCharacter,
IN DWORD nLength,
IN COORD dwReadCoord,
OUT LPDWORD lpNumberOfCharsRead
);
WINBASEAPI
BOOL
WINAPI
ReadConsoleOutputCharacterW(
IN HANDLE hConsoleOutput,
OUT LPWSTR lpCharacter,
IN DWORD nLength,
IN COORD dwReadCoord,
OUT LPDWORD lpNumberOfCharsRead
);
#ifdef UNICODE
#define ReadConsoleOutputCharacter ReadConsoleOutputCharacterW
#else
#define ReadConsoleOutputCharacter ReadConsoleOutputCharacterA
#endif // !UNICODE
WINBASEAPI
BOOL
WINAPI
ReadConsoleOutputAttribute(
IN HANDLE hConsoleOutput,
OUT LPWORD lpAttribute,
IN DWORD nLength,
IN COORD dwReadCoord,
OUT LPDWORD lpNumberOfAttrsRead
);
WINBASEAPI
BOOL
WINAPI
WriteConsoleOutputCharacterA(
IN HANDLE hConsoleOutput,
IN LPCSTR lpCharacter,
IN DWORD nLength,
IN COORD dwWriteCoord,
OUT LPDWORD lpNumberOfCharsWritten
);
WINBASEAPI
BOOL
WINAPI
WriteConsoleOutputCharacterW(
IN HANDLE hConsoleOutput,
IN LPCWSTR lpCharacter,
IN DWORD nLength,
IN COORD dwWriteCoord,
OUT LPDWORD lpNumberOfCharsWritten
);
#ifdef UNICODE
#define WriteConsoleOutputCharacter WriteConsoleOutputCharacterW
#else
#define WriteConsoleOutputCharacter WriteConsoleOutputCharacterA
#endif // !UNICODE
WINBASEAPI
BOOL
WINAPI
WriteConsoleOutputAttribute(
IN HANDLE hConsoleOutput,
IN CONST WORD *lpAttribute,
IN DWORD nLength,
IN COORD dwWriteCoord,
OUT LPDWORD lpNumberOfAttrsWritten
);
WINBASEAPI
BOOL
WINAPI
FillConsoleOutputCharacterA(
IN HANDLE hConsoleOutput,
IN CHAR cCharacter,
IN DWORD nLength,
IN COORD dwWriteCoord,
OUT LPDWORD lpNumberOfCharsWritten
);
WINBASEAPI
BOOL
WINAPI
FillConsoleOutputCharacterW(
IN HANDLE hConsoleOutput,
IN WCHAR cCharacter,
IN DWORD nLength,
IN COORD dwWriteCoord,
OUT LPDWORD lpNumberOfCharsWritten
);
#ifdef UNICODE
#define FillConsoleOutputCharacter FillConsoleOutputCharacterW
#else
#define FillConsoleOutputCharacter FillConsoleOutputCharacterA
#endif // !UNICODE
WINBASEAPI
BOOL
WINAPI
FillConsoleOutputAttribute(
IN HANDLE hConsoleOutput,
IN WORD wAttribute,
IN DWORD nLength,
IN COORD dwWriteCoord,
OUT LPDWORD lpNumberOfAttrsWritten
);
WINBASEAPI
BOOL
WINAPI
GetConsoleMode(
IN HANDLE hConsoleHandle,
OUT LPDWORD lpMode
);
WINBASEAPI
BOOL
WINAPI
GetNumberOfConsoleInputEvents(
IN HANDLE hConsoleInput,
OUT LPDWORD lpNumberOfEvents
);
WINBASEAPI
BOOL
WINAPI
GetConsoleScreenBufferInfo(
IN HANDLE hConsoleOutput,
OUT PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo
);
WINBASEAPI
COORD
WINAPI
GetLargestConsoleWindowSize(
IN HANDLE hConsoleOutput
);
WINBASEAPI
BOOL
WINAPI
GetConsoleCursorInfo(
IN HANDLE hConsoleOutput,
OUT PCONSOLE_CURSOR_INFO lpConsoleCursorInfo
);
#if(_WIN32_WINNT >= 0x0500)
WINBASEAPI
BOOL
WINAPI
GetCurrentConsoleFont(
IN HANDLE hConsoleOutput,
IN BOOL bMaximumWindow,
OUT PCONSOLE_FONT_INFO lpConsoleCurrentFont
);
WINBASEAPI
COORD
WINAPI
GetConsoleFontSize(
IN HANDLE hConsoleOutput,
IN DWORD nFont
);
WINBASEAPI
BOOL
WINAPI
GetConsoleSelectionInfo(
OUT PCONSOLE_SELECTION_INFO lpConsoleSelectionInfo
);
#endif /* _WIN32_WINNT >= 0x0500 */
WINBASEAPI
BOOL
WINAPI
GetNumberOfConsoleMouseButtons(
OUT LPDWORD lpNumberOfMouseButtons
);
WINBASEAPI
BOOL
WINAPI
SetConsoleMode(
IN HANDLE hConsoleHandle,
IN DWORD dwMode
);
WINBASEAPI
BOOL
WINAPI
SetConsoleActiveScreenBuffer(
IN HANDLE hConsoleOutput
);
WINBASEAPI
BOOL
WINAPI
FlushConsoleInputBuffer(
IN HANDLE hConsoleInput
);
WINBASEAPI
BOOL
WINAPI
SetConsoleScreenBufferSize(
IN HANDLE hConsoleOutput,
IN COORD dwSize
);
WINBASEAPI
BOOL
WINAPI
SetConsoleCursorPosition(
IN HANDLE hConsoleOutput,
IN COORD dwCursorPosition
);
WINBASEAPI
BOOL
WINAPI
SetConsoleCursorInfo(
IN HANDLE hConsoleOutput,
IN CONST CONSOLE_CURSOR_INFO *lpConsoleCursorInfo
);
WINBASEAPI
BOOL
WINAPI
ScrollConsoleScreenBufferA(
IN HANDLE hConsoleOutput,
IN CONST SMALL_RECT *lpScrollRectangle,
IN CONST SMALL_RECT *lpClipRectangle,
IN COORD dwDestinationOrigin,
IN CONST CHAR_INFO *lpFill
);
WINBASEAPI
BOOL
WINAPI
ScrollConsoleScreenBufferW(
IN HANDLE hConsoleOutput,
IN CONST SMALL_RECT *lpScrollRectangle,
IN CONST SMALL_RECT *lpClipRectangle,
IN COORD dwDestinationOrigin,
IN CONST CHAR_INFO *lpFill
);
#ifdef UNICODE
#define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferW
#else
#define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferA
#endif // !UNICODE
WINBASEAPI
BOOL
WINAPI
SetConsoleWindowInfo(
IN HANDLE hConsoleOutput,
IN BOOL bAbsolute,
IN CONST SMALL_RECT *lpConsoleWindow
);
WINBASEAPI
BOOL
WINAPI
SetConsoleTextAttribute(
IN HANDLE hConsoleOutput,
IN WORD wAttributes
);
WINBASEAPI
BOOL
WINAPI
SetConsoleCtrlHandler(
IN PHANDLER_ROUTINE HandlerRoutine,
IN BOOL Add
);
WINBASEAPI
BOOL
WINAPI
GenerateConsoleCtrlEvent(
IN DWORD dwCtrlEvent,
IN DWORD dwProcessGroupId
);
WINBASEAPI
BOOL
WINAPI
AllocConsole( VOID );
WINBASEAPI
BOOL
WINAPI
FreeConsole( VOID );
#if(_WIN32_WINNT >= 0x0500)
WINBASEAPI
BOOL
WINAPI
AttachConsole(
IN DWORD dwProcessId
);
#define ATTACH_PARENT_PROCESS ((DWORD)-1)
#endif /* _WIN32_WINNT >= 0x0500 */
WINBASEAPI
DWORD
WINAPI
GetConsoleTitleA(
OUT LPSTR lpConsoleTitle,
IN DWORD nSize
);
WINBASEAPI
DWORD
WINAPI
GetConsoleTitleW(
OUT LPWSTR lpConsoleTitle,
IN DWORD nSize
);
#ifdef UNICODE
#define GetConsoleTitle GetConsoleTitleW
#else
#define GetConsoleTitle GetConsoleTitleA
#endif // !UNICODE
WINBASEAPI
BOOL
WINAPI
SetConsoleTitleA(
IN LPCSTR lpConsoleTitle
);
WINBASEAPI
BOOL
WINAPI
SetConsoleTitleW(
IN LPCWSTR lpConsoleTitle
);
#ifdef UNICODE
#define SetConsoleTitle SetConsoleTitleW
#else
#define SetConsoleTitle SetConsoleTitleA
#endif // !UNICODE
WINBASEAPI
BOOL
WINAPI
ReadConsoleA(
IN HANDLE hConsoleInput,
OUT LPVOID lpBuffer,
IN DWORD nNumberOfCharsToRead,
OUT LPDWORD lpNumberOfCharsRead,
IN LPVOID lpReserved
);
WINBASEAPI
BOOL
WINAPI
ReadConsoleW(
IN HANDLE hConsoleInput,
OUT LPVOID lpBuffer,
IN DWORD nNumberOfCharsToRead,
OUT LPDWORD lpNumberOfCharsRead,
IN LPVOID lpReserved
);
#ifdef UNICODE
#define ReadConsole ReadConsoleW
#else
#define ReadConsole ReadConsoleA
#endif // !UNICODE
WINBASEAPI
BOOL
WINAPI
WriteConsoleA(
IN HANDLE hConsoleOutput,
IN CONST VOID *lpBuffer,
IN DWORD nNumberOfCharsToWrite,
OUT LPDWORD lpNumberOfCharsWritten,
IN LPVOID lpReserved
);
WINBASEAPI
BOOL
WINAPI
WriteConsoleW(
IN HANDLE hConsoleOutput,
IN CONST VOID *lpBuffer,
IN DWORD nNumberOfCharsToWrite,
OUT LPDWORD lpNumberOfCharsWritten,
IN LPVOID lpReserved
);
#ifdef UNICODE
#define WriteConsole WriteConsoleW
#else
#define WriteConsole WriteConsoleA
#endif // !UNICODE
#define CONSOLE_TEXTMODE_BUFFER 1
WINBASEAPI
HANDLE
WINAPI
CreateConsoleScreenBuffer(
IN DWORD dwDesiredAccess,
IN DWORD dwShareMode,
IN CONST SECURITY_ATTRIBUTES *lpSecurityAttributes,
IN DWORD dwFlags,
IN LPVOID lpScreenBufferData
);
WINBASEAPI
UINT
WINAPI
GetConsoleCP( VOID );
WINBASEAPI
BOOL
WINAPI
SetConsoleCP(
IN UINT wCodePageID
);
WINBASEAPI
UINT
WINAPI
GetConsoleOutputCP( VOID );
WINBASEAPI
BOOL
WINAPI
SetConsoleOutputCP(
IN UINT wCodePageID
);
#if(_WIN32_WINNT >= 0x0500)
#define CONSOLE_FULLSCREEN 1 // fullscreen console
#define CONSOLE_FULLSCREEN_HARDWARE 2 // console owns the hardware
WINBASEAPI
BOOL
APIENTRY
GetConsoleDisplayMode(
OUT LPDWORD lpModeFlags
);
WINBASEAPI
HWND
APIENTRY
GetConsoleWindow(
VOID
);
#endif /* _WIN32_WINNT >= 0x0500 */
#if(_WIN32_WINNT >= 0x0501)
WINBASEAPI
DWORD
APIENTRY
GetConsoleProcessList(
OUT LPDWORD lpdwProcessList,
IN DWORD dwProcessCount);
//
// Aliasing apis.
//
WINBASEAPI
BOOL
APIENTRY
AddConsoleAliasA(
IN LPSTR Source,
IN LPSTR Target,
IN LPSTR ExeName);
WINBASEAPI
BOOL
APIENTRY
AddConsoleAliasW(
IN LPWSTR Source,
IN LPWSTR Target,
IN LPWSTR ExeName);
#ifdef UNICODE
#define AddConsoleAlias AddConsoleAliasW
#else
#define AddConsoleAlias AddConsoleAliasA
#endif // !UNICODE
WINBASEAPI
DWORD
APIENTRY
GetConsoleAliasA(
IN LPSTR Source,
OUT LPSTR TargetBuffer,
IN DWORD TargetBufferLength,
IN LPSTR ExeName);
WINBASEAPI
DWORD
APIENTRY
GetConsoleAliasW(
IN LPWSTR Source,
OUT LPWSTR TargetBuffer,
IN DWORD TargetBufferLength,
IN LPWSTR ExeName);
#ifdef UNICODE
#define GetConsoleAlias GetConsoleAliasW
#else
#define GetConsoleAlias GetConsoleAliasA
#endif // !UNICODE
WINBASEAPI
DWORD
APIENTRY
GetConsoleAliasesLengthA(
IN LPSTR ExeName);
WINBASEAPI
DWORD
APIENTRY
GetConsoleAliasesLengthW(
IN LPWSTR ExeName);
#ifdef UNICODE
#define GetConsoleAliasesLength GetConsoleAliasesLengthW
#else
#define GetConsoleAliasesLength GetConsoleAliasesLengthA
#endif // !UNICODE
WINBASEAPI
DWORD
APIENTRY
GetConsoleAliasExesLengthA(
VOID);
WINBASEAPI
DWORD
APIENTRY
GetConsoleAliasExesLengthW(
VOID);
#ifdef UNICODE
#define GetConsoleAliasExesLength GetConsoleAliasExesLengthW
#else
#define GetConsoleAliasExesLength GetConsoleAliasExesLengthA
#endif // !UNICODE
WINBASEAPI
DWORD
APIENTRY
GetConsoleAliasesA(
OUT LPSTR AliasBuffer,
IN DWORD AliasBufferLength,
IN LPSTR ExeName);
WINBASEAPI
DWORD
APIENTRY
GetConsoleAliasesW(
OUT LPWSTR AliasBuffer,
IN DWORD AliasBufferLength,
IN LPWSTR ExeName);
#ifdef UNICODE
#define GetConsoleAliases GetConsoleAliasesW
#else
#define GetConsoleAliases GetConsoleAliasesA
#endif // !UNICODE
WINBASEAPI
DWORD
APIENTRY
GetConsoleAliasExesA(
OUT LPSTR ExeNameBuffer,
IN DWORD ExeNameBufferLength);
WINBASEAPI
DWORD
APIENTRY
GetConsoleAliasExesW(
OUT LPWSTR ExeNameBuffer,
IN DWORD ExeNameBufferLength);
#ifdef UNICODE
#define GetConsoleAliasExes GetConsoleAliasExesW
#else
#define GetConsoleAliasExes GetConsoleAliasExesA
#endif // !UNICODE
#endif /* _WIN32_WINNT >= 0x0501 */
#ifdef __cplusplus
}
#endif
#endif // _WINCON_

16130
lib/MSPlatformSDK/Include/WinCrypt.h Executable file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,406 @@
/****************************************************************************
* *
* windef.h -- Basic Windows Type Definitions *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
****************************************************************************/
#ifndef _WINDEF_
#define _WINDEF_
#ifndef NO_STRICT
#ifndef STRICT
#define STRICT 1
#endif
#endif /* NO_STRICT */
// Win32 defines _WIN32 automatically,
// but Macintosh doesn't, so if we are using
// Win32 Functions, we must do it here
#ifdef _MAC
#ifndef _WIN32
#define _WIN32
#endif
#endif //_MAC
#ifndef WIN32
#define WIN32
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifndef WINVER
#define WINVER 0x0500
#endif /* WINVER */
/*
* BASETYPES is defined in ntdef.h if these types are already defined
*/
#ifndef BASETYPES
#define BASETYPES
typedef unsigned long ULONG;
typedef ULONG *PULONG;
typedef unsigned short USHORT;
typedef USHORT *PUSHORT;
typedef unsigned char UCHAR;
typedef UCHAR *PUCHAR;
typedef char *PSZ;
#endif /* !BASETYPES */
#define MAX_PATH 260
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
#ifndef IN
#define IN
#endif
#ifndef OUT
#define OUT
#endif
#ifndef OPTIONAL
#define OPTIONAL
#endif
#undef far
#undef near
#undef pascal
#define far
#define near
#if (!defined(_MAC)) && ((_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED))
#define pascal __stdcall
#else
#define pascal
#endif
#if defined(DOSWIN32) || defined(_MAC)
#define cdecl _cdecl
#ifndef CDECL
#define CDECL _cdecl
#endif
#else
#define cdecl
#ifndef CDECL
#define CDECL
#endif
#endif
#ifdef _MAC
#define CALLBACK PASCAL
#define WINAPI CDECL
#define WINAPIV CDECL
#define APIENTRY WINAPI
#define APIPRIVATE CDECL
#ifdef _68K_
#define PASCAL __pascal
#else
#define PASCAL
#endif
#elif (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
#define CALLBACK __stdcall
#define WINAPI __stdcall
#define WINAPIV __cdecl
#define APIENTRY WINAPI
#define APIPRIVATE __stdcall
#define PASCAL __stdcall
#else
#define CALLBACK
#define WINAPI
#define WINAPIV
#define APIENTRY WINAPI
#define APIPRIVATE
#define PASCAL pascal
#endif
#ifdef _M_CEE_PURE
#define WINAPI_INLINE __clrcall
#else
#define WINAPI_INLINE WINAPI
#endif
#undef FAR
#undef NEAR
#define FAR far
#define NEAR near
#ifndef CONST
#define CONST const
#endif
typedef unsigned long DWORD;
typedef int BOOL;
typedef unsigned char BYTE;
typedef unsigned short WORD;
typedef float FLOAT;
typedef FLOAT *PFLOAT;
typedef BOOL near *PBOOL;
typedef BOOL far *LPBOOL;
typedef BYTE near *PBYTE;
typedef BYTE far *LPBYTE;
typedef int near *PINT;
typedef int far *LPINT;
typedef WORD near *PWORD;
typedef WORD far *LPWORD;
typedef long far *LPLONG;
typedef DWORD near *PDWORD;
typedef DWORD far *LPDWORD;
typedef void far *LPVOID;
typedef CONST void far *LPCVOID;
typedef int INT;
typedef unsigned int UINT;
typedef unsigned int *PUINT;
#ifndef NT_INCLUDED
#include <winnt.h>
#endif /* NT_INCLUDED */
#include <specstrings.h>
/* Types use for passing & returning polymorphic values */
typedef UINT_PTR WPARAM;
typedef LONG_PTR LPARAM;
typedef LONG_PTR LRESULT;
#ifndef NOMINMAX
#ifndef max
#define max(a,b) (((a) > (b)) ? (a) : (b))
#endif
#ifndef min
#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
#endif /* NOMINMAX */
#define MAKEWORD(a, b) ((WORD)(((BYTE)((DWORD_PTR)(a) & 0xff)) | ((WORD)((BYTE)((DWORD_PTR)(b) & 0xff))) << 8))
#define MAKELONG(a, b) ((LONG)(((WORD)((DWORD_PTR)(a) & 0xffff)) | ((DWORD)((WORD)((DWORD_PTR)(b) & 0xffff))) << 16))
#define LOWORD(l) ((WORD)((DWORD_PTR)(l) & 0xffff))
#define HIWORD(l) ((WORD)((DWORD_PTR)(l) >> 16))
#define LOBYTE(w) ((BYTE)((DWORD_PTR)(w) & 0xff))
#define HIBYTE(w) ((BYTE)((DWORD_PTR)(w) >> 8))
#ifndef WIN_INTERNAL
DECLARE_HANDLE (HWND);
DECLARE_HANDLE (HHOOK);
#ifdef WINABLE
DECLARE_HANDLE (HEVENT);
#endif
#endif
typedef WORD ATOM;
typedef HANDLE NEAR *SPHANDLE;
typedef HANDLE FAR *LPHANDLE;
typedef HANDLE HGLOBAL;
typedef HANDLE HLOCAL;
typedef HANDLE GLOBALHANDLE;
typedef HANDLE LOCALHANDLE;
#ifndef _MAC
#ifdef _WIN64
typedef INT_PTR (FAR WINAPI *FARPROC)();
typedef INT_PTR (NEAR WINAPI *NEARPROC)();
typedef INT_PTR (WINAPI *PROC)();
#else
typedef int (FAR WINAPI *FARPROC)();
typedef int (NEAR WINAPI *NEARPROC)();
typedef int (WINAPI *PROC)();
#endif // _WIN64
#else
typedef int (CALLBACK *FARPROC)();
typedef int (CALLBACK *NEARPROC)();
typedef int (CALLBACK *PROC)();
#endif
#if !defined(_MAC) || !defined(GDI_INTERNAL)
#ifdef STRICT
typedef void NEAR* HGDIOBJ;
#else
DECLARE_HANDLE(HGDIOBJ);
#endif
#endif
DECLARE_HANDLE(HKEY);
typedef HKEY *PHKEY;
#if !defined(_MAC) || !defined(WIN_INTERNAL)
DECLARE_HANDLE(HACCEL);
#endif
#if !defined(_MAC) || !defined(GDI_INTERNAL)
DECLARE_HANDLE(HBITMAP);
DECLARE_HANDLE(HBRUSH);
#endif
#if(WINVER >= 0x0400)
DECLARE_HANDLE(HCOLORSPACE);
#endif /* WINVER >= 0x0400 */
#if !defined(_MAC) || !defined(GDI_INTERNAL)
DECLARE_HANDLE(HDC);
#endif
DECLARE_HANDLE(HGLRC); // OpenGL
DECLARE_HANDLE(HDESK);
DECLARE_HANDLE(HENHMETAFILE);
#if !defined(_MAC) || !defined(GDI_INTERNAL)
DECLARE_HANDLE(HFONT);
#endif
DECLARE_HANDLE(HICON);
#if !defined(_MAC) || !defined(WIN_INTERNAL)
DECLARE_HANDLE(HMENU);
#endif
DECLARE_HANDLE(HMETAFILE);
DECLARE_HANDLE(HINSTANCE);
typedef HINSTANCE HMODULE; /* HMODULEs can be used in place of HINSTANCEs */
#if !defined(_MAC) || !defined(GDI_INTERNAL)
DECLARE_HANDLE(HPALETTE);
DECLARE_HANDLE(HPEN);
#endif
DECLARE_HANDLE(HRGN);
DECLARE_HANDLE(HRSRC);
DECLARE_HANDLE(HSTR);
DECLARE_HANDLE(HTASK);
DECLARE_HANDLE(HWINSTA);
DECLARE_HANDLE(HKL);
#if(WINVER >= 0x0500)
#ifndef _MAC
DECLARE_HANDLE(HMONITOR);
DECLARE_HANDLE(HWINEVENTHOOK);
#endif
DECLARE_HANDLE(HUMPD);
#endif /* WINVER >= 0x0500 */
#ifndef _MAC
typedef int HFILE;
typedef HICON HCURSOR; /* HICONs & HCURSORs are polymorphic */
#else
typedef short HFILE;
DECLARE_HANDLE(HCURSOR); /* HICONs & HCURSORs are not polymorphic */
#endif
typedef DWORD COLORREF;
typedef DWORD *LPCOLORREF;
#define HFILE_ERROR ((HFILE)-1)
typedef struct tagRECT
{
LONG left;
LONG top;
LONG right;
LONG bottom;
} RECT, *PRECT, NEAR *NPRECT, FAR *LPRECT;
typedef const RECT FAR* LPCRECT;
typedef struct _RECTL /* rcl */
{
LONG left;
LONG top;
LONG right;
LONG bottom;
} RECTL, *PRECTL, *LPRECTL;
typedef const RECTL FAR* LPCRECTL;
typedef struct tagPOINT
{
LONG x;
LONG y;
} POINT, *PPOINT, NEAR *NPPOINT, FAR *LPPOINT;
typedef struct _POINTL /* ptl */
{
LONG x;
LONG y;
} POINTL, *PPOINTL;
typedef struct tagSIZE
{
LONG cx;
LONG cy;
} SIZE, *PSIZE, *LPSIZE;
typedef SIZE SIZEL;
typedef SIZE *PSIZEL, *LPSIZEL;
typedef struct tagPOINTS
{
#ifndef _MAC
SHORT x;
SHORT y;
#else
SHORT y;
SHORT x;
#endif
} POINTS, *PPOINTS, *LPPOINTS;
//
// File System time stamps are represented with the following structure:
//
typedef struct _FILETIME {
DWORD dwLowDateTime;
DWORD dwHighDateTime;
} FILETIME, *PFILETIME, *LPFILETIME;
#define _FILETIME_
/* mode selections for the device mode function */
#define DM_UPDATE 1
#define DM_COPY 2
#define DM_PROMPT 4
#define DM_MODIFY 8
#define DM_IN_BUFFER DM_MODIFY
#define DM_IN_PROMPT DM_PROMPT
#define DM_OUT_BUFFER DM_COPY
#define DM_OUT_DEFAULT DM_UPDATE
/* device capabilities indices */
#define DC_FIELDS 1
#define DC_PAPERS 2
#define DC_PAPERSIZE 3
#define DC_MINEXTENT 4
#define DC_MAXEXTENT 5
#define DC_BINS 6
#define DC_DUPLEX 7
#define DC_SIZE 8
#define DC_EXTRA 9
#define DC_VERSION 10
#define DC_DRIVER 11
#define DC_BINNAMES 12
#define DC_ENUMRESOLUTIONS 13
#define DC_FILEDEPENDENCIES 14
#define DC_TRUETYPE 15
#define DC_PAPERNAMES 16
#define DC_ORIENTATION 17
#define DC_COPIES 18
#ifdef __cplusplus
}
#endif
#endif /* _WINDEF_ */

View File

@ -0,0 +1,249 @@
//+---------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1992-1999.
//
// File: winefs.h
//
// Contents: EFS Data and prototypes.
//
//----------------------------------------------------------------------------
#ifndef __WINEFS_H__
#define __WINEFS_H__
#if _MSC_VER > 1000
#pragma once
#endif
#ifdef __cplusplus
extern "C" {
#endif
//+---------------------------------------------------------------------------------/
// /
// /
// Data Structures /
// /
// /
//----------------------------------------------------------------------------------/
#ifndef ALGIDDEF
#define ALGIDDEF
typedef unsigned int ALG_ID;
#endif
//
// Encoded Certificate
//
typedef struct _CERTIFICATE_BLOB {
DWORD dwCertEncodingType;
#ifdef MIDL_PASS
[range(0,32768)]
#endif // MIDL_PASS
DWORD cbData;
#ifdef MIDL_PASS
[size_is(cbData)]
#endif // MIDL_PASS
PBYTE pbData;
} EFS_CERTIFICATE_BLOB, *PEFS_CERTIFICATE_BLOB;
//
// Certificate Hash
//
typedef struct _EFS_HASH_BLOB {
#ifdef MIDL_PASS
[range(0,100)]
#endif // MIDL_PASS
DWORD cbData;
#ifdef MIDL_PASS
[size_is(cbData)]
#endif // MIDL_PASS
PBYTE pbData;
} EFS_HASH_BLOB, *PEFS_HASH_BLOB;
//
// RPC blob
//
typedef struct _EFS_RPC_BLOB {
#ifdef MIDL_PASS
[range(0,266240)]
#endif // MIDL_PASS
DWORD cbData;
#ifdef MIDL_PASS
[size_is(cbData)]
#endif // MIDL_PASS
PBYTE pbData;
} EFS_RPC_BLOB, *PEFS_RPC_BLOB;
typedef struct _EFS_KEY_INFO {
DWORD dwVersion;
ULONG Entropy;
ALG_ID Algorithm;
ULONG KeyLength;
} EFS_KEY_INFO, *PEFS_KEY_INFO;
//
// Input to add a user to an encrypted file
//
typedef struct _ENCRYPTION_CERTIFICATE {
DWORD cbTotalLength;
SID * pUserSid;
PEFS_CERTIFICATE_BLOB pCertBlob;
} ENCRYPTION_CERTIFICATE, *PENCRYPTION_CERTIFICATE;
#define MAX_SID_SIZE 256
typedef struct _ENCRYPTION_CERTIFICATE_HASH {
DWORD cbTotalLength;
SID * pUserSid;
PEFS_HASH_BLOB pHash;
#ifdef MIDL_PASS
[string]
#endif // MIDL_PASS
LPWSTR lpDisplayInformation;
} ENCRYPTION_CERTIFICATE_HASH, *PENCRYPTION_CERTIFICATE_HASH;
typedef struct _ENCRYPTION_CERTIFICATE_HASH_LIST {
#ifdef MIDL_PASS
[range(0,500)]
#endif // MIDL_PASS
DWORD nCert_Hash;
#ifdef MIDL_PASS
[size_is(nCert_Hash)]
#endif // MIDL_PASS
PENCRYPTION_CERTIFICATE_HASH * pUsers;
} ENCRYPTION_CERTIFICATE_HASH_LIST, *PENCRYPTION_CERTIFICATE_HASH_LIST;
typedef struct _ENCRYPTION_CERTIFICATE_LIST {
#ifdef MIDL_PASS
[range(0,500)]
#endif // MIDL_PASS
DWORD nUsers;
#ifdef MIDL_PASS
[size_is(nUsers)]
#endif // MIDL_PASS
PENCRYPTION_CERTIFICATE * pUsers;
} ENCRYPTION_CERTIFICATE_LIST, *PENCRYPTION_CERTIFICATE_LIST;
//+---------------------------------------------------------------------------------/
// /
// /
// Prototypes /
// /
// /
//----------------------------------------------------------------------------------/
WINADVAPI
DWORD
WINAPI
QueryUsersOnEncryptedFile(
__in LPCWSTR lpFileName,
__out PENCRYPTION_CERTIFICATE_HASH_LIST * pUsers
);
WINADVAPI
DWORD
WINAPI
QueryRecoveryAgentsOnEncryptedFile(
__in LPCWSTR lpFileName,
__out PENCRYPTION_CERTIFICATE_HASH_LIST * pRecoveryAgents
);
WINADVAPI
DWORD
WINAPI
RemoveUsersFromEncryptedFile(
__in LPCWSTR lpFileName,
__in PENCRYPTION_CERTIFICATE_HASH_LIST pHashes
);
WINADVAPI
DWORD
WINAPI
AddUsersToEncryptedFile(
__in LPCWSTR lpFileName,
__in PENCRYPTION_CERTIFICATE_LIST pUsers
);
WINADVAPI
DWORD
WINAPI
SetUserFileEncryptionKey(
__in_opt PENCRYPTION_CERTIFICATE pEncryptionCertificate
);
WINADVAPI
VOID
WINAPI
FreeEncryptionCertificateHashList(
__in_opt PENCRYPTION_CERTIFICATE_HASH_LIST pHashes
);
WINADVAPI
BOOL
WINAPI
EncryptionDisable(
__in LPCWSTR DirPath,
__in BOOL Disable
);
WINADVAPI
DWORD
WINAPI
DuplicateEncryptionInfoFile(
__in LPCWSTR SrcFileName,
__in LPCWSTR DstFileName,
__in DWORD dwCreationDistribution,
__in DWORD dwAttributes,
__in CONST LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
#ifdef __cplusplus
} // Balance extern "C" above
#endif
#endif // __WINEFS_H__

27380
lib/MSPlatformSDK/Include/WinError.h Executable file

File diff suppressed because it is too large Load Diff

5221
lib/MSPlatformSDK/Include/WinGDI.h Executable file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

9633
lib/MSPlatformSDK/Include/WinNT.h Executable file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,250 @@
/*++ BUILD Version: 0001 Increment this if a change has global effects
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
winnt.rh
Abstract:
This module defines the 32-Bit Windows resource codes from winnt.h
Revision History:
--*/
#ifdef UNICODE
#define __TEXT(quote) L##quote
#else /* UNICODE */
#define __TEXT(quote) quote
#endif /* UNICODE */
#define TEXT(quote) __TEXT(quote)
//
// Language IDs.
//
// The following two combinations of primary language ID and
// sublanguage ID have special semantics:
//
// Primary Language ID Sublanguage ID Result
// ------------------- --------------- ------------------------
// LANG_NEUTRAL SUBLANG_NEUTRAL Language neutral
// LANG_NEUTRAL SUBLANG_DEFAULT User default language
// LANG_NEUTRAL SUBLANG_SYS_DEFAULT System default language
// LANG_INVARIANT SUBLANG_NEUTRAL Invariant locale
//
//
// Primary language IDs.
//
#define LANG_NEUTRAL 0x00
#define LANG_INVARIANT 0x7f
#define LANG_AFRIKAANS 0x36
#define LANG_ALBANIAN 0x1c
#define LANG_ARABIC 0x01
#define LANG_ARMENIAN 0x2b
#define LANG_ASSAMESE 0x4d
#define LANG_AZERI 0x2c
#define LANG_BASQUE 0x2d
#define LANG_BELARUSIAN 0x23
#define LANG_BENGALI 0x45
#define LANG_BULGARIAN 0x02
#define LANG_CATALAN 0x03
#define LANG_CHINESE 0x04
#define LANG_CROATIAN 0x1a
#define LANG_CZECH 0x05
#define LANG_DANISH 0x06
#define LANG_DIVEHI 0x65
#define LANG_DUTCH 0x13
#define LANG_ENGLISH 0x09
#define LANG_ESTONIAN 0x25
#define LANG_FAEROESE 0x38
#define LANG_FARSI 0x29
#define LANG_FINNISH 0x0b
#define LANG_FRENCH 0x0c
#define LANG_GALICIAN 0x56
#define LANG_GEORGIAN 0x37
#define LANG_GERMAN 0x07
#define LANG_GREEK 0x08
#define LANG_GUJARATI 0x47
#define LANG_HEBREW 0x0d
#define LANG_HINDI 0x39
#define LANG_HUNGARIAN 0x0e
#define LANG_ICELANDIC 0x0f
#define LANG_INDONESIAN 0x21
#define LANG_ITALIAN 0x10
#define LANG_JAPANESE 0x11
#define LANG_KANNADA 0x4b
#define LANG_KASHMIRI 0x60
#define LANG_KAZAK 0x3f
#define LANG_KONKANI 0x57
#define LANG_KOREAN 0x12
#define LANG_KYRGYZ 0x40
#define LANG_LATVIAN 0x26
#define LANG_LITHUANIAN 0x27
#define LANG_MACEDONIAN 0x2f // the Former Yugoslav Republic of Macedonia
#define LANG_MALAY 0x3e
#define LANG_MALAYALAM 0x4c
#define LANG_MANIPURI 0x58
#define LANG_MARATHI 0x4e
#define LANG_MONGOLIAN 0x50
#define LANG_NEPALI 0x61
#define LANG_NORWEGIAN 0x14
#define LANG_ORIYA 0x48
#define LANG_POLISH 0x15
#define LANG_PORTUGUESE 0x16
#define LANG_PUNJABI 0x46
#define LANG_ROMANIAN 0x18
#define LANG_RUSSIAN 0x19
#define LANG_SANSKRIT 0x4f
#define LANG_SERBIAN 0x1a
#define LANG_SINDHI 0x59
#define LANG_SLOVAK 0x1b
#define LANG_SLOVENIAN 0x24
#define LANG_SPANISH 0x0a
#define LANG_SWAHILI 0x41
#define LANG_SWEDISH 0x1d
#define LANG_SYRIAC 0x5a
#define LANG_TAMIL 0x49
#define LANG_TATAR 0x44
#define LANG_TELUGU 0x4a
#define LANG_THAI 0x1e
#define LANG_TURKISH 0x1f
#define LANG_UKRAINIAN 0x22
#define LANG_URDU 0x20
#define LANG_UZBEK 0x43
#define LANG_VIETNAMESE 0x2a
//
// Sublanguage IDs.
//
// The name immediately following SUBLANG_ dictates which primary
// language ID that sublanguage ID can be combined with to form a
// valid language ID.
//
#define SUBLANG_NEUTRAL 0x00 // language neutral
#define SUBLANG_DEFAULT 0x01 // user default
#define SUBLANG_SYS_DEFAULT 0x02 // system default
#define SUBLANG_ARABIC_SAUDI_ARABIA 0x01 // Arabic (Saudi Arabia)
#define SUBLANG_ARABIC_IRAQ 0x02 // Arabic (Iraq)
#define SUBLANG_ARABIC_EGYPT 0x03 // Arabic (Egypt)
#define SUBLANG_ARABIC_LIBYA 0x04 // Arabic (Libya)
#define SUBLANG_ARABIC_ALGERIA 0x05 // Arabic (Algeria)
#define SUBLANG_ARABIC_MOROCCO 0x06 // Arabic (Morocco)
#define SUBLANG_ARABIC_TUNISIA 0x07 // Arabic (Tunisia)
#define SUBLANG_ARABIC_OMAN 0x08 // Arabic (Oman)
#define SUBLANG_ARABIC_YEMEN 0x09 // Arabic (Yemen)
#define SUBLANG_ARABIC_SYRIA 0x0a // Arabic (Syria)
#define SUBLANG_ARABIC_JORDAN 0x0b // Arabic (Jordan)
#define SUBLANG_ARABIC_LEBANON 0x0c // Arabic (Lebanon)
#define SUBLANG_ARABIC_KUWAIT 0x0d // Arabic (Kuwait)
#define SUBLANG_ARABIC_UAE 0x0e // Arabic (U.A.E)
#define SUBLANG_ARABIC_BAHRAIN 0x0f // Arabic (Bahrain)
#define SUBLANG_ARABIC_QATAR 0x10 // Arabic (Qatar)
#define SUBLANG_AZERI_LATIN 0x01 // Azeri (Latin)
#define SUBLANG_AZERI_CYRILLIC 0x02 // Azeri (Cyrillic)
#define SUBLANG_CHINESE_TRADITIONAL 0x01 // Chinese (Taiwan)
#define SUBLANG_CHINESE_SIMPLIFIED 0x02 // Chinese (PR China)
#define SUBLANG_CHINESE_HONGKONG 0x03 // Chinese (Hong Kong S.A.R., P.R.C.)
#define SUBLANG_CHINESE_SINGAPORE 0x04 // Chinese (Singapore)
#define SUBLANG_CHINESE_MACAU 0x05 // Chinese (Macau S.A.R.)
#define SUBLANG_DUTCH 0x01 // Dutch
#define SUBLANG_DUTCH_BELGIAN 0x02 // Dutch (Belgian)
#define SUBLANG_ENGLISH_US 0x01 // English (USA)
#define SUBLANG_ENGLISH_UK 0x02 // English (UK)
#define SUBLANG_ENGLISH_AUS 0x03 // English (Australian)
#define SUBLANG_ENGLISH_CAN 0x04 // English (Canadian)
#define SUBLANG_ENGLISH_NZ 0x05 // English (New Zealand)
#define SUBLANG_ENGLISH_EIRE 0x06 // English (Irish)
#define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07 // English (South Africa)
#define SUBLANG_ENGLISH_JAMAICA 0x08 // English (Jamaica)
#define SUBLANG_ENGLISH_CARIBBEAN 0x09 // English (Caribbean)
#define SUBLANG_ENGLISH_BELIZE 0x0a // English (Belize)
#define SUBLANG_ENGLISH_TRINIDAD 0x0b // English (Trinidad)
#define SUBLANG_ENGLISH_ZIMBABWE 0x0c // English (Zimbabwe)
#define SUBLANG_ENGLISH_PHILIPPINES 0x0d // English (Philippines)
#define SUBLANG_FRENCH 0x01 // French
#define SUBLANG_FRENCH_BELGIAN 0x02 // French (Belgian)
#define SUBLANG_FRENCH_CANADIAN 0x03 // French (Canadian)
#define SUBLANG_FRENCH_SWISS 0x04 // French (Swiss)
#define SUBLANG_FRENCH_LUXEMBOURG 0x05 // French (Luxembourg)
#define SUBLANG_FRENCH_MONACO 0x06 // French (Monaco)
#define SUBLANG_GERMAN 0x01 // German
#define SUBLANG_GERMAN_SWISS 0x02 // German (Swiss)
#define SUBLANG_GERMAN_AUSTRIAN 0x03 // German (Austrian)
#define SUBLANG_GERMAN_LUXEMBOURG 0x04 // German (Luxembourg)
#define SUBLANG_GERMAN_LIECHTENSTEIN 0x05 // German (Liechtenstein)
#define SUBLANG_ITALIAN 0x01 // Italian
#define SUBLANG_ITALIAN_SWISS 0x02 // Italian (Swiss)
#if _WIN32_WINNT >= 0x0501
#define SUBLANG_KASHMIRI_SASIA 0x02 // Kashmiri (South Asia)
#endif
#define SUBLANG_KASHMIRI_INDIA 0x02 // For app compatibility only
#define SUBLANG_KOREAN 0x01 // Korean (Extended Wansung)
#define SUBLANG_LITHUANIAN 0x01 // Lithuanian
#define SUBLANG_MALAY_MALAYSIA 0x01 // Malay (Malaysia)
#define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02 // Malay (Brunei Darussalam)
#define SUBLANG_NEPALI_INDIA 0x02 // Nepali (India)
#define SUBLANG_NORWEGIAN_BOKMAL 0x01 // Norwegian (Bokmal)
#define SUBLANG_NORWEGIAN_NYNORSK 0x02 // Norwegian (Nynorsk)
#define SUBLANG_PORTUGUESE 0x02 // Portuguese
#define SUBLANG_PORTUGUESE_BRAZILIAN 0x01 // Portuguese (Brazilian)
#define SUBLANG_SERBIAN_LATIN 0x02 // Serbian (Latin)
#define SUBLANG_SERBIAN_CYRILLIC 0x03 // Serbian (Cyrillic)
#define SUBLANG_SPANISH 0x01 // Spanish (Castilian)
#define SUBLANG_SPANISH_MEXICAN 0x02 // Spanish (Mexican)
#define SUBLANG_SPANISH_MODERN 0x03 // Spanish (Spain)
#define SUBLANG_SPANISH_GUATEMALA 0x04 // Spanish (Guatemala)
#define SUBLANG_SPANISH_COSTA_RICA 0x05 // Spanish (Costa Rica)
#define SUBLANG_SPANISH_PANAMA 0x06 // Spanish (Panama)
#define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07 // Spanish (Dominican Republic)
#define SUBLANG_SPANISH_VENEZUELA 0x08 // Spanish (Venezuela)
#define SUBLANG_SPANISH_COLOMBIA 0x09 // Spanish (Colombia)
#define SUBLANG_SPANISH_PERU 0x0a // Spanish (Peru)
#define SUBLANG_SPANISH_ARGENTINA 0x0b // Spanish (Argentina)
#define SUBLANG_SPANISH_ECUADOR 0x0c // Spanish (Ecuador)
#define SUBLANG_SPANISH_CHILE 0x0d // Spanish (Chile)
#define SUBLANG_SPANISH_URUGUAY 0x0e // Spanish (Uruguay)
#define SUBLANG_SPANISH_PARAGUAY 0x0f // Spanish (Paraguay)
#define SUBLANG_SPANISH_BOLIVIA 0x10 // Spanish (Bolivia)
#define SUBLANG_SPANISH_EL_SALVADOR 0x11 // Spanish (El Salvador)
#define SUBLANG_SPANISH_HONDURAS 0x12 // Spanish (Honduras)
#define SUBLANG_SPANISH_NICARAGUA 0x13 // Spanish (Nicaragua)
#define SUBLANG_SPANISH_PUERTO_RICO 0x14 // Spanish (Puerto Rico)
#define SUBLANG_SWEDISH 0x01 // Swedish
#define SUBLANG_SWEDISH_FINLAND 0x02 // Swedish (Finland)
#define SUBLANG_URDU_PAKISTAN 0x01 // Urdu (Pakistan)
#define SUBLANG_URDU_INDIA 0x02 // Urdu (India)
#define SUBLANG_UZBEK_LATIN 0x01 // Uzbek (Latin)
#define SUBLANG_UZBEK_CYRILLIC 0x02 // Uzbek (Cyrillic)
//
// Sorting IDs.
//
#define SORT_DEFAULT 0x0 // sorting default
#define SORT_JAPANESE_XJIS 0x0 // Japanese XJIS order
#define SORT_JAPANESE_UNICODE 0x1 // Japanese Unicode order
#define SORT_CHINESE_BIG5 0x0 // Chinese BIG5 order
#define SORT_CHINESE_PRCP 0x0 // PRC Chinese Phonetic order
#define SORT_CHINESE_UNICODE 0x1 // Chinese Unicode order
#define SORT_CHINESE_PRC 0x2 // PRC Chinese Stroke Count order
#define SORT_CHINESE_BOPOMOFO 0x3 // Traditional Chinese Bopomofo order
#define SORT_KOREAN_KSC 0x0 // Korean KSC order
#define SORT_KOREAN_UNICODE 0x1 // Korean Unicode order
#define SORT_GERMAN_PHONE_BOOK 0x1 // German Phone Book order
#define SORT_HUNGARIAN_DEFAULT 0x0 // Hungarian Default order
#define SORT_HUNGARIAN_TECHNICAL 0x1 // Hungarian Technical order
#define SORT_GEORGIAN_TRADITIONAL 0x0 // Georgian Traditional order
#define SORT_GEORGIAN_MODERN 0x1 // Georgian Modern order

View File

@ -0,0 +1,894 @@
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
winnetwk.h
Abstract:
Standard WINNET Header File for WIN32
Environment:
User Mode -Win32
Notes:
optional-notes
--*/
#ifndef _WINNETWK_
#define _WINNETWK_
#ifdef __cplusplus
extern "C" {
#endif
//
// Network types
//
#define WNNC_NET_MSNET 0x00010000
#define WNNC_NET_LANMAN 0x00020000
#define WNNC_NET_NETWARE 0x00030000
#define WNNC_NET_VINES 0x00040000
#define WNNC_NET_10NET 0x00050000
#define WNNC_NET_LOCUS 0x00060000
#define WNNC_NET_SUN_PC_NFS 0x00070000
#define WNNC_NET_LANSTEP 0x00080000
#define WNNC_NET_9TILES 0x00090000
#define WNNC_NET_LANTASTIC 0x000A0000
#define WNNC_NET_AS400 0x000B0000
#define WNNC_NET_FTP_NFS 0x000C0000
#define WNNC_NET_PATHWORKS 0x000D0000
#define WNNC_NET_LIFENET 0x000E0000
#define WNNC_NET_POWERLAN 0x000F0000
#define WNNC_NET_BWNFS 0x00100000
#define WNNC_NET_COGENT 0x00110000
#define WNNC_NET_FARALLON 0x00120000
#define WNNC_NET_APPLETALK 0x00130000
#define WNNC_NET_INTERGRAPH 0x00140000
#define WNNC_NET_SYMFONET 0x00150000
#define WNNC_NET_CLEARCASE 0x00160000
#define WNNC_NET_FRONTIER 0x00170000
#define WNNC_NET_BMC 0x00180000
#define WNNC_NET_DCE 0x00190000
#define WNNC_NET_AVID 0x001A0000
#define WNNC_NET_DOCUSPACE 0x001B0000
#define WNNC_NET_MANGOSOFT 0x001C0000
#define WNNC_NET_SERNET 0x001D0000
#define WNNC_NET_RIVERFRONT1 0X001E0000
#define WNNC_NET_RIVERFRONT2 0x001F0000
#define WNNC_NET_DECORB 0x00200000
#define WNNC_NET_PROTSTOR 0x00210000
#define WNNC_NET_FJ_REDIR 0x00220000
#define WNNC_NET_DISTINCT 0x00230000
#define WNNC_NET_TWINS 0x00240000
#define WNNC_NET_RDR2SAMPLE 0x00250000
#define WNNC_NET_CSC 0x00260000
#define WNNC_NET_3IN1 0x00270000
#define WNNC_NET_EXTENDNET 0x00290000
#define WNNC_NET_STAC 0x002A0000
#define WNNC_NET_FOXBAT 0x002B0000
#define WNNC_NET_YAHOO 0x002C0000
#define WNNC_NET_EXIFS 0x002D0000
#define WNNC_NET_DAV 0x002E0000
#define WNNC_NET_KNOWARE 0x002F0000
#define WNNC_NET_OBJECT_DIRE 0x00300000
#define WNNC_NET_MASFAX 0x00310000
#define WNNC_NET_HOB_NFS 0x00320000
#define WNNC_NET_SHIVA 0x00330000
#define WNNC_NET_IBMAL 0x00340000
#define WNNC_NET_LOCK 0x00350000
#define WNNC_NET_TERMSRV 0x00360000
#define WNNC_NET_SRT 0x00370000
#define WNNC_NET_QUINCY 0x00380000
#define WNNC_CRED_MANAGER 0xFFFF0000
//
// Network Resources.
//
#define RESOURCE_CONNECTED 0x00000001
#define RESOURCE_GLOBALNET 0x00000002
#define RESOURCE_REMEMBERED 0x00000003
#if(WINVER >= 0x0400)
#define RESOURCE_RECENT 0x00000004
#define RESOURCE_CONTEXT 0x00000005
#endif /* WINVER >= 0x0400 */
#define RESOURCETYPE_ANY 0x00000000
#define RESOURCETYPE_DISK 0x00000001
#define RESOURCETYPE_PRINT 0x00000002
#if(WINVER >= 0x0400)
#define RESOURCETYPE_RESERVED 0x00000008
#endif /* WINVER >= 0x0400 */
#define RESOURCETYPE_UNKNOWN 0xFFFFFFFF
#define RESOURCEUSAGE_CONNECTABLE 0x00000001
#define RESOURCEUSAGE_CONTAINER 0x00000002
#if(WINVER >= 0x0400)
#define RESOURCEUSAGE_NOLOCALDEVICE 0x00000004
#define RESOURCEUSAGE_SIBLING 0x00000008
#define RESOURCEUSAGE_ATTACHED 0x00000010
#define RESOURCEUSAGE_ALL (RESOURCEUSAGE_CONNECTABLE | RESOURCEUSAGE_CONTAINER | RESOURCEUSAGE_ATTACHED)
#endif /* WINVER >= 0x0400 */
#define RESOURCEUSAGE_RESERVED 0x80000000
#define RESOURCEDISPLAYTYPE_GENERIC 0x00000000
#define RESOURCEDISPLAYTYPE_DOMAIN 0x00000001
#define RESOURCEDISPLAYTYPE_SERVER 0x00000002
#define RESOURCEDISPLAYTYPE_SHARE 0x00000003
#define RESOURCEDISPLAYTYPE_FILE 0x00000004
#define RESOURCEDISPLAYTYPE_GROUP 0x00000005
#if(WINVER >= 0x0400)
#define RESOURCEDISPLAYTYPE_NETWORK 0x00000006
#define RESOURCEDISPLAYTYPE_ROOT 0x00000007
#define RESOURCEDISPLAYTYPE_SHAREADMIN 0x00000008
#define RESOURCEDISPLAYTYPE_DIRECTORY 0x00000009
#endif /* WINVER >= 0x0400 */
#define RESOURCEDISPLAYTYPE_TREE 0x0000000A
#if(WINVER >= 0x0400)
#define RESOURCEDISPLAYTYPE_NDSCONTAINER 0x0000000B
#endif /* WINVER >= 0x0400 */
typedef struct _NETRESOURCEA {
DWORD dwScope;
DWORD dwType;
DWORD dwDisplayType;
DWORD dwUsage;
LPSTR lpLocalName;
LPSTR lpRemoteName;
LPSTR lpComment ;
LPSTR lpProvider;
}NETRESOURCEA, *LPNETRESOURCEA;
typedef struct _NETRESOURCEW {
DWORD dwScope;
DWORD dwType;
DWORD dwDisplayType;
DWORD dwUsage;
LPWSTR lpLocalName;
LPWSTR lpRemoteName;
LPWSTR lpComment ;
LPWSTR lpProvider;
}NETRESOURCEW, *LPNETRESOURCEW;
#ifdef UNICODE
typedef NETRESOURCEW NETRESOURCE;
typedef LPNETRESOURCEW LPNETRESOURCE;
#else
typedef NETRESOURCEA NETRESOURCE;
typedef LPNETRESOURCEA LPNETRESOURCE;
#endif // UNICODE
//
// Network Connections.
//
#define NETPROPERTY_PERSISTENT 1
#define CONNECT_UPDATE_PROFILE 0x00000001
#define CONNECT_UPDATE_RECENT 0x00000002
#define CONNECT_TEMPORARY 0x00000004
#define CONNECT_INTERACTIVE 0x00000008
#define CONNECT_PROMPT 0x00000010
#define CONNECT_NEED_DRIVE 0x00000020
#if(WINVER >= 0x0400)
#define CONNECT_REFCOUNT 0x00000040
#define CONNECT_REDIRECT 0x00000080
#define CONNECT_LOCALDRIVE 0x00000100
#define CONNECT_CURRENT_MEDIA 0x00000200
#define CONNECT_DEFERRED 0x00000400
#define CONNECT_RESERVED 0xFF000000
#endif /* WINVER >= 0x0400 */
#if(WINVER >= 0x0500)
#define CONNECT_COMMANDLINE 0x00000800
#define CONNECT_CMD_SAVECRED 0x00001000
#endif /* WINVER >= 0x0500 */
DWORD APIENTRY
WNetAddConnectionA(
IN LPCSTR lpRemoteName,
IN LPCSTR lpPassword,
IN LPCSTR lpLocalName
);
DWORD APIENTRY
WNetAddConnectionW(
IN LPCWSTR lpRemoteName,
IN LPCWSTR lpPassword,
IN LPCWSTR lpLocalName
);
#ifdef UNICODE
#define WNetAddConnection WNetAddConnectionW
#else
#define WNetAddConnection WNetAddConnectionA
#endif // !UNICODE
DWORD APIENTRY
WNetAddConnection2A(
IN LPNETRESOURCEA lpNetResource,
IN LPCSTR lpPassword,
IN LPCSTR lpUserName,
IN DWORD dwFlags
);
DWORD APIENTRY
WNetAddConnection2W(
IN LPNETRESOURCEW lpNetResource,
IN LPCWSTR lpPassword,
IN LPCWSTR lpUserName,
IN DWORD dwFlags
);
#ifdef UNICODE
#define WNetAddConnection2 WNetAddConnection2W
#else
#define WNetAddConnection2 WNetAddConnection2A
#endif // !UNICODE
DWORD APIENTRY
WNetAddConnection3A(
IN HWND hwndOwner,
IN LPNETRESOURCEA lpNetResource,
IN LPCSTR lpPassword,
IN LPCSTR lpUserName,
IN DWORD dwFlags
);
DWORD APIENTRY
WNetAddConnection3W(
IN HWND hwndOwner,
IN LPNETRESOURCEW lpNetResource,
IN LPCWSTR lpPassword,
IN LPCWSTR lpUserName,
IN DWORD dwFlags
);
#ifdef UNICODE
#define WNetAddConnection3 WNetAddConnection3W
#else
#define WNetAddConnection3 WNetAddConnection3A
#endif // !UNICODE
DWORD APIENTRY
WNetCancelConnectionA(
IN LPCSTR lpName,
IN BOOL fForce
);
DWORD APIENTRY
WNetCancelConnectionW(
IN LPCWSTR lpName,
IN BOOL fForce
);
#ifdef UNICODE
#define WNetCancelConnection WNetCancelConnectionW
#else
#define WNetCancelConnection WNetCancelConnectionA
#endif // !UNICODE
DWORD APIENTRY
WNetCancelConnection2A(
IN LPCSTR lpName,
IN DWORD dwFlags,
IN BOOL fForce
);
DWORD APIENTRY
WNetCancelConnection2W(
IN LPCWSTR lpName,
IN DWORD dwFlags,
IN BOOL fForce
);
#ifdef UNICODE
#define WNetCancelConnection2 WNetCancelConnection2W
#else
#define WNetCancelConnection2 WNetCancelConnection2A
#endif // !UNICODE
DWORD APIENTRY
WNetGetConnectionA(
IN LPCSTR lpLocalName,
OUT LPSTR lpRemoteName,
IN OUT LPDWORD lpnLength
);
DWORD APIENTRY
WNetGetConnectionW(
IN LPCWSTR lpLocalName,
OUT LPWSTR lpRemoteName,
IN OUT LPDWORD lpnLength
);
#ifdef UNICODE
#define WNetGetConnection WNetGetConnectionW
#else
#define WNetGetConnection WNetGetConnectionA
#endif // !UNICODE
DWORD APIENTRY
WNetRestoreConnectionA(
IN HWND hwndParent,
IN LPCSTR lpDevice
);
DWORD APIENTRY
WNetRestoreConnectionW(
IN HWND hwndParent,
IN LPCWSTR lpDevice
);
#ifdef UNICODE
#define WNetRestoreConnection WNetRestoreConnectionW
#else
#define WNetRestoreConnection WNetRestoreConnectionA
#endif // !UNICODE
#if(WINVER >= 0x0400)
DWORD APIENTRY
WNetUseConnectionA(
IN HWND hwndOwner,
IN LPNETRESOURCEA lpNetResource,
IN LPCSTR lpPassword,
IN LPCSTR lpUserID,
IN DWORD dwFlags,
OUT LPSTR lpAccessName,
IN OUT LPDWORD lpBufferSize,
OUT LPDWORD lpResult
);
DWORD APIENTRY
WNetUseConnectionW(
IN HWND hwndOwner,
IN LPNETRESOURCEW lpNetResource,
IN LPCWSTR lpPassword,
IN LPCWSTR lpUserID,
IN DWORD dwFlags,
OUT LPWSTR lpAccessName,
IN OUT LPDWORD lpBufferSize,
OUT LPDWORD lpResult
);
#ifdef UNICODE
#define WNetUseConnection WNetUseConnectionW
#else
#define WNetUseConnection WNetUseConnectionA
#endif // !UNICODE
#endif /* WINVER >= 0x0400 */
//
// Network Connection Dialogs.
//
DWORD APIENTRY
WNetConnectionDialog(
IN HWND hwnd,
IN DWORD dwType
);
DWORD APIENTRY
WNetDisconnectDialog(
IN HWND hwnd,
IN DWORD dwType
);
#if(WINVER >= 0x0400)
typedef struct _CONNECTDLGSTRUCTA{
DWORD cbStructure; /* size of this structure in bytes */
HWND hwndOwner; /* owner window for the dialog */
LPNETRESOURCEA lpConnRes;/* Requested Resource info */
DWORD dwFlags; /* flags (see below) */
DWORD dwDevNum; /* number of devices connected to */
} CONNECTDLGSTRUCTA, FAR *LPCONNECTDLGSTRUCTA;
typedef struct _CONNECTDLGSTRUCTW{
DWORD cbStructure; /* size of this structure in bytes */
HWND hwndOwner; /* owner window for the dialog */
LPNETRESOURCEW lpConnRes;/* Requested Resource info */
DWORD dwFlags; /* flags (see below) */
DWORD dwDevNum; /* number of devices connected to */
} CONNECTDLGSTRUCTW, FAR *LPCONNECTDLGSTRUCTW;
#ifdef UNICODE
typedef CONNECTDLGSTRUCTW CONNECTDLGSTRUCT;
typedef LPCONNECTDLGSTRUCTW LPCONNECTDLGSTRUCT;
#else
typedef CONNECTDLGSTRUCTA CONNECTDLGSTRUCT;
typedef LPCONNECTDLGSTRUCTA LPCONNECTDLGSTRUCT;
#endif // UNICODE
#define CONNDLG_RO_PATH 0x00000001 /* Resource path should be read-only */
#define CONNDLG_CONN_POINT 0x00000002 /* Netware -style movable connection point enabled */
#define CONNDLG_USE_MRU 0x00000004 /* Use MRU combobox */
#define CONNDLG_HIDE_BOX 0x00000008 /* Hide persistent connect checkbox */
/*
* NOTE: Set at most ONE of the below flags. If neither flag is set,
* then the persistence is set to whatever the user chose during
* a previous connection
*/
#define CONNDLG_PERSIST 0x00000010 /* Force persistent connection */
#define CONNDLG_NOT_PERSIST 0x00000020 /* Force connection NOT persistent */
DWORD APIENTRY
WNetConnectionDialog1A(
IN OUT LPCONNECTDLGSTRUCTA lpConnDlgStruct
);
DWORD APIENTRY
WNetConnectionDialog1W(
IN OUT LPCONNECTDLGSTRUCTW lpConnDlgStruct
);
#ifdef UNICODE
#define WNetConnectionDialog1 WNetConnectionDialog1W
#else
#define WNetConnectionDialog1 WNetConnectionDialog1A
#endif // !UNICODE
typedef struct _DISCDLGSTRUCTA{
DWORD cbStructure; /* size of this structure in bytes */
HWND hwndOwner; /* owner window for the dialog */
LPSTR lpLocalName; /* local device name */
LPSTR lpRemoteName; /* network resource name */
DWORD dwFlags; /* flags */
} DISCDLGSTRUCTA, FAR *LPDISCDLGSTRUCTA;
typedef struct _DISCDLGSTRUCTW{
DWORD cbStructure; /* size of this structure in bytes */
HWND hwndOwner; /* owner window for the dialog */
LPWSTR lpLocalName; /* local device name */
LPWSTR lpRemoteName; /* network resource name */
DWORD dwFlags; /* flags */
} DISCDLGSTRUCTW, FAR *LPDISCDLGSTRUCTW;
#ifdef UNICODE
typedef DISCDLGSTRUCTW DISCDLGSTRUCT;
typedef LPDISCDLGSTRUCTW LPDISCDLGSTRUCT;
#else
typedef DISCDLGSTRUCTA DISCDLGSTRUCT;
typedef LPDISCDLGSTRUCTA LPDISCDLGSTRUCT;
#endif // UNICODE
#define DISC_UPDATE_PROFILE 0x00000001
#define DISC_NO_FORCE 0x00000040
DWORD APIENTRY
WNetDisconnectDialog1A(
IN LPDISCDLGSTRUCTA lpConnDlgStruct
);
DWORD APIENTRY
WNetDisconnectDialog1W(
IN LPDISCDLGSTRUCTW lpConnDlgStruct
);
#ifdef UNICODE
#define WNetDisconnectDialog1 WNetDisconnectDialog1W
#else
#define WNetDisconnectDialog1 WNetDisconnectDialog1A
#endif // !UNICODE
#endif /* WINVER >= 0x0400 */
//
// Network Browsing.
//
DWORD APIENTRY
WNetOpenEnumA(
IN DWORD dwScope,
IN DWORD dwType,
IN DWORD dwUsage,
IN LPNETRESOURCEA lpNetResource,
OUT LPHANDLE lphEnum
);
DWORD APIENTRY
WNetOpenEnumW(
IN DWORD dwScope,
IN DWORD dwType,
IN DWORD dwUsage,
IN LPNETRESOURCEW lpNetResource,
OUT LPHANDLE lphEnum
);
#ifdef UNICODE
#define WNetOpenEnum WNetOpenEnumW
#else
#define WNetOpenEnum WNetOpenEnumA
#endif // !UNICODE
DWORD APIENTRY
WNetEnumResourceA(
IN HANDLE hEnum,
IN OUT LPDWORD lpcCount,
OUT LPVOID lpBuffer,
IN OUT LPDWORD lpBufferSize
);
DWORD APIENTRY
WNetEnumResourceW(
IN HANDLE hEnum,
IN OUT LPDWORD lpcCount,
OUT LPVOID lpBuffer,
IN OUT LPDWORD lpBufferSize
);
#ifdef UNICODE
#define WNetEnumResource WNetEnumResourceW
#else
#define WNetEnumResource WNetEnumResourceA
#endif // !UNICODE
DWORD APIENTRY
WNetCloseEnum(
IN HANDLE hEnum
);
#if(WINVER >= 0x0400)
DWORD APIENTRY
WNetGetResourceParentA(
IN LPNETRESOURCEA lpNetResource,
OUT LPVOID lpBuffer,
IN OUT LPDWORD lpcbBuffer
);
DWORD APIENTRY
WNetGetResourceParentW(
IN LPNETRESOURCEW lpNetResource,
OUT LPVOID lpBuffer,
IN OUT LPDWORD lpcbBuffer
);
#ifdef UNICODE
#define WNetGetResourceParent WNetGetResourceParentW
#else
#define WNetGetResourceParent WNetGetResourceParentA
#endif // !UNICODE
DWORD APIENTRY
WNetGetResourceInformationA(
IN LPNETRESOURCEA lpNetResource,
OUT LPVOID lpBuffer,
IN OUT LPDWORD lpcbBuffer,
OUT LPSTR *lplpSystem
);
DWORD APIENTRY
WNetGetResourceInformationW(
IN LPNETRESOURCEW lpNetResource,
OUT LPVOID lpBuffer,
IN OUT LPDWORD lpcbBuffer,
OUT LPWSTR *lplpSystem
);
#ifdef UNICODE
#define WNetGetResourceInformation WNetGetResourceInformationW
#else
#define WNetGetResourceInformation WNetGetResourceInformationA
#endif // !UNICODE
#endif /* WINVER >= 0x0400 */
//
// Universal Naming.
//
#define UNIVERSAL_NAME_INFO_LEVEL 0x00000001
#define REMOTE_NAME_INFO_LEVEL 0x00000002
typedef struct _UNIVERSAL_NAME_INFOA {
LPSTR lpUniversalName;
}UNIVERSAL_NAME_INFOA, *LPUNIVERSAL_NAME_INFOA;
typedef struct _UNIVERSAL_NAME_INFOW {
LPWSTR lpUniversalName;
}UNIVERSAL_NAME_INFOW, *LPUNIVERSAL_NAME_INFOW;
#ifdef UNICODE
typedef UNIVERSAL_NAME_INFOW UNIVERSAL_NAME_INFO;
typedef LPUNIVERSAL_NAME_INFOW LPUNIVERSAL_NAME_INFO;
#else
typedef UNIVERSAL_NAME_INFOA UNIVERSAL_NAME_INFO;
typedef LPUNIVERSAL_NAME_INFOA LPUNIVERSAL_NAME_INFO;
#endif // UNICODE
typedef struct _REMOTE_NAME_INFOA {
LPSTR lpUniversalName;
LPSTR lpConnectionName;
LPSTR lpRemainingPath;
}REMOTE_NAME_INFOA, *LPREMOTE_NAME_INFOA;
typedef struct _REMOTE_NAME_INFOW {
LPWSTR lpUniversalName;
LPWSTR lpConnectionName;
LPWSTR lpRemainingPath;
}REMOTE_NAME_INFOW, *LPREMOTE_NAME_INFOW;
#ifdef UNICODE
typedef REMOTE_NAME_INFOW REMOTE_NAME_INFO;
typedef LPREMOTE_NAME_INFOW LPREMOTE_NAME_INFO;
#else
typedef REMOTE_NAME_INFOA REMOTE_NAME_INFO;
typedef LPREMOTE_NAME_INFOA LPREMOTE_NAME_INFO;
#endif // UNICODE
DWORD APIENTRY
WNetGetUniversalNameA(
IN LPCSTR lpLocalPath,
IN DWORD dwInfoLevel,
OUT LPVOID lpBuffer,
IN OUT LPDWORD lpBufferSize
);
DWORD APIENTRY
WNetGetUniversalNameW(
IN LPCWSTR lpLocalPath,
IN DWORD dwInfoLevel,
OUT LPVOID lpBuffer,
IN OUT LPDWORD lpBufferSize
);
#ifdef UNICODE
#define WNetGetUniversalName WNetGetUniversalNameW
#else
#define WNetGetUniversalName WNetGetUniversalNameA
#endif // !UNICODE
//
// Authentication and Logon/Logoff.
//
DWORD APIENTRY
WNetGetUserA(
IN LPCSTR lpName,
OUT LPSTR lpUserName,
IN OUT LPDWORD lpnLength
);
DWORD APIENTRY
WNetGetUserW(
IN LPCWSTR lpName,
OUT LPWSTR lpUserName,
IN OUT LPDWORD lpnLength
);
#ifdef UNICODE
#define WNetGetUser WNetGetUserW
#else
#define WNetGetUser WNetGetUserA
#endif // !UNICODE
//
// Other.
//
#if(WINVER >= 0x0400)
#define WNFMT_MULTILINE 0x01
#define WNFMT_ABBREVIATED 0x02
#define WNFMT_INENUM 0x10
#define WNFMT_CONNECTION 0x20
#endif /* WINVER >= 0x0400 */
#if(WINVER >= 0x0400)
DWORD APIENTRY
WNetGetProviderNameA(
IN DWORD dwNetType,
OUT LPSTR lpProviderName,
IN OUT LPDWORD lpBufferSize
);
DWORD APIENTRY
WNetGetProviderNameW(
IN DWORD dwNetType,
OUT LPWSTR lpProviderName,
IN OUT LPDWORD lpBufferSize
);
#ifdef UNICODE
#define WNetGetProviderName WNetGetProviderNameW
#else
#define WNetGetProviderName WNetGetProviderNameA
#endif // !UNICODE
typedef struct _NETINFOSTRUCT{
DWORD cbStructure;
DWORD dwProviderVersion;
DWORD dwStatus;
DWORD dwCharacteristics;
ULONG_PTR dwHandle;
WORD wNetType;
DWORD dwPrinters;
DWORD dwDrives;
} NETINFOSTRUCT, FAR *LPNETINFOSTRUCT;
#define NETINFO_DLL16 0x00000001 /* Provider running as 16 bit Winnet Driver */
#define NETINFO_DISKRED 0x00000004 /* Provider requires disk redirections to connect */
#define NETINFO_PRINTERRED 0x00000008 /* Provider requires printer redirections to connect */
DWORD APIENTRY
WNetGetNetworkInformationA(
IN LPCSTR lpProvider,
OUT LPNETINFOSTRUCT lpNetInfoStruct
);
DWORD APIENTRY
WNetGetNetworkInformationW(
IN LPCWSTR lpProvider,
OUT LPNETINFOSTRUCT lpNetInfoStruct
);
#ifdef UNICODE
#define WNetGetNetworkInformation WNetGetNetworkInformationW
#else
#define WNetGetNetworkInformation WNetGetNetworkInformationA
#endif // !UNICODE
//
// User Profiles.
//
typedef UINT (FAR PASCAL *PFNGETPROFILEPATHA) (
LPCSTR pszUsername,
LPSTR pszBuffer,
UINT cbBuffer
);
typedef UINT (FAR PASCAL *PFNGETPROFILEPATHW) (
LPCWSTR pszUsername,
LPWSTR pszBuffer,
UINT cbBuffer
);
#ifdef UNICODE
#define PFNGETPROFILEPATH PFNGETPROFILEPATHW
#else
#define PFNGETPROFILEPATH PFNGETPROFILEPATHA
#endif // !UNICODE
typedef UINT (FAR PASCAL *PFNRECONCILEPROFILEA) (
LPCSTR pszCentralFile,
LPCSTR pszLocalFile,
DWORD dwFlags
);
typedef UINT (FAR PASCAL *PFNRECONCILEPROFILEW) (
LPCWSTR pszCentralFile,
LPCWSTR pszLocalFile,
DWORD dwFlags
);
#ifdef UNICODE
#define PFNRECONCILEPROFILE PFNRECONCILEPROFILEW
#else
#define PFNRECONCILEPROFILE PFNRECONCILEPROFILEA
#endif // !UNICODE
#define RP_LOGON 0x01 /* if set, do for logon, else for logoff */
#define RP_INIFILE 0x02 /* if set, reconcile .INI file, else reg. hive */
//
// Policies.
//
typedef BOOL (FAR PASCAL *PFNPROCESSPOLICIESA) (
HWND hwnd,
LPCSTR pszPath,
LPCSTR pszUsername,
LPCSTR pszComputerName,
DWORD dwFlags
);
typedef BOOL (FAR PASCAL *PFNPROCESSPOLICIESW) (
HWND hwnd,
LPCWSTR pszPath,
LPCWSTR pszUsername,
LPCWSTR pszComputerName,
DWORD dwFlags
);
#ifdef UNICODE
#define PFNPROCESSPOLICIES PFNPROCESSPOLICIESW
#else
#define PFNPROCESSPOLICIES PFNPROCESSPOLICIESA
#endif // !UNICODE
#define PP_DISPLAYERRORS 0x01 /* if set, display error messages, else fail silently if error */
#endif /* WINVER >= 0x0400 */
//
// Error handling.
//
DWORD APIENTRY
WNetGetLastErrorA(
OUT LPDWORD lpError,
OUT LPSTR lpErrorBuf,
IN DWORD nErrorBufSize,
OUT LPSTR lpNameBuf,
IN DWORD nNameBufSize
);
DWORD APIENTRY
WNetGetLastErrorW(
OUT LPDWORD lpError,
OUT LPWSTR lpErrorBuf,
IN DWORD nErrorBufSize,
OUT LPWSTR lpNameBuf,
IN DWORD nNameBufSize
);
#ifdef UNICODE
#define WNetGetLastError WNetGetLastErrorW
#else
#define WNetGetLastError WNetGetLastErrorA
#endif // !UNICODE
//
// STATUS CODES
//
// General
#define WN_SUCCESS NO_ERROR
#define WN_NO_ERROR NO_ERROR
#define WN_NOT_SUPPORTED ERROR_NOT_SUPPORTED
#define WN_CANCEL ERROR_CANCELLED
#define WN_RETRY ERROR_RETRY
#define WN_NET_ERROR ERROR_UNEXP_NET_ERR
#define WN_MORE_DATA ERROR_MORE_DATA
#define WN_BAD_POINTER ERROR_INVALID_ADDRESS
#define WN_BAD_VALUE ERROR_INVALID_PARAMETER
#define WN_BAD_USER ERROR_BAD_USERNAME
#define WN_BAD_PASSWORD ERROR_INVALID_PASSWORD
#define WN_ACCESS_DENIED ERROR_ACCESS_DENIED
#define WN_FUNCTION_BUSY ERROR_BUSY
#define WN_WINDOWS_ERROR ERROR_UNEXP_NET_ERR
#define WN_OUT_OF_MEMORY ERROR_NOT_ENOUGH_MEMORY
#define WN_NO_NETWORK ERROR_NO_NETWORK
#define WN_EXTENDED_ERROR ERROR_EXTENDED_ERROR
#define WN_BAD_LEVEL ERROR_INVALID_LEVEL
#define WN_BAD_HANDLE ERROR_INVALID_HANDLE
#if(WINVER >= 0x0400)
#define WN_NOT_INITIALIZING ERROR_ALREADY_INITIALIZED
#define WN_NO_MORE_DEVICES ERROR_NO_MORE_DEVICES
#endif /* WINVER >= 0x0400 */
// Connection
#define WN_NOT_CONNECTED ERROR_NOT_CONNECTED
#define WN_OPEN_FILES ERROR_OPEN_FILES
#define WN_DEVICE_IN_USE ERROR_DEVICE_IN_USE
#define WN_BAD_NETNAME ERROR_BAD_NET_NAME
#define WN_BAD_LOCALNAME ERROR_BAD_DEVICE
#define WN_ALREADY_CONNECTED ERROR_ALREADY_ASSIGNED
#define WN_DEVICE_ERROR ERROR_GEN_FAILURE
#define WN_CONNECTION_CLOSED ERROR_CONNECTION_UNAVAIL
#define WN_NO_NET_OR_BAD_PATH ERROR_NO_NET_OR_BAD_PATH
#define WN_BAD_PROVIDER ERROR_BAD_PROVIDER
#define WN_CANNOT_OPEN_PROFILE ERROR_CANNOT_OPEN_PROFILE
#define WN_BAD_PROFILE ERROR_BAD_PROFILE
#define WN_BAD_DEV_TYPE ERROR_BAD_DEV_TYPE
#define WN_DEVICE_ALREADY_REMEMBERED ERROR_DEVICE_ALREADY_REMEMBERED
#define WN_CONNECTED_OTHER_PASSWORD ERROR_CONNECTED_OTHER_PASSWORD
#if(WINVER >= 0x0501)
#define WN_CONNECTED_OTHER_PASSWORD_DEFAULT ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT
#endif /* WINVER >= 0x0501 */
// Enumeration
#define WN_NO_MORE_ENTRIES ERROR_NO_MORE_ITEMS
#define WN_NOT_CONTAINER ERROR_NOT_CONTAINER
#if(WINVER >= 0x0400)
// Authentication
#define WN_NOT_AUTHENTICATED ERROR_NOT_AUTHENTICATED
#define WN_NOT_LOGGED_ON ERROR_NOT_LOGGED_ON
#define WN_NOT_VALIDATED ERROR_NO_LOGON_SERVERS
#endif /* WINVER >= 0x0400 */
//
// For Shell
//
#if(WINVER >= 0x0400)
typedef struct _NETCONNECTINFOSTRUCT{
DWORD cbStructure;
DWORD dwFlags;
DWORD dwSpeed;
DWORD dwDelay;
DWORD dwOptDataSize;
} NETCONNECTINFOSTRUCT, *LPNETCONNECTINFOSTRUCT;
#define WNCON_FORNETCARD 0x00000001
#define WNCON_NOTROUTED 0x00000002
#define WNCON_SLOWLINK 0x00000004
#define WNCON_DYNAMIC 0x00000008
DWORD APIENTRY
MultinetGetConnectionPerformanceA(
IN LPNETRESOURCEA lpNetResource,
OUT LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct
);
DWORD APIENTRY
MultinetGetConnectionPerformanceW(
IN LPNETRESOURCEW lpNetResource,
OUT LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct
);
#ifdef UNICODE
#define MultinetGetConnectionPerformance MultinetGetConnectionPerformanceW
#else
#define MultinetGetConnectionPerformance MultinetGetConnectionPerformanceA
#endif // !UNICODE
#endif /* WINVER >= 0x0400 */
#ifdef __cplusplus
}
#endif
#endif // _WINNETWK_

1761
lib/MSPlatformSDK/Include/WinNls.h Executable file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,670 @@
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
winperf.h
Abstract:
Header file for the Performance Monitor data.
This file contains the definitions of the data structures returned
by the Configuration Registry in response to a request for
performance data. This file is used by both the Configuration
Registry and the Performance Monitor to define their interface.
The complete interface is described here, except for the name
of the node to query in the registry. It is
HKEY_PERFORMANCE_DATA.
By querying that node with a subkey of "Global" the caller will
retrieve the structures described here.
There is no need to RegOpenKey() the reserved handle HKEY_PERFORMANCE_DATA,
but the caller should RegCloseKey() the handle so that network transports
and drivers can be removed or installed (which cannot happen while
they are open for monitoring.) Remote requests must first
RegConnectRegistry().
--*/
#ifndef _WINPERF_
#define _WINPERF_
#if _MSC_VER > 1000
#pragma once
#endif
#include <pshpack8.h>
// Data structure definitions.
// In order for data to be returned through the Configuration Registry
// in a system-independent fashion, it must be self-describing.
// In the following, all offsets are in bytes.
//
// Data is returned through the Configuration Registry in a
// a data block which begins with a _PERF_DATA_BLOCK structure.
//
#define PERF_DATA_VERSION 1
#define PERF_DATA_REVISION 1
typedef struct _PERF_DATA_BLOCK {
WCHAR Signature[4]; // Signature: Unicode "PERF"
DWORD LittleEndian; // 0 = Big Endian, 1 = Little Endian
DWORD Version; // Version of these data structures
// starting at 1
DWORD Revision; // Revision of these data structures
// starting at 0 for each Version
DWORD TotalByteLength; // Total length of data block
DWORD HeaderLength; // Length of this structure
DWORD NumObjectTypes; // Number of types of objects
// being reported
LONG DefaultObject; // Object Title Index of default
// object to display when data from
// this system is retrieved (-1 =
// none, but this is not expected to
// be used)
SYSTEMTIME SystemTime; // Time at the system under
// measurement
LARGE_INTEGER PerfTime; // Performance counter value
// at the system under measurement
LARGE_INTEGER PerfFreq; // Performance counter frequency
// at the system under measurement
LARGE_INTEGER PerfTime100nSec; // Performance counter time in 100 nsec
// units at the system under measurement
DWORD SystemNameLength; // Length of the system name
DWORD SystemNameOffset; // Offset, from beginning of this
// structure, to name of system
// being measured
} PERF_DATA_BLOCK, *PPERF_DATA_BLOCK;
//
// The _PERF_DATA_BLOCK structure is followed by NumObjectTypes of
// data sections, one for each type of object measured. Each object
// type section begins with a _PERF_OBJECT_TYPE structure.
//
typedef struct _PERF_OBJECT_TYPE {
DWORD TotalByteLength; // Length of this object definition
// including this structure, the
// counter definitions, and the
// instance definitions and the
// counter blocks for each instance:
// This is the offset from this
// structure to the next object, if
// any
DWORD DefinitionLength; // Length of object definition,
// which includes this structure
// and the counter definition
// structures for this object: this
// is the offset of the first
// instance or of the counters
// for this object if there is
// no instance
DWORD HeaderLength; // Length of this structure: this
// is the offset to the first
// counter definition for this
// object
DWORD ObjectNameTitleIndex;
// Index to name in Title Database
#ifdef _WIN64
DWORD ObjectNameTitle; // Should use this as an offset
#else
LPWSTR ObjectNameTitle; // Initially NULL, for use by
// analysis program to point to
// retrieved title string
#endif
DWORD ObjectHelpTitleIndex;
// Index to Help in Title Database
#ifdef _WIN64
DWORD ObjectHelpTitle; // Should use this as an offset
#else
LPWSTR ObjectHelpTitle; // Initially NULL, for use by
// analysis program to point to
// retrieved title string
#endif
DWORD DetailLevel; // Object level of detail (for
// controlling display complexity);
// will be min of detail levels
// for all this object's counters
DWORD NumCounters; // Number of counters in each
// counter block (one counter
// block per instance)
LONG DefaultCounter; // Default counter to display when
// this object is selected, index
// starting at 0 (-1 = none, but
// this is not expected to be used)
LONG NumInstances; // Number of object instances
// for which counters are being
// returned from the system under
// measurement. If the object defined
// will never have any instance data
// structures (PERF_INSTANCE_DEFINITION)
// then this value should be -1, if the
// object can have 0 or more instances,
// but has none present, then this
// should be 0, otherwise this field
// contains the number of instances of
// this counter.
DWORD CodePage; // 0 if instance strings are in
// UNICODE, else the Code Page of
// the instance names
LARGE_INTEGER PerfTime; // Sample Time in "Object" units
//
LARGE_INTEGER PerfFreq; // Frequency of "Object" units in
// counts per second.
} PERF_OBJECT_TYPE, *PPERF_OBJECT_TYPE;
#define PERF_NO_INSTANCES -1 // no instances (see NumInstances above)
//
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//
// PERF_COUNTER_DEFINITION.CounterType field values
//
//
// Counter ID Field Definition:
//
// 3 2 2 2 2 1 1 1
// 1 8 4 2 0 6 2 0 8 0
// +--------+--------+----+----+--------+--------+----+----+----------------+
// |Display |Calculation |Time|Counter | |Ctr |Size| |
// |Flags |Modifiers |Base|SubType |Reserved|Type|Fld | Reserved |
// +--------+--------+----+----+--------+--------+----+----+----------------+
//
//
// The counter type is the "or" of the following values as described below
//
// select one of the following to indicate the counter's data size
//
#define PERF_SIZE_DWORD 0x00000000 // 32 bit field
#define PERF_SIZE_LARGE 0x00000100 // 64 bit field
#define PERF_SIZE_ZERO 0x00000200 // for Zero Length fields
#define PERF_SIZE_VARIABLE_LEN 0x00000300 // length is in CounterLength field
// of Counter Definition struct
//
// select one of the following values to indicate the counter field usage
//
#define PERF_TYPE_NUMBER 0x00000000 // a number (not a counter)
#define PERF_TYPE_COUNTER 0x00000400 // an increasing numeric value
#define PERF_TYPE_TEXT 0x00000800 // a text field
#define PERF_TYPE_ZERO 0x00000C00 // displays a zero
//
// If the PERF_TYPE_NUMBER field was selected, then select one of the
// following to describe the Number
//
#define PERF_NUMBER_HEX 0x00000000 // display as HEX value
#define PERF_NUMBER_DECIMAL 0x00010000 // display as a decimal integer
#define PERF_NUMBER_DEC_1000 0x00020000 // display as a decimal/1000
//
// If the PERF_TYPE_COUNTER value was selected then select one of the
// following to indicate the type of counter
//
#define PERF_COUNTER_VALUE 0x00000000 // display counter value
#define PERF_COUNTER_RATE 0x00010000 // divide ctr / delta time
#define PERF_COUNTER_FRACTION 0x00020000 // divide ctr / base
#define PERF_COUNTER_BASE 0x00030000 // base value used in fractions
#define PERF_COUNTER_ELAPSED 0x00040000 // subtract counter from current time
#define PERF_COUNTER_QUEUELEN 0x00050000 // Use Queuelen processing func.
#define PERF_COUNTER_HISTOGRAM 0x00060000 // Counter begins or ends a histogram
#define PERF_COUNTER_PRECISION 0x00070000 // divide ctr / private clock
//
// If the PERF_TYPE_TEXT value was selected, then select one of the
// following to indicate the type of TEXT data.
//
#define PERF_TEXT_UNICODE 0x00000000 // type of text in text field
#define PERF_TEXT_ASCII 0x00010000 // ASCII using the CodePage field
//
// Timer SubTypes
//
#define PERF_TIMER_TICK 0x00000000 // use system perf. freq for base
#define PERF_TIMER_100NS 0x00100000 // use 100 NS timer time base units
#define PERF_OBJECT_TIMER 0x00200000 // use the object timer freq
//
// Any types that have calculations performed can use one or more of
// the following calculation modification flags listed here
//
#define PERF_DELTA_COUNTER 0x00400000 // compute difference first
#define PERF_DELTA_BASE 0x00800000 // compute base diff as well
#define PERF_INVERSE_COUNTER 0x01000000 // show as 1.00-value (assumes:
#define PERF_MULTI_COUNTER 0x02000000 // sum of multiple instances
//
// Select one of the following values to indicate the display suffix (if any)
//
#define PERF_DISPLAY_NO_SUFFIX 0x00000000 // no suffix
#define PERF_DISPLAY_PER_SEC 0x10000000 // "/sec"
#define PERF_DISPLAY_PERCENT 0x20000000 // "%"
#define PERF_DISPLAY_SECONDS 0x30000000 // "secs"
#define PERF_DISPLAY_NOSHOW 0x40000000 // value is not displayed
//
// Predefined counter types
//
// 32-bit Counter. Divide delta by delta time. Display suffix: "/sec"
#define PERF_COUNTER_COUNTER \
(PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_RATE |\
PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_PER_SEC)
// 64-bit Timer. Divide delta by delta time. Display suffix: "%"
#define PERF_COUNTER_TIMER \
(PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE |\
PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_PERCENT)
// Queue Length Space-Time Product. Divide delta by delta time. No Display Suffix.
#define PERF_COUNTER_QUEUELEN_TYPE \
(PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_QUEUELEN |\
PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_NO_SUFFIX)
// Queue Length Space-Time Product. Divide delta by delta time. No Display Suffix.
#define PERF_COUNTER_LARGE_QUEUELEN_TYPE \
(PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_QUEUELEN |\
PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_NO_SUFFIX)
// Queue Length Space-Time Product using 100 Ns timebase.
// Divide delta by delta time. No Display Suffix.
#define PERF_COUNTER_100NS_QUEUELEN_TYPE \
(PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_QUEUELEN |\
PERF_TIMER_100NS | PERF_DELTA_COUNTER | PERF_DISPLAY_NO_SUFFIX)
// Queue Length Space-Time Product using Object specific timebase.
// Divide delta by delta time. No Display Suffix.
#define PERF_COUNTER_OBJ_TIME_QUEUELEN_TYPE \
(PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_QUEUELEN |\
PERF_OBJECT_TIMER | PERF_DELTA_COUNTER | PERF_DISPLAY_NO_SUFFIX)
// 64-bit Counter. Divide delta by delta time. Display Suffix: "/sec"
#define PERF_COUNTER_BULK_COUNT \
(PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE |\
PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_PER_SEC)
// Indicates the counter is not a counter but rather Unicode text Display as text.
#define PERF_COUNTER_TEXT \
(PERF_SIZE_VARIABLE_LEN | PERF_TYPE_TEXT | PERF_TEXT_UNICODE |\
PERF_DISPLAY_NO_SUFFIX)
// Indicates the data is a counter which should not be
// time averaged on display (such as an error counter on a serial line)
// Display as is. No Display Suffix.
#define PERF_COUNTER_RAWCOUNT \
(PERF_SIZE_DWORD | PERF_TYPE_NUMBER | PERF_NUMBER_DECIMAL |\
PERF_DISPLAY_NO_SUFFIX)
// Same as PERF_COUNTER_RAWCOUNT except its size is a large integer
#define PERF_COUNTER_LARGE_RAWCOUNT \
(PERF_SIZE_LARGE | PERF_TYPE_NUMBER | PERF_NUMBER_DECIMAL |\
PERF_DISPLAY_NO_SUFFIX)
// Special case for RAWCOUNT that want to be displayed in hex
// Indicates the data is a counter which should not be
// time averaged on display (such as an error counter on a serial line)
// Display as is. No Display Suffix.
#define PERF_COUNTER_RAWCOUNT_HEX \
(PERF_SIZE_DWORD | PERF_TYPE_NUMBER | PERF_NUMBER_HEX |\
PERF_DISPLAY_NO_SUFFIX)
// Same as PERF_COUNTER_RAWCOUNT_HEX except its size is a large integer
#define PERF_COUNTER_LARGE_RAWCOUNT_HEX \
(PERF_SIZE_LARGE | PERF_TYPE_NUMBER | PERF_NUMBER_HEX |\
PERF_DISPLAY_NO_SUFFIX)
// A count which is either 1 or 0 on each sampling interrupt (% busy)
// Divide delta by delta base. Display Suffix: "%"
#define PERF_SAMPLE_FRACTION \
(PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_FRACTION |\
PERF_DELTA_COUNTER | PERF_DELTA_BASE | PERF_DISPLAY_PERCENT)
// A count which is sampled on each sampling interrupt (queue length)
// Divide delta by delta time. No Display Suffix.
#define PERF_SAMPLE_COUNTER \
(PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_RATE |\
PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_NO_SUFFIX)
// A label: no data is associated with this counter (it has 0 length)
// Do not display.
#define PERF_COUNTER_NODATA \
(PERF_SIZE_ZERO | PERF_DISPLAY_NOSHOW)
// 64-bit Timer inverse (e.g., idle is measured, but display busy %)
// Display 100 - delta divided by delta time. Display suffix: "%"
#define PERF_COUNTER_TIMER_INV \
(PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE |\
PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_INVERSE_COUNTER | \
PERF_DISPLAY_PERCENT)
// The divisor for a sample, used with the previous counter to form a
// sampled %. You must check for >0 before dividing by this! This
// counter will directly follow the numerator counter. It should not
// be displayed to the user.
#define PERF_SAMPLE_BASE \
(PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_BASE |\
PERF_DISPLAY_NOSHOW |\
0x00000001) // for compatibility with pre-beta versions
// A timer which, when divided by an average base, produces a time
// in seconds which is the average time of some operation. This
// timer times total operations, and the base is the number of opera-
// tions. Display Suffix: "sec"
#define PERF_AVERAGE_TIMER \
(PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_FRACTION |\
PERF_DISPLAY_SECONDS)
// Used as the denominator in the computation of time or count
// averages. Must directly follow the numerator counter. Not dis-
// played to the user.
#define PERF_AVERAGE_BASE \
(PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_BASE |\
PERF_DISPLAY_NOSHOW |\
0x00000002) // for compatibility with pre-beta versions
// A bulk count which, when divided (typically) by the number of
// operations, gives (typically) the number of bytes per operation.
// No Display Suffix.
#define PERF_AVERAGE_BULK \
(PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_FRACTION |\
PERF_DISPLAY_NOSHOW)
// 64-bit Timer in object specific units. Display delta divided by
// delta time as returned in the object type header structure. Display suffix: "%"
#define PERF_OBJ_TIME_TIMER \
(PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE |\
PERF_OBJECT_TIMER | PERF_DELTA_COUNTER | PERF_DISPLAY_PERCENT)
// 64-bit Timer in 100 nsec units. Display delta divided by
// delta time. Display suffix: "%"
#define PERF_100NSEC_TIMER \
(PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE |\
PERF_TIMER_100NS | PERF_DELTA_COUNTER | PERF_DISPLAY_PERCENT)
// 64-bit Timer inverse (e.g., idle is measured, but display busy %)
// Display 100 - delta divided by delta time. Display suffix: "%"
#define PERF_100NSEC_TIMER_INV \
(PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE |\
PERF_TIMER_100NS | PERF_DELTA_COUNTER | PERF_INVERSE_COUNTER |\
PERF_DISPLAY_PERCENT)
// 64-bit Timer. Divide delta by delta time. Display suffix: "%"
// Timer for multiple instances, so result can exceed 100%.
#define PERF_COUNTER_MULTI_TIMER \
(PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE |\
PERF_DELTA_COUNTER | PERF_TIMER_TICK | PERF_MULTI_COUNTER |\
PERF_DISPLAY_PERCENT)
// 64-bit Timer inverse (e.g., idle is measured, but display busy %)
// Display 100 * _MULTI_BASE - delta divided by delta time.
// Display suffix: "%" Timer for multiple instances, so result
// can exceed 100%. Followed by a counter of type _MULTI_BASE.
#define PERF_COUNTER_MULTI_TIMER_INV \
(PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE |\
PERF_DELTA_COUNTER | PERF_MULTI_COUNTER | PERF_TIMER_TICK |\
PERF_INVERSE_COUNTER | PERF_DISPLAY_PERCENT)
// Number of instances to which the preceding _MULTI_..._INV counter
// applies. Used as a factor to get the percentage.
#define PERF_COUNTER_MULTI_BASE \
(PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_BASE |\
PERF_MULTI_COUNTER | PERF_DISPLAY_NOSHOW)
// 64-bit Timer in 100 nsec units. Display delta divided by delta time.
// Display suffix: "%" Timer for multiple instances, so result can exceed 100%.
#define PERF_100NSEC_MULTI_TIMER \
(PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_DELTA_COUNTER |\
PERF_COUNTER_RATE | PERF_TIMER_100NS | PERF_MULTI_COUNTER |\
PERF_DISPLAY_PERCENT)
// 64-bit Timer inverse (e.g., idle is measured, but display busy %)
// Display 100 * _MULTI_BASE - delta divided by delta time.
// Display suffix: "%" Timer for multiple instances, so result
// can exceed 100%. Followed by a counter of type _MULTI_BASE.
#define PERF_100NSEC_MULTI_TIMER_INV \
(PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_DELTA_COUNTER |\
PERF_COUNTER_RATE | PERF_TIMER_100NS | PERF_MULTI_COUNTER |\
PERF_INVERSE_COUNTER | PERF_DISPLAY_PERCENT)
// Indicates the data is a fraction of the following counter which
// should not be time averaged on display (such as free space over
// total space.) Display as is. Display the quotient as "%".
#define PERF_RAW_FRACTION \
(PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_FRACTION |\
PERF_DISPLAY_PERCENT)
#define PERF_LARGE_RAW_FRACTION \
(PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_FRACTION |\
PERF_DISPLAY_PERCENT)
// Indicates the data is a base for the preceding counter which should
// not be time averaged on display (such as free space over total space.)
#define PERF_RAW_BASE \
(PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_BASE |\
PERF_DISPLAY_NOSHOW |\
0x00000003) // for compatibility with pre-beta versions
#define PERF_LARGE_RAW_BASE \
(PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_BASE |\
PERF_DISPLAY_NOSHOW )
// The data collected in this counter is actually the start time of the
// item being measured. For display, this data is subtracted from the
// sample time to yield the elapsed time as the difference between the two.
// In the definition below, the PerfTime field of the Object contains
// the sample time as indicated by the PERF_OBJECT_TIMER bit and the
// difference is scaled by the PerfFreq of the Object to convert the time
// units into seconds.
#define PERF_ELAPSED_TIME \
(PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_ELAPSED |\
PERF_OBJECT_TIMER | PERF_DISPLAY_SECONDS)
//
// The following counter type can be used with the preceding types to
// define a range of values to be displayed in a histogram.
//
#define PERF_COUNTER_HISTOGRAM_TYPE 0x80000000
// Counter begins or ends a histogram
//
// This counter is used to display the difference from one sample
// to the next. The counter value is a constantly increasing number
// and the value displayed is the difference between the current
// value and the previous value. Negative numbers are not allowed
// which shouldn't be a problem as long as the counter value is
// increasing or unchanged.
//
#define PERF_COUNTER_DELTA \
(PERF_SIZE_DWORD | PERF_TYPE_COUNTER | PERF_COUNTER_VALUE |\
PERF_DELTA_COUNTER | PERF_DISPLAY_NO_SUFFIX)
#define PERF_COUNTER_LARGE_DELTA \
(PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_VALUE |\
PERF_DELTA_COUNTER | PERF_DISPLAY_NO_SUFFIX)
//
// The precision counters are timers that consist of two counter values:
// 1) the count of elapsed time of the event being monitored
// 2) the "clock" time in the same units
//
// the precition timers are used where the standard system timers are not
// precise enough for accurate readings. It's assumed that the service
// providing the data is also providing a timestamp at the same time which
// will eliminate any error that may occur since some small and variable
// time elapses between the time the system timestamp is captured and when
// the data is collected from the performance DLL. Only in extreme cases
// has this been observed to be problematic.
//
// when using this type of timer, the definition of the
// PERF_PRECISION_TIMESTAMP counter must immediately follow the
// definition of the PERF_PRECISION_*_TIMER in the Object header
//
// The timer used has the same frequency as the System Performance Timer
#define PERF_PRECISION_SYSTEM_TIMER \
(PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_PRECISION | \
PERF_TIMER_TICK | PERF_DELTA_COUNTER | PERF_DISPLAY_PERCENT )
//
// The timer used has the same frequency as the 100 NanoSecond Timer
#define PERF_PRECISION_100NS_TIMER \
(PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_PRECISION | \
PERF_TIMER_100NS | PERF_DELTA_COUNTER | PERF_DISPLAY_PERCENT )
//
// The timer used is of the frequency specified in the Object header's
// PerfFreq field (PerfTime is ignored)
#define PERF_PRECISION_OBJECT_TIMER \
(PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_PRECISION | \
PERF_OBJECT_TIMER | PERF_DELTA_COUNTER | PERF_DISPLAY_PERCENT )
//
// This is the timestamp to use in the computation of the timer specified
// in the previous description block
#define PERF_PRECISION_TIMESTAMP PERF_LARGE_RAW_BASE
//
// The following are used to determine the level of detail associated
// with the counter. The user will be setting the level of detail
// that should be displayed at any given time.
//
//
#define PERF_DETAIL_NOVICE 100 // The uninformed can understand it
#define PERF_DETAIL_ADVANCED 200 // For the advanced user
#define PERF_DETAIL_EXPERT 300 // For the expert user
#define PERF_DETAIL_WIZARD 400 // For the system designer
//
//
// There is one of the following for each of the
// PERF_OBJECT_TYPE.NumCounters. The Unicode names in this structure MUST
// come from a message file.
//
//
typedef struct _PERF_COUNTER_DEFINITION {
DWORD ByteLength; // Length in bytes of this structure
DWORD CounterNameTitleIndex;
// Index of Counter name into
// Title Database
#ifdef _WIN64
DWORD CounterNameTitle;
#else
LPWSTR CounterNameTitle; // Initially NULL, for use by
// analysis program to point to
// retrieved title string
#endif
DWORD CounterHelpTitleIndex;
// Index of Counter Help into
// Title Database
#ifdef _WIN64
DWORD CounterHelpTitle;
#else
LPWSTR CounterHelpTitle; // Initially NULL, for use by
// analysis program to point to
// retrieved title string
#endif
LONG DefaultScale; // Power of 10 by which to scale
// chart line if vertical axis is 100
// 0 ==> 1, 1 ==> 10, -1 ==>1/10, etc.
DWORD DetailLevel; // Counter level of detail (for
// controlling display complexity)
DWORD CounterType; // Type of counter
DWORD CounterSize; // Size of counter in bytes
DWORD CounterOffset; // Offset from the start of the
// PERF_COUNTER_BLOCK to the first
// byte of this counter
} PERF_COUNTER_DEFINITION, *PPERF_COUNTER_DEFINITION;
//
//
// If (PERF_DATA_BLOCK.NumInstances >= 0) then there will be
// PERF_DATA_BLOCK.NumInstances of a (PERF_INSTANCE_DEFINITION
// followed by a PERF_COUNTER_BLOCK followed by the counter data fields)
// for each instance.
//
// If (PERF_DATA_BLOCK.NumInstances < 0) then the counter definition
// strucutre above will be followed by only a PERF_COUNTER_BLOCK and the
// counter data for that COUNTER.
//
#define PERF_NO_UNIQUE_ID -1
typedef struct _PERF_INSTANCE_DEFINITION {
DWORD ByteLength; // Length in bytes of this structure,
// including the subsequent name
DWORD ParentObjectTitleIndex;
// Title Index to name of "parent"
// object (e.g., if thread, then
// process is parent object type);
// if logical drive, the physical
// drive is parent object type
DWORD ParentObjectInstance;
// Index to instance of parent object
// type which is the parent of this
// instance.
LONG UniqueID; // A unique ID used instead of
// matching the name to identify
// this instance, -1 = none
DWORD NameOffset; // Offset from beginning of
// this struct to the Unicode name
// of this instance
DWORD NameLength; // Length in bytes of name; 0 = none
// this length includes the characters
// in the string plus the size of the
// terminating NULL char. It does not
// include any additional pad bytes to
// correct structure alignment
} PERF_INSTANCE_DEFINITION, *PPERF_INSTANCE_DEFINITION;
//
// If .ParentObjectName is 0, there
// is no parent-child hierarchy for this object type. Otherwise,
// the .ParentObjectInstance is an index, starting at 0, into the
// instances reported for the parent object type. It is only
// meaningful if .ParentObjectName is not 0. The purpose of all this
// is to permit reporting/summation of object instances like threads
// within processes, and logical drives within physical drives.
//
//
// The PERF_INSTANCE_DEFINITION will be followed by a PERF_COUNTER_BLOCK.
//
typedef struct _PERF_COUNTER_BLOCK {
DWORD ByteLength; // Length in bytes of this structure,
// including the following counters
} PERF_COUNTER_BLOCK, *PPERF_COUNTER_BLOCK;
//
// The PERF_COUNTER_BLOCK is followed by PERF_OBJECT_TYPE.NumCounters
// number of counters.
//
//
// Support for New Extensible API starting with NT 5.0
//
#define PERF_QUERY_OBJECTS ((LONG)0x80000000)
#define PERF_QUERY_GLOBAL ((LONG)0x80000001)
#define PERF_QUERY_COSTLY ((LONG)0x80000002)
//
// function typedefs for extensible counter function prototypes
//
typedef DWORD (APIENTRY PM_OPEN_PROC) (LPWSTR);
typedef DWORD (APIENTRY PM_COLLECT_PROC) (LPWSTR, LPVOID *, LPDWORD, LPDWORD);
typedef DWORD (APIENTRY PM_CLOSE_PROC) (void);
typedef DWORD (APIENTRY PM_QUERY_PROC) (LPDWORD, LPVOID *, LPDWORD, LPDWORD);
#define MAX_PERF_OBJECTS_IN_QUERY_FUNCTION (64L)
//
// The following are the possible values for
// HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\EventLogLevel
// The default is WINPERF_LOG_NONE if the registry value is not defined.
// This should be adopted by all perfdlls to avoid flooding the application
// event log.
//
#define WINPERF_LOG_NONE 0 // No event reported
#define WINPERF_LOG_USER 1 // Report only errors
#define WINPERF_LOG_DEBUG 2 // Report debug errors as well
#define WINPERF_LOG_VERBOSE 3 // Report everything
#include <poppack.h>
#endif // _WINPERF_

1022
lib/MSPlatformSDK/Include/WinReg.h Executable file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,43 @@
/*++
Copyright (c) 1990-1999 Microsoft Corporation
Module Name:
winresrc.h
Abstract:
This module defines the 32-Bit Windows resource codes.
Revision History:
--*/
#ifndef _WINRESRC_
#define _WINRESRC_
#ifndef WINVER
#define WINVER 0x0500
#endif
#ifndef _WIN32_IE
#define _WIN32_IE 0x0501
#endif
#ifndef _WIN32_WINDOWS
#define _WIN32_WINDOWS 0x0410
#endif
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0500
#endif
#include <winuser.rh>
#include <commctrl.rh>
#include <dde.rh>
#include <winnt.rh>
#include <dlgs.h>
#include <winver.h>
#endif /* _WINRESRC_ */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,330 @@
/*++
Copyright (c) 1996 Microsoft Corporation
Module Name:
winsmcrd.h
Abstract:
Smart Card class/port IOCTL codes. This file is required for all code
user mode and kernel mode, using Smart Card IOCTL's, defines,
data structures
Revision History:
--*/
#ifndef _NTDDSCRD_H2_
#define _NTDDSCRD_H2_
#if defined (_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _WINSCARD_H_
typedef DWORD ULONG;
typedef WORD UWORD;
typedef BYTE UCHAR;
#else
typedef ULONG DWORD;
// typedef UWORD WORD;
typedef UCHAR BYTE;
#endif
#ifndef DEVICE_TYPE_SMARTCARD
#define FILE_DEVICE_SMARTCARD 0x00000031
#else
#if 0x00000031 != FILE_DEVICE_SMARTCARD
#error "Incorrect Smart Card Device Definition"
#endif
#endif
//
// Various constants
//
#define SCARD_ATR_LENGTH 33 // ISO 7816-3 spec.
//
///////////////////////////////////////////////////////////////////////////////
//
// Protocol Flag definitions
//
#define SCARD_PROTOCOL_UNDEFINED 0x00000000 // There is no active protocol.
#define SCARD_PROTOCOL_T0 0x00000001 // T=0 is the active protocol.
#define SCARD_PROTOCOL_T1 0x00000002 // T=1 is the active protocol.
#define SCARD_PROTOCOL_RAW 0x00010000 // Raw is the active protocol.
//
// This is the mask of ISO defined transmission protocols
//
#define SCARD_PROTOCOL_Tx (SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1)
//
// Use the default transmission parameters / card clock freq.
//
#define SCARD_PROTOCOL_DEFAULT 0x80000000
//
// Use optimal transmission parameters / card clock freq.
// Since using the optimal parameters is the default case no bit is defined to be 1
//
#define SCARD_PROTOCOL_OPTIMAL 0x00000000
//
// Ioctl parameters 1 for IOCTL_SMARTCARD_POWER
//
#define SCARD_POWER_DOWN 0 // Power down the card.
#define SCARD_COLD_RESET 1 // Cycle power and reset the card.
#define SCARD_WARM_RESET 2 // Force a reset on the card.
//
///////////////////////////////////////////////////////////////////////////////
//
// Reader Action IOCTLs
//
#define SCARD_CTL_CODE(code) CTL_CODE(FILE_DEVICE_SMARTCARD, \
(code), \
METHOD_BUFFERED, \
FILE_ANY_ACCESS)
#define IOCTL_SMARTCARD_POWER SCARD_CTL_CODE( 1)
#define IOCTL_SMARTCARD_GET_ATTRIBUTE SCARD_CTL_CODE( 2)
#define IOCTL_SMARTCARD_SET_ATTRIBUTE SCARD_CTL_CODE( 3)
#define IOCTL_SMARTCARD_CONFISCATE SCARD_CTL_CODE( 4)
#define IOCTL_SMARTCARD_TRANSMIT SCARD_CTL_CODE( 5)
#define IOCTL_SMARTCARD_EJECT SCARD_CTL_CODE( 6)
#define IOCTL_SMARTCARD_SWALLOW SCARD_CTL_CODE( 7)
// #define IOCTL_SMARTCARD_READ SCARD_CTL_CODE( 8) obsolete
// #define IOCTL_SMARTCARD_WRITE SCARD_CTL_CODE( 9) obsolete
#define IOCTL_SMARTCARD_IS_PRESENT SCARD_CTL_CODE(10)
#define IOCTL_SMARTCARD_IS_ABSENT SCARD_CTL_CODE(11)
#define IOCTL_SMARTCARD_SET_PROTOCOL SCARD_CTL_CODE(12)
#define IOCTL_SMARTCARD_GET_STATE SCARD_CTL_CODE(14)
#define IOCTL_SMARTCARD_GET_LAST_ERROR SCARD_CTL_CODE(15)
#define IOCTL_SMARTCARD_GET_PERF_CNTR SCARD_CTL_CODE(16)
//
///////////////////////////////////////////////////////////////////////////////
//
// Tags for requesting card and reader attributes
//
#define MAXIMUM_ATTR_STRING_LENGTH 32 // Nothing bigger than this from getAttr
#define MAXIMUM_SMARTCARD_READERS 10 // Limit the readers on the system
#define SCARD_ATTR_VALUE(Class, Tag) ((((ULONG)(Class)) << 16) | ((ULONG)(Tag)))
#define SCARD_CLASS_VENDOR_INFO 1 // Vendor information definitions
#define SCARD_CLASS_COMMUNICATIONS 2 // Communication definitions
#define SCARD_CLASS_PROTOCOL 3 // Protocol definitions
#define SCARD_CLASS_POWER_MGMT 4 // Power Management definitions
#define SCARD_CLASS_SECURITY 5 // Security Assurance definitions
#define SCARD_CLASS_MECHANICAL 6 // Mechanical characteristic definitions
#define SCARD_CLASS_VENDOR_DEFINED 7 // Vendor specific definitions
#define SCARD_CLASS_IFD_PROTOCOL 8 // Interface Device Protocol options
#define SCARD_CLASS_ICC_STATE 9 // ICC State specific definitions
#define SCARD_CLASS_PERF 0x7ffe // performace counters
#define SCARD_CLASS_SYSTEM 0x7fff // System-specific definitions
#define SCARD_ATTR_VENDOR_NAME SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_INFO, 0x0100)
#define SCARD_ATTR_VENDOR_IFD_TYPE SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_INFO, 0x0101)
#define SCARD_ATTR_VENDOR_IFD_VERSION SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_INFO, 0x0102)
#define SCARD_ATTR_VENDOR_IFD_SERIAL_NO SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_INFO, 0x0103)
#define SCARD_ATTR_CHANNEL_ID SCARD_ATTR_VALUE(SCARD_CLASS_COMMUNICATIONS, 0x0110)
#define SCARD_ATTR_PROTOCOL_TYPES SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0120)
// #define SCARD_ATTR_ASYNC_PROTOCOL_TYPES SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0120)
#define SCARD_ATTR_DEFAULT_CLK SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0121)
#define SCARD_ATTR_MAX_CLK SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0122)
#define SCARD_ATTR_DEFAULT_DATA_RATE SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0123)
#define SCARD_ATTR_MAX_DATA_RATE SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0124)
#define SCARD_ATTR_MAX_IFSD SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0125)
// #define SCARD_ATTR_SYNC_PROTOCOL_TYPES SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0126)
#define SCARD_ATTR_POWER_MGMT_SUPPORT SCARD_ATTR_VALUE(SCARD_CLASS_POWER_MGMT, 0x0131)
#define SCARD_ATTR_USER_TO_CARD_AUTH_DEVICE SCARD_ATTR_VALUE(SCARD_CLASS_SECURITY, 0x0140)
#define SCARD_ATTR_USER_AUTH_INPUT_DEVICE SCARD_ATTR_VALUE(SCARD_CLASS_SECURITY, 0x0142)
#define SCARD_ATTR_CHARACTERISTICS SCARD_ATTR_VALUE(SCARD_CLASS_MECHANICAL, 0x0150)
#define SCARD_ATTR_CURRENT_PROTOCOL_TYPE SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0201)
#define SCARD_ATTR_CURRENT_CLK SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0202)
#define SCARD_ATTR_CURRENT_F SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0203)
#define SCARD_ATTR_CURRENT_D SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0204)
#define SCARD_ATTR_CURRENT_N SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0205)
#define SCARD_ATTR_CURRENT_W SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0206)
#define SCARD_ATTR_CURRENT_IFSC SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0207)
#define SCARD_ATTR_CURRENT_IFSD SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0208)
#define SCARD_ATTR_CURRENT_BWT SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0209)
#define SCARD_ATTR_CURRENT_CWT SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x020a)
#define SCARD_ATTR_CURRENT_EBC_ENCODING SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x020b)
#define SCARD_ATTR_EXTENDED_BWT SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x020c)
#define SCARD_ATTR_ICC_PRESENCE SCARD_ATTR_VALUE(SCARD_CLASS_ICC_STATE, 0x0300)
#define SCARD_ATTR_ICC_INTERFACE_STATUS SCARD_ATTR_VALUE(SCARD_CLASS_ICC_STATE, 0x0301)
#define SCARD_ATTR_CURRENT_IO_STATE SCARD_ATTR_VALUE(SCARD_CLASS_ICC_STATE, 0x0302)
#define SCARD_ATTR_ATR_STRING SCARD_ATTR_VALUE(SCARD_CLASS_ICC_STATE, 0x0303)
#define SCARD_ATTR_ICC_TYPE_PER_ATR SCARD_ATTR_VALUE(SCARD_CLASS_ICC_STATE, 0x0304)
#define SCARD_ATTR_ESC_RESET SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_DEFINED, 0xA000)
#define SCARD_ATTR_ESC_CANCEL SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_DEFINED, 0xA003)
#define SCARD_ATTR_ESC_AUTHREQUEST SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_DEFINED, 0xA005)
#define SCARD_ATTR_MAXINPUT SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_DEFINED, 0xA007)
#define SCARD_ATTR_DEVICE_UNIT SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0001)
#define SCARD_ATTR_DEVICE_IN_USE SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0002)
#define SCARD_ATTR_DEVICE_FRIENDLY_NAME_A SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0003)
#define SCARD_ATTR_DEVICE_SYSTEM_NAME_A SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0004)
#define SCARD_ATTR_DEVICE_FRIENDLY_NAME_W SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0005)
#define SCARD_ATTR_DEVICE_SYSTEM_NAME_W SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0006)
#define SCARD_ATTR_SUPRESS_T1_IFS_REQUEST SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0007)
#define SCARD_PERF_NUM_TRANSMISSIONS SCARD_ATTR_VALUE(SCARD_CLASS_PERF, 0x0001)
#define SCARD_PERF_BYTES_TRANSMITTED SCARD_ATTR_VALUE(SCARD_CLASS_PERF, 0x0002)
#define SCARD_PERF_TRANSMISSION_TIME SCARD_ATTR_VALUE(SCARD_CLASS_PERF, 0x0003)
#ifdef UNICODE
#define SCARD_ATTR_DEVICE_FRIENDLY_NAME SCARD_ATTR_DEVICE_FRIENDLY_NAME_W
#define SCARD_ATTR_DEVICE_SYSTEM_NAME SCARD_ATTR_DEVICE_SYSTEM_NAME_W
#else
#define SCARD_ATTR_DEVICE_FRIENDLY_NAME SCARD_ATTR_DEVICE_FRIENDLY_NAME_A
#define SCARD_ATTR_DEVICE_SYSTEM_NAME SCARD_ATTR_DEVICE_SYSTEM_NAME_A
#endif
//
// T=0 Protocol Defines
//
#define SCARD_T0_HEADER_LENGTH 7
#define SCARD_T0_CMD_LENGTH 5
//
// T=1 Protocol Defines
//
#define SCARD_T1_PROLOGUE_LENGTH 3
#define SCARD_T1_EPILOGUE_LENGTH 2
#define SCARD_T1_MAX_IFS 254
//
///////////////////////////////////////////////////////////////////////////////
//
// Reader states
//
#define SCARD_UNKNOWN 0 // This value implies the driver is unaware
// of the current state of the reader.
#define SCARD_ABSENT 1 // This value implies there is no card in
// the reader.
#define SCARD_PRESENT 2 // This value implies there is a card is
// present in the reader, but that it has
// not been moved into position for use.
#define SCARD_SWALLOWED 3 // This value implies there is a card in the
// reader in position for use. The card is
// not powered.
#define SCARD_POWERED 4 // This value implies there is power is
// being provided to the card, but the
// Reader Driver is unaware of the mode of
// the card.
#define SCARD_NEGOTIABLE 5 // This value implies the card has been
// reset and is awaiting PTS negotiation.
#define SCARD_SPECIFIC 6 // This value implies the card has been
// reset and specific communication
// protocols have been established.
////////////////////////////////////////////////////////////////////////////////
//
// I/O Services
//
// The following services provide access to the I/O capabilities of the
// reader drivers. Services of the Smart Card are requested by placing the
// following structure into the protocol buffer:
//
typedef struct _SCARD_IO_REQUEST{
DWORD dwProtocol; // Protocol identifier
DWORD cbPciLength; // Protocol Control Information Length
} SCARD_IO_REQUEST, *PSCARD_IO_REQUEST, *LPSCARD_IO_REQUEST;
typedef const SCARD_IO_REQUEST *LPCSCARD_IO_REQUEST;
//
// T=0 protocol services.
//
typedef struct {
BYTE
bCla, // The instruction class
bIns, // The instruction code within the instruction class
bP1,
bP2, // Parameters to the instruction
bP3; // Size of I/O Transfer
} SCARD_T0_COMMAND, *LPSCARD_T0_COMMAND;
typedef struct {
SCARD_IO_REQUEST ioRequest;
BYTE
bSw1,
bSw2; // Return codes from the instruction
union
{
SCARD_T0_COMMAND CmdBytes;
BYTE rgbHeader[5];
};
} SCARD_T0_REQUEST;
typedef SCARD_T0_REQUEST *PSCARD_T0_REQUEST, *LPSCARD_T0_REQUEST;
//
// T=1 Protocol Services
//
typedef struct {
SCARD_IO_REQUEST ioRequest;
} SCARD_T1_REQUEST;
typedef SCARD_T1_REQUEST *PSCARD_T1_REQUEST, *LPSCARD_T1_REQUEST;
//
////////////////////////////////////////////////////////////////////////////////
//
// Driver attribute flags
//
#define SCARD_READER_SWALLOWS 0x00000001 // Reader has a card swallowing
// mechanism.
#define SCARD_READER_EJECTS 0x00000002 // Reader has a card ejection
// mechanism.
#define SCARD_READER_CONFISCATES 0x00000004 // Reader has a card capture
// mechanism.
//
///////////////////////////////////////////////////////////////////////////////
//
// Type of reader
//
#define SCARD_READER_TYPE_SERIAL 0x01
#define SCARD_READER_TYPE_PARALELL 0x02
#define SCARD_READER_TYPE_KEYBOARD 0x04
#define SCARD_READER_TYPE_SCSI 0x08
#define SCARD_READER_TYPE_IDE 0x10
#define SCARD_READER_TYPE_USB 0x20
#define SCARD_READER_TYPE_PCMCIA 0x40
#define SCARD_READER_TYPE_VENDOR 0xF0
#ifdef __cplusplus
}
#endif
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1059
lib/MSPlatformSDK/Include/WinSvc.h Executable file

File diff suppressed because it is too large Load Diff

12128
lib/MSPlatformSDK/Include/WinUser.h Executable 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,304 @@
/*****************************************************************************\
* *
* winver.h - Version management functions, types, and definitions *
* *
* Include file for VER.DLL. This library is *
* designed to allow version stamping of Windows executable files*
* and of special .VER files for DOS executable files. *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
\*****************************************************************************/
#ifndef VER_H
#define VER_H
#ifdef __cplusplus
extern "C" {
#endif
/* ----- Symbols ----- */
#define VS_FILE_INFO RT_VERSION
#define VS_VERSION_INFO 1
#define VS_USER_DEFINED 100
/* ----- VS_VERSION.dwFileFlags ----- */
#ifndef _MAC
#define VS_FFI_SIGNATURE 0xFEEF04BDL
#else
#define VS_FFI_SIGNATURE 0xBD04EFFEL
#endif
#define VS_FFI_STRUCVERSION 0x00010000L
#define VS_FFI_FILEFLAGSMASK 0x0000003FL
/* ----- VS_VERSION.dwFileFlags ----- */
#define VS_FF_DEBUG 0x00000001L
#define VS_FF_PRERELEASE 0x00000002L
#define VS_FF_PATCHED 0x00000004L
#define VS_FF_PRIVATEBUILD 0x00000008L
#define VS_FF_INFOINFERRED 0x00000010L
#define VS_FF_SPECIALBUILD 0x00000020L
/* ----- VS_VERSION.dwFileOS ----- */
#define VOS_UNKNOWN 0x00000000L
#define VOS_DOS 0x00010000L
#define VOS_OS216 0x00020000L
#define VOS_OS232 0x00030000L
#define VOS_NT 0x00040000L
#define VOS_WINCE 0x00050000L
#define VOS__BASE 0x00000000L
#define VOS__WINDOWS16 0x00000001L
#define VOS__PM16 0x00000002L
#define VOS__PM32 0x00000003L
#define VOS__WINDOWS32 0x00000004L
#define VOS_DOS_WINDOWS16 0x00010001L
#define VOS_DOS_WINDOWS32 0x00010004L
#define VOS_OS216_PM16 0x00020002L
#define VOS_OS232_PM32 0x00030003L
#define VOS_NT_WINDOWS32 0x00040004L
/* ----- VS_VERSION.dwFileType ----- */
#define VFT_UNKNOWN 0x00000000L
#define VFT_APP 0x00000001L
#define VFT_DLL 0x00000002L
#define VFT_DRV 0x00000003L
#define VFT_FONT 0x00000004L
#define VFT_VXD 0x00000005L
#define VFT_STATIC_LIB 0x00000007L
/* ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_DRV ----- */
#define VFT2_UNKNOWN 0x00000000L
#define VFT2_DRV_PRINTER 0x00000001L
#define VFT2_DRV_KEYBOARD 0x00000002L
#define VFT2_DRV_LANGUAGE 0x00000003L
#define VFT2_DRV_DISPLAY 0x00000004L
#define VFT2_DRV_MOUSE 0x00000005L
#define VFT2_DRV_NETWORK 0x00000006L
#define VFT2_DRV_SYSTEM 0x00000007L
#define VFT2_DRV_INSTALLABLE 0x00000008L
#define VFT2_DRV_SOUND 0x00000009L
#define VFT2_DRV_COMM 0x0000000AL
#define VFT2_DRV_INPUTMETHOD 0x0000000BL
#define VFT2_DRV_VERSIONED_PRINTER 0x0000000CL
/* ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_FONT ----- */
#define VFT2_FONT_RASTER 0x00000001L
#define VFT2_FONT_VECTOR 0x00000002L
#define VFT2_FONT_TRUETYPE 0x00000003L
/* ----- VerFindFile() flags ----- */
#define VFFF_ISSHAREDFILE 0x0001
#define VFF_CURNEDEST 0x0001
#define VFF_FILEINUSE 0x0002
#define VFF_BUFFTOOSMALL 0x0004
/* ----- VerInstallFile() flags ----- */
#define VIFF_FORCEINSTALL 0x0001
#define VIFF_DONTDELETEOLD 0x0002
#define VIF_TEMPFILE 0x00000001L
#define VIF_MISMATCH 0x00000002L
#define VIF_SRCOLD 0x00000004L
#define VIF_DIFFLANG 0x00000008L
#define VIF_DIFFCODEPG 0x00000010L
#define VIF_DIFFTYPE 0x00000020L
#define VIF_WRITEPROT 0x00000040L
#define VIF_FILEINUSE 0x00000080L
#define VIF_OUTOFSPACE 0x00000100L
#define VIF_ACCESSVIOLATION 0x00000200L
#define VIF_SHARINGVIOLATION 0x00000400L
#define VIF_CANNOTCREATE 0x00000800L
#define VIF_CANNOTDELETE 0x00001000L
#define VIF_CANNOTRENAME 0x00002000L
#define VIF_CANNOTDELETECUR 0x00004000L
#define VIF_OUTOFMEMORY 0x00008000L
#define VIF_CANNOTREADSRC 0x00010000L
#define VIF_CANNOTREADDST 0x00020000L
#define VIF_BUFFTOOSMALL 0x00040000L
#define VIF_CANNOTLOADLZ32 0x00080000L
#define VIF_CANNOTLOADCABINET 0x00100000L
#ifndef RC_INVOKED /* RC doesn't need to see the rest of this */
/* ----- Types and structures ----- */
typedef struct tagVS_FIXEDFILEINFO
{
DWORD dwSignature; /* e.g. 0xfeef04bd */
DWORD dwStrucVersion; /* e.g. 0x00000042 = "0.42" */
DWORD dwFileVersionMS; /* e.g. 0x00030075 = "3.75" */
DWORD dwFileVersionLS; /* e.g. 0x00000031 = "0.31" */
DWORD dwProductVersionMS; /* e.g. 0x00030010 = "3.10" */
DWORD dwProductVersionLS; /* e.g. 0x00000031 = "0.31" */
DWORD dwFileFlagsMask; /* = 0x3F for version "0.42" */
DWORD dwFileFlags; /* e.g. VFF_DEBUG | VFF_PRERELEASE */
DWORD dwFileOS; /* e.g. VOS_DOS_WINDOWS16 */
DWORD dwFileType; /* e.g. VFT_DRIVER */
DWORD dwFileSubtype; /* e.g. VFT2_DRV_KEYBOARD */
DWORD dwFileDateMS; /* e.g. 0 */
DWORD dwFileDateLS; /* e.g. 0 */
} VS_FIXEDFILEINFO;
/* ----- Function prototypes ----- */
DWORD
APIENTRY
VerFindFileA(
DWORD uFlags,
LPSTR szFileName,
LPSTR szWinDir,
LPSTR szAppDir,
LPSTR szCurDir,
PUINT lpuCurDirLen,
LPSTR szDestDir,
PUINT lpuDestDirLen
);
DWORD
APIENTRY
VerFindFileW(
DWORD uFlags,
LPWSTR szFileName,
LPWSTR szWinDir,
LPWSTR szAppDir,
LPWSTR szCurDir,
PUINT lpuCurDirLen,
LPWSTR szDestDir,
PUINT lpuDestDirLen
);
#ifdef UNICODE
#define VerFindFile VerFindFileW
#else
#define VerFindFile VerFindFileA
#endif // !UNICODE
DWORD
APIENTRY
VerInstallFileA(
DWORD uFlags,
LPSTR szSrcFileName,
LPSTR szDestFileName,
LPSTR szSrcDir,
LPSTR szDestDir,
LPSTR szCurDir,
LPSTR szTmpFile,
PUINT lpuTmpFileLen
);
DWORD
APIENTRY
VerInstallFileW(
DWORD uFlags,
LPWSTR szSrcFileName,
LPWSTR szDestFileName,
LPWSTR szSrcDir,
LPWSTR szDestDir,
LPWSTR szCurDir,
LPWSTR szTmpFile,
PUINT lpuTmpFileLen
);
#ifdef UNICODE
#define VerInstallFile VerInstallFileW
#else
#define VerInstallFile VerInstallFileA
#endif // !UNICODE
/* Returns size of version info in bytes */
DWORD
APIENTRY
GetFileVersionInfoSizeA(
__in LPCSTR lptstrFilename, /* Filename of version stamped file */
__out_opt LPDWORD lpdwHandle
); /* Information for use by GetFileVersionInfo */
/* Returns size of version info in bytes */
DWORD
APIENTRY
GetFileVersionInfoSizeW(
__in LPCWSTR lptstrFilename, /* Filename of version stamped file */
__out_opt LPDWORD lpdwHandle
); /* Information for use by GetFileVersionInfo */
#ifdef UNICODE
#define GetFileVersionInfoSize GetFileVersionInfoSizeW
#else
#define GetFileVersionInfoSize GetFileVersionInfoSizeA
#endif // !UNICODE
/* Read version info into buffer */
BOOL
APIENTRY
GetFileVersionInfoA(
__in LPCSTR lptstrFilename, /* Filename of version stamped file */
__in DWORD dwHandle, /* Information from GetFileVersionSize */
__in DWORD dwLen, /* Length of buffer for info */
__out_bcount(dwLen) LPVOID lpData
); /* Buffer to place the data structure */
/* Read version info into buffer */
BOOL
APIENTRY
GetFileVersionInfoW(
__in LPCWSTR lptstrFilename, /* Filename of version stamped file */
__in DWORD dwHandle, /* Information from GetFileVersionSize */
__in DWORD dwLen, /* Length of buffer for info */
__out_bcount(dwLen) LPVOID lpData
); /* Buffer to place the data structure */
#ifdef UNICODE
#define GetFileVersionInfo GetFileVersionInfoW
#else
#define GetFileVersionInfo GetFileVersionInfoA
#endif // !UNICODE
DWORD
APIENTRY
VerLanguageNameA(
DWORD wLang,
LPSTR szLang,
DWORD nSize
);
DWORD
APIENTRY
VerLanguageNameW(
DWORD wLang,
LPWSTR szLang,
DWORD nSize
);
#ifdef UNICODE
#define VerLanguageName VerLanguageNameW
#else
#define VerLanguageName VerLanguageNameA
#endif // !UNICODE
BOOL
APIENTRY
VerQueryValueA(
const LPVOID pBlock,
LPSTR lpSubBlock,
LPVOID * lplpBuffer,
PUINT puLen
);
BOOL
APIENTRY
VerQueryValueW(
const LPVOID pBlock,
LPWSTR lpSubBlock,
LPVOID * lplpBuffer,
PUINT puLen
);
#ifdef UNICODE
#define VerQueryValue VerQueryValueW
#else
#define VerQueryValue VerQueryValueA
#endif // !UNICODE
#endif /* !RC_INVOKED */
#ifdef __cplusplus
}
#endif
#endif /* !VER_H */

View File

@ -0,0 +1,258 @@
/*++ BUILD Version: 0001 Increment this if a change has global effects
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
windows.h
Abstract:
Master include file for Windows applications.
--*/
#ifndef _WINDOWS_
#define _WINDOWS_
#ifndef WINVER
#define WINVER 0x0501
#else
#if defined(_WIN32_WINNT) && (WINVER < 0x0400) && (_WIN32_WINNT > 0x0400)
#error WINVER setting conflicts with _WIN32_WINNT setting
#endif
#endif
#ifndef _INC_WINDOWS
#define _INC_WINDOWS
#if defined (_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* If defined, the following flags inhibit definition
* of the indicated items.
*
* NOGDICAPMASKS - CC_*, LC_*, PC_*, CP_*, TC_*, RC_
* NOVIRTUALKEYCODES - VK_*
* NOWINMESSAGES - WM_*, EM_*, LB_*, CB_*
* NOWINSTYLES - WS_*, CS_*, ES_*, LBS_*, SBS_*, CBS_*
* NOSYSMETRICS - SM_*
* NOMENUS - MF_*
* NOICONS - IDI_*
* NOKEYSTATES - MK_*
* NOSYSCOMMANDS - SC_*
* NORASTEROPS - Binary and Tertiary raster ops
* NOSHOWWINDOW - SW_*
* OEMRESOURCE - OEM Resource values
* NOATOM - Atom Manager routines
* NOCLIPBOARD - Clipboard routines
* NOCOLOR - Screen colors
* NOCTLMGR - Control and Dialog routines
* NODRAWTEXT - DrawText() and DT_*
* NOGDI - All GDI defines and routines
* NOKERNEL - All KERNEL defines and routines
* NOUSER - All USER defines and routines
* NONLS - All NLS defines and routines
* NOMB - MB_* and MessageBox()
* NOMEMMGR - GMEM_*, LMEM_*, GHND, LHND, associated routines
* NOMETAFILE - typedef METAFILEPICT
* NOMINMAX - Macros min(a,b) and max(a,b)
* NOMSG - typedef MSG and associated routines
* NOOPENFILE - OpenFile(), OemToAnsi, AnsiToOem, and OF_*
* NOSCROLL - SB_* and scrolling routines
* NOSERVICE - All Service Controller routines, SERVICE_ equates, etc.
* NOSOUND - Sound driver routines
* NOTEXTMETRIC - typedef TEXTMETRIC and associated routines
* NOWH - SetWindowsHook and WH_*
* NOWINOFFSETS - GWL_*, GCL_*, associated routines
* NOCOMM - COMM driver routines
* NOKANJI - Kanji support stuff.
* NOHELP - Help engine interface.
* NOPROFILER - Profiler interface.
* NODEFERWINDOWPOS - DeferWindowPos routines
* NOMCX - Modem Configuration Extensions
*/
#if defined(RC_INVOKED) && !defined(NOWINRES)
#include <winresrc.h>
#else
#if defined(RC_INVOKED)
/* Turn off a bunch of stuff to ensure that RC files compile OK. */
#define NOATOM
#define NOGDI
#define NOGDICAPMASKS
#define NOMETAFILE
#define NOMINMAX
#define NOMSG
#define NOOPENFILE
#define NORASTEROPS
#define NOSCROLL
#define NOSOUND
#define NOSYSMETRICS
#define NOTEXTMETRIC
#define NOWH
#define NOCOMM
#define NOKANJI
#define NOCRYPT
#define NOMCX
#endif
#if !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_IA64_) && !defined(_AMD64_) && defined(_M_IX86)
#define _X86_
#endif
#if !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_IA64_) && !defined(_AMD64_) && defined(_M_AMD64)
#define _AMD64_
#endif
#if !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_IA64_) && !defined(_AMD64_) && defined(_M_M68K)
#define _68K_
#endif
#if !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_IA64_) && !defined(_AMD64_) && defined(_M_MPPC)
#define _MPPC_
#endif
#if !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_M_IX86) && !defined(_AMD64_) && defined(_M_IA64)
#if !defined(_IA64_)
#define _IA64_
#endif // !_IA64_
#endif
#ifndef _MAC
#if defined(_68K_) || defined(_MPPC_)
#define _MAC
#endif
#endif
#if defined (_MSC_VER)
#if ( _MSC_VER >= 800 )
#ifndef __cplusplus
#pragma warning(disable:4116) // TYPE_ALIGNMENT generates this - move it
// outside the warning push/pop scope.
#endif
#endif
#endif
#ifndef RC_INVOKED
#if ( _MSC_VER >= 800 )
#pragma warning(disable:4514)
#ifndef __WINDOWS_DONT_DISABLE_PRAGMA_PACK_WARNING__
#pragma warning(disable:4103)
#endif
#if _MSC_VER >= 1200
#pragma warning(push)
#endif
#pragma warning(disable:4001)
#pragma warning(disable:4201)
#pragma warning(disable:4214)
#endif
#include <excpt.h>
#include <stdarg.h>
#endif /* RC_INVOKED */
#include <windef.h>
#include <winbase.h>
#include <wingdi.h>
#include <winuser.h>
#if !defined(_MAC) || defined(_WIN32NLS)
#include <winnls.h>
#endif
#ifndef _MAC
#include <wincon.h>
#include <winver.h>
#endif
#if !defined(_MAC) || defined(_WIN32REG)
#include <winreg.h>
#endif
#ifndef _MAC
#include <winnetwk.h>
#endif
#ifndef WIN32_LEAN_AND_MEAN
#include <cderr.h>
#include <dde.h>
#include <ddeml.h>
#include <dlgs.h>
#ifndef _MAC
#include <lzexpand.h>
#include <mmsystem.h>
#include <nb30.h>
#include <rpc.h>
#endif
#include <shellapi.h>
#ifndef _MAC
#include <winperf.h>
#include <winsock.h>
#endif
#ifndef NOCRYPT
#include <wincrypt.h>
#include <winefs.h>
#include <winscard.h>
#endif
#ifndef NOGDI
#ifndef _MAC
#include <winspool.h>
#ifdef INC_OLE1
#include <ole.h>
#else
#include <ole2.h>
#endif /* !INC_OLE1 */
#endif /* !MAC */
#include <commdlg.h>
#endif /* !NOGDI */
#endif /* WIN32_LEAN_AND_MEAN */
#include <stralign.h>
#ifdef _MAC
#include <winwlm.h>
#endif
#ifdef INC_OLE2
#include <ole2.h>
#endif /* INC_OLE2 */
#ifndef _MAC
#ifndef NOSERVICE
#include <winsvc.h>
#endif
#if(WINVER >= 0x0400)
#ifndef NOMCX
#include <mcx.h>
#endif /* NOMCX */
#ifndef NOIME
#include <imm.h>
#endif
#endif /* WINVER >= 0x0400 */
#endif
#ifndef RC_INVOKED
#if ( _MSC_VER >= 800 )
#if _MSC_VER >= 1200
#pragma warning(pop)
#else
#pragma warning(default:4001)
#pragma warning(default:4201)
#pragma warning(default:4214)
/* Leave 4514 disabled. It's an unneeded warning anyway. */
#endif
#endif
#endif /* RC_INVOKED */
#endif /* RC_INVOKED */
#endif /* _INC_WINDOWS */
#endif /* _WINDOWS_ */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,658 @@
/***************************************************************\
* *
* SpecStrings.h - markers for documenting the semantics of APIs *
* *
* Version 1.0 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
\***************************************************************/
// @@BEGIN_DDKSPLIT
// -------------------------------------------------------------------------------
// Introduction
//
// SpecStrings.h provides a set of annotations to describe how a function uses its
// parameters - the assumptions it makes about them, and the guarantees it makes
// upon finishing.
//
// Annotations may be placed before either a function parameter's type or its return
// type, and describe the function's behavior regarding the parameter or return value.
// There are two classes of annotations: buffer annotations and advanced annotations.
// Buffer annotations describe how functions use their pointer parameters, and
// advanced annotations either describe complex/unusual buffer behavior, or provide
// additional information about a parameter that is not otherwise expressible.
//
// -------------------------------------------------------------------------------
// Buffer Annotations
//
// The most important annotations in SpecStrings.h provide a consistent way to annotate
// buffer parameters or return values for a function. Each of these annotations describes
// a single buffer (which could be a string, a fixed-length or variable-length array,
// or just a pointer) that the function interacts with: where it is, how large it is,
// how much is initialized, and what the function does with it.
//
// The appropriate macro for a given buffer can be constructed using the table below.
// Just pick the appropriate values from each category, and combine them together
// with a leading underscore. Some combinations of values do not make sense as buffer
// annotations. Only meaningful annotations can be added to your code; for a list of
// these, see the buffer annotation definitions section.
//
// Only a single buffer annotation should be used for each parameter.
//
// |------------|------------|---------|--------|----------|---------------|
// | Level | Usage | Size | Output | Optional | Parameters |
// |------------|------------|---------|--------|----------|---------------|
// | <> | <> | <> | <> | <> | <> |
// | _deref | _in | _ecount | _full | _opt | (size) |
// | _deref_opt | _out | _bcount | _part | | (size,length) |
// | | _inout | | | | |
// | | | | | | |
// |------------|------------|---------|--------|----------|---------------|
//
// Level: Describes the buffer pointer's level of indirection from the parameter or
// return value 'p'.
//
// <> : p is the buffer pointer.
// _deref : *p is the buffer pointer. p must not be NULL.
// _deref_opt : *p may be the buffer pointer. p may be NULL, in which case the rest of
// the annotation is ignored.
//
// Usage: Describes how the function uses the buffer.
//
// <> : The buffer is not accessed. If used on the return value or with _deref, the
// function will provide the buffer, and it will be uninitialized at exit.
// Otherwise, the caller must provide the buffer. This should only be used
// for alloc and free functions.
// _in : The function will only read from the buffer. The caller must provide the
// buffer and initialize it.
// _out : The function will only write to the buffer. If used on the return value or
// with _deref, the function will provide the buffer and initialize it.
// Otherwise, the caller must provide the buffer, and the function will
// initialize it.
// _inout : The function may freely read from and write to the buffer. The caller must
// provide the buffer and initialize it. If used with _deref, the buffer may
// be reallocated by the function.
//
// Size: Describes the total size of the buffer. This may be less than the space actually
// allocated for the buffer, in which case it describes the accessible amount.
//
// <> : No buffer size is given. If the type specifies the buffer size (such as
// with LPSTR and LPWSTR), that amount is used. Otherwise, the buffer is one
// element long. Must be used with _in, _out, or _inout.
// _ecount : The buffer size is an explicit element count.
// _bcount : The buffer size is an explicit byte count.
//
// Output: Describes how much of the buffer will be initialized by the function. For
// _inout buffers, this also describes how much is initialized at entry. Omit this
// category for _in buffers; they must be fully initialized by the caller.
//
// <> : The type specifies how much is initialized. For instance, a function initializing
// an LPWSTR must NULL-terminate the string.
// _full : The function initializes the entire buffer.
// _part : The function initializes part of the buffer, and explicitly indicates how much.
//
// Optional: Describes if the buffer itself is optional.
//
// <> : The pointer to the buffer must not be NULL.
// _opt : The pointer to the buffer might be NULL. It will be checked before being dereferenced.
//
// Parameters: Gives explicit counts for the size and length of the buffer.
//
// <> : There is no explicit count. Use when neither _ecount nor _bcount is used.
// (size) : Only the buffer's total size is given. Use with _ecount or _bcount but not _part.
// (size,length) : The buffer's total size and initialized length are given. Use with _ecount_part
// and _bcount_part.
//
// -------------------------------------------------------------------------------
// Buffer Annotation Examples
//
// LWSTDAPI_(BOOL) StrToIntExA(
// LPCSTR pszString, // No annotation required, const implies __in.
// DWORD dwFlags,
// __out int *piRet // A pointer whose dereference will be filled in.
// );
//
// void MyPaintingFunction(
// __in HWND hwndControl, // An initialized read-only parameter.
// __in_opt HDC hdcOptional, // An initialized read-only parameter that might be NULL.
// __inout IPropertyStore *ppsStore // An initialized parameter that may be freely used
// // and modified.
// );
//
// LWSTDAPI_(BOOL) PathCompactPathExA(
// __out_ecount(cchMax) LPSTR pszOut, // A string buffer with cch elements that will
// // be NULL terminated on exit.
// LPCSTR pszSrc, // No annotation required, const implies __in.
// UINT cchMax,
// DWORD dwFlags
// );
//
// HRESULT SHLocalAllocBytes(
// size_t cb,
// __deref_bcount(cb) T **ppv // A pointer whose dereference will be set to an
// // uninitialized buffer with cb bytes.
// );
//
// __inout_bcount_full(cb) : A buffer with cb elements that is fully initialized at
// entry and exit, and may be written to by this function.
//
// __out_ecount_part(count, *countOut) : A buffer with count elements that will be
// partially initialized by this function. The function indicates how much it
// initialized by setting *countOut.
//
// -------------------------------------------------------------------------------
// Advanced Annotations
//
// Advanced annotations describe behavior that is not expressible with the regular
// buffer macros. These may be used either to annotate buffer parameters that involve
// complex or conditional behavior, or to enrich existing annotations with additional
// information.
//
// __success(expr) f :
// <expr> indicates whether function f succeeded or not. If <expr> is true at exit,
// all the function's guarantees (as given by other annotations) must hold. If <expr>
// is false at exit, the caller should not expect any of the function's guarantees
// to hold. If not used, the function must always satisfy its guarantees. Added
// automatically to functions that indicate success in standard ways, such as by
// returning an HRESULT.
//
// __out_awcount(expr, size) p :
// Pointer p is a buffer whose size may be given in either bytes or elements. If
// <expr> is true, this acts like __out_bcount. If <expr> is false, this acts
// like __out_ecount. This should only be used to annotate old APIs.
//
// __in_awcount(expr, size) p :
// Pointer p is a buffer whose size may be given in either bytes or elements. If
// <expr> is true, this acts like __in_bcount. If <expr> is false, this acts
// like __in_ecount. This should only be used to annotate old APIs.
//
// __nullterminated p :
// Pointer p is a buffer that may be read or written up to and including the first
// NULL character or pointer. May be used on typedefs, which marks valid (properly
// initialized) instances of that type as being NULL-terminated.
//
// __nullnullterminated p :
// Pointer p is a buffer that may be read or written up to and including the first
// sequence of two NULL characters or pointers. May be used on typedefs, which marks
// valid instances of that type as being double-NULL terminated.
//
// __reserved v :
// Value v must be 0/NULL, reserved for future use.
//
// __checkReturn v :
// Return value v must not be ignored by callers of this function.
//
// __typefix(ctype) v :
// Value v should be treated as an instance of ctype, rather than its declared type.
//
// __override f :
// Specify C#-style 'override' behaviour for overriding virtual methods.
//
// __callback f :
// Function f can be used as a function pointer.
//
// __format_string p :
// Pointer p is a string that contains % markers in the style of printf.
//
// __blocksOn(resource) f :
// Function f blocks on the resource 'resource'.
//
// __fallthrough :
// Annotates switch statement labels where fall-through is desired, to distinguish
// from forgotten break statements.
//
// -------------------------------------------------------------------------------
// Advanced Annotation Examples
//
// __success(return == TRUE) LWSTDAPI_(BOOL)
// PathCanonicalizeA(__out_ecount(MAX_PATH) LPSTR pszBuf, LPCSTR pszPath) :
// pszBuf is only guaranteed to be NULL-terminated when TRUE is returned.
//
// typedef __nullterminated WCHAR* LPWSTR : Initialized LPWSTRs are NULL-terminated strings.
//
// __out_ecount(cch) __typefix(LPWSTR) void *psz : psz is a buffer parameter which will be
// a NULL-terminated WCHAR string at exit, and which initially contains cch WCHARs.
//
// -------------------------------------------------------------------------------
// @@END_DDKSPLIT
#if _MSC_VER > 1000
#pragma once
#endif // #if _MSC_VER > 1000
#define __specstrings
#ifdef __cplusplus
#ifndef __nothrow
# define __nothrow __declspec(nothrow)
#endif
extern "C" {
#else
#ifndef __nothrow
# define __nothrow
#endif
#endif // #ifdef __cplusplus
// @@BEGIN_DDKSPLIT
// -------------------------------------------------------------------------------
// Helper Macro Definitions
//
// These express behavior common to many of the high-level annotations.
// DO NOT USE THESE IN YOUR CODE.
// -------------------------------------------------------------------------------
// The helper annotations are only understood by the compiler version used by various
// defect detection tools. When the regular compiler is running, they are defined into
// nothing, and do not affect the compiled code.
#if (_MSC_VER >= 1000) && !defined(MIDL_PASS) && defined(_PREFAST_)
// In the primitive __declspec("SAL_*") annotations "SAL" stands for Standard
// Annotation Language. These __declspec("SAL_*") annotations are the
// primitives the compiler understands and all high-level SpecString MACROs
// will decompose into these primivates.
#define SPECSTRINGIZE( x ) #x
//
// __null p
// __notnull p
// __maybenull p
//
// Annotates a pointer p. States that pointer p is null. Commonly used
// in the negated form __notnull or the possibly null form __maybenull.
//
#define __null __declspec("SAL_null")
#define __notnull __declspec("SAL_notnull")
#define __maybenull __declspec("SAL_maybenull")
//
// __readonly l
// __notreadonly l
// __mabyereadonly l
//
// Annotates a location l. States that location l is not modified after
// this point. If the annotation is placed on the precondition state of
// a function, the restriction only applies until the postcondition state
// of the function. __maybereadonly states that the annotated location
// may be modified, whereas __notreadonly states that a location must be
// modified.
//
#define __readonly __declspec("SAL_readonly")
#define __notreadonly __declspec("SAL_notreadonly")
#define __maybereadonly __declspec("SAL_maybereadonly")
//
// __valid v
// __notvalid v
// __maybevalid v
//
// Annotates any value v. States that the value satisfies all properties of
// valid values of its type. For example, for a string buffer, valid means
// that the buffer pointer is either NULL or points to a NULL-terminated string.
//
#define __valid __declspec("SAL_valid")
#define __notvalid __declspec("SAL_notvalid")
#define __maybevalid __declspec("SAL_maybevalid")
//
// __readableTo(extent) p
//
// Annotates a buffer pointer p. If the buffer can be read, extent describes
// how much of the buffer is readable. For a reader of the buffer, this is
// an explicit permission to read up to that amount, rather than a restriction to
// read only up to it.
//
#define __readableTo(extent) __declspec("SAL_readableTo("SPECSTRINGIZE(extent)")")
//
// __elem_readableTo(size)
//
// Annotates a buffer pointer p as being readable to size elements.
//
#define __elem_readableTo(size) __declspec("SAL_readableTo(elementCount("SPECSTRINGIZE(size)"))")
//
// __byte_readableTo(size)
//
// Annotates a buffer pointer p as being readable to size bytes.
//
#define __byte_readableTo(size) __declspec("SAL_readableTo(byteCount("SPECSTRINGIZE(size)"))")
//
// __writableTo(extent) p
//
// Annotates a buffer pointer p. If the buffer can be modified, extent
// describes how much of the buffer is writable (usually the allocation
// size). For a writer of the buffer, this is an explicit permission to
// write up to that amount, rather than a restriction to write only up to it.
//
#define __writableTo(size) __declspec("SAL_writableTo("SPECSTRINGIZE(size)")")
//
// __elem_writableTo(size)
//
// Annotates a buffer pointer p as being writable to size elements.
//
#define __elem_writableTo(size) __declspec("SAL_writableTo(elementCount("SPECSTRINGIZE(size)"))")
//
// __byte_writableTo(size)
//
// Annotates a buffer pointer p as being writable to size bytes.
//
#define __byte_writableTo(size) __declspec("SAL_writableTo(byteCount("SPECSTRINGIZE(size)"))")
//
// __deref p
//
// Annotates a pointer p. The next annotation applies one dereference down
// in the type. If readableTo(p, size) then the next annotation applies to
// all elements *(p+i) for which i satisfies the size. If p is a pointer
// to a struct, the next annotation applies to all fields of the struct.
//
#define __deref __declspec("SAL_deref")
//
// __pre __next_annotation
//
// The next annotation applies in the precondition state
//
#define __pre __declspec("SAL_pre")
//
// __post __next_annotation
//
// The next annotation applies in the postcondition state
//
#define __post __declspec("SAL_post")
//
// __precond(<expr>)
//
// When <expr> is true, the next annotation applies in the precondition state
// (currently not enabled)
//
#define __precond(expr) __pre
//
// __postcond(<expr>)
//
// When <expr> is true, the next annotation applies in the postcondition state
// (currently not enabled)
//
#define __postcond(expr) __post
//
// __exceptthat
//
// Given a set of annotations Q containing __exceptthat maybeP, the effect of
// the except clause is to erase any P or notP annotations (explicit or
// implied) within Q at the same level of dereferencing that the except
// clause appears, and to replace it with maybeP.
//
// Example 1: __valid __exceptthat __maybenull on a pointer p means that the
// pointer may be null, and is otherwise valid, thus overriding
// the implicit notnull annotation implied by __valid on
// pointers.
//
// Example 2: __valid __deref __exceptthat __maybenull on an int **p means
// that p is not null (implied by valid), but the elements
// pointed to by p could be null, and are otherwise valid.
//
#define __exceptthat __declspec("SAL_except")
//
// _refparam
//
// Added to all out parameter macros to indicate that they are all reference
// parameters.
//
#define __refparam __deref __notreadonly
//
// __inner_*
//
// Helper macros that directly correspond to certain high-level annotations.
//
//
// Macros to classify the entrypoints and indicate their category.
//
//
// Pre-defined control point categories include: RPC, LPC, DeviceDriver, UserToKernel, ISAPI, COM.
//
#define __inner_control_entrypoint(category) __declspec("SAL_entrypoint(controlEntry, "SPECSTRINGIZE(category)")")
//
// Pre-defined data entry point categories include: Registry, File, Network.
//
#define __inner_data_entrypoint(category) __declspec("SAL_entrypoint(dataEntry, "SPECSTRINGIZE(category)")")
#define __inner_success(expr) __declspec("SAL_success("SPECSTRINGIZE(expr)")")
#define __inner_checkReturn __declspec("SAL_checkReturn")
#define __inner_typefix(ctype) __declspec("SAL_typefix("SPECSTRINGIZE(ctype)")")
#define __inner_override __declspec("__override")
#define __inner_callback __declspec("__callback")
#define __inner_blocksOn(resource) __declspec("SAL_blocksOn("SPECSTRINGIZE(resource)")")
#define __inner_fallthrough_dec __inline __nothrow void __FallThrough() {}
#define __inner_fallthrough __FallThrough();
#else
// @@END_DDKSPLIT
#define __null
#define __notnull
#define __maybenull
#define __readonly
#define __notreadonly
#define __maybereadonly
#define __valid
#define __notvalid
#define __maybevalid
#define __readableTo(extent)
#define __elem_readableTo(size)
#define __byte_readableTo(size)
#define __writableTo(size)
#define __elem_writableTo(size)
#define __byte_writableTo(size)
#define __deref
#define __pre
#define __post
#define __precond(expr)
#define __postcond(expr)
#define __exceptthat
#define __inner_success(expr)
#define __inner_checkReturn
#define __inner_typefix(ctype)
#define __inner_override
#define __inner_callback
#define __inner_blocksOn(resource)
#define __inner_fallthrough_dec
#define __inner_fallthrough
#define __refparam
#define __inner_control_entrypoint(category)
#define __inner_data_entrypoint(category)
// @@BEGIN_DDKSPLIT
#endif // #if (_MSC_VER >= 1000) && !defined(MIDL_PASS) && defined(_PREFAST_)
// -------------------------------------------------------------------------------
// Buffer Annotation Definitions
//
// Any of these may be used to directly annotate functions, but only one should
// be used for each parameter. To determine which annotation to use for a given
// buffer, use the table in the buffer annotations section.
// -------------------------------------------------------------------------------
// @@END_DDKSPLIT
#define __ecount(size) __notnull __elem_writableTo(size)
#define __bcount(size) __notnull __byte_writableTo(size)
#define __in __pre __valid __pre __deref __readonly
#define __in_ecount(size) __in __pre __elem_readableTo(size)
#define __in_bcount(size) __in __pre __byte_readableTo(size)
#define __out __ecount(1) __post __valid __refparam
#define __out_ecount(size) __ecount(size) __post __valid __refparam
#define __out_bcount(size) __bcount(size) __post __valid __refparam
#define __out_ecount_part(size,length) __out_ecount(size) __post __elem_readableTo(length)
#define __out_bcount_part(size,length) __out_bcount(size) __post __byte_readableTo(length)
#define __out_ecount_full(size) __out_ecount_part(size,size)
#define __out_bcount_full(size) __out_bcount_part(size,size)
#define __inout __pre __valid __post __valid __refparam
#define __inout_ecount(size) __out_ecount(size) __pre __valid
#define __inout_bcount(size) __out_bcount(size) __pre __valid
#define __inout_ecount_part(size,length) __out_ecount_part(size,length) __pre __valid __pre __elem_readableTo(length)
#define __inout_bcount_part(size,length) __out_bcount_part(size,length) __pre __valid __pre __byte_readableTo(length)
#define __inout_ecount_full(size) __inout_ecount_part(size,size)
#define __inout_bcount_full(size) __inout_bcount_part(size,size)
#define __ecount_opt(size) __ecount(size) __exceptthat __maybenull
#define __bcount_opt(size) __bcount(size) __exceptthat __maybenull
#define __in_opt __in __exceptthat __maybenull
#define __in_ecount_opt(size) __in_ecount(size) __exceptthat __maybenull
#define __in_bcount_opt(size) __in_bcount(size) __exceptthat __maybenull
#define __out_opt __out __exceptthat __maybenull
#define __out_ecount_opt(size) __out_ecount(size) __exceptthat __maybenull
#define __out_bcount_opt(size) __out_bcount(size) __exceptthat __maybenull
#define __out_ecount_part_opt(size,length) __out_ecount_part(size,length) __exceptthat __maybenull
#define __out_bcount_part_opt(size,length) __out_bcount_part(size,length) __exceptthat __maybenull
#define __out_ecount_full_opt(size) __out_ecount_full(size) __exceptthat __maybenull
#define __out_bcount_full_opt(size) __out_bcount_full(size) __exceptthat __maybenull
#define __inout_opt __inout __exceptthat __maybenull
#define __inout_ecount_opt(size) __inout_ecount(size) __exceptthat __maybenull
#define __inout_bcount_opt(size) __inout_bcount(size) __exceptthat __maybenull
#define __inout_ecount_part_opt(size,length) __inout_ecount_part(size,length) __exceptthat __maybenull
#define __inout_bcount_part_opt(size,length) __inout_bcount_part(size,length) __exceptthat __maybenull
#define __inout_ecount_full_opt(size) __inout_ecount_full(size) __exceptthat __maybenull
#define __inout_bcount_full_opt(size) __inout_bcount_full(size) __exceptthat __maybenull
#define __deref_ecount(size) __ecount(1) __post __elem_readableTo(1) __post __deref __notnull __post __deref __elem_writableTo(size)
#define __deref_bcount(size) __ecount(1) __post __elem_readableTo(1) __post __deref __notnull __post __deref __byte_writableTo(size)
#define __deref_in __in __pre __deref __deref __readonly
#define __deref_in_ecount(size) __deref_in __pre __deref __elem_readableTo(size)
#define __deref_in_bcount(size) __deref_in __pre __deref __byte_readableTo(size)
#define __deref_out __deref_ecount(1) __post __deref __valid __refparam
#define __deref_out_ecount(size) __deref_ecount(size) __post __deref __valid __refparam
#define __deref_out_bcount(size) __deref_bcount(size) __post __deref __valid __refparam
#define __deref_out_ecount_part(size,length) __deref_out_ecount(size) __post __deref __elem_readableTo(length)
#define __deref_out_bcount_part(size,length) __deref_out_bcount(size) __post __deref __byte_readableTo(length)
#define __deref_out_ecount_full(size) __deref_out_ecount_part(size,size)
#define __deref_out_bcount_full(size) __deref_out_bcount_part(size,size)
#define __deref_inout __notnull __elem_readableTo(1) __pre __deref __valid __post __deref __valid __refparam
#define __deref_inout_ecount(size) __deref_inout __pre __deref __elem_writableTo(size) __post __deref __elem_writableTo(size)
#define __deref_inout_bcount(size) __deref_inout __pre __deref __byte_writableTo(size) __post __deref __byte_writableTo(size)
#define __deref_inout_ecount_part(size,length) __deref_inout_ecount(size) __pre __deref __elem_readableTo(length) __post __deref __elem_readableTo(length)
#define __deref_inout_bcount_part(size,length) __deref_inout_bcount(size) __pre __deref __byte_readableTo(length) __post __deref __byte_readableTo(length)
#define __deref_inout_ecount_full(size) __deref_inout_ecount_part(size,size)
#define __deref_inout_bcount_full(size) __deref_inout_bcount_part(size,size)
#define __deref_ecount_opt(size) __deref_ecount(size) __post __deref __exceptthat __maybenull
#define __deref_bcount_opt(size) __deref_bcount(size) __post __deref __exceptthat __maybenull
#define __deref_in_opt __deref_in __pre __deref __exceptthat __maybenull
#define __deref_in_ecount_opt(size) __deref_in_ecount(size) __pre __deref __exceptthat __maybenull
#define __deref_in_bcount_opt(size) __deref_in_bcount(size) __pre __deref __exceptthat __maybenull
#define __deref_out_opt __deref_out __post __deref __exceptthat __maybenull
#define __deref_out_ecount_opt(size) __deref_out_ecount(size) __post __deref __exceptthat __maybenull
#define __deref_out_bcount_opt(size) __deref_out_bcount(size) __post __deref __exceptthat __maybenull
#define __deref_out_ecount_part_opt(size,length) __deref_out_ecount_part(size,length) __post __deref __exceptthat __maybenull
#define __deref_out_bcount_part_opt(size,length) __deref_out_bcount_part(size,length) __post __deref __exceptthat __maybenull
#define __deref_out_ecount_full_opt(size) __deref_out_ecount_full(size) __post __deref __exceptthat __maybenull
#define __deref_out_bcount_full_opt(size) __deref_out_bcount_full(size) __post __deref __exceptthat __maybenull
#define __deref_inout_opt __deref_inout __pre __deref __exceptthat __maybenull __post __deref __exceptthat __maybenull
#define __deref_inout_ecount_opt(size) __deref_inout_ecount(size) __pre __deref __exceptthat __maybenull __post __deref __exceptthat __maybenull
#define __deref_inout_bcount_opt(size) __deref_inout_bcount(size) __pre __deref __exceptthat __maybenull __post __deref __exceptthat __maybenull
#define __deref_inout_ecount_part_opt(size,length) __deref_inout_ecount_part(size,length) __pre __deref __exceptthat __maybenull __post __deref __exceptthat __maybenull
#define __deref_inout_bcount_part_opt(size,length) __deref_inout_bcount_part(size,length) __pre __deref __exceptthat __maybenull __post __deref __exceptthat __maybenull
#define __deref_inout_ecount_full_opt(size) __deref_inout_ecount_full(size) __pre __deref __exceptthat __maybenull __post __deref __exceptthat __maybenull
#define __deref_inout_bcount_full_opt(size) __deref_inout_bcount_full(size) __pre __deref __exceptthat __maybenull __post __deref __exceptthat __maybenull
#define __deref_opt_ecount(size) __deref_ecount(size) __exceptthat __maybenull
#define __deref_opt_bcount(size) __deref_bcount(size) __exceptthat __maybenull
#define __deref_opt_in __deref_in __exceptthat __maybenull
#define __deref_opt_in_ecount(size) __deref_in_ecount(size) __exceptthat __maybenull
#define __deref_opt_in_bcount(size) __deref_in_bcount(size) __exceptthat __maybenull
#define __deref_opt_out __deref_out __exceptthat __maybenull
#define __deref_opt_out_ecount(size) __deref_out_ecount(size) __exceptthat __maybenull
#define __deref_opt_out_bcount(size) __deref_out_bcount(size) __exceptthat __maybenull
#define __deref_opt_out_ecount_part(size,length) __deref_out_ecount_part(size,length) __exceptthat __maybenull
#define __deref_opt_out_bcount_part(size,length) __deref_out_bcount_part(size,length) __exceptthat __maybenull
#define __deref_opt_out_ecount_full(size) __deref_out_ecount_full(size) __exceptthat __maybenull
#define __deref_opt_out_bcount_full(size) __deref_out_bcount_full(size) __exceptthat __maybenull
#define __deref_opt_inout __deref_inout __exceptthat __maybenull
#define __deref_opt_inout_ecount(size) __deref_inout_ecount(size) __exceptthat __maybenull
#define __deref_opt_inout_bcount(size) __deref_inout_bcount(size) __exceptthat __maybenull
#define __deref_opt_inout_ecount_part(size,length) __deref_inout_ecount_part(size,length) __exceptthat __maybenull
#define __deref_opt_inout_bcount_part(size,length) __deref_inout_bcount_part(size,length) __exceptthat __maybenull
#define __deref_opt_inout_ecount_full(size) __deref_inout_ecount_full(size) __exceptthat __maybenull
#define __deref_opt_inout_bcount_full(size) __deref_inout_bcount_full(size) __exceptthat __maybenull
#define __deref_opt_ecount_opt(size) __deref_ecount_opt(size) __exceptthat __maybenull
#define __deref_opt_bcount_opt(size) __deref_bcount_opt(size) __exceptthat __maybenull
#define __deref_opt_in_opt __deref_in_opt __exceptthat __maybenull
#define __deref_opt_in_ecount_opt(size) __deref_in_ecount_opt(size) __exceptthat __maybenull
#define __deref_opt_in_bcount_opt(size) __deref_in_bcount_opt(size) __exceptthat __maybenull
#define __deref_opt_out_opt __deref_out_opt __exceptthat __maybenull
#define __deref_opt_out_ecount_opt(size) __deref_out_ecount_opt(size) __exceptthat __maybenull
#define __deref_opt_out_bcount_opt(size) __deref_out_bcount_opt(size) __exceptthat __maybenull
#define __deref_opt_out_ecount_part_opt(size,length) __deref_out_ecount_part_opt(size,length) __exceptthat __maybenull
#define __deref_opt_out_bcount_part_opt(size,length) __deref_out_bcount_part_opt(size,length) __exceptthat __maybenull
#define __deref_opt_out_ecount_full_opt(size) __deref_out_ecount_full_opt(size) __exceptthat __maybenull
#define __deref_opt_out_bcount_full_opt(size) __deref_out_bcount_full_opt(size) __exceptthat __maybenull
#define __deref_opt_inout_opt __deref_inout_opt __exceptthat __maybenull
#define __deref_opt_inout_ecount_opt(size) __deref_inout_ecount_opt(size) __exceptthat __maybenull
#define __deref_opt_inout_bcount_opt(size) __deref_inout_bcount_opt(size) __exceptthat __maybenull
#define __deref_opt_inout_ecount_part_opt(size,length) __deref_inout_ecount_part_opt(size,length) __exceptthat __maybenull
#define __deref_opt_inout_bcount_part_opt(size,length) __deref_inout_bcount_part_opt(size,length) __exceptthat __maybenull
#define __deref_opt_inout_ecount_full_opt(size) __deref_inout_ecount_full_opt(size) __exceptthat __maybenull
#define __deref_opt_inout_bcount_full_opt(size) __deref_inout_bcount_full_opt(size) __exceptthat __maybenull
// @@BEGIN_DDKSPLIT
// -------------------------------------------------------------------------------
// Advanced Annotation Definitions
//
// Any of these may be used to directly annotate functions, and may be used in
// combination with each other or with regular buffer macros. For an explanation
// of each annotation, see the advanced annotations section.
// -------------------------------------------------------------------------------
// @@END_DDKSPLIT
#define __out_awcount(expr,size) __pre __notnull \
__precond(expr) __byte_writableTo(size) \
__precond(!(expr)) __byte_writableTo((size)*2) \
__post __valid __refparam
#define __in_awcount(expr,size) __pre __valid \
__pre __deref __readonly \
__precond(expr) __byte_readableTo(size) \
__precond(!(expr)) __elem_readableTo(size)
#define __success(expr) __inner_success(expr)
#define __nullterminated __readableTo(sentinel(0))
#define __nullnullterminated
#define __reserved __pre __null
#define __checkReturn __inner_checkReturn
#define __typefix(ctype) __inner_typefix(ctype)
#define __override __inner_override
#define __callback __inner_callback
#define __format_string
#define __blocksOn(resource) __inner_blocksOn(resource)
#define __control_entrypoint(category) __inner_control_entrypoint(category)
#define __data_entrypoint(category) __inner_data_entrypoint(category)
#ifndef __fallthrough
__inner_fallthrough_dec
#define __fallthrough __inner_fallthrough
#endif
// -------------------------------------------------------------------------------
// Deprecated Annotation Definitions
//
// These should be removed from existing code.
// -------------------------------------------------------------------------------
// #define __opt __exceptthat __maybenull
#ifdef __cplusplus
}
#endif

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
lib/MSPlatformSDK/Lib/Gdi32.Lib Executable file

Binary file not shown.

BIN
lib/MSPlatformSDK/Lib/Imm32.Lib Executable file

Binary file not shown.

BIN
lib/MSPlatformSDK/Lib/Mpr.Lib Executable file

Binary file not shown.

BIN
lib/MSPlatformSDK/Lib/Ole32.Lib Executable file

Binary file not shown.

BIN
lib/MSPlatformSDK/Lib/OleAcc.Lib Executable file

Binary file not shown.

Binary file not shown.

BIN
lib/MSPlatformSDK/Lib/OleDlg.Lib Executable file

Binary file not shown.

Binary file not shown.

BIN
lib/MSPlatformSDK/Lib/Secur32.Lib Executable file

Binary file not shown.

BIN
lib/MSPlatformSDK/Lib/SensAPI.Lib Executable file

Binary file not shown.

BIN
lib/MSPlatformSDK/Lib/Shell32.Lib Executable file

Binary file not shown.

BIN
lib/MSPlatformSDK/Lib/User32.Lib Executable file

Binary file not shown.

BIN
lib/MSPlatformSDK/Lib/Uuid.Lib Executable file

Binary file not shown.

BIN
lib/MSPlatformSDK/Lib/Version.Lib Executable file

Binary file not shown.

BIN
lib/MSPlatformSDK/Lib/Vfw32.Lib Executable file

Binary file not shown.

BIN
lib/MSPlatformSDK/Lib/WSock32.Lib Executable file

Binary file not shown.

BIN
lib/MSPlatformSDK/Lib/WinMM.Lib Executable file

Binary file not shown.

Binary file not shown.

BIN
lib/MSPlatformSDK/Lib/odbc32.lib Executable file

Binary file not shown.

Binary file not shown.

BIN
lib/MSPlatformSDK/Lib/unicows.lib Executable file

Binary file not shown.

79
lib/Makefile Executable file
View File

@ -0,0 +1,79 @@
#--------------------------------------
# include and verify the users mk/conf.mk
-include ../mk/conf.mk
ifndef CONFIG_STATUS
doConfigure:
$(error Configuration file not defined. Please run make -f mk/configure.mk)
#@make --no-print-directory -f ../mk/configure.mk
else
ifeq ($(CONFIG_STATUS),INVALID)
doConfigure:
$(error Invalid Configuration file. Please run make -f mk/configure.mk)
#@make --no-print-directory -f mk/configure.mk
else
include ../mk/conf.$(COMPILER).$(OS).mk
include ../mk/conf.$(COMPILER).mk
endif
endif
default: \
$(DIR.OBJ)/ \
$(DIR.OBJ)/lpng$(EXT.LIB) \
$(DIR.OBJ)/zlib$(EXT.LIB) \
$(DIR.OBJ)/ljpeg$(EXT.LIB) \
$(DIR.OBJ)/lungif$(EXT.LIB) \
$(DIR.OBJ)/opengl2d3d$(EXT.DLL) \
$(DIR.OBJ)/glu2d3d$(EXT.DLL)
# opengl2d3d currently does not compile with CodeWarrior6
# until the link errors are resolved create dummy targets
COMPILE_D3D ?= true
ifeq "$(COMPILER)" "CW6"
COMPILE_D3D = false
endif
# no need to compile D3D stuff under Linux :)
ifeq "$(OS)" "LINUX"
COMPILE_D3D = false
endif
# or FreeBSD
ifeq "$(OS)" "FreeBSD"
COMPILE_D3D = false
endif
# or OpenBSD!
ifeq "$(OS)" "OpenBSD"
COMPILE_D3D = false
endif
ifeq "$(COMPILE_D3D)" "false"
$(DIR.OBJ)/opengl2d3d$(EXT.DLL): ;
$(DIR.OBJ)/glu2d3d$(EXT.DLL): ;
else
include targets.opengl2d3d.mk
endif
include targets.lpng.mk
include targets.zlib.mk
include targets.ljpeg.mk
include targets.lungif.mk
include ../mk/conf.common.mk
TORQUEclean: ljpegclean zlibclean ljpegclean lungif
#default:
# echo default.
ifneq ($(MAKECMDGOALS),clean)
-include $(addprefix $(DIR.OBJ)/, $(addsuffix $(EXT.DEP), $(basename $(filter %.cc %.c,$(SOURCE.ALL)))))
endif

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