mirror of
https://git.code.sf.net/p/mingw-w64/mingw-w64
synced 2024-11-27 03:43:37 +08:00
Copy over more DDK dependency headers from experimental/ddk_test:
* dmksctrl.h: New. * driverspecs.h: New. * hidpi.h: New. * hidusage.h: New. * ntdd1394.h: New. * ntdd8042.h: New. * ntddbeep.h: New. * ntddcdrm.h: New. * ntddcdvd.h: New. * ntdddisk.h: New. * ntddft.h: New. * ntddpar.h: New. * ntddser.h: New. * ntddtape.h: New. * ntddtdi.h: New. * ntddvdeo.h: New. * ntddvol.h: New. * prntfont.h: New. * tdi.h: New. * tdiinfo.h: New. * unknown.h: New. git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@3350 4407c894-4637-0410-b4f5-ada5f102cad1
This commit is contained in:
parent
a31cc1dc58
commit
cdeff263f4
@ -1,3 +1,28 @@
|
||||
2010-08-15 Ozkan Sezer <sezeroz@gmail.com>
|
||||
|
||||
Copy over more DDK dependency headers from experimental/ddk_test:
|
||||
* dmksctrl.h: New.
|
||||
* driverspecs.h: New.
|
||||
* hidpi.h: New.
|
||||
* hidusage.h: New.
|
||||
* ntdd1394.h: New.
|
||||
* ntdd8042.h: New.
|
||||
* ntddbeep.h: New.
|
||||
* ntddcdrm.h: New.
|
||||
* ntddcdvd.h: New.
|
||||
* ntdddisk.h: New.
|
||||
* ntddft.h: New.
|
||||
* ntddpar.h: New.
|
||||
* ntddser.h: New.
|
||||
* ntddtape.h: New.
|
||||
* ntddtdi.h: New.
|
||||
* ntddvdeo.h: New.
|
||||
* ntddvol.h: New.
|
||||
* prntfont.h: New.
|
||||
* tdi.h: New.
|
||||
* tdiinfo.h: New.
|
||||
* unknown.h: New.
|
||||
|
||||
2010-08-14 Ozkan Sezer <sezeroz@gmail.com>
|
||||
|
||||
Baby steps in moving shared data from ws2tcpip.h to ws2ipdef.h:
|
||||
|
59
mingw-w64-headers/include/dmksctrl.h
Normal file
59
mingw-w64-headers/include/dmksctrl.h
Normal file
@ -0,0 +1,59 @@
|
||||
/*
|
||||
* dmksctrl.h
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Johannes Anderwald
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _IKsControl_
|
||||
#define _IKsControl_
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IKsControl
|
||||
DECLARE_INTERFACE_(IKsControl, IUnknown)
|
||||
{
|
||||
/* IUnknown */
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
|
||||
/*IKsControl*/
|
||||
STDMETHOD(KsProperty)(
|
||||
THIS_
|
||||
IN PKSPROPERTY Property,
|
||||
IN ULONG PropertyLength,
|
||||
IN OUT LPVOID PropertyData,
|
||||
IN ULONG DataLength,
|
||||
OUT ULONG* BytesReturned
|
||||
) PURE;
|
||||
STDMETHOD(KsMethod)(
|
||||
THIS_
|
||||
IN PKSMETHOD Method,
|
||||
IN ULONG MethodLength,
|
||||
IN OUT LPVOID MethodData,
|
||||
IN ULONG DataLength,
|
||||
OUT ULONG* BytesReturned
|
||||
) PURE;
|
||||
STDMETHOD(KsEvent)(
|
||||
THIS_
|
||||
IN PKSEVENT Event OPTIONAL,
|
||||
IN ULONG EventLength,
|
||||
IN OUT LPVOID EventData,
|
||||
IN ULONG DataLength,
|
||||
OUT ULONG* BytesReturned
|
||||
) PURE;
|
||||
};
|
||||
|
||||
#endif /* _IKsControl_ */
|
||||
|
30
mingw-w64-headers/include/driverspecs.h
Normal file
30
mingw-w64-headers/include/driverspecs.h
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* PROJECT: ReactOS DDK
|
||||
* COPYRIGHT: This file is in the Public Domain.
|
||||
* FILE: driverspecs.h
|
||||
* ABSTRACT: This header stubs out Driver Verifier annotations to
|
||||
* allow drivers using them to compile with our header set.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Stubs
|
||||
*/
|
||||
#define __drv_dispatchType(x)
|
||||
#define __drv_dispatchType_other
|
||||
|
||||
/*
|
||||
* FIXME: These annotations are not driver-only and does not belong here
|
||||
*/
|
||||
#define __in
|
||||
#define __in_bcount(Size)
|
||||
#define __in_ecount(Size)
|
||||
|
||||
#define __out
|
||||
#define __out_bcount(Size)
|
||||
#define __out_bcount_part(Size, Length)
|
||||
#define __out_ecount(Size)
|
||||
|
||||
#define __inout
|
||||
|
||||
#define __deref_out_ecount(Size)
|
||||
|
630
mingw-w64-headers/include/hidpi.h
Normal file
630
mingw-w64-headers/include/hidpi.h
Normal file
@ -0,0 +1,630 @@
|
||||
/*
|
||||
* hidpi.h
|
||||
*
|
||||
* Public Interface for HID parsing library.
|
||||
*
|
||||
* This file is part of the w32api package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __HIDPI_H
|
||||
#define __HIDPI_H
|
||||
|
||||
#include "hidusage.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(_HIDPI_)
|
||||
# define HIDAPI
|
||||
#else
|
||||
# define HIDAPI DECLSPEC_IMPORT
|
||||
#endif
|
||||
|
||||
typedef PUCHAR PHIDP_REPORT_DESCRIPTOR;
|
||||
typedef struct _HIDP_PREPARSED_DATA * PHIDP_PREPARSED_DATA;
|
||||
|
||||
typedef struct _HIDP_UNKNOWN_TOKEN {
|
||||
UCHAR Token;
|
||||
UCHAR Reserved[3];
|
||||
ULONG BitField;
|
||||
} HIDP_UNKNOWN_TOKEN, *PHIDP_UNKNOWN_TOKEN;
|
||||
|
||||
typedef enum _HIDP_KEYBOARD_DIRECTION {
|
||||
HidP_Keyboard_Break,
|
||||
HidP_Keyboard_Make
|
||||
} HIDP_KEYBOARD_DIRECTION;
|
||||
|
||||
typedef struct _HIDP_KEYBOARD_MODIFIER_STATE {
|
||||
_ANONYMOUS_UNION union {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
ULONG LeftControl : 1;
|
||||
ULONG LeftShift : 1;
|
||||
ULONG LeftAlt : 1;
|
||||
ULONG LeftGUI : 1;
|
||||
ULONG RightControl : 1;
|
||||
ULONG RightShift : 1;
|
||||
ULONG RightAlt : 1;
|
||||
ULONG RigthGUI : 1;
|
||||
ULONG CapsLock : 1;
|
||||
ULONG ScollLock : 1;
|
||||
ULONG NumLock : 1;
|
||||
ULONG Reserved : 21;
|
||||
} DUMMYSTRUCTNAME;
|
||||
ULONG ul;
|
||||
} DUMMYUNIONNAME;
|
||||
} HIDP_KEYBOARD_MODIFIER_STATE, *PHIDP_KEYBOARD_MODIFIER_STATE;
|
||||
|
||||
typedef BOOLEAN (NTAPI *PHIDP_INSERT_SCANCODES)(
|
||||
IN PVOID Context,
|
||||
IN PCHAR NewScanCodes,
|
||||
IN ULONG Length);
|
||||
|
||||
typedef struct _USAGE_AND_PAGE {
|
||||
USAGE Usage;
|
||||
USAGE UsagePage;
|
||||
} USAGE_AND_PAGE, *PUSAGE_AND_PAGE;
|
||||
|
||||
typedef struct _HIDD_ATTRIBUTES {
|
||||
ULONG Size;
|
||||
USHORT VendorID;
|
||||
USHORT ProductID;
|
||||
USHORT VersionNumber;
|
||||
} HIDD_ATTRIBUTES, *PHIDD_ATTRIBUTES;
|
||||
|
||||
typedef struct _HIDD_CONFIGURATION {
|
||||
PVOID cookie;
|
||||
ULONG size;
|
||||
ULONG RingBufferSize;
|
||||
} HIDD_CONFIGURATION, *PHIDD_CONFIGURATION;
|
||||
|
||||
HIDAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
HidP_TranslateUsageAndPagesToI8042ScanCodes(
|
||||
IN PUSAGE_AND_PAGE ChangedUsageList,
|
||||
IN ULONG UsageListLength,
|
||||
IN HIDP_KEYBOARD_DIRECTION KeyAction,
|
||||
IN OUT PHIDP_KEYBOARD_MODIFIER_STATE ModifierState,
|
||||
IN PHIDP_INSERT_SCANCODES InsertCodesProcedure,
|
||||
IN PVOID InsertCodesContext);
|
||||
|
||||
HIDAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
HidP_TranslateUsagesToI8042ScanCodes(
|
||||
IN PUSAGE ChangedUsageList,
|
||||
IN ULONG UsageListLength,
|
||||
IN HIDP_KEYBOARD_DIRECTION KeyAction,
|
||||
IN OUT PHIDP_KEYBOARD_MODIFIER_STATE ModifierState,
|
||||
IN PHIDP_INSERT_SCANCODES InsertCodesProcedure,
|
||||
IN PVOID InsertCodesContext);
|
||||
|
||||
typedef struct _HIDP_BUTTON_CAPS {
|
||||
USAGE UsagePage;
|
||||
UCHAR ReportID;
|
||||
BOOLEAN IsAlias;
|
||||
USHORT BitField;
|
||||
USHORT LinkCollection;
|
||||
USAGE LinkUsage;
|
||||
USAGE LinkUsagePage;
|
||||
BOOLEAN IsRange;
|
||||
BOOLEAN IsStringRange;
|
||||
BOOLEAN IsDesignatorRange;
|
||||
BOOLEAN IsAbsolute;
|
||||
ULONG Reserved[10];
|
||||
_ANONYMOUS_UNION union {
|
||||
struct {
|
||||
USAGE UsageMin, UsageMax;
|
||||
USHORT StringMin, StringMax;
|
||||
USHORT DesignatorMin, DesignatorMax;
|
||||
USHORT DataIndexMin, DataIndexMax;
|
||||
} Range;
|
||||
struct {
|
||||
USAGE Usage, Reserved1;
|
||||
USHORT StringIndex, Reserved2;
|
||||
USHORT DesignatorIndex, Reserved3;
|
||||
USHORT DataIndex, Reserved4;
|
||||
} NotRange;
|
||||
} DUMMYUNIONNAME;
|
||||
} HIDP_BUTTON_CAPS, *PHIDP_BUTTON_CAPS;
|
||||
|
||||
typedef struct _HIDP_CAPS {
|
||||
USAGE Usage;
|
||||
USAGE UsagePage;
|
||||
USHORT InputReportByteLength;
|
||||
USHORT OutputReportByteLength;
|
||||
USHORT FeatureReportByteLength;
|
||||
USHORT Reserved[17];
|
||||
USHORT NumberLinkCollectionNodes;
|
||||
USHORT NumberInputButtonCaps;
|
||||
USHORT NumberInputValueCaps;
|
||||
USHORT NumberInputDataIndices;
|
||||
USHORT NumberOutputButtonCaps;
|
||||
USHORT NumberOutputValueCaps;
|
||||
USHORT NumberOutputDataIndices;
|
||||
USHORT NumberFeatureButtonCaps;
|
||||
USHORT NumberFeatureValueCaps;
|
||||
USHORT NumberFeatureDataIndices;
|
||||
} HIDP_CAPS, *PHIDP_CAPS;
|
||||
|
||||
typedef struct _HIDP_DATA {
|
||||
USHORT DataIndex;
|
||||
USHORT Reserved;
|
||||
_ANONYMOUS_UNION union {
|
||||
ULONG RawValue;
|
||||
BOOLEAN On;
|
||||
} DUMMYUNIONNAME;
|
||||
} HIDP_DATA, *PHIDP_DATA;
|
||||
|
||||
typedef struct _HIDP_EXTENDED_ATTRIBUTES {
|
||||
UCHAR NumGlobalUnknowns;
|
||||
UCHAR Reserved[3];
|
||||
PHIDP_UNKNOWN_TOKEN GlobalUnknowns;
|
||||
ULONG Data[1];
|
||||
} HIDP_EXTENDED_ATTRIBUTES, *PHIDP_EXTENDED_ATTRIBUTES;
|
||||
|
||||
#define HIDP_LINK_COLLECTION_ROOT ((USHORT) -1)
|
||||
#define HIDP_LINK_COLLECTION_UNSPECIFIED ((USHORT) 0)
|
||||
|
||||
typedef struct _HIDP_LINK_COLLECTION_NODE {
|
||||
USAGE LinkUsage;
|
||||
USAGE LinkUsagePage;
|
||||
USHORT Parent;
|
||||
USHORT NumberOfChildren;
|
||||
USHORT NextSibling;
|
||||
USHORT FirstChild;
|
||||
ULONG CollectionType: 8;
|
||||
ULONG IsAlias: 1;
|
||||
ULONG Reserved: 23;
|
||||
PVOID UserContext;
|
||||
} HIDP_LINK_COLLECTION_NODE, *PHIDP_LINK_COLLECTION_NODE;
|
||||
|
||||
typedef struct _HIDP_VALUE_CAPS {
|
||||
USAGE UsagePage;
|
||||
UCHAR ReportID;
|
||||
BOOLEAN IsAlias;
|
||||
USHORT BitField;
|
||||
USHORT LinkCollection;
|
||||
USAGE LinkUsage;
|
||||
USAGE LinkUsagePage;
|
||||
BOOLEAN IsRange;
|
||||
BOOLEAN IsStringRange;
|
||||
BOOLEAN IsDesignatorRange;
|
||||
BOOLEAN IsAbsolute;
|
||||
BOOLEAN HasNull;
|
||||
UCHAR Reserved;
|
||||
USHORT BitSize;
|
||||
USHORT ReportCount;
|
||||
USHORT Reserved2[5];
|
||||
ULONG UnitsExp;
|
||||
ULONG Units;
|
||||
LONG LogicalMin, LogicalMax;
|
||||
LONG PhysicalMin, PhysicalMax;
|
||||
_ANONYMOUS_UNION union {
|
||||
struct {
|
||||
USAGE UsageMin, UsageMax;
|
||||
USHORT StringMin, StringMax;
|
||||
USHORT DesignatorMin, DesignatorMax;
|
||||
USHORT DataIndexMin, DataIndexMax;
|
||||
} Range;
|
||||
struct {
|
||||
USAGE Usage, Reserved1;
|
||||
USHORT StringIndex, Reserved2;
|
||||
USHORT DesignatorIndex, Reserved3;
|
||||
USHORT DataIndex, Reserved4;
|
||||
} NotRange;
|
||||
} DUMMYUNIONNAME;
|
||||
} HIDP_VALUE_CAPS, *PHIDP_VALUE_CAPS;
|
||||
|
||||
typedef enum _HIDP_REPORT_TYPE {
|
||||
HidP_Input,
|
||||
HidP_Output,
|
||||
HidP_Feature
|
||||
} HIDP_REPORT_TYPE;
|
||||
|
||||
#define FACILITY_HID_ERROR_CODE 0x11
|
||||
|
||||
#define HIDP_ERROR_CODES(SEV, CODE) \
|
||||
((NTSTATUS) (((SEV) << 28) | (FACILITY_HID_ERROR_CODE << 16) | (CODE)))
|
||||
|
||||
#define HIDP_STATUS_SUCCESS (HIDP_ERROR_CODES(0x0, 0))
|
||||
#define HIDP_STATUS_NULL (HIDP_ERROR_CODES(0x8, 1))
|
||||
#define HIDP_STATUS_INVALID_PREPARSED_DATA (HIDP_ERROR_CODES(0xC, 1))
|
||||
#define HIDP_STATUS_INVALID_REPORT_TYPE (HIDP_ERROR_CODES(0xC, 2))
|
||||
#define HIDP_STATUS_INVALID_REPORT_LENGTH (HIDP_ERROR_CODES(0xC, 3))
|
||||
#define HIDP_STATUS_USAGE_NOT_FOUND (HIDP_ERROR_CODES(0xC, 4))
|
||||
#define HIDP_STATUS_VALUE_OUT_OF_RANGE (HIDP_ERROR_CODES(0xC, 5))
|
||||
#define HIDP_STATUS_BAD_LOG_PHY_VALUES (HIDP_ERROR_CODES(0xC, 6))
|
||||
#define HIDP_STATUS_BUFFER_TOO_SMALL (HIDP_ERROR_CODES(0xC, 7))
|
||||
#define HIDP_STATUS_INTERNAL_ERROR (HIDP_ERROR_CODES(0xC, 8))
|
||||
#define HIDP_STATUS_I8042_TRANS_UNKNOWN (HIDP_ERROR_CODES(0xC, 9))
|
||||
#define HIDP_STATUS_INCOMPATIBLE_REPORT_ID (HIDP_ERROR_CODES(0xC, 0xA))
|
||||
#define HIDP_STATUS_NOT_VALUE_ARRAY (HIDP_ERROR_CODES(0xC, 0xB))
|
||||
#define HIDP_STATUS_IS_VALUE_ARRAY (HIDP_ERROR_CODES(0xC, 0xC))
|
||||
#define HIDP_STATUS_DATA_INDEX_NOT_FOUND (HIDP_ERROR_CODES(0xC, 0xD))
|
||||
#define HIDP_STATUS_DATA_INDEX_OUT_OF_RANGE (HIDP_ERROR_CODES(0xC, 0xE))
|
||||
#define HIDP_STATUS_BUTTON_NOT_PRESSED (HIDP_ERROR_CODES(0xC, 0xF))
|
||||
#define HIDP_STATUS_REPORT_DOES_NOT_EXIST (HIDP_ERROR_CODES(0xC, 0x10))
|
||||
#define HIDP_STATUS_NOT_IMPLEMENTED (HIDP_ERROR_CODES(0xC, 0x20))
|
||||
#define HIDP_STATUS_I8242_TRANS_UNKNOWN HIDP_STATUS_I8042_TRANS_UNKNOWN
|
||||
|
||||
|
||||
#if !defined(_HIDPI_NO_FUNCTION_MACROS_)
|
||||
/*
|
||||
* NTSTATUS
|
||||
* HidP_GetButtonCaps(
|
||||
* IN HIDP_REPORT_TYPE ReportType,
|
||||
* OUT PHIDP_BUTTON_CAPS ButtonCaps,
|
||||
* IN OUT PULONG ButtonCapsLength,
|
||||
* IN PHIDP_PREPARSED_DATA PreparsedData);
|
||||
*/
|
||||
#define HidP_GetButtonCaps(_Type_, _Caps_, _Len_, _Data_) \
|
||||
HidP_GetSpecificButtonCaps(_Type_, 0, 0, 0, _Caps_, _Len_, _Data_)
|
||||
|
||||
/*
|
||||
* NTSTATUS
|
||||
* HidP_GetButtons(
|
||||
* IN HIDP_REPORT_TYPE ReportType,
|
||||
* IN USAGE UsagePage,
|
||||
* IN USHORT LinkCollection,
|
||||
* OUT USAGE *UsageList,
|
||||
* IN OUT ULONG *UsageLength,
|
||||
* IN PHIDP_PREPARSED_DATA PreparsedData,
|
||||
* IN PCHAR Report,
|
||||
* IN ULONG ReportLength);
|
||||
*/
|
||||
#define HidP_GetButtons(Rty, UPa, LCo, ULi, ULe, Ppd, Rep, RLe) \
|
||||
HidP_GetUsages(Rty, UPa, LCo, ULi, ULe, Ppd, Rep, RLe)
|
||||
|
||||
#define HidP_GetButtonListLength(RTy, UPa, Ppd) \
|
||||
HidP_GetUsageListLength(Rty, UPa, Ppd)
|
||||
|
||||
|
||||
/*
|
||||
* NTSTATUS
|
||||
* HidP_GetButtonsEx(
|
||||
* IN HIDP_REPORT_TYPE ReportType,
|
||||
* IN USHORT LinkCollection,
|
||||
* OUT PUSAGE_AND_PAGE ButtonList,
|
||||
* IN OUT ULONG *UsageLength,
|
||||
* IN PHIDP_PREPARSED_DATA PreparsedData,
|
||||
* IN PCHAR Report,
|
||||
* IN ULONG ReportLength);
|
||||
*/
|
||||
#define HidP_GetButtonsEx(RT, LC, BL, UL, PD, R, RL) \
|
||||
HidP_GetUsagesEx(RT, LC, BL, UL, PD, R, RL)
|
||||
|
||||
#endif /* _HIDPI_NO_FUNCTION_MACROS_ */
|
||||
|
||||
HIDAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
HidP_GetCaps(
|
||||
IN PHIDP_PREPARSED_DATA PreparsedData,
|
||||
OUT PHIDP_CAPS Capabilities);
|
||||
|
||||
HIDAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
HidP_GetData(
|
||||
IN HIDP_REPORT_TYPE ReportType,
|
||||
OUT PHIDP_DATA DataList,
|
||||
IN OUT PULONG DataLength,
|
||||
IN PHIDP_PREPARSED_DATA PreparsedData,
|
||||
IN PCHAR Report,
|
||||
IN ULONG ReportLength);
|
||||
|
||||
HIDAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
HidP_GetExtendedAttributes(
|
||||
IN HIDP_REPORT_TYPE ReportType,
|
||||
IN USHORT DataIndex,
|
||||
IN PHIDP_PREPARSED_DATA PreparsedData,
|
||||
OUT PHIDP_EXTENDED_ATTRIBUTES Attributes,
|
||||
IN OUT PULONG LengthAttributes);
|
||||
|
||||
HIDAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
HidP_GetLinkCollectionNodes(
|
||||
OUT PHIDP_LINK_COLLECTION_NODE LinkCollectionNodes,
|
||||
IN OUT PULONG LinkCollectionNodesLength,
|
||||
IN PHIDP_PREPARSED_DATA PreparsedData);
|
||||
|
||||
HIDAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
HidP_GetScaledUsageValue(
|
||||
IN HIDP_REPORT_TYPE ReportType,
|
||||
IN USAGE UsagePage,
|
||||
IN USHORT LinkCollection OPTIONAL,
|
||||
IN USAGE Usage,
|
||||
OUT PLONG UsageValue,
|
||||
IN PHIDP_PREPARSED_DATA PreparsedData,
|
||||
IN PCHAR Report,
|
||||
IN ULONG ReportLength);
|
||||
|
||||
HIDAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
HidP_GetSpecificButtonCaps(
|
||||
IN HIDP_REPORT_TYPE ReportType,
|
||||
IN USAGE UsagePage,
|
||||
IN USHORT LinkCollection,
|
||||
IN USAGE Usage,
|
||||
OUT PHIDP_BUTTON_CAPS ButtonCaps,
|
||||
IN OUT PULONG ButtonCapsLength,
|
||||
IN PHIDP_PREPARSED_DATA PreparsedData);
|
||||
|
||||
HIDAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
HidP_GetSpecificValueCaps(
|
||||
IN HIDP_REPORT_TYPE ReportType,
|
||||
IN USAGE UsagePage,
|
||||
IN USHORT LinkCollection,
|
||||
IN USAGE Usage,
|
||||
OUT PHIDP_VALUE_CAPS ValueCaps,
|
||||
IN OUT PULONG ValueCapsLength,
|
||||
IN PHIDP_PREPARSED_DATA PreparsedData);
|
||||
|
||||
HIDAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
HidP_GetUsages(
|
||||
IN HIDP_REPORT_TYPE ReportType,
|
||||
IN USAGE UsagePage,
|
||||
IN USHORT LinkCollection OPTIONAL,
|
||||
OUT USAGE *UsageList,
|
||||
IN OUT ULONG *UsageLength,
|
||||
IN PHIDP_PREPARSED_DATA PreparsedData,
|
||||
IN PCHAR Report,
|
||||
IN ULONG ReportLength);
|
||||
|
||||
HIDAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
HidP_GetUsagesEx(
|
||||
IN HIDP_REPORT_TYPE ReportType,
|
||||
IN USHORT LinkCollection,
|
||||
OUT PUSAGE_AND_PAGE ButtonList,
|
||||
IN OUT ULONG *UsageLength,
|
||||
IN PHIDP_PREPARSED_DATA PreparsedData,
|
||||
IN PCHAR Report,
|
||||
IN ULONG ReportLength);
|
||||
|
||||
HIDAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
HidP_GetUsageValue(
|
||||
IN HIDP_REPORT_TYPE ReportType,
|
||||
IN USAGE UsagePage,
|
||||
IN USHORT LinkCollection,
|
||||
IN USAGE Usage,
|
||||
OUT PULONG UsageValue,
|
||||
IN PHIDP_PREPARSED_DATA PreparsedData,
|
||||
IN PCHAR Report,
|
||||
IN ULONG ReportLength);
|
||||
|
||||
HIDAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
HidP_GetUsageValueArray(
|
||||
IN HIDP_REPORT_TYPE ReportType,
|
||||
IN USAGE UsagePage,
|
||||
IN USHORT LinkCollection OPTIONAL,
|
||||
IN USAGE Usage,
|
||||
OUT PCHAR UsageValue,
|
||||
IN USHORT UsageValueByteLength,
|
||||
IN PHIDP_PREPARSED_DATA PreparsedData,
|
||||
IN PCHAR Report,
|
||||
IN ULONG ReportLength);
|
||||
|
||||
#if !defined(_HIDPI_NO_FUNCTION_MACROS_)
|
||||
|
||||
/*
|
||||
* NTSTATUS
|
||||
* HidP_GetValueCaps(
|
||||
* IN HIDP_REPORT_TYPE ReportType,
|
||||
* OUT PHIDP_VALUE_CAPS ValueCaps,
|
||||
* IN OUT PULONG ValueCapsLength,
|
||||
* IN PHIDP_PREPARSED_DATA PreparsedData);
|
||||
*/
|
||||
#define HidP_GetValueCaps(_Type_, _Caps_, _Len_, _Data_) \
|
||||
HidP_GetSpecificValueCaps (_Type_, 0, 0, 0, _Caps_, _Len_, _Data_)
|
||||
|
||||
#endif /* _HIDPI_NO_FUNCTION_MACROS_ */
|
||||
|
||||
HIDAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
HidP_InitializeReportForID(
|
||||
IN HIDP_REPORT_TYPE ReportType,
|
||||
IN UCHAR ReportID,
|
||||
IN PHIDP_PREPARSED_DATA PreparsedData,
|
||||
IN OUT PCHAR Report,
|
||||
IN ULONG ReportLength);
|
||||
|
||||
#if !defined(_HIDPI_NO_FUNCTION_MACROS_)
|
||||
|
||||
/*
|
||||
* BOOLEAN
|
||||
* HidP_IsSameUsageAndPage(
|
||||
* USAGE_AND_PAGE u1,
|
||||
* USAGE_AND_PAGE u2);
|
||||
*/
|
||||
#define HidP_IsSameUsageAndPage(u1, u2) ((* (PULONG) &u1) == (* (PULONG) &u2))
|
||||
|
||||
#endif /* _HIDPI_NO_FUNCTION_MACROS_ */
|
||||
|
||||
HIDAPI
|
||||
ULONG
|
||||
NTAPI
|
||||
HidP_MaxDataListLength(
|
||||
IN HIDP_REPORT_TYPE ReportType,
|
||||
IN PHIDP_PREPARSED_DATA PreparsedData);
|
||||
|
||||
HIDAPI
|
||||
ULONG
|
||||
NTAPI
|
||||
HidP_MaxUsageListLength(
|
||||
IN HIDP_REPORT_TYPE ReportType,
|
||||
IN USAGE UsagePage OPTIONAL,
|
||||
IN PHIDP_PREPARSED_DATA PreparsedData);
|
||||
|
||||
#if !defined(_HIDPI_NO_FUNCTION_MACROS_)
|
||||
|
||||
/*
|
||||
* NTSTATUS
|
||||
* HidP_SetButtons(
|
||||
* IN HIDP_REPORT_TYPE ReportType,
|
||||
* IN USAGE UsagePage,
|
||||
* IN USHORT LinkCollection,
|
||||
* IN PUSAGE UsageList,
|
||||
* IN OUT PULONG UsageLength,
|
||||
* IN PHIDP_PREPARSED_DATA PreparsedData,
|
||||
* IN OUT PCHAR Report,
|
||||
* IN ULONG ReportLength);
|
||||
*/
|
||||
#define HidP_SetButtons(RT, UP, LC, UL1, UL2, PD, R, RL) \
|
||||
HidP_SetUsages(RT, UP, LC, UL1, UL2, PD, R, RL)
|
||||
|
||||
#endif /* _HIDPI_NO_FUNCTION_MACROS_ */
|
||||
|
||||
HIDAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
HidP_SetData(
|
||||
IN HIDP_REPORT_TYPE ReportType,
|
||||
IN PHIDP_DATA DataList,
|
||||
IN OUT PULONG DataLength,
|
||||
IN PHIDP_PREPARSED_DATA PreparsedData,
|
||||
IN OUT PCHAR Report,
|
||||
IN ULONG ReportLength);
|
||||
|
||||
HIDAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
HidP_SetScaledUsageValue(
|
||||
IN HIDP_REPORT_TYPE ReportType,
|
||||
IN USAGE UsagePage,
|
||||
IN USHORT LinkCollection OPTIONAL,
|
||||
IN USAGE Usage,
|
||||
IN LONG UsageValue,
|
||||
IN PHIDP_PREPARSED_DATA PreparsedData,
|
||||
IN OUT PCHAR Report,
|
||||
IN ULONG ReportLength);
|
||||
|
||||
HIDAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
HidP_SetUsages(
|
||||
IN HIDP_REPORT_TYPE ReportType,
|
||||
IN USAGE UsagePage,
|
||||
IN USHORT LinkCollection, /* Optional */
|
||||
IN PUSAGE UsageList,
|
||||
IN OUT PULONG UsageLength,
|
||||
IN PHIDP_PREPARSED_DATA PreparsedData,
|
||||
IN OUT PCHAR Report,
|
||||
IN ULONG ReportLength);
|
||||
|
||||
HIDAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
HidP_SetUsageValue(
|
||||
IN HIDP_REPORT_TYPE ReportType,
|
||||
IN USAGE UsagePage,
|
||||
IN USHORT LinkCollection,
|
||||
IN USAGE Usage,
|
||||
IN ULONG UsageValue,
|
||||
IN PHIDP_PREPARSED_DATA PreparsedData,
|
||||
IN OUT PCHAR Report,
|
||||
IN ULONG ReportLength);
|
||||
|
||||
HIDAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
HidP_SetUsageValueArray(
|
||||
IN HIDP_REPORT_TYPE ReportType,
|
||||
IN USAGE UsagePage,
|
||||
IN USHORT LinkCollection OPTIONAL,
|
||||
IN USAGE Usage,
|
||||
IN PCHAR UsageValue,
|
||||
IN USHORT UsageValueByteLength,
|
||||
IN PHIDP_PREPARSED_DATA PreparsedData,
|
||||
OUT PCHAR Report,
|
||||
IN ULONG ReportLength);
|
||||
|
||||
#if !defined(_HIDPI_NO_FUNCTION_MACROS_)
|
||||
|
||||
/*
|
||||
* NTSTATUS
|
||||
* HidP_UnsetButtons(
|
||||
* IN HIDP_REPORT_TYPE ReportType,
|
||||
* IN USAGE UsagePage,
|
||||
* IN USHORT LinkCollection,
|
||||
* IN PUSAGE UsageList,
|
||||
* IN OUT PULONG UsageLength,
|
||||
* IN PHIDP_PREPARSED_DATA PreparsedData,
|
||||
* IN OUT PCHAR Report,
|
||||
* IN ULONG ReportLength);
|
||||
*/
|
||||
#define HidP_UnsetButtons(RT, UP, LC, UL1, UL2, PD, R, RL) \
|
||||
HidP_UnsetUsages(RT, UP, LC, UL1, UL2, PD, R, RL)
|
||||
|
||||
#endif /* _HIDPI_NO_FUNCTION_MACROS_ */
|
||||
|
||||
HIDAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
HidP_UnsetUsages(
|
||||
IN HIDP_REPORT_TYPE ReportType,
|
||||
IN USAGE UsagePage,
|
||||
IN USHORT LinkCollection,
|
||||
IN PUSAGE UsageList,
|
||||
IN OUT PULONG UsageLength,
|
||||
IN PHIDP_PREPARSED_DATA PreparsedData,
|
||||
IN OUT PCHAR Report,
|
||||
IN ULONG ReportLength);
|
||||
|
||||
HIDAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
HidP_UsageAndPageListDifference(
|
||||
IN PUSAGE_AND_PAGE PreviousUsageList,
|
||||
IN PUSAGE_AND_PAGE CurrentUsageList,
|
||||
OUT PUSAGE_AND_PAGE BreakUsageList,
|
||||
OUT PUSAGE_AND_PAGE MakeUsageList,
|
||||
IN ULONG UsageListLength);
|
||||
|
||||
HIDAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
HidP_UsageListDifference(
|
||||
IN PUSAGE PreviousUsageList,
|
||||
IN PUSAGE CurrentUsageList,
|
||||
OUT PUSAGE BreakUsageList,
|
||||
OUT PUSAGE MakeUsageList,
|
||||
IN ULONG UsageListLength);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __HIDPI_H */
|
206
mingw-w64-headers/include/hidusage.h
Normal file
206
mingw-w64-headers/include/hidusage.h
Normal file
@ -0,0 +1,206 @@
|
||||
/*
|
||||
* hidusage.h
|
||||
*
|
||||
* HID usages
|
||||
*
|
||||
* This file is part of the w32api package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __HIDUSAGE_H
|
||||
#define __HIDUSAGE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef USHORT USAGE, *PUSAGE;
|
||||
|
||||
#define HID_USAGE_GENERIC_POINTER ((USAGE) 0x01)
|
||||
#define HID_USAGE_GENERIC_MOUSE ((USAGE) 0x02)
|
||||
#define HID_USAGE_GENERIC_JOYSTICK ((USAGE) 0x04)
|
||||
#define HID_USAGE_GENERIC_GAMEPAD ((USAGE) 0x05)
|
||||
#define HID_USAGE_GENERIC_KEYBOARD ((USAGE) 0x06)
|
||||
#define HID_USAGE_GENERIC_KEYPAD ((USAGE) 0x07)
|
||||
#define HID_USAGE_GENERIC_SYSTEM_CTL ((USAGE) 0x80)
|
||||
#define HID_USAGE_GENERIC_X ((USAGE) 0x30)
|
||||
#define HID_USAGE_GENERIC_Y ((USAGE) 0x31)
|
||||
#define HID_USAGE_GENERIC_Z ((USAGE) 0x32)
|
||||
#define HID_USAGE_GENERIC_RX ((USAGE) 0x33)
|
||||
#define HID_USAGE_GENERIC_RY ((USAGE) 0x34)
|
||||
#define HID_USAGE_GENERIC_RZ ((USAGE) 0x35)
|
||||
#define HID_USAGE_GENERIC_SLIDER ((USAGE) 0x36)
|
||||
#define HID_USAGE_GENERIC_DIAL ((USAGE) 0x37)
|
||||
#define HID_USAGE_GENERIC_WHEEL ((USAGE) 0x38)
|
||||
#define HID_USAGE_GENERIC_HATSWITCH ((USAGE) 0x39)
|
||||
#define HID_USAGE_GENERIC_COUNTED_BUFFER ((USAGE) 0x3A)
|
||||
#define HID_USAGE_GENERIC_BYTE_COUNT ((USAGE) 0x3B)
|
||||
#define HID_USAGE_GENERIC_MOTION_WAKEUP ((USAGE) 0x3C)
|
||||
#define HID_USAGE_GENERIC_VX ((USAGE) 0x40)
|
||||
#define HID_USAGE_GENERIC_VY ((USAGE) 0x41)
|
||||
#define HID_USAGE_GENERIC_VZ ((USAGE) 0x42)
|
||||
#define HID_USAGE_GENERIC_VBRX ((USAGE) 0x43)
|
||||
#define HID_USAGE_GENERIC_VBRY ((USAGE) 0x44)
|
||||
#define HID_USAGE_GENERIC_VBRZ ((USAGE) 0x45)
|
||||
#define HID_USAGE_GENERIC_VNO ((USAGE) 0x46)
|
||||
#define HID_USAGE_GENERIC_SYSCTL_POWER ((USAGE) 0x81)
|
||||
#define HID_USAGE_GENERIC_SYSCTL_SLEEP ((USAGE) 0x82)
|
||||
#define HID_USAGE_GENERIC_SYSCTL_WAKE ((USAGE) 0x83)
|
||||
#define HID_USAGE_GENERIC_SYSCTL_CONTEXT_MENU ((USAGE) 0x84)
|
||||
#define HID_USAGE_GENERIC_SYSCTL_MAIN_MENU ((USAGE) 0x85)
|
||||
#define HID_USAGE_GENERIC_SYSCTL_APP_MENU ((USAGE) 0x86)
|
||||
#define HID_USAGE_GENERIC_SYSCTL_HELP_MENU ((USAGE) 0x87)
|
||||
#define HID_USAGE_GENERIC_SYSCTL_MENU_EXIT ((USAGE) 0x88)
|
||||
#define HID_USAGE_GENERIC_SYSCTL_MENU_SELECT ((USAGE) 0x89)
|
||||
#define HID_USAGE_GENERIC_SYSCTL_MENU_RIGHT ((USAGE) 0x8A)
|
||||
#define HID_USAGE_GENERIC_SYSCTL_MENU_LEFT ((USAGE) 0x8B)
|
||||
#define HID_USAGE_GENERIC_SYSCTL_MENU_UP ((USAGE) 0x8C)
|
||||
#define HID_USAGE_GENERIC_SYSCTL_MENU_DOWN ((USAGE) 0x8D)
|
||||
|
||||
#define HID_USAGE_KEYBOARD_NOEVENT ((USAGE) 0x00)
|
||||
#define HID_USAGE_KEYBOARD_ROLLOVER ((USAGE) 0x01)
|
||||
#define HID_USAGE_KEYBOARD_POSTFAIL ((USAGE) 0x02)
|
||||
#define HID_USAGE_KEYBOARD_UNDEFINED ((USAGE) 0x03)
|
||||
#define HID_USAGE_KEYBOARD_aA ((USAGE) 0x04)
|
||||
#define HID_USAGE_KEYBOARD_zZ ((USAGE) 0x1D)
|
||||
#define HID_USAGE_KEYBOARD_ONE ((USAGE) 0x1E)
|
||||
#define HID_USAGE_KEYBOARD_ZERO ((USAGE) 0x27)
|
||||
#define HID_USAGE_KEYBOARD_LCTRL ((USAGE) 0xE0)
|
||||
#define HID_USAGE_KEYBOARD_LSHFT ((USAGE) 0xE1)
|
||||
#define HID_USAGE_KEYBOARD_LALT ((USAGE) 0xE2)
|
||||
#define HID_USAGE_KEYBOARD_LGUI ((USAGE) 0xE3)
|
||||
#define HID_USAGE_KEYBOARD_RCTRL ((USAGE) 0xE4)
|
||||
#define HID_USAGE_KEYBOARD_RSHFT ((USAGE) 0xE5)
|
||||
#define HID_USAGE_KEYBOARD_RALT ((USAGE) 0xE6)
|
||||
#define HID_USAGE_KEYBOARD_RGUI ((USAGE) 0xE7)
|
||||
#define HID_USAGE_KEYBOARD_SCROLL_LOCK ((USAGE) 0x47)
|
||||
#define HID_USAGE_KEYBOARD_NUM_LOCK ((USAGE) 0x53)
|
||||
#define HID_USAGE_KEYBOARD_CAPS_LOCK ((USAGE) 0x39)
|
||||
#define HID_USAGE_KEYBOARD_F1 ((USAGE) 0x3A)
|
||||
#define HID_USAGE_KEYBOARD_F12 ((USAGE) 0x45)
|
||||
#define HID_USAGE_KEYBOARD_RETURN ((USAGE) 0x28)
|
||||
#define HID_USAGE_KEYBOARD_ESCAPE ((USAGE) 0x29)
|
||||
#define HID_USAGE_KEYBOARD_DELETE ((USAGE) 0x2A)
|
||||
#define HID_USAGE_KEYBOARD_PRINT_SCREEN ((USAGE) 0x46)
|
||||
|
||||
#define HID_USAGE_LED_NUM_LOCK ((USAGE) 0x01)
|
||||
#define HID_USAGE_LED_CAPS_LOCK ((USAGE) 0x02)
|
||||
#define HID_USAGE_LED_SCROLL_LOCK ((USAGE) 0x03)
|
||||
#define HID_USAGE_LED_COMPOSE ((USAGE) 0x04)
|
||||
#define HID_USAGE_LED_KANA ((USAGE) 0x05)
|
||||
#define HID_USAGE_LED_POWER ((USAGE) 0x06)
|
||||
#define HID_USAGE_LED_SHIFT ((USAGE) 0x07)
|
||||
#define HID_USAGE_LED_DO_NOT_DISTURB ((USAGE) 0x08)
|
||||
#define HID_USAGE_LED_MUTE ((USAGE) 0x09)
|
||||
#define HID_USAGE_LED_TONE_ENABLE ((USAGE) 0x0A)
|
||||
#define HID_USAGE_LED_HIGH_CUT_FILTER ((USAGE) 0x0B)
|
||||
#define HID_USAGE_LED_LOW_CUT_FILTER ((USAGE) 0x0C)
|
||||
#define HID_USAGE_LED_EQUALIZER_ENABLE ((USAGE) 0x0D)
|
||||
#define HID_USAGE_LED_SOUND_FIELD_ON ((USAGE) 0x0E)
|
||||
#define HID_USAGE_LED_SURROUND_FIELD_ON ((USAGE) 0x0F)
|
||||
#define HID_USAGE_LED_REPEAT ((USAGE) 0x10)
|
||||
#define HID_USAGE_LED_STEREO ((USAGE) 0x11)
|
||||
#define HID_USAGE_LED_SAMPLING_RATE_DETECT ((USAGE) 0x12)
|
||||
#define HID_USAGE_LED_SPINNING ((USAGE) 0x13)
|
||||
#define HID_USAGE_LED_CAV ((USAGE) 0x14)
|
||||
#define HID_USAGE_LED_CLV ((USAGE) 0x15)
|
||||
#define HID_USAGE_LED_RECORDING_FORMAT_DET ((USAGE) 0x16)
|
||||
#define HID_USAGE_LED_OFF_HOOK ((USAGE) 0x17)
|
||||
#define HID_USAGE_LED_RING ((USAGE) 0x18)
|
||||
#define HID_USAGE_LED_MESSAGE_WAITING ((USAGE) 0x19)
|
||||
#define HID_USAGE_LED_DATA_MODE ((USAGE) 0x1A)
|
||||
#define HID_USAGE_LED_BATTERY_OPERATION ((USAGE) 0x1B)
|
||||
#define HID_USAGE_LED_BATTERY_OK ((USAGE) 0x1C)
|
||||
#define HID_USAGE_LED_BATTERY_LOW ((USAGE) 0x1D)
|
||||
#define HID_USAGE_LED_SPEAKER ((USAGE) 0x1E)
|
||||
#define HID_USAGE_LED_HEAD_SET ((USAGE) 0x1F)
|
||||
#define HID_USAGE_LED_HOLD ((USAGE) 0x20)
|
||||
#define HID_USAGE_LED_MICROPHONE ((USAGE) 0x21)
|
||||
#define HID_USAGE_LED_COVERAGE ((USAGE) 0x22)
|
||||
#define HID_USAGE_LED_NIGHT_MODE ((USAGE) 0x23)
|
||||
#define HID_USAGE_LED_SEND_CALLS ((USAGE) 0x24)
|
||||
#define HID_USAGE_LED_CALL_PICKUP ((USAGE) 0x25)
|
||||
#define HID_USAGE_LED_CONFERENCE ((USAGE) 0x26)
|
||||
#define HID_USAGE_LED_STAND_BY ((USAGE) 0x27)
|
||||
#define HID_USAGE_LED_CAMERA_ON ((USAGE) 0x28)
|
||||
#define HID_USAGE_LED_CAMERA_OFF ((USAGE) 0x29)
|
||||
#define HID_USAGE_LED_ON_LINE ((USAGE) 0x2A)
|
||||
#define HID_USAGE_LED_OFF_LINE ((USAGE) 0x2B)
|
||||
#define HID_USAGE_LED_BUSY ((USAGE) 0x2C)
|
||||
#define HID_USAGE_LED_READY ((USAGE) 0x2D)
|
||||
#define HID_USAGE_LED_PAPER_OUT ((USAGE) 0x2E)
|
||||
#define HID_USAGE_LED_PAPER_JAM ((USAGE) 0x2F)
|
||||
#define HID_USAGE_LED_REMOTE ((USAGE) 0x30)
|
||||
#define HID_USAGE_LED_FORWARD ((USAGE) 0x31)
|
||||
#define HID_USAGE_LED_REVERSE ((USAGE) 0x32)
|
||||
#define HID_USAGE_LED_STOP ((USAGE) 0x33)
|
||||
#define HID_USAGE_LED_REWIND ((USAGE) 0x34)
|
||||
#define HID_USAGE_LED_FAST_FORWARD ((USAGE) 0x35)
|
||||
#define HID_USAGE_LED_PLAY ((USAGE) 0x36)
|
||||
#define HID_USAGE_LED_PAUSE ((USAGE) 0x37)
|
||||
#define HID_USAGE_LED_RECORD ((USAGE) 0x38)
|
||||
#define HID_USAGE_LED_ERROR ((USAGE) 0x39)
|
||||
#define HID_USAGE_LED_SELECTED_INDICATOR ((USAGE) 0x3A)
|
||||
#define HID_USAGE_LED_IN_USE_INDICATOR ((USAGE) 0x3B)
|
||||
#define HID_USAGE_LED_MULTI_MODE_INDICATOR ((USAGE) 0x3C)
|
||||
#define HID_USAGE_LED_INDICATOR_ON ((USAGE) 0x3D)
|
||||
#define HID_USAGE_LED_INDICATOR_FLASH ((USAGE) 0x3E)
|
||||
#define HID_USAGE_LED_INDICATOR_SLOW_BLINK ((USAGE) 0x3F)
|
||||
#define HID_USAGE_LED_INDICATOR_FAST_BLINK ((USAGE) 0x40)
|
||||
#define HID_USAGE_LED_INDICATOR_OFF ((USAGE) 0x41)
|
||||
#define HID_USAGE_LED_FLASH_ON_TIME ((USAGE) 0x42)
|
||||
#define HID_USAGE_LED_SLOW_BLINK_ON_TIME ((USAGE) 0x43)
|
||||
#define HID_USAGE_LED_SLOW_BLINK_OFF_TIME ((USAGE) 0x44)
|
||||
#define HID_USAGE_LED_FAST_BLINK_ON_TIME ((USAGE) 0x45)
|
||||
#define HID_USAGE_LED_FAST_BLINK_OFF_TIME ((USAGE) 0x46)
|
||||
#define HID_USAGE_LED_INDICATOR_COLOR ((USAGE) 0x47)
|
||||
#define HID_USAGE_LED_RED ((USAGE) 0x48)
|
||||
#define HID_USAGE_LED_GREEN ((USAGE) 0x49)
|
||||
#define HID_USAGE_LED_AMBER ((USAGE) 0x4A)
|
||||
#define HID_USAGE_LED_GENERIC_INDICATOR ((USAGE) 0x3B)
|
||||
|
||||
#define HID_USAGE_PAGE_UNDEFINED ((USAGE) 0x00)
|
||||
#define HID_USAGE_PAGE_GENERIC ((USAGE) 0x01)
|
||||
#define HID_USAGE_PAGE_SIMULATION ((USAGE) 0x02)
|
||||
#define HID_USAGE_PAGE_VR ((USAGE) 0x03)
|
||||
#define HID_USAGE_PAGE_SPORT ((USAGE) 0x04)
|
||||
#define HID_USAGE_PAGE_GAME ((USAGE) 0x05)
|
||||
#define HID_USAGE_PAGE_KEYBOARD ((USAGE) 0x07)
|
||||
#define HID_USAGE_PAGE_LED ((USAGE) 0x08)
|
||||
#define HID_USAGE_PAGE_BUTTON ((USAGE) 0x09)
|
||||
#define HID_USAGE_PAGE_ORDINAL ((USAGE) 0x0A)
|
||||
#define HID_USAGE_PAGE_TELEPHONY ((USAGE) 0x0B)
|
||||
#define HID_USAGE_PAGE_CONSUMER ((USAGE) 0x0C)
|
||||
#define HID_USAGE_PAGE_DIGITIZER ((USAGE) 0x0D)
|
||||
#define HID_USAGE_PAGE_UNICODE ((USAGE) 0x10)
|
||||
#define HID_USAGE_PAGE_ALPHANUMERIC ((USAGE) 0x14)
|
||||
|
||||
#define HID_USAGE_TELEPHONY_PHONE ((USAGE) 0x01)
|
||||
#define HID_USAGE_TELEPHONY_ANSWERING_MACHINE ((USAGE) 0x02)
|
||||
#define HID_USAGE_TELEPHONY_MESSAGE_CONTROLS ((USAGE) 0x03)
|
||||
#define HID_USAGE_TELEPHONY_HANDSET ((USAGE) 0x04)
|
||||
#define HID_USAGE_TELEPHONY_HEADSET ((USAGE) 0x05)
|
||||
#define HID_USAGE_TELEPHONY_KEYPAD ((USAGE) 0x06)
|
||||
#define HID_USAGE_TELEPHONY_PROGRAMMABLE_BUTTON ((USAGE) 0x07)
|
||||
|
||||
#define HID_USAGE_SIMULATION_RUDDER ((USAGE) 0xBA)
|
||||
#define HID_USAGE_SIMULATION_THROTTLE ((USAGE) 0xBB)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __HIDUSAGE_H */
|
60
mingw-w64-headers/include/ntdd1394.h
Normal file
60
mingw-w64-headers/include/ntdd1394.h
Normal file
@ -0,0 +1,60 @@
|
||||
/*
|
||||
* ntdd1394.h
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Magnus Olsen
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NTDD1394_H_
|
||||
#define _NTDD1394_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct _IEEE1394_VDEV_PNP_REQUEST
|
||||
{
|
||||
ULONG fulFlags;
|
||||
ULONG Reserved;
|
||||
ULARGE_INTEGER InstanceId;
|
||||
UCHAR DeviceId;
|
||||
} IEEE1394_VDEV_PNP_REQUEST,*PIEEE1394_VDEV_PNP_REQUEST;
|
||||
|
||||
|
||||
typedef struct _IEEE1394_API_REQUEST
|
||||
{
|
||||
ULONG RequestNumber;
|
||||
ULONG Flags;
|
||||
union
|
||||
{
|
||||
IEEE1394_VDEV_PNP_REQUEST AddVirtualDevice;
|
||||
IEEE1394_VDEV_PNP_REQUEST RemoveVirtualDevice;
|
||||
} u;
|
||||
} IEEE1394_API_REQUEST, *PIEEE1394_API_REQUEST;
|
||||
|
||||
#define IEEE1394_API_ADD_VIRTUAL_DEVICE 0x00000001
|
||||
#define IEEE1394_API_REMOVE_VIRTUAL_DEVICE 0x00000002
|
||||
#define IEEE1394_REQUEST_FLAG_UNICODE 0x00000001
|
||||
#define IEEE1394_REQUEST_FLAG_PERSISTENT 0x00000002
|
||||
#define IEEE1394_REQUEST_FLAG_USE_LOCAL_HOST_EUI 0x00000004
|
||||
#define BUS1394_VIRTUAL_DEVICE_LIST_KEY L"Virtual Device List"
|
||||
#define BUS1394_LOCAL_HOST_INSTANCE_KEY L"LOCAL HOST EUI64"
|
||||
#define IOCTL_IEEE1394_API_REQUEST CTL_CODE(FILE_DEVICE_UNKNOWN, 0x100, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _NTDD1394_H_ */
|
||||
|
208
mingw-w64-headers/include/ntdd8042.h
Normal file
208
mingw-w64-headers/include/ntdd8042.h
Normal file
@ -0,0 +1,208 @@
|
||||
/*
|
||||
* ntdd8042.h
|
||||
*
|
||||
* i8042 IOCTL interface.
|
||||
*
|
||||
* This file is part of the w32api package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NTDD8042_
|
||||
#define _NTDD8042_
|
||||
|
||||
#include "ntddkbd.h"
|
||||
#include "ntddmou.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define IOCTL_INTERNAL_I8042_CONTROLLER_WRITE_BUFFER \
|
||||
CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0FF2, METHOD_NEITHER, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_INTERNAL_I8042_HOOK_KEYBOARD \
|
||||
CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0FF0, METHOD_NEITHER, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_INTERNAL_I8042_KEYBOARD_START_INFORMATION \
|
||||
CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0FF3, METHOD_NEITHER, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_INTERNAL_I8042_KEYBOARD_WRITE_BUFFER \
|
||||
CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0FF1, METHOD_NEITHER, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_INTERNAL_I8042_HOOK_MOUSE \
|
||||
CTL_CODE(FILE_DEVICE_MOUSE, 0x0FF0, METHOD_NEITHER, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_INTERNAL_I8042_MOUSE_START_INFORMATION \
|
||||
CTL_CODE(FILE_DEVICE_MOUSE, 0x0FF3, METHOD_NEITHER, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_INTERNAL_I8042_MOUSE_WRITE_BUFFER \
|
||||
CTL_CODE(FILE_DEVICE_MOUSE, 0x0FF1, METHOD_NEITHER, FILE_ANY_ACCESS)
|
||||
|
||||
#define I8042_POWER_SYS_BUTTON 0x0001
|
||||
#define I8042_SLEEP_SYS_BUTTON 0x0002
|
||||
#define I8042_WAKE_SYS_BUTTON 0x0004
|
||||
#define I8042_SYS_BUTTONS (I8042_POWER_SYS_BUTTON | \
|
||||
I8042_SLEEP_SYS_BUTTON | \
|
||||
I8042_WAKE_SYS_BUTTON)
|
||||
|
||||
typedef enum _TRANSMIT_STATE {
|
||||
Idle = 0,
|
||||
SendingBytes
|
||||
} TRANSMIT_STATE;
|
||||
|
||||
typedef struct _OUTPUT_PACKET {
|
||||
PUCHAR Bytes;
|
||||
ULONG CurrentByte;
|
||||
ULONG ByteCount;
|
||||
TRANSMIT_STATE State;
|
||||
} OUTPUT_PACKET, *POUTPUT_PACKET;
|
||||
|
||||
typedef enum _KEYBOARD_SCAN_STATE {
|
||||
Normal,
|
||||
GotE0,
|
||||
GotE1
|
||||
} KEYBOARD_SCAN_STATE, *PKEYBOARD_SCAN_STATE;
|
||||
|
||||
typedef enum _MOUSE_STATE {
|
||||
MouseIdle,
|
||||
XMovement,
|
||||
YMovement,
|
||||
ZMovement,
|
||||
MouseExpectingACK,
|
||||
MouseResetting
|
||||
} MOUSE_STATE, *PMOUSE_STATE;
|
||||
|
||||
typedef enum _MOUSE_RESET_SUBSTATE {
|
||||
ExpectingReset,
|
||||
ExpectingResetId,
|
||||
ExpectingGetDeviceIdACK,
|
||||
ExpectingGetDeviceIdValue,
|
||||
ExpectingSetResolutionDefaultACK,
|
||||
ExpectingSetResolutionDefaultValueACK,
|
||||
ExpectingSetResolutionACK,
|
||||
ExpectingSetResolutionValueACK,
|
||||
ExpectingSetScaling1to1ACK,
|
||||
ExpectingSetScaling1to1ACK2,
|
||||
ExpectingSetScaling1to1ACK3,
|
||||
ExpectingReadMouseStatusACK,
|
||||
ExpectingReadMouseStatusByte1,
|
||||
ExpectingReadMouseStatusByte2,
|
||||
ExpectingReadMouseStatusByte3,
|
||||
StartPnPIdDetection,
|
||||
ExpectingLoopSetSamplingRateACK,
|
||||
ExpectingLoopSetSamplingRateValueACK,
|
||||
ExpectingPnpIdByte1,
|
||||
ExpectingPnpIdByte2,
|
||||
ExpectingPnpIdByte3,
|
||||
ExpectingPnpIdByte4,
|
||||
ExpectingPnpIdByte5,
|
||||
ExpectingPnpIdByte6,
|
||||
ExpectingPnpIdByte7,
|
||||
EnableWheel,
|
||||
Enable5Buttons,
|
||||
ExpectingGetDeviceId2ACK,
|
||||
ExpectingGetDeviceId2Value,
|
||||
ExpectingSetSamplingRateACK,
|
||||
ExpectingSetSamplingRateValueACK,
|
||||
ExpectingEnableACK,
|
||||
ExpectingFinalResolutionACK,
|
||||
ExpectingFinalResolutionValueACK,
|
||||
ExpectingGetDeviceIdDetectACK,
|
||||
ExpectingGetDeviceIdDetectValue,
|
||||
CustomHookStateMinimum = 100,
|
||||
CustomHookStateMaximum = 999,
|
||||
I8042ReservedMinimum = 1000
|
||||
} MOUSE_RESET_SUBSTATE, *PMOUSE_RESET_SUBSTATE;
|
||||
|
||||
typedef struct _INTERNAL_I8042_START_INFORMATION {
|
||||
ULONG Size;
|
||||
PKINTERRUPT InterruptObject;
|
||||
ULONG Reserved[8];
|
||||
} INTERNAL_I8042_START_INFORMATION, *PINTERNAL_I8042_START_INFORMATION;
|
||||
|
||||
typedef VOID
|
||||
(NTAPI *PI8042_ISR_WRITE_PORT)(
|
||||
IN PVOID Context,
|
||||
IN UCHAR Value);
|
||||
|
||||
typedef VOID
|
||||
(NTAPI *PI8042_QUEUE_PACKET)(
|
||||
IN PVOID Context);
|
||||
|
||||
typedef NTSTATUS
|
||||
(NTAPI *PI8042_SYNCH_READ_PORT) (
|
||||
IN PVOID Context,
|
||||
OUT PUCHAR Value,
|
||||
IN BOOLEAN WaitForACK);
|
||||
|
||||
typedef NTSTATUS
|
||||
(NTAPI *PI8042_SYNCH_WRITE_PORT)(
|
||||
IN PVOID Context,
|
||||
IN UCHAR Value,
|
||||
IN BOOLEAN WaitForACK);
|
||||
|
||||
|
||||
typedef NTSTATUS
|
||||
(NTAPI *PI8042_KEYBOARD_INITIALIZATION_ROUTINE)(
|
||||
IN PVOID InitializationContext,
|
||||
IN PVOID SynchFuncContext,
|
||||
IN PI8042_SYNCH_READ_PORT ReadPort,
|
||||
IN PI8042_SYNCH_WRITE_PORT WritePort,
|
||||
OUT PBOOLEAN TurnTranslationOn);
|
||||
|
||||
typedef BOOLEAN
|
||||
(NTAPI *PI8042_KEYBOARD_ISR)(
|
||||
PVOID IsrContext,
|
||||
PKEYBOARD_INPUT_DATA CurrentInput,
|
||||
POUTPUT_PACKET CurrentOutput,
|
||||
UCHAR StatusByte,
|
||||
PUCHAR Byte,
|
||||
PBOOLEAN ContinueProcessing,
|
||||
PKEYBOARD_SCAN_STATE ScanState);
|
||||
|
||||
typedef struct _INTERNAL_I8042_HOOK_KEYBOARD {
|
||||
OUT PVOID Context;
|
||||
OUT PI8042_KEYBOARD_INITIALIZATION_ROUTINE InitializationRoutine;
|
||||
OUT PI8042_KEYBOARD_ISR IsrRoutine;
|
||||
IN PI8042_ISR_WRITE_PORT IsrWritePort;
|
||||
IN PI8042_QUEUE_PACKET QueueKeyboardPacket;
|
||||
IN PVOID CallContext;
|
||||
} INTERNAL_I8042_HOOK_KEYBOARD, *PINTERNAL_I8042_HOOK_KEYBOARD;
|
||||
|
||||
typedef BOOLEAN
|
||||
(NTAPI *PI8042_MOUSE_ISR)(
|
||||
PVOID IsrContext,
|
||||
PMOUSE_INPUT_DATA CurrentInput,
|
||||
POUTPUT_PACKET CurrentOutput,
|
||||
UCHAR StatusByte,
|
||||
PUCHAR Byte,
|
||||
PBOOLEAN ContinueProcessing,
|
||||
PMOUSE_STATE MouseState,
|
||||
PMOUSE_RESET_SUBSTATE ResetSubState);
|
||||
|
||||
typedef struct _INTERNAL_I8042_HOOK_MOUSE {
|
||||
OUT PVOID Context;
|
||||
OUT PI8042_MOUSE_ISR IsrRoutine;
|
||||
IN PI8042_ISR_WRITE_PORT IsrWritePort;
|
||||
IN PI8042_QUEUE_PACKET QueueMousePacket;
|
||||
IN PVOID CallContext;
|
||||
} INTERNAL_I8042_HOOK_MOUSE, *PINTERNAL_I8042_HOOK_MOUSE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _NTDD8042_ */
|
43
mingw-w64-headers/include/ntddbeep.h
Normal file
43
mingw-w64-headers/include/ntddbeep.h
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* ntddbeep.h
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NTDDBEEP_
|
||||
#define _NTDDBEEP_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define DD_BEEP_DEVICE_NAME "\\Device\\Beep"
|
||||
#define DD_BEEP_DEVICE_NAME_U L"\\Device\\Beep"
|
||||
#define BEEP_FREQUENCY_MINIMUM 0x25
|
||||
#define BEEP_FREQUENCY_MAXIMUM 0x7FFF
|
||||
#define IOCTL_BEEP_SET CTL_CODE(FILE_DEVICE_BEEP, 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
typedef struct _BEEP_SET_PARAMETERS
|
||||
{
|
||||
ULONG Frequency;
|
||||
ULONG Duration;
|
||||
} BEEP_SET_PARAMETERS, *PBEEP_SET_PARAMETERS;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _NTDDBEEP_ */
|
||||
|
345
mingw-w64-headers/include/ntddcdrm.h
Normal file
345
mingw-w64-headers/include/ntddcdrm.h
Normal file
@ -0,0 +1,345 @@
|
||||
/*
|
||||
* ntddcdrm.h
|
||||
*
|
||||
* CDROM IOCTL interface.
|
||||
*
|
||||
* This file is part of the w32api package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NTDDCDRM_
|
||||
#define _NTDDCDRM_
|
||||
|
||||
#include "ntddstor.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define IOCTL_CDROM_BASE FILE_DEVICE_CD_ROM
|
||||
|
||||
#define IOCTL_CDROM_CHECK_VERIFY \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_FIND_NEW_DEVICES \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_GET_CONTROL \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x000D, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_GET_DRIVE_GEOMETRY \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x0013, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_GET_LAST_SESSION \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x000E, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_GET_VOLUME \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x0005, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_PAUSE_AUDIO \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x0003, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_PLAY_AUDIO_MSF \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x0006, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_RAW_READ \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x000F, METHOD_OUT_DIRECT, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_DISK_TYPE \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x0010, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_READ_Q_CHANNEL \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x000B, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_READ_TOC \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x0000, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_READ_TOC_EX \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x0015, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_RESUME_AUDIO \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x0004, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_SEEK_AUDIO_MSF \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_SET_VOLUME \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x000A, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_SIMBAD \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x1003, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_CDROM_STOP_AUDIO \
|
||||
CTL_CODE(IOCTL_CDROM_BASE, 0x0002, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
|
||||
#define MAXIMUM_NUMBER_TRACKS 100
|
||||
#define MAXIMUM_CDROM_SIZE 804
|
||||
#define MINIMUM_CDROM_READ_TOC_EX_SIZE 2
|
||||
|
||||
typedef struct _TRACK_DATA {
|
||||
UCHAR Reserved;
|
||||
UCHAR Control : 4;
|
||||
UCHAR Adr : 4;
|
||||
UCHAR TrackNumber;
|
||||
UCHAR Reserved1;
|
||||
UCHAR Address[4];
|
||||
} TRACK_DATA, *PTRACK_DATA;
|
||||
|
||||
/* CDROM_DISK_DATA.DiskData flags */
|
||||
#define CDROM_DISK_AUDIO_TRACK 0x00000001
|
||||
#define CDROM_DISK_DATA_TRACK 0x00000002
|
||||
|
||||
typedef struct _CDROM_DISK_DATA {
|
||||
ULONG DiskData;
|
||||
} CDROM_DISK_DATA, *PCDROM_DISK_DATA;
|
||||
|
||||
typedef struct _CDROM_PLAY_AUDIO_MSF {
|
||||
UCHAR StartingM;
|
||||
UCHAR StartingS;
|
||||
UCHAR StartingF;
|
||||
UCHAR EndingM;
|
||||
UCHAR EndingS;
|
||||
UCHAR EndingF;
|
||||
} CDROM_PLAY_AUDIO_MSF, *PCDROM_PLAY_AUDIO_MSF;
|
||||
|
||||
/* CDROM_READ_TOC_EX.Format constants */
|
||||
#define CDROM_READ_TOC_EX_FORMAT_TOC 0x00
|
||||
#define CDROM_READ_TOC_EX_FORMAT_SESSION 0x01
|
||||
#define CDROM_READ_TOC_EX_FORMAT_FULL_TOC 0x02
|
||||
#define CDROM_READ_TOC_EX_FORMAT_PMA 0x03
|
||||
#define CDROM_READ_TOC_EX_FORMAT_ATIP 0x04
|
||||
#define CDROM_READ_TOC_EX_FORMAT_CDTEXT 0x05
|
||||
|
||||
typedef struct _CDROM_READ_TOC_EX {
|
||||
UCHAR Format : 4;
|
||||
UCHAR Reserved1 : 3;
|
||||
UCHAR Msf : 1;
|
||||
UCHAR SessionTrack;
|
||||
UCHAR Reserved2;
|
||||
UCHAR Reserved3;
|
||||
} CDROM_READ_TOC_EX, *PCDROM_READ_TOC_EX;
|
||||
|
||||
typedef struct _CDROM_SEEK_AUDIO_MSF {
|
||||
UCHAR M;
|
||||
UCHAR S;
|
||||
UCHAR F;
|
||||
} CDROM_SEEK_AUDIO_MSF, *PCDROM_SEEK_AUDIO_MSF;
|
||||
|
||||
/* CDROM_SUB_Q_DATA_FORMAT.Format constants */
|
||||
#define IOCTL_CDROM_SUB_Q_CHANNEL 0x00
|
||||
#define IOCTL_CDROM_CURRENT_POSITION 0x01
|
||||
#define IOCTL_CDROM_MEDIA_CATALOG 0x02
|
||||
#define IOCTL_CDROM_TRACK_ISRC 0x03
|
||||
|
||||
typedef struct _CDROM_SUB_Q_DATA_FORMAT {
|
||||
UCHAR Format;
|
||||
UCHAR Track;
|
||||
} CDROM_SUB_Q_DATA_FORMAT, *PCDROM_SUB_Q_DATA_FORMAT;
|
||||
|
||||
typedef struct _CDROM_TOC {
|
||||
UCHAR Length[2];
|
||||
UCHAR FirstTrack;
|
||||
UCHAR LastTrack;
|
||||
TRACK_DATA TrackData[MAXIMUM_NUMBER_TRACKS];
|
||||
} CDROM_TOC, *PCDROM_TOC;
|
||||
|
||||
#define CDROM_TOC_SIZE sizeof(CDROM_TOC)
|
||||
|
||||
typedef struct _CDROM_TOC_ATIP_DATA_BLOCK {
|
||||
UCHAR CdrwReferenceSpeed : 3;
|
||||
UCHAR Reserved3 : 1;
|
||||
UCHAR WritePower : 3;
|
||||
UCHAR True1 : 1;
|
||||
UCHAR Reserved4 : 6;
|
||||
UCHAR UnrestrictedUse : 1;
|
||||
UCHAR Reserved5 : 1;
|
||||
UCHAR A3Valid : 1;
|
||||
UCHAR A2Valid : 1;
|
||||
UCHAR A1Valid : 1;
|
||||
UCHAR Reserved6 : 3;
|
||||
UCHAR IsCdrw : 1;
|
||||
UCHAR True2 : 1;
|
||||
UCHAR Reserved7;
|
||||
UCHAR LeadInMsf[3];
|
||||
UCHAR Reserved8;
|
||||
UCHAR LeadOutMsf[3];
|
||||
UCHAR Reserved9;
|
||||
UCHAR A1Values[3];
|
||||
UCHAR Reserved10;
|
||||
UCHAR A2Values[3];
|
||||
UCHAR Reserved11;
|
||||
UCHAR A3Values[3];
|
||||
UCHAR Reserved12;
|
||||
} CDROM_TOC_ATIP_DATA_BLOCK, *PCDROM_TOC_ATIP_DATA_BLOCK;
|
||||
|
||||
typedef struct _CDROM_TOC_ATIP_DATA {
|
||||
UCHAR Length[2];
|
||||
UCHAR Reserved1;
|
||||
UCHAR Reserved2;
|
||||
CDROM_TOC_ATIP_DATA_BLOCK Descriptors[0];
|
||||
} CDROM_TOC_ATIP_DATA, *PCDROM_TOC_ATIP_DATA;
|
||||
|
||||
/* CDROM_TOC_CD_TEXT_DATA_BLOCK.PackType constants */
|
||||
#define CDROM_CD_TEXT_PACK_ALBUM_NAME 0x80
|
||||
#define CDROM_CD_TEXT_PACK_PERFORMER 0x81
|
||||
#define CDROM_CD_TEXT_PACK_SONGWRITER 0x82
|
||||
#define CDROM_CD_TEXT_PACK_COMPOSER 0x83
|
||||
#define CDROM_CD_TEXT_PACK_ARRANGER 0x84
|
||||
#define CDROM_CD_TEXT_PACK_MESSAGES 0x85
|
||||
#define CDROM_CD_TEXT_PACK_DISC_ID 0x86
|
||||
#define CDROM_CD_TEXT_PACK_GENRE 0x87
|
||||
#define CDROM_CD_TEXT_PACK_TOC_INFO 0x88
|
||||
#define CDROM_CD_TEXT_PACK_TOC_INFO2 0x89
|
||||
#define CDROM_CD_TEXT_PACK_UPC_EAN 0x8e
|
||||
#define CDROM_CD_TEXT_PACK_SIZE_INFO 0x8f
|
||||
|
||||
typedef struct _CDROM_TOC_CD_TEXT_DATA_BLOCK {
|
||||
UCHAR PackType;
|
||||
UCHAR TrackNumber : 7;
|
||||
UCHAR ExtensionFlag : 1;
|
||||
UCHAR SequenceNumber;
|
||||
UCHAR CharacterPosition : 4;
|
||||
UCHAR BlockNumber : 3;
|
||||
UCHAR Unicode : 1;
|
||||
_ANONYMOUS_UNION union {
|
||||
UCHAR Text[12];
|
||||
WCHAR WText[6];
|
||||
} DUMMYUNIONNAME;
|
||||
UCHAR CRC[2];
|
||||
} CDROM_TOC_CD_TEXT_DATA_BLOCK, *PCDROM_TOC_CD_TEXT_DATA_BLOCK;
|
||||
|
||||
typedef struct _CDROM_TOC_CD_TEXT_DATA {
|
||||
UCHAR Length[2];
|
||||
UCHAR Reserved1;
|
||||
UCHAR Reserved2;
|
||||
CDROM_TOC_CD_TEXT_DATA_BLOCK Descriptors[0];
|
||||
} CDROM_TOC_CD_TEXT_DATA, *PCDROM_TOC_CD_TEXT_DATA;
|
||||
|
||||
/* CDROM_TOC_FULL_TOC_DATA_BLOCK.Adr constants */
|
||||
#define ADR_NO_MODE_INFORMATION 0x0
|
||||
#define ADR_ENCODES_CURRENT_POSITION 0x1
|
||||
#define ADR_ENCODES_MEDIA_CATALOG 0x2
|
||||
#define ADR_ENCODES_ISRC 0x3
|
||||
|
||||
typedef struct _CDROM_TOC_FULL_TOC_DATA_BLOCK {
|
||||
UCHAR SessionNumber;
|
||||
UCHAR Control : 4;
|
||||
UCHAR Adr : 4;
|
||||
UCHAR Reserved1;
|
||||
UCHAR Point;
|
||||
UCHAR MsfExtra[3];
|
||||
UCHAR Zero;
|
||||
UCHAR Msf[3];
|
||||
} CDROM_TOC_FULL_TOC_DATA_BLOCK, *PCDROM_TOC_FULL_TOC_DATA_BLOCK;
|
||||
|
||||
typedef struct _CDROM_TOC_FULL_TOC_DATA {
|
||||
UCHAR Length[2];
|
||||
UCHAR FirstCompleteSession;
|
||||
UCHAR LastCompleteSession;
|
||||
CDROM_TOC_FULL_TOC_DATA_BLOCK Descriptors[0];
|
||||
} CDROM_TOC_FULL_TOC_DATA, *PCDROM_TOC_FULL_TOC_DATA;
|
||||
|
||||
typedef struct _CDROM_TOC_PMA_DATA {
|
||||
UCHAR Length[2];
|
||||
UCHAR Reserved1;
|
||||
UCHAR Reserved2;
|
||||
CDROM_TOC_FULL_TOC_DATA_BLOCK Descriptors[0];
|
||||
} CDROM_TOC_PMA_DATA, *PCDROM_TOC_PMA_DATA;
|
||||
|
||||
/* SUB_Q_HEADER.AudioStatus constants */
|
||||
#define AUDIO_STATUS_NOT_SUPPORTED 0x00
|
||||
#define AUDIO_STATUS_IN_PROGRESS 0x11
|
||||
#define AUDIO_STATUS_PAUSED 0x12
|
||||
#define AUDIO_STATUS_PLAY_COMPLETE 0x13
|
||||
#define AUDIO_STATUS_PLAY_ERROR 0x14
|
||||
#define AUDIO_STATUS_NO_STATUS 0x15
|
||||
|
||||
typedef struct _SUB_Q_HEADER {
|
||||
UCHAR Reserved;
|
||||
UCHAR AudioStatus;
|
||||
UCHAR DataLength[2];
|
||||
} SUB_Q_HEADER, *PSUB_Q_HEADER;
|
||||
|
||||
typedef struct _SUB_Q_MEDIA_CATALOG_NUMBER {
|
||||
SUB_Q_HEADER Header;
|
||||
UCHAR FormatCode;
|
||||
UCHAR Reserved[3];
|
||||
UCHAR Reserved1 : 7;
|
||||
UCHAR Mcval :1;
|
||||
UCHAR MediaCatalog[15];
|
||||
} SUB_Q_MEDIA_CATALOG_NUMBER, *PSUB_Q_MEDIA_CATALOG_NUMBER;
|
||||
|
||||
typedef struct _SUB_Q_TRACK_ISRC {
|
||||
SUB_Q_HEADER Header;
|
||||
UCHAR FormatCode;
|
||||
UCHAR Reserved0;
|
||||
UCHAR Track;
|
||||
UCHAR Reserved1;
|
||||
UCHAR Reserved2 : 7;
|
||||
UCHAR Tcval : 1;
|
||||
UCHAR TrackIsrc[15];
|
||||
} SUB_Q_TRACK_ISRC, *PSUB_Q_TRACK_ISRC;
|
||||
|
||||
typedef struct _SUB_Q_CURRENT_POSITION {
|
||||
SUB_Q_HEADER Header;
|
||||
UCHAR FormatCode;
|
||||
UCHAR Control : 4;
|
||||
UCHAR ADR : 4;
|
||||
UCHAR TrackNumber;
|
||||
UCHAR IndexNumber;
|
||||
UCHAR AbsoluteAddress[4];
|
||||
UCHAR TrackRelativeAddress[4];
|
||||
} SUB_Q_CURRENT_POSITION, *PSUB_Q_CURRENT_POSITION;
|
||||
|
||||
typedef union _SUB_Q_CHANNEL_DATA {
|
||||
SUB_Q_CURRENT_POSITION CurrentPosition;
|
||||
SUB_Q_MEDIA_CATALOG_NUMBER MediaCatalog;
|
||||
SUB_Q_TRACK_ISRC TrackIsrc;
|
||||
} SUB_Q_CHANNEL_DATA, *PSUB_Q_CHANNEL_DATA;
|
||||
|
||||
/* CDROM_AUDIO_CONTROL.LbaFormat constants */
|
||||
#define AUDIO_WITH_PREEMPHASIS 0x1
|
||||
#define DIGITAL_COPY_PERMITTED 0x2
|
||||
#define AUDIO_DATA_TRACK 0x4
|
||||
#define TWO_FOUR_CHANNEL_AUDIO 0x8
|
||||
|
||||
typedef struct _CDROM_AUDIO_CONTROL {
|
||||
UCHAR LbaFormat;
|
||||
USHORT LogicalBlocksPerSecond;
|
||||
} CDROM_AUDIO_CONTROL, *PCDROM_AUDIO_CONTROL;
|
||||
|
||||
typedef struct _VOLUME_CONTROL {
|
||||
UCHAR PortVolume[4];
|
||||
} VOLUME_CONTROL, *PVOLUME_CONTROL;
|
||||
|
||||
typedef enum _TRACK_MODE_TYPE {
|
||||
YellowMode2,
|
||||
XAForm2,
|
||||
CDDA
|
||||
} TRACK_MODE_TYPE, *PTRACK_MODE_TYPE;
|
||||
|
||||
typedef struct __RAW_READ_INFO {
|
||||
LARGE_INTEGER DiskOffset;
|
||||
ULONG SectorCount;
|
||||
TRACK_MODE_TYPE TrackMode;
|
||||
} RAW_READ_INFO, *PRAW_READ_INFO;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _NTDDCDRM_ */
|
208
mingw-w64-headers/include/ntddcdvd.h
Normal file
208
mingw-w64-headers/include/ntddcdvd.h
Normal file
@ -0,0 +1,208 @@
|
||||
/*
|
||||
* ntddcdvd.h
|
||||
*
|
||||
* DVD IOCTL interface.
|
||||
*
|
||||
* This file is part of the w32api package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NTDDCDVD_
|
||||
#define _NTDDCDVD_
|
||||
|
||||
#include "ntddstor.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define IOCTL_DVD_BASE FILE_DEVICE_DVD
|
||||
|
||||
#define IOCTL_DVD_END_SESSION \
|
||||
CTL_CODE(IOCTL_DVD_BASE, 0x0403, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_DVD_GET_REGION \
|
||||
CTL_CODE(IOCTL_DVD_BASE, 0x0405, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_DVD_READ_KEY \
|
||||
CTL_CODE(IOCTL_DVD_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_DVD_READ_STRUCTURE \
|
||||
CTL_CODE(IOCTL_DVD_BASE, 0x0450, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_DVD_SEND_KEY \
|
||||
CTL_CODE(IOCTL_DVD_BASE, 0x0402, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_DVD_START_SESSION \
|
||||
CTL_CODE(IOCTL_DVD_BASE, 0x0400, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_DVD_SET_READ_AHEAD \
|
||||
CTL_CODE(IOCTL_DVD_BASE, 0x0404, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
|
||||
typedef ULONG DVD_SESSION_ID, *PDVD_SESSION_ID;
|
||||
|
||||
typedef struct _STORAGE_SET_READ_AHEAD {
|
||||
LARGE_INTEGER TriggerAddress;
|
||||
LARGE_INTEGER TargetAddress;
|
||||
} STORAGE_SET_READ_AHEAD, *PSTORAGE_SET_READ_AHEAD;
|
||||
|
||||
typedef enum DVD_STRUCTURE_FORMAT {
|
||||
DvdPhysicalDescriptor,
|
||||
DvdCopyrightDescriptor,
|
||||
DvdDiskKeyDescriptor,
|
||||
DvdBCADescriptor,
|
||||
DvdManufacturerDescriptor,
|
||||
DvdMaxDescriptor
|
||||
} DVD_STRUCTURE_FORMAT, *PDVD_STRUCTURE_FORMAT;
|
||||
|
||||
#include <pshpack1.h>
|
||||
typedef struct DVD_READ_STRUCTURE {
|
||||
LARGE_INTEGER BlockByteOffset;
|
||||
DVD_STRUCTURE_FORMAT Format;
|
||||
DVD_SESSION_ID SessionId;
|
||||
UCHAR LayerNumber;
|
||||
} DVD_READ_STRUCTURE, *PDVD_READ_STRUCTURE;
|
||||
#include <poppack.h>
|
||||
|
||||
typedef struct _DVD_DESCRIPTOR_HEADER {
|
||||
USHORT Length;
|
||||
UCHAR Reserved[2];
|
||||
UCHAR Data[0];
|
||||
} DVD_DESCRIPTOR_HEADER, *PDVD_DESCRIPTOR_HEADER;
|
||||
|
||||
#include <pshpack1.h>
|
||||
typedef struct _DVD_LAYER_DESCRIPTOR {
|
||||
UCHAR BookVersion : 4;
|
||||
UCHAR BookType : 4;
|
||||
UCHAR MinimumRate : 4;
|
||||
UCHAR DiskSize : 4;
|
||||
UCHAR LayerType : 4;
|
||||
UCHAR TrackPath : 1;
|
||||
UCHAR NumberOfLayers : 2;
|
||||
UCHAR Reserved1 : 1;
|
||||
UCHAR TrackDensity : 4;
|
||||
UCHAR LinearDensity : 4;
|
||||
ULONG StartingDataSector;
|
||||
ULONG EndDataSector;
|
||||
ULONG EndLayerZeroSector;
|
||||
UCHAR Reserved5 : 7;
|
||||
UCHAR BCAFlag : 1;
|
||||
UCHAR Reserved6;
|
||||
} DVD_LAYER_DESCRIPTOR, *PDVD_LAYER_DESCRIPTOR;
|
||||
#include <poppack.h>
|
||||
|
||||
typedef struct _DVD_COPYRIGHT_DESCRIPTOR {
|
||||
UCHAR CopyrightProtectionType;
|
||||
UCHAR RegionManagementInformation;
|
||||
USHORT Reserved;
|
||||
} DVD_COPYRIGHT_DESCRIPTOR, *PDVD_COPYRIGHT_DESCRIPTOR;
|
||||
|
||||
typedef struct _DVD_DISK_KEY_DESCRIPTOR {
|
||||
UCHAR DiskKeyData[2048];
|
||||
} DVD_DISK_KEY_DESCRIPTOR, *PDVD_DISK_KEY_DESCRIPTOR;
|
||||
|
||||
typedef enum _DVD_KEY_TYPE {
|
||||
DvdChallengeKey = 0x01,
|
||||
DvdBusKey1,
|
||||
DvdBusKey2,
|
||||
DvdTitleKey,
|
||||
DvdAsf,
|
||||
DvdSetRpcKey = 0x6,
|
||||
DvdGetRpcKey = 0x8,
|
||||
DvdDiskKey = 0x80,
|
||||
DvdInvalidateAGID = 0x3f
|
||||
} DVD_KEY_TYPE;
|
||||
|
||||
typedef struct _DVD_COPY_PROTECT_KEY {
|
||||
ULONG KeyLength;
|
||||
DVD_SESSION_ID SessionId;
|
||||
DVD_KEY_TYPE KeyType;
|
||||
ULONG KeyFlags;
|
||||
union {
|
||||
HANDLE FileHandle;
|
||||
LARGE_INTEGER TitleOffset;
|
||||
} Parameters;
|
||||
UCHAR KeyData[0];
|
||||
} DVD_COPY_PROTECT_KEY, *PDVD_COPY_PROTECT_KEY;
|
||||
|
||||
#define DVD_CHALLENGE_KEY_LENGTH (12 + sizeof(DVD_COPY_PROTECT_KEY))
|
||||
#define DVD_BUS_KEY_LENGTH (8 + sizeof(DVD_COPY_PROTECT_KEY))
|
||||
#define DVD_TITLE_KEY_LENGTH (8 + sizeof(DVD_COPY_PROTECT_KEY))
|
||||
#define DVD_DISK_KEY_LENGTH (2048 + sizeof(DVD_COPY_PROTECT_KEY))
|
||||
#define DVD_RPC_KEY_LENGTH (sizeof(DVD_RPC_KEY) + sizeof(DVD_COPY_PROTECT_KEY))
|
||||
#define DVD_SET_RPC_KEY_LENGTH (sizeof(DVD_SET_RPC_KEY) + sizeof(DVD_COPY_PROTECT_KEY))
|
||||
#define DVD_ASF_LENGTH (sizeof(DVD_ASF) + sizeof(DVD_COPY_PROTECT_KEY))
|
||||
|
||||
#define DVD_END_ALL_SESSIONS ((DVD_SESSION_ID) 0xffffffff)
|
||||
|
||||
|
||||
#define DVD_CGMS_RESERVED_MASK 0x00000078
|
||||
|
||||
#define DVD_CGMS_COPY_PROTECT_MASK 0x00000018
|
||||
#define DVD_CGMS_COPY_PERMITTED 0x00000000
|
||||
#define DVD_CGMS_COPY_ONCE 0x00000010
|
||||
#define DVD_CGMS_NO_COPY 0x00000018
|
||||
|
||||
#define DVD_COPYRIGHT_MASK 0x00000040
|
||||
#define DVD_NOT_COPYRIGHTED 0x00000000
|
||||
#define DVD_COPYRIGHTED 0x00000040
|
||||
|
||||
#define DVD_SECTOR_PROTECT_MASK 0x00000020
|
||||
#define DVD_SECTOR_NOT_PROTECTED 0x00000000
|
||||
#define DVD_SECTOR_PROTECTED 0x00000020
|
||||
|
||||
|
||||
typedef struct _DVD_BCA_DESCRIPTOR {
|
||||
UCHAR BCAInformation[0];
|
||||
} DVD_BCA_DESCRIPTOR, *PDVD_BCA_DESCRIPTOR;
|
||||
|
||||
typedef struct _DVD_MANUFACTURER_DESCRIPTOR {
|
||||
UCHAR ManufacturingInformation[2048];
|
||||
} DVD_MANUFACTURER_DESCRIPTOR, *PDVD_MANUFACTURER_DESCRIPTOR;
|
||||
|
||||
typedef struct _DVD_RPC_KEY {
|
||||
UCHAR UserResetsAvailable : 3;
|
||||
UCHAR ManufacturerResetsAvailable : 3;
|
||||
UCHAR TypeCode : 2;
|
||||
UCHAR RegionMask;
|
||||
UCHAR RpcScheme;
|
||||
UCHAR Reserved2[1];
|
||||
} DVD_RPC_KEY, *PDVD_RPC_KEY;
|
||||
|
||||
typedef struct _DVD_SET_RPC_KEY {
|
||||
UCHAR PreferredDriveRegionCode;
|
||||
UCHAR Reserved[3];
|
||||
} DVD_SET_RPC_KEY, *PDVD_SET_RPC_KEY;
|
||||
|
||||
typedef struct _DVD_ASF {
|
||||
UCHAR Reserved0[3];
|
||||
UCHAR SuccessFlag : 1;
|
||||
UCHAR Reserved1 : 7;
|
||||
} DVD_ASF, *PDVD_ASF;
|
||||
|
||||
typedef struct _DVD_REGION {
|
||||
UCHAR CopySystem;
|
||||
UCHAR RegionData;
|
||||
UCHAR SystemRegion;
|
||||
UCHAR ResetCount;
|
||||
} DVD_REGION, *PDVD_REGION;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _NTDDCDVD_ */
|
600
mingw-w64-headers/include/ntdddisk.h
Normal file
600
mingw-w64-headers/include/ntdddisk.h
Normal file
@ -0,0 +1,600 @@
|
||||
/*
|
||||
* ntdddisk.h
|
||||
*
|
||||
* Disk IOCTL interface.
|
||||
*
|
||||
* This file is part of the w32api package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NTDDDISK_H_
|
||||
#define _NTDDDISK_H_
|
||||
|
||||
#include "ntddstor.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define DD_DISK_DEVICE_NAME "\\Device\\UNKNOWN"
|
||||
#define DD_DISK_DEVICE_NAME_U L"\\Device\\UNKNOWN"
|
||||
|
||||
#define IOCTL_DISK_BASE FILE_DEVICE_DISK
|
||||
|
||||
#define IOCTL_DISK_CHECK_VERIFY \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_CONTROLLER_NUMBER \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0011, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_CREATE_DISK \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0016, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_DELETE_DRIVE_LAYOUT \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0040, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_FIND_NEW_DEVICES \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_FORMAT_TRACKS \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0006, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_FORMAT_TRACKS_EX \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x000b, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_GET_CACHE_INFORMATION \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0035, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_GET_DRIVE_GEOMETRY \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0000, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_GET_DRIVE_GEOMETRY_EX \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0028, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_GET_DRIVE_LAYOUT \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0003, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_GET_DRIVE_LAYOUT_EX \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0014, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_GET_MEDIA_TYPES \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0300, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_GET_LENGTH_INFO \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0017, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_GET_PARTITION_INFO \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_GET_PARTITION_INFO_EX \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0012, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_GROW_PARTITION \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0034, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_HISTOGRAM_STRUCTURE \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x000c, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_HISTOGRAM_DATA \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x000d, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_HISTOGRAM_RESET \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x000e, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_INTERNAL_CLEAR_VERIFY \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0101, METHOD_NEITHER, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_INTERNAL_SET_VERIFY \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0100, METHOD_NEITHER, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_IS_WRITABLE \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0009, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_LOGGING \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x000a, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_PERFORMANCE \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0008, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_PERFORMANCE_OFF \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0018, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_REASSIGN_BLOCKS \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0007, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_REQUEST_DATA \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0010, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_REQUEST_STRUCTURE \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x000f, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_MEDIA_REMOVAL \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0201, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_EJECT_MEDIA \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0202, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_LOAD_MEDIA \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0203, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_RESERVE \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0204, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_RELEASE \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0205, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_FIND_NEW_DEVICES \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_SET_CACHE_INFORMATION \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0036, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_SET_DRIVE_LAYOUT \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0004, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_SET_DRIVE_LAYOUT_EX \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0015, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_SET_PARTITION_INFO \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0002, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_SET_PARTITION_INFO_EX \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0013, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_UPDATE_DRIVE_SIZE \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0032, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_VERIFY \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0005, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define SMART_GET_VERSION \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0020, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define SMART_RCV_DRIVE_DATA \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0022, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
|
||||
#define SMART_SEND_DRIVE_COMMAND \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x0021, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_DISK_UPDATE_PROPERTIES \
|
||||
CTL_CODE(IOCTL_DISK_BASE, 0x50, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define PARTITION_ENTRY_UNUSED 0x00
|
||||
#define PARTITION_FAT_12 0x01
|
||||
#define PARTITION_XENIX_1 0x02
|
||||
#define PARTITION_XENIX_2 0x03
|
||||
#define PARTITION_FAT_16 0x04
|
||||
#define PARTITION_EXTENDED 0x05
|
||||
#define PARTITION_HUGE 0x06
|
||||
#define PARTITION_IFS 0x07
|
||||
#define PARTITION_OS2BOOTMGR 0x0A
|
||||
#define PARTITION_FAT32 0x0B
|
||||
#define PARTITION_FAT32_XINT13 0x0C
|
||||
#define PARTITION_XINT13 0x0E
|
||||
#define PARTITION_XINT13_EXTENDED 0x0F
|
||||
#define PARTITION_PREP 0x41
|
||||
#define PARTITION_LDM 0x42
|
||||
#define PARTITION_UNIX 0x63
|
||||
#define VALID_NTFT 0xC0
|
||||
#define PARTITION_NTFT 0x80
|
||||
|
||||
#define IsFTPartition( PartitionType ) \
|
||||
(((PartitionType) & PARTITION_NTFT) && \
|
||||
IsRecognizedPartition(PartitionType))
|
||||
|
||||
#define IsContainerPartition(PartitionType) \
|
||||
(((PartitionType) == PARTITION_EXTENDED) || \
|
||||
((PartitionType) == PARTITION_XINT13_EXTENDED))
|
||||
|
||||
#define IsRecognizedPartition(PartitionType) ( \
|
||||
(((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_FAT_12)) || \
|
||||
(((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_HUGE)) || \
|
||||
(((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_IFS)) || \
|
||||
(((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_FAT32)) || \
|
||||
(((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_FAT32_XINT13)) || \
|
||||
(((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_XINT13)) || \
|
||||
((PartitionType) == PARTITION_FAT_12) || \
|
||||
((PartitionType) == PARTITION_FAT_16) || \
|
||||
((PartitionType) == PARTITION_HUGE) || \
|
||||
((PartitionType) == PARTITION_IFS) || \
|
||||
((PartitionType) == PARTITION_FAT32) || \
|
||||
((PartitionType) == PARTITION_FAT32_XINT13) || \
|
||||
((PartitionType) == PARTITION_XINT13))
|
||||
|
||||
#define WMI_DISK_GEOMETRY_GUID \
|
||||
{0x25007f51, 0x57c2, 0x11d1, {0xa5, 0x28, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0x10}}
|
||||
|
||||
typedef USHORT BAD_TRACK_NUMBER;
|
||||
typedef USHORT *PBAD_TRACK_NUMBER;
|
||||
|
||||
typedef enum _MEDIA_TYPE {
|
||||
Unknown,
|
||||
F5_1Pt2_512,
|
||||
F3_1Pt44_512,
|
||||
F3_2Pt88_512,
|
||||
F3_20Pt8_512,
|
||||
F3_720_512,
|
||||
F5_360_512,
|
||||
F5_320_512,
|
||||
F5_320_1024,
|
||||
F5_180_512,
|
||||
F5_160_512,
|
||||
RemovableMedia,
|
||||
FixedMedia,
|
||||
F3_120M_512,
|
||||
F3_640_512,
|
||||
F5_640_512,
|
||||
F5_720_512,
|
||||
F3_1Pt2_512,
|
||||
F3_1Pt23_1024,
|
||||
F5_1Pt23_1024,
|
||||
F3_128Mb_512,
|
||||
F3_230Mb_512,
|
||||
F8_256_128
|
||||
} MEDIA_TYPE, *PMEDIA_TYPE;
|
||||
|
||||
typedef enum _DETECTION_TYPE {
|
||||
DetectNone,
|
||||
DetectInt13,
|
||||
DetectExInt13
|
||||
} DETECTION_TYPE;
|
||||
|
||||
typedef struct _DISK_CONTROLLER_NUMBER {
|
||||
ULONG ControllerNumber;
|
||||
ULONG DiskNumber;
|
||||
} DISK_CONTROLLER_NUMBER, *PDISK_CONTROLLER_NUMBER;
|
||||
|
||||
typedef struct _DISK_INT13_INFO {
|
||||
USHORT DriveSelect;
|
||||
ULONG MaxCylinders;
|
||||
USHORT SectorsPerTrack;
|
||||
USHORT MaxHeads;
|
||||
USHORT NumberDrives;
|
||||
} DISK_INT13_INFO, *PDISK_INT13_INFO;
|
||||
|
||||
typedef struct _DISK_EX_INT13_INFO {
|
||||
USHORT ExBufferSize;
|
||||
USHORT ExFlags;
|
||||
ULONG ExCylinders;
|
||||
ULONG ExHeads;
|
||||
ULONG ExSectorsPerTrack;
|
||||
ULONG64 ExSectorsPerDrive;
|
||||
USHORT ExSectorSize;
|
||||
USHORT ExReserved;
|
||||
} DISK_EX_INT13_INFO, *PDISK_EX_INT13_INFO;
|
||||
|
||||
typedef struct _DISK_DETECTION_INFO {
|
||||
ULONG SizeOfDetectInfo;
|
||||
DETECTION_TYPE DetectionType;
|
||||
_ANONYMOUS_UNION union {
|
||||
_ANONYMOUS_STRUCT struct {
|
||||
DISK_INT13_INFO Int13;
|
||||
DISK_EX_INT13_INFO ExInt13;
|
||||
} DUMMYSTRUCTNAME;
|
||||
} DUMMYUNIONNAME;
|
||||
} DISK_DETECTION_INFO, *PDISK_DETECTION_INFO;
|
||||
|
||||
typedef struct _DISK_GEOMETRY {
|
||||
LARGE_INTEGER Cylinders;
|
||||
MEDIA_TYPE MediaType;
|
||||
ULONG TracksPerCylinder;
|
||||
ULONG SectorsPerTrack;
|
||||
ULONG BytesPerSector;
|
||||
} DISK_GEOMETRY, *PDISK_GEOMETRY;
|
||||
|
||||
typedef struct _DISK_GEOMETRY_EX {
|
||||
DISK_GEOMETRY Geometry;
|
||||
LARGE_INTEGER DiskSize;
|
||||
UCHAR Data[1];
|
||||
} DISK_GEOMETRY_EX, *PDISK_GEOMETRY_EX;
|
||||
|
||||
#define DiskGeometryGetPartition(Geometry) \
|
||||
((PDISK_PARTITION_INFO)((Geometry) + 1))
|
||||
|
||||
#define DiskGeometryGetDetect(Geometry)\
|
||||
((PDISK_DETECTION_INFO)(((PBYTE)DiskGeometryGetPartition(Geometry) + \
|
||||
DiskGeometryGetPartition(Geometry)->SizeOfPartitionInfo)))
|
||||
|
||||
typedef struct _PARTITION_INFORMATION {
|
||||
LARGE_INTEGER StartingOffset;
|
||||
LARGE_INTEGER PartitionLength;
|
||||
ULONG HiddenSectors;
|
||||
ULONG PartitionNumber;
|
||||
UCHAR PartitionType;
|
||||
BOOLEAN BootIndicator;
|
||||
BOOLEAN RecognizedPartition;
|
||||
BOOLEAN RewritePartition;
|
||||
} PARTITION_INFORMATION, *PPARTITION_INFORMATION;
|
||||
|
||||
typedef struct _PARTITION_INFORMATION_GPT {
|
||||
GUID PartitionType;
|
||||
GUID PartitionId;
|
||||
ULONG64 Attributes;
|
||||
WCHAR Name [36];
|
||||
} PARTITION_INFORMATION_GPT, *PPARTITION_INFORMATION_GPT;
|
||||
|
||||
typedef enum _PARTITION_STYLE {
|
||||
PARTITION_STYLE_MBR,
|
||||
PARTITION_STYLE_GPT,
|
||||
PARTITION_STYLE_RAW
|
||||
} PARTITION_STYLE;
|
||||
|
||||
typedef struct _DISK_PARTITION_INFO {
|
||||
ULONG SizeOfPartitionInfo;
|
||||
PARTITION_STYLE PartitionStyle;
|
||||
_ANONYMOUS_UNION union {
|
||||
struct {
|
||||
ULONG Signature;
|
||||
ULONG CheckSum;
|
||||
} Mbr;
|
||||
struct {
|
||||
GUID DiskId;
|
||||
} Gpt;
|
||||
} DUMMYUNIONNAME;
|
||||
} DISK_PARTITION_INFO, *PDISK_PARTITION_INFO;
|
||||
|
||||
typedef struct _DISK_PERFORMANCE {
|
||||
LARGE_INTEGER BytesRead;
|
||||
LARGE_INTEGER BytesWritten;
|
||||
LARGE_INTEGER ReadTime;
|
||||
LARGE_INTEGER WriteTime;
|
||||
LARGE_INTEGER IdleTime;
|
||||
ULONG ReadCount;
|
||||
ULONG WriteCount;
|
||||
ULONG QueueDepth;
|
||||
ULONG SplitCount;
|
||||
LARGE_INTEGER QueryTime;
|
||||
ULONG StorageDeviceNumber;
|
||||
WCHAR StorageManagerName[8];
|
||||
} DISK_PERFORMANCE, *PDISK_PERFORMANCE;
|
||||
|
||||
typedef struct _PARTITION_INFORMATION_MBR {
|
||||
UCHAR PartitionType;
|
||||
BOOLEAN BootIndicator;
|
||||
BOOLEAN RecognizedPartition;
|
||||
ULONG HiddenSectors;
|
||||
} PARTITION_INFORMATION_MBR, *PPARTITION_INFORMATION_MBR;
|
||||
|
||||
typedef struct _PARTITION_INFORMATION_EX {
|
||||
PARTITION_STYLE PartitionStyle;
|
||||
LARGE_INTEGER StartingOffset;
|
||||
LARGE_INTEGER PartitionLength;
|
||||
ULONG PartitionNumber;
|
||||
BOOLEAN RewritePartition;
|
||||
_ANONYMOUS_UNION union {
|
||||
PARTITION_INFORMATION_MBR Mbr;
|
||||
PARTITION_INFORMATION_GPT Gpt;
|
||||
} DUMMYUNIONNAME;
|
||||
} PARTITION_INFORMATION_EX, *PPARTITION_INFORMATION_EX;
|
||||
|
||||
typedef struct _DRIVE_LAYOUT_INFORMATION {
|
||||
ULONG PartitionCount;
|
||||
ULONG Signature;
|
||||
PARTITION_INFORMATION PartitionEntry[1];
|
||||
} DRIVE_LAYOUT_INFORMATION, *PDRIVE_LAYOUT_INFORMATION;
|
||||
|
||||
typedef struct _DRIVE_LAYOUT_INFORMATION_MBR {
|
||||
ULONG Signature;
|
||||
} DRIVE_LAYOUT_INFORMATION_MBR, *PDRIVE_LAYOUT_INFORMATION_MBR;
|
||||
|
||||
typedef struct _DRIVE_LAYOUT_INFORMATION_GPT {
|
||||
GUID DiskId;
|
||||
LARGE_INTEGER StartingUsableOffset;
|
||||
LARGE_INTEGER UsableLength;
|
||||
ULONG MaxPartitionCount;
|
||||
} DRIVE_LAYOUT_INFORMATION_GPT, *PDRIVE_LAYOUT_INFORMATION_GPT;
|
||||
|
||||
typedef struct _DRIVE_LAYOUT_INFORMATION_EX {
|
||||
ULONG PartitionStyle;
|
||||
ULONG PartitionCount;
|
||||
__GNU_EXTENSION union {
|
||||
DRIVE_LAYOUT_INFORMATION_MBR Mbr;
|
||||
DRIVE_LAYOUT_INFORMATION_GPT Gpt;
|
||||
};
|
||||
PARTITION_INFORMATION_EX PartitionEntry[1];
|
||||
} DRIVE_LAYOUT_INFORMATION_EX, *PDRIVE_LAYOUT_INFORMATION_EX;
|
||||
|
||||
typedef struct _FORMAT_EX_PARAMETERS {
|
||||
MEDIA_TYPE MediaType;
|
||||
ULONG StartCylinderNumber;
|
||||
ULONG EndCylinderNumber;
|
||||
ULONG StartHeadNumber;
|
||||
ULONG EndHeadNumber;
|
||||
USHORT FormatGapLength;
|
||||
USHORT SectorsPerTrack;
|
||||
USHORT SectorNumber[1];
|
||||
} FORMAT_EX_PARAMETERS, *PFORMAT_EX_PARAMETERS;
|
||||
|
||||
typedef struct _FORMAT_PARAMETERS {
|
||||
MEDIA_TYPE MediaType;
|
||||
ULONG StartCylinderNumber;
|
||||
ULONG EndCylinderNumber;
|
||||
ULONG StartHeadNumber;
|
||||
ULONG EndHeadNumber;
|
||||
} FORMAT_PARAMETERS, *PFORMAT_PARAMETERS;
|
||||
|
||||
typedef struct _GET_LENGTH_INFORMATION {
|
||||
LARGE_INTEGER Length;
|
||||
} GET_LENGTH_INFORMATION, *PGET_LENGTH_INFORMATION;
|
||||
|
||||
typedef struct _REASSIGN_BLOCKS {
|
||||
USHORT Reserved;
|
||||
USHORT Count;
|
||||
ULONG BlockNumber[1];
|
||||
} REASSIGN_BLOCKS, *PREASSIGN_BLOCKS;
|
||||
|
||||
typedef struct _SET_PARTITION_INFORMATION {
|
||||
UCHAR PartitionType;
|
||||
} SET_PARTITION_INFORMATION, *PSET_PARTITION_INFORMATION;
|
||||
|
||||
typedef SET_PARTITION_INFORMATION SET_PARTITION_INFORMATION_MBR;
|
||||
typedef PARTITION_INFORMATION_GPT SET_PARTITION_INFORMATION_GPT;
|
||||
|
||||
typedef struct _SET_PARTITION_INFORMATION_EX {
|
||||
PARTITION_STYLE PartitionStyle;
|
||||
_ANONYMOUS_UNION union {
|
||||
SET_PARTITION_INFORMATION_MBR Mbr;
|
||||
SET_PARTITION_INFORMATION_GPT Gpt;
|
||||
} DUMMYUNIONNAME;
|
||||
} SET_PARTITION_INFORMATION_EX, *PSET_PARTITION_INFORMATION_EX;
|
||||
|
||||
typedef struct _VERIFY_INFORMATION {
|
||||
LARGE_INTEGER StartingOffset;
|
||||
ULONG Length;
|
||||
} VERIFY_INFORMATION, *PVERIFY_INFORMATION;
|
||||
|
||||
typedef enum {
|
||||
EqualPriority,
|
||||
KeepPrefetchedData,
|
||||
KeepReadData
|
||||
} DISK_CACHE_RETENTION_PRIORITY;
|
||||
|
||||
typedef struct _DISK_CACHE_INFORMATION {
|
||||
BOOLEAN ParametersSavable;
|
||||
BOOLEAN ReadCacheEnabled;
|
||||
BOOLEAN WriteCacheEnabled;
|
||||
DISK_CACHE_RETENTION_PRIORITY ReadRetentionPriority;
|
||||
DISK_CACHE_RETENTION_PRIORITY WriteRetentionPriority;
|
||||
USHORT DisablePrefetchTransferLength;
|
||||
BOOLEAN PrefetchScalar;
|
||||
_ANONYMOUS_UNION union {
|
||||
struct {
|
||||
USHORT Minimum;
|
||||
USHORT Maximum;
|
||||
USHORT MaximumBlocks;
|
||||
} ScalarPrefetch;
|
||||
struct {
|
||||
USHORT Minimum;
|
||||
USHORT Maximum;
|
||||
} BlockPrefetch;
|
||||
} DUMMYUNIONNAME;
|
||||
} DISK_CACHE_INFORMATION, *PDISK_CACHE_INFORMATION;
|
||||
|
||||
typedef struct _DISK_GROW_PARTITION {
|
||||
ULONG PartitionNumber;
|
||||
LARGE_INTEGER BytesToGrow;
|
||||
} DISK_GROW_PARTITION, *PDISK_GROW_PARTITION;
|
||||
|
||||
/* GETVERSIONINPARAMS.fCapabilities constants */
|
||||
#define CAP_ATA_ID_CMD 1
|
||||
#define CAP_ATAPI_ID_CMD 2
|
||||
#define CAP_SMART_CMD 4
|
||||
|
||||
typedef struct _GETVERSIONINPARAMS {
|
||||
UCHAR bVersion;
|
||||
UCHAR bRevision;
|
||||
UCHAR bReserved;
|
||||
UCHAR bIDEDeviceMap;
|
||||
ULONG fCapabilities;
|
||||
ULONG dwReserved[4];
|
||||
} GETVERSIONINPARAMS, *PGETVERSIONINPARAMS, *LPGETVERSIONINPARAMS;
|
||||
|
||||
/* IDEREGS.bCommandReg constants */
|
||||
#define ATAPI_ID_CMD 0xA1
|
||||
#define ID_CMD 0xEC
|
||||
#define SMART_CMD 0xB0
|
||||
|
||||
#define SMART_CYL_LOW 0x4F
|
||||
#define SMART_CYL_HI 0xC2
|
||||
|
||||
typedef struct _IDEREGS {
|
||||
UCHAR bFeaturesReg;
|
||||
UCHAR bSectorCountReg;
|
||||
UCHAR bSectorNumberReg;
|
||||
UCHAR bCylLowReg;
|
||||
UCHAR bCylHighReg;
|
||||
UCHAR bDriveHeadReg;
|
||||
UCHAR bCommandReg;
|
||||
UCHAR bReserved;
|
||||
} IDEREGS, *PIDEREGS, *LPIDEREGS;
|
||||
|
||||
#include <pshpack1.h>
|
||||
typedef struct _SENDCMDINPARAMS {
|
||||
ULONG cBufferSize;
|
||||
IDEREGS irDriveRegs;
|
||||
UCHAR bDriveNumber;
|
||||
UCHAR bReserved[3];
|
||||
ULONG dwReserved[4];
|
||||
UCHAR bBuffer[1];
|
||||
} SENDCMDINPARAMS, *PSENDCMDINPARAMS, *LPSENDCMDINPARAMS;
|
||||
#include <poppack.h>
|
||||
|
||||
/* DRIVERSTATUS.bDriverError constants */
|
||||
#define SMART_NO_ERROR 0
|
||||
#define SMART_IDE_ERROR 1
|
||||
#define SMART_INVALID_FLAG 2
|
||||
#define SMART_INVALID_COMMAND 3
|
||||
#define SMART_INVALID_BUFFER 4
|
||||
#define SMART_INVALID_DRIVE 5
|
||||
#define SMART_INVALID_IOCTL 6
|
||||
#define SMART_ERROR_NO_MEM 7
|
||||
#define SMART_INVALID_REGISTER 8
|
||||
#define SMART_NOT_SUPPORTED 9
|
||||
#define SMART_NO_IDE_DEVICE 10
|
||||
|
||||
#define SMART_OFFLINE_ROUTINE_OFFLINE 0
|
||||
#define SMART_SHORT_SELFTEST_OFFLINE 1
|
||||
#define SMART_EXTENDED_SELFTEST_OFFLINE 2
|
||||
#define SMART_ABORT_OFFLINE_SELFTEST 127
|
||||
#define SMART_SHORT_SELFTEST_CAPTIVE 129
|
||||
#define SMART_EXTENDED_SELFTEST_CAPTIVE 130
|
||||
|
||||
typedef struct _DRIVERSTATUS {
|
||||
UCHAR bDriverError;
|
||||
UCHAR bIDEError;
|
||||
UCHAR bReserved[2];
|
||||
ULONG dwReserved[2];
|
||||
} DRIVERSTATUS, *PDRIVERSTATUS, *LPDRIVERSTATUS;
|
||||
|
||||
#define READ_ATTRIBUTE_BUFFER_SIZE 512
|
||||
#define IDENTIFY_BUFFER_SIZE 512
|
||||
#define READ_THRESHOLD_BUFFER_SIZE 512
|
||||
#define SMART_LOG_SECTOR_SIZE 512
|
||||
|
||||
#include <pshpack1.h>
|
||||
typedef struct _SENDCMDOUTPARAMS {
|
||||
ULONG cBufferSize;
|
||||
DRIVERSTATUS DriverStatus;
|
||||
UCHAR bBuffer[1];
|
||||
} SENDCMDOUTPARAMS, *PSENDCMDOUTPARAMS, *LPSENDCMDOUTPARAMS;
|
||||
#include <poppack.h>
|
||||
|
||||
#define READ_ATTRIBUTES 0xD0
|
||||
#define READ_THRESHOLDS 0xD1
|
||||
#define ENABLE_DISABLE_AUTOSAVE 0xD2
|
||||
#define SAVE_ATTRIBUTE_VALUES 0xD3
|
||||
#define EXECUTE_OFFLINE_DIAGS 0xD4
|
||||
#define SMART_READ_LOG 0xD5
|
||||
#define SMART_WRITE_LOG 0xd6
|
||||
#define ENABLE_SMART 0xD8
|
||||
#define DISABLE_SMART 0xD9
|
||||
#define RETURN_SMART_STATUS 0xDA
|
||||
#define ENABLE_DISABLE_AUTO_OFFLINE 0xDB
|
||||
|
||||
typedef struct _MAPPED_ADDRESS {
|
||||
struct _MAPPED_ADDRESS *NextMappedAddress;
|
||||
PVOID MappedAddress;
|
||||
ULONG NumberOfBytes;
|
||||
LARGE_INTEGER IoAddress;
|
||||
ULONG BusNumber;
|
||||
} MAPPED_ADDRESS, *PMAPPED_ADDRESS;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _NTDDDISK_H_ */
|
38
mingw-w64-headers/include/ntddft.h
Normal file
38
mingw-w64-headers/include/ntddft.h
Normal file
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* ntddft.h
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Alex Ionescu
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NTDDFT_
|
||||
#define _NTDDFT_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define FTTYPE ((ULONG)'f')
|
||||
|
||||
#define FT_SECONDARY_READ CTL_CODE(FTTYPE, 4, METHOD_OUT_DIRECT, FILE_READ_ACCESS)
|
||||
#define FT_PRIMARY_READ CTL_CODE(FTTYPE, 5, METHOD_OUT_DIRECT, FILE_READ_ACCESS)
|
||||
#define FT_BALANCED_READ_MODE CTL_CODE(FTTYPE, 6, METHOD_NEITHER, FILE_ANY_ACCESS)
|
||||
#define FT_SYNC_REDUNDANT_COPY CTL_CODE(FTTYPE, 7, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _NTDDFT_ */
|
||||
|
113
mingw-w64-headers/include/ntddpar.h
Normal file
113
mingw-w64-headers/include/ntddpar.h
Normal file
@ -0,0 +1,113 @@
|
||||
/*
|
||||
* ntddpar.h
|
||||
*
|
||||
* Parallel port driver interface
|
||||
*
|
||||
* This file is part of the w32api package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NTDDPAR_
|
||||
#define _NTDDPAR_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Parallel port device GUIDs */
|
||||
|
||||
DEFINE_GUID (GUID_DEVINTERFACE_PARALLEL,
|
||||
0x97F76EF0, 0xF883, 0x11D0, 0xAF, 0x1F, 0x00, 0x00, 0xF8, 0x00, 0x84, 0x5C);
|
||||
DEFINE_GUID (GUID_DEVINTERFACE_PARCLASS,
|
||||
0x811FC6A5, 0xF728, 0x11D0, 0xA5, 0x37, 0x00, 0x00, 0xF8, 0x75, 0x3E, 0xD1);
|
||||
|
||||
#define GUID_PARALLEL_DEVICE GUID_DEVINTERFACE_PARALLEL
|
||||
#define GUID_PARCLASS_DEVICE GUID_DEVINTERFACE_PARCLASS
|
||||
|
||||
|
||||
#define IOCTL_IEEE1284_GET_MODE \
|
||||
CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 5, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_IEEE1284_NEGOTIATE \
|
||||
CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 6, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_PAR_GET_DEFAULT_MODES \
|
||||
CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 10, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_PAR_GET_DEVICE_CAPS \
|
||||
CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 9, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_PAR_IS_PORT_FREE \
|
||||
CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 21, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_PAR_QUERY_DEVICE_ID \
|
||||
CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 3, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_PAR_QUERY_DEVICE_ID_SIZE \
|
||||
CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_PAR_QUERY_INFORMATION \
|
||||
CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_PAR_QUERY_LOCATION \
|
||||
CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 22, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_PAR_QUERY_RAW_DEVICE_ID \
|
||||
CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 12, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_PAR_SET_INFORMATION \
|
||||
CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_PAR_SET_READ_ADDRESS \
|
||||
CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 8, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_PAR_SET_WRITE_ADDRESS \
|
||||
CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 7, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
typedef struct _PAR_DEVICE_ID_SIZE_INFORMATION {
|
||||
ULONG DeviceIdSize;
|
||||
} PAR_DEVICE_ID_SIZE_INFORMATION, *PPAR_DEVICE_ID_SIZE_INFORMATION;
|
||||
|
||||
#define PARALLEL_INIT 0x01
|
||||
#define PARALLEL_AUTOFEED 0x02
|
||||
#define PARALLEL_PAPER_EMPTY 0x04
|
||||
#define PARALLEL_OFF_LINE 0x08
|
||||
#define PARALLEL_POWER_OFF 0x10
|
||||
#define PARALLEL_NOT_CONNECTED 0x20
|
||||
#define PARALLEL_BUSY 0x40
|
||||
#define PARALLEL_SELECTED 0x80
|
||||
|
||||
typedef struct _PAR_QUERY_INFORMATION {
|
||||
UCHAR Status;
|
||||
} PAR_QUERY_INFORMATION, *PPAR_QUERY_INFORMATION;
|
||||
|
||||
typedef struct _PAR_SET_INFORMATION {
|
||||
UCHAR Init;
|
||||
} PAR_SET_INFORMATION, *PPAR_SET_INFORMATION;
|
||||
|
||||
typedef struct _PARCLASS_NEGOTIATION_MASK {
|
||||
USHORT usReadMask;
|
||||
USHORT usWriteMask;
|
||||
} PARCLASS_NEGOTIATION_MASK, *PPARCLASS_NEGOTIATION_MASK;
|
||||
|
||||
#define NONE 0x0000
|
||||
#define CENTRONICS 0x0001
|
||||
#define IEEE_COMPATIBILITY 0x0002
|
||||
#define NIBBLE 0x0004
|
||||
#define CHANNEL_NIBBLE 0x0008
|
||||
#define BYTE_BIDIR 0x0010
|
||||
#define EPP_HW 0x0020
|
||||
#define EPP_SW 0x0040
|
||||
#define EPP_ANY 0x0060
|
||||
#define BOUNDED_ECP 0x0080
|
||||
#define ECP_HW_NOIRQ 0x0100
|
||||
#define ECP_HW_IRQ 0x0200
|
||||
#define ECP_SW 0x0400
|
||||
#define ECP_ANY 0x0780
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _NTDDPAR_ */
|
447
mingw-w64-headers/include/ntddser.h
Normal file
447
mingw-w64-headers/include/ntddser.h
Normal file
@ -0,0 +1,447 @@
|
||||
/*
|
||||
* ntddser.h
|
||||
*
|
||||
* Serial port driver interface
|
||||
*
|
||||
* This file is part of the w32api package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NTDDSER_
|
||||
#define _NTDDSER_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* GUIDs */
|
||||
|
||||
DEFINE_GUID(GUID_DEVINTERFACE_COMPORT,
|
||||
0x86e0d1e0L, 0x8089, 0x11d0, 0x9c, 0xe4, 0x08, 0x00, 0x3e, 0x30, 0x1f, 0x73);
|
||||
|
||||
#define GUID_CLASS_COMPORT GUID_DEVINTERFACE_COMPORT
|
||||
|
||||
DEFINE_GUID(GUID_DEVINTERFACE_SERENUM_BUS_ENUMERATOR,
|
||||
0x4D36E978L, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
|
||||
|
||||
#define GUID_SERENUM_BUS_ENUMERATOR GUID_DEVINTERFACE_SERENUM_BUS_ENUMERATOR
|
||||
|
||||
#define IOCTL_SERIAL_CLEAR_STATS \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 36, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_CLR_DTR \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 10, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_CLR_RTS \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 13, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_CONFIG_SIZE \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 32, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_GET_BAUD_RATE \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 20, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_GET_CHARS \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 22, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_GET_COMMSTATUS \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 27, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_GET_DTRRTS \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 30, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_GET_HANDFLOW \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 24, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_GET_LINE_CONTROL \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 21, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_GET_MODEM_CONTROL \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 37, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_GET_MODEMSTATUS \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 26, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_GET_PROPERTIES \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 29, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_GET_STATS \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 35, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_GET_TIMEOUTS \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 8, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_GET_WAIT_MASK \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 16, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_IMMEDIATE_CHAR \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 6, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_LSRMST_INSERT \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 31, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_PURGE \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 19, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_RESET_DEVICE \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 11, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_SET_BAUD_RATE \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_SET_BREAK_ON \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_SET_BREAK_OFF \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 5, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_SET_CHARS \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 23, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_SET_DTR \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 9, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_SET_FIFO_CONTROL \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 39, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_SET_HANDFLOW \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 25, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_SET_LINE_CONTROL \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 3, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_SET_MODEM_CONTROL \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 38, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_SET_QUEUE_SIZE \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_SET_RTS \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 12, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_SET_TIMEOUTS \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 7, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_SET_WAIT_MASK \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 17, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_SET_XOFF \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 14, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_SET_XON \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 15, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_WAIT_ON_MASK \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 18, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_XOFF_COUNTER \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 28, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_SERIAL_INTERNAL_BASIC_SETTINGS \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 3, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_INTERNAL_CANCEL_WAIT_WAKE \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_INTERNAL_DO_WAIT_WAKE \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERIAL_INTERNAL_RESTORE_SETTINGS \
|
||||
CTL_CODE (FILE_DEVICE_SERIAL_PORT, 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_SERENUM_PORT_DESC \
|
||||
CTL_CODE (FILE_DEVICE_SERENUM, 130, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_SERENUM_GET_PORT_NAME \
|
||||
CTL_CODE (FILE_DEVICE_SERENUM, 131, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_INTERNAL_SERENUM_REMOVE_SELF \
|
||||
CTL_CODE (FILE_DEVICE_SERENUM, 129, METHOD_NEITHER, FILE_ANY_ACCESS)
|
||||
|
||||
|
||||
typedef struct _SERIAL_BAUD_RATE {
|
||||
ULONG BaudRate;
|
||||
} SERIAL_BAUD_RATE, *PSERIAL_BAUD_RATE;
|
||||
|
||||
/* SERIAL_BAUD_RATE.BaudRate constants */
|
||||
#define SERIAL_BAUD_075 0x00000001
|
||||
#define SERIAL_BAUD_110 0x00000002
|
||||
#define SERIAL_BAUD_134_5 0x00000004
|
||||
#define SERIAL_BAUD_150 0x00000008
|
||||
#define SERIAL_BAUD_300 0x00000010
|
||||
#define SERIAL_BAUD_600 0x00000020
|
||||
#define SERIAL_BAUD_1200 0x00000040
|
||||
#define SERIAL_BAUD_1800 0x00000080
|
||||
#define SERIAL_BAUD_2400 0x00000100
|
||||
#define SERIAL_BAUD_4800 0x00000200
|
||||
#define SERIAL_BAUD_7200 0x00000400
|
||||
#define SERIAL_BAUD_9600 0x00000800
|
||||
#define SERIAL_BAUD_14400 0x00001000
|
||||
#define SERIAL_BAUD_19200 0x00002000
|
||||
#define SERIAL_BAUD_38400 0x00004000
|
||||
#define SERIAL_BAUD_56K 0x00008000
|
||||
#define SERIAL_BAUD_128K 0x00010000
|
||||
#define SERIAL_BAUD_115200 0x00020000
|
||||
#define SERIAL_BAUD_57600 0x00040000
|
||||
#define SERIAL_BAUD_USER 0x10000000
|
||||
|
||||
typedef struct _SERIAL_CHARS {
|
||||
UCHAR EofChar;
|
||||
UCHAR ErrorChar;
|
||||
UCHAR BreakChar;
|
||||
UCHAR EventChar;
|
||||
UCHAR XonChar;
|
||||
UCHAR XoffChar;
|
||||
} SERIAL_CHARS, *PSERIAL_CHARS;
|
||||
|
||||
typedef struct _SERIAL_STATUS {
|
||||
ULONG Errors;
|
||||
ULONG HoldReasons;
|
||||
ULONG AmountInInQueue;
|
||||
ULONG AmountInOutQueue;
|
||||
BOOLEAN EofReceived;
|
||||
BOOLEAN WaitForImmediate;
|
||||
} SERIAL_STATUS, *PSERIAL_STATUS;
|
||||
|
||||
typedef struct _SERIAL_HANDFLOW {
|
||||
ULONG ControlHandShake;
|
||||
ULONG FlowReplace;
|
||||
LONG XonLimit;
|
||||
LONG XoffLimit;
|
||||
} SERIAL_HANDFLOW, *PSERIAL_HANDFLOW;
|
||||
|
||||
#define SERIAL_DTR_MASK 0x00000003
|
||||
#define SERIAL_DTR_CONTROL 0x00000001
|
||||
#define SERIAL_DTR_HANDSHAKE 0x00000002
|
||||
#define SERIAL_CTS_HANDSHAKE 0x00000008
|
||||
#define SERIAL_DSR_HANDSHAKE 0x00000010
|
||||
#define SERIAL_DCD_HANDSHAKE 0x00000020
|
||||
#define SERIAL_OUT_HANDSHAKEMASK 0x00000038
|
||||
#define SERIAL_DSR_SENSITIVITY 0x00000040
|
||||
#define SERIAL_ERROR_ABORT 0x80000000
|
||||
#define SERIAL_CONTROL_INVALID 0x7fffff84
|
||||
#define SERIAL_AUTO_TRANSMIT 0x00000001
|
||||
#define SERIAL_AUTO_RECEIVE 0x00000002
|
||||
#define SERIAL_ERROR_CHAR 0x00000004
|
||||
#define SERIAL_NULL_STRIPPING 0x00000008
|
||||
#define SERIAL_BREAK_CHAR 0x00000010
|
||||
#define SERIAL_RTS_MASK 0x000000c0
|
||||
#define SERIAL_RTS_CONTROL 0x00000040
|
||||
#define SERIAL_RTS_HANDSHAKE 0x00000080
|
||||
#define SERIAL_TRANSMIT_TOGGLE 0x000000c0
|
||||
#define SERIAL_XOFF_CONTINUE 0x80000000
|
||||
#define SERIAL_FLOW_INVALID 0x7fffff20
|
||||
|
||||
typedef struct _SERIAL_LINE_CONTROL {
|
||||
UCHAR StopBits;
|
||||
UCHAR Parity;
|
||||
UCHAR WordLength;
|
||||
} SERIAL_LINE_CONTROL, *PSERIAL_LINE_CONTROL;
|
||||
|
||||
/* SERIAL_LINE_CONTROL.StopBits constants */
|
||||
#define STOP_BIT_1 0x00
|
||||
#define STOP_BITS_1_5 0x01
|
||||
#define STOP_BITS_2 0x02
|
||||
|
||||
/* SERIAL_LINE_CONTROL.Parity constants */
|
||||
#define NO_PARITY 0x00
|
||||
#define ODD_PARITY 0x01
|
||||
#define EVEN_PARITY 0x02
|
||||
#define MARK_PARITY 0x03
|
||||
#define SPACE_PARITY 0x04
|
||||
|
||||
/* IOCTL_SERIAL_(GET_MODEM_CONTROL, SET_MODEM_CONTROL) flags */
|
||||
#define SERIAL_IOC_MCR_DTR 0x00000001
|
||||
#define SERIAL_IOC_MCR_RTS 0x00000002
|
||||
#define SERIAL_IOC_MCR_OUT1 0x00000004
|
||||
#define SERIAL_IOC_MCR_OUT2 0x00000008
|
||||
#define SERIAL_IOC_MCR_LOOP 0x00000010
|
||||
|
||||
typedef struct _SERIAL_COMMPROP {
|
||||
USHORT PacketLength;
|
||||
USHORT PacketVersion;
|
||||
ULONG ServiceMask;
|
||||
ULONG Reserved1;
|
||||
ULONG MaxTxQueue;
|
||||
ULONG MaxRxQueue;
|
||||
ULONG MaxBaud;
|
||||
ULONG ProvSubType;
|
||||
ULONG ProvCapabilities;
|
||||
ULONG SettableParams;
|
||||
ULONG SettableBaud;
|
||||
USHORT SettableData;
|
||||
USHORT SettableStopParity;
|
||||
ULONG CurrentTxQueue;
|
||||
ULONG CurrentRxQueue;
|
||||
ULONG ProvSpec1;
|
||||
ULONG ProvSpec2;
|
||||
WCHAR ProvChar[1];
|
||||
} SERIAL_COMMPROP, *PSERIAL_COMMPROP;
|
||||
|
||||
/* SERIAL_COMMPROP.SettableParams flags */
|
||||
#define SERIAL_SP_PARITY 0x0001
|
||||
#define SERIAL_SP_BAUD 0x0002
|
||||
#define SERIAL_SP_DATABITS 0x0004
|
||||
#define SERIAL_SP_STOPBITS 0x0008
|
||||
#define SERIAL_SP_HANDSHAKING 0x0010
|
||||
#define SERIAL_SP_PARITY_CHECK 0x0020
|
||||
#define SERIAL_SP_CARRIER_DETECT 0x0040
|
||||
|
||||
/* SERIAL_COMMPROP.ProvCapabilities flags */
|
||||
#define SERIAL_PCF_DTRDSR 0x00000001
|
||||
#define SERIAL_PCF_RTSCTS 0x00000002
|
||||
#define SERIAL_PCF_CD 0x00000004
|
||||
#define SERIAL_PCF_PARITY_CHECK 0x00000008
|
||||
#define SERIAL_PCF_XONXOFF 0x00000010
|
||||
#define SERIAL_PCF_SETXCHAR 0x00000020
|
||||
#define SERIAL_PCF_TOTALTIMEOUTS 0x00000040
|
||||
#define SERIAL_PCF_INTTIMEOUTS 0x00000080
|
||||
#define SERIAL_PCF_SPECIALCHARS 0x00000100
|
||||
#define SERIAL_PCF_16BITMODE 0x00000200
|
||||
|
||||
/* SERIAL_COMMPROP.SettableData flags */
|
||||
#define SERIAL_DATABITS_5 0x0001
|
||||
#define SERIAL_DATABITS_6 0x0002
|
||||
#define SERIAL_DATABITS_7 0x0004
|
||||
#define SERIAL_DATABITS_8 0x0008
|
||||
#define SERIAL_DATABITS_16 0x0010
|
||||
#define SERIAL_DATABITS_16X 0x0020
|
||||
|
||||
/* SERIAL_COMMPROP.SettableStopParity flags */
|
||||
#define SERIAL_STOPBITS_10 0x0001
|
||||
#define SERIAL_STOPBITS_15 0x0002
|
||||
#define SERIAL_STOPBITS_20 0x0004
|
||||
#define SERIAL_PARITY_NONE 0x0100
|
||||
#define SERIAL_PARITY_ODD 0x0200
|
||||
#define SERIAL_PARITY_EVEN 0x0400
|
||||
#define SERIAL_PARITY_MARK 0x0800
|
||||
#define SERIAL_PARITY_SPACE 0x1000
|
||||
|
||||
typedef struct _SERIALPERF_STATS {
|
||||
ULONG ReceivedCount;
|
||||
ULONG TransmittedCount;
|
||||
ULONG FrameErrorCount;
|
||||
ULONG SerialOverrunErrorCount;
|
||||
ULONG BufferOverrunErrorCount;
|
||||
ULONG ParityErrorCount;
|
||||
} SERIALPERF_STATS, *PSERIALPERF_STATS;
|
||||
|
||||
typedef struct _SERIAL_TIMEOUTS {
|
||||
ULONG ReadIntervalTimeout;
|
||||
ULONG ReadTotalTimeoutMultiplier;
|
||||
ULONG ReadTotalTimeoutConstant;
|
||||
ULONG WriteTotalTimeoutMultiplier;
|
||||
ULONG WriteTotalTimeoutConstant;
|
||||
} SERIAL_TIMEOUTS, *PSERIAL_TIMEOUTS;
|
||||
|
||||
/* IOCTL_SERIAL_(GET_WAIT_MASK, SET_WAIT_MASK, WAIT_ON_MASK) flags */
|
||||
#define SERIAL_EV_RXCHAR 0x0001
|
||||
#define SERIAL_EV_RXFLAG 0x0002
|
||||
#define SERIAL_EV_TXEMPTY 0x0004
|
||||
#define SERIAL_EV_CTS 0x0008
|
||||
#define SERIAL_EV_DSR 0x0010
|
||||
#define SERIAL_EV_RLSD 0x0020
|
||||
#define SERIAL_EV_BREAK 0x0040
|
||||
#define SERIAL_EV_ERR 0x0080
|
||||
#define SERIAL_EV_RING 0x0100
|
||||
#define SERIAL_EV_PERR 0x0200
|
||||
#define SERIAL_EV_RX80FULL 0x0400
|
||||
#define SERIAL_EV_EVENT1 0x0800
|
||||
#define SERIAL_EV_EVENT2 0x1000
|
||||
|
||||
/* IOCTL_SERIAL_LSRMST_INSERT constants */
|
||||
#define SERIAL_LSRMST_LSR_DATA 0x01
|
||||
#define SERIAL_LSRMST_LSR_NODATA 0x02
|
||||
#define SERIAL_LSRMST_MST 0x03
|
||||
#define SERIAL_LSRMST_ESCAPE 0x00
|
||||
|
||||
/* IOCTL_SERIAL_PURGE constants */
|
||||
#define SERIAL_PURGE_TXABORT 0x00000001
|
||||
#define SERIAL_PURGE_RXABORT 0x00000002
|
||||
#define SERIAL_PURGE_TXCLEAR 0x00000004
|
||||
#define SERIAL_PURGE_RXCLEAR 0x00000008
|
||||
|
||||
/* IOCTL_SERIAL_SET_FIFO_CONTROL constants */
|
||||
#define SERIAL_IOC_FCR_FIFO_ENABLE 0x00000001
|
||||
#define SERIAL_IOC_FCR_RCVR_RESET 0x00000002
|
||||
#define SERIAL_IOC_FCR_XMIT_RESET 0x00000004
|
||||
#define SERIAL_IOC_FCR_DMA_MODE 0x00000008
|
||||
#define SERIAL_IOC_FCR_RES1 0x00000010
|
||||
#define SERIAL_IOC_FCR_RES2 0x00000020
|
||||
#define SERIAL_IOC_FCR_RCVR_TRIGGER_LSB 0x00000040
|
||||
#define SERIAL_IOC_FCR_RCVR_TRIGGER_MSB 0x00000080
|
||||
|
||||
typedef struct _SERIAL_QUEUE_SIZE {
|
||||
ULONG InSize;
|
||||
ULONG OutSize;
|
||||
} SERIAL_QUEUE_SIZE, *PSERIAL_QUEUE_SIZE;
|
||||
|
||||
typedef struct _SERIAL_XOFF_COUNTER {
|
||||
ULONG Timeout;
|
||||
LONG Counter;
|
||||
UCHAR XoffChar;
|
||||
} SERIAL_XOFF_COUNTER, *PSERIAL_XOFF_COUNTER;
|
||||
|
||||
typedef struct _SERIAL_BASIC_SETTINGS {
|
||||
SERIAL_TIMEOUTS Timeouts;
|
||||
SERIAL_HANDFLOW HandFlow;
|
||||
ULONG RxFifo;
|
||||
ULONG TxFifo;
|
||||
} SERIAL_BASIC_SETTINGS, *PSERIAL_BASIC_SETTINGS;
|
||||
|
||||
typedef struct _SERENUM_PORT_DESC {
|
||||
ULONG Size;
|
||||
PVOID PortHandle;
|
||||
PHYSICAL_ADDRESS PortAddress;
|
||||
USHORT Reserved[1];
|
||||
} SERENUM_PORT_DESC, *PSERENUM_PORT_DESC;
|
||||
|
||||
typedef UCHAR
|
||||
(NTAPI*PSERENUM_READPORT)(
|
||||
PVOID SerPortAddress);
|
||||
|
||||
typedef VOID
|
||||
(NTAPI*PSERENUM_WRITEPORT)(
|
||||
PVOID SerPortAddress,
|
||||
UCHAR Value);
|
||||
|
||||
typedef enum _SERENUM_PORTION {
|
||||
SerenumFirstHalf,
|
||||
SerenumSecondHalf,
|
||||
SerenumWhole
|
||||
} SERENUM_PORTION;
|
||||
|
||||
typedef struct _SERENUM_PORT_PARAMETERS {
|
||||
ULONG Size;
|
||||
PSERENUM_READPORT ReadAccessor;
|
||||
PSERENUM_WRITEPORT WriteAccessor;
|
||||
PVOID SerPortAddress;
|
||||
PVOID HardwareHandle;
|
||||
SERENUM_PORTION Portion;
|
||||
USHORT NumberAxis;
|
||||
USHORT Reserved[3];
|
||||
} SERENUM_PORT_PARAMETERS, *PSERENUM_PORT_PARAMETERS;
|
||||
|
||||
#define SERIAL_ERROR_BREAK 0x00000001
|
||||
#define SERIAL_ERROR_FRAMING 0x00000002
|
||||
#define SERIAL_ERROR_OVERRUN 0x00000004
|
||||
#define SERIAL_ERROR_QUEUEOVERRUN 0x00000008
|
||||
#define SERIAL_ERROR_PARITY 0x00000010
|
||||
|
||||
#define SERIAL_SP_UNSPECIFIED 0x00000000
|
||||
#define SERIAL_SP_RS232 0x00000001
|
||||
#define SERIAL_SP_PARALLEL 0x00000002
|
||||
#define SERIAL_SP_RS422 0x00000003
|
||||
#define SERIAL_SP_RS423 0x00000004
|
||||
#define SERIAL_SP_RS449 0x00000005
|
||||
#define SERIAL_SP_MODEM 0X00000006
|
||||
#define SERIAL_SP_FAX 0x00000021
|
||||
#define SERIAL_SP_SCANNER 0x00000022
|
||||
#define SERIAL_SP_BRIDGE 0x00000100
|
||||
#define SERIAL_SP_LAT 0x00000101
|
||||
#define SERIAL_SP_TELNET 0x00000102
|
||||
#define SERIAL_SP_X25 0x00000103
|
||||
#define SERIAL_SP_SERIALCOMM 0x00000001
|
||||
|
||||
#define SERIAL_TX_WAITING_FOR_CTS 0x00000001
|
||||
#define SERIAL_TX_WAITING_FOR_DSR 0x00000002
|
||||
#define SERIAL_TX_WAITING_FOR_DCD 0x00000004
|
||||
#define SERIAL_TX_WAITING_FOR_XON 0x00000008
|
||||
#define SERIAL_TX_WAITING_XOFF_SENT 0x00000010
|
||||
#define SERIAL_TX_WAITING_ON_BREAK 0x00000020
|
||||
#define SERIAL_RX_WAITING_FOR_DSR 0x00000040
|
||||
|
||||
#define SERIAL_DTR_STATE 0x00000001
|
||||
#define SERIAL_RTS_STATE 0x00000002
|
||||
#define SERIAL_CTS_STATE 0x00000010
|
||||
#define SERIAL_DSR_STATE 0x00000020
|
||||
#define SERIAL_RI_STATE 0x00000040
|
||||
#define SERIAL_DCD_STATE 0x00000080
|
||||
|
||||
typedef struct _SERIALCONFIG {
|
||||
ULONG Size;
|
||||
USHORT Version;
|
||||
ULONG SubType;
|
||||
ULONG ProvOffset;
|
||||
ULONG ProviderSize;
|
||||
WCHAR ProviderData[1];
|
||||
} SERIALCONFIG,*PSERIALCONFIG;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _NTDDSER_ */
|
74
mingw-w64-headers/include/ntddtape.h
Normal file
74
mingw-w64-headers/include/ntddtape.h
Normal file
@ -0,0 +1,74 @@
|
||||
/*
|
||||
* ntddtape.h
|
||||
*
|
||||
* Tape device IOCTL interface.
|
||||
*
|
||||
* This file is part of the w32api package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NTDDTAPE_
|
||||
#define _NTDDTAPE_
|
||||
|
||||
#include "ntddstor.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define DD_TAPE_DEVICE_NAME "\\Device\\Tape"
|
||||
#define DD_TAPE_DEVICE_NAME_U L"\\Device\\Tape"
|
||||
|
||||
#define IOCTL_TAPE_BASE FILE_DEVICE_TAPE
|
||||
|
||||
#define IOCTL_TAPE_CHECK_VERIFY CTL_CODE(IOCTL_TAPE_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
#define IOCTL_TAPE_CREATE_PARTITION CTL_CODE(IOCTL_TAPE_BASE, 0x000a, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
#define IOCTL_TAPE_ERASE CTL_CODE(IOCTL_TAPE_BASE, 0x0000, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
#define IOCTL_TAPE_FIND_NEW_DEVICES CTL_CODE(IOCTL_DISK_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
#define IOCTL_TAPE_GET_DRIVE_PARAMS CTL_CODE(IOCTL_TAPE_BASE, 0x0005, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
#define IOCTL_TAPE_GET_MEDIA_PARAMS CTL_CODE(IOCTL_TAPE_BASE, 0x0007, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
#define IOCTL_TAPE_GET_POSITION CTL_CODE(IOCTL_TAPE_BASE, 0x0003, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
#define IOCTL_TAPE_GET_STATUS CTL_CODE(IOCTL_TAPE_BASE, 0x0009, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_TAPE_PREPARE CTL_CODE(IOCTL_TAPE_BASE, 0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
#define IOCTL_TAPE_SET_DRIVE_PARAMS CTL_CODE(IOCTL_TAPE_BASE, 0x0006, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
#define IOCTL_TAPE_SET_MEDIA_PARAMS CTL_CODE(IOCTL_TAPE_BASE, 0x0008, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
#define IOCTL_TAPE_SET_POSITION CTL_CODE(IOCTL_TAPE_BASE, 0x0004, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
#define IOCTL_TAPE_WRITE_MARKS CTL_CODE(IOCTL_TAPE_BASE, 0x0002, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
|
||||
|
||||
typedef enum _TAPE_DRIVE_PROBLEM_TYPE {
|
||||
TapeDriveProblemNone,
|
||||
TapeDriveReadWriteWarning,
|
||||
TapeDriveReadWriteError,
|
||||
TapeDriveReadWarning,
|
||||
TapeDriveWriteWarning,
|
||||
TapeDriveReadError,
|
||||
TapeDriveWriteError,
|
||||
TapeDriveHardwareError,
|
||||
TapeDriveUnsupportedMedia,
|
||||
TapeDriveScsiConnectionError,
|
||||
TapeDriveTimetoClean,
|
||||
TapeDriveCleanDriveNow,
|
||||
TapeDriveMediaLifeExpired,
|
||||
TapeDriveSnappedTape
|
||||
} TAPE_DRIVE_PROBLEM_TYPE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _NTDDTAPE_ */
|
48
mingw-w64-headers/include/ntddtdi.h
Normal file
48
mingw-w64-headers/include/ntddtdi.h
Normal file
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* ntddtdi.h
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NTDDTDI_
|
||||
#define _NTDDTDI_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define DD_TDI_DEVICE_NAME "\\Device\\UNKNOWN"
|
||||
#define _TDI_CONTROL_CODE(request,method) CTL_CODE(FILE_DEVICE_TRANSPORT, request, method, FILE_ANY_ACCESS)
|
||||
#define IOCTL_TDI_ACCEPT _TDI_CONTROL_CODE( 0, METHOD_BUFFERED )
|
||||
#define IOCTL_TDI_CONNECT _TDI_CONTROL_CODE( 1, METHOD_BUFFERED )
|
||||
#define IOCTL_TDI_DISCONNECT _TDI_CONTROL_CODE( 2, METHOD_BUFFERED )
|
||||
#define IOCTL_TDI_LISTEN _TDI_CONTROL_CODE( 3, METHOD_BUFFERED )
|
||||
#define IOCTL_TDI_QUERY_INFORMATION _TDI_CONTROL_CODE( 4, METHOD_OUT_DIRECT )
|
||||
#define IOCTL_TDI_RECEIVE _TDI_CONTROL_CODE( 5, METHOD_OUT_DIRECT )
|
||||
#define IOCTL_TDI_RECEIVE_DATAGRAM _TDI_CONTROL_CODE( 6, METHOD_OUT_DIRECT )
|
||||
#define IOCTL_TDI_SEND _TDI_CONTROL_CODE( 7, METHOD_IN_DIRECT )
|
||||
#define IOCTL_TDI_SEND_DATAGRAM _TDI_CONTROL_CODE( 8, METHOD_IN_DIRECT )
|
||||
#define IOCTL_TDI_SET_EVENT_HANDLER _TDI_CONTROL_CODE( 9, METHOD_BUFFERED )
|
||||
#define IOCTL_TDI_SET_INFORMATION _TDI_CONTROL_CODE( 10, METHOD_IN_DIRECT )
|
||||
#define IOCTL_TDI_ASSOCIATE_ADDRESS _TDI_CONTROL_CODE( 11, METHOD_BUFFERED )
|
||||
#define IOCTL_TDI_DISASSOCIATE_ADDRESS _TDI_CONTROL_CODE( 12, METHOD_BUFFERED )
|
||||
#define IOCTL_TDI_ACTION _TDI_CONTROL_CODE( 13, METHOD_OUT_DIRECT )
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _NTDDTDI_ */
|
||||
|
475
mingw-w64-headers/include/ntddvdeo.h
Normal file
475
mingw-w64-headers/include/ntddvdeo.h
Normal file
@ -0,0 +1,475 @@
|
||||
/*
|
||||
* ntddvdeo.h
|
||||
*
|
||||
* Definitions for video devices
|
||||
*
|
||||
* This file is part of the w32api package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NTDDVDEO_
|
||||
#define _NTDDVDEO_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define VIDEO_DEVICE_NAME "DISPLAY%d"
|
||||
#define WVIDEO_DEVICE_NAME L"DISPLAY%d"
|
||||
|
||||
#define DD_FULLSCREEN_VIDEO_DEVICE_NAME L"\\Device\\FSVideo"
|
||||
|
||||
DEFINE_GUID(GUID_DEVINTERFACE_DISPLAY_ADAPTER, \
|
||||
0x5b45201d, 0xf2f2, 0x4f3b, 0x85, 0xbb, 0x30, 0xff, 0x1f, 0x95, 0x35, 0x99);
|
||||
|
||||
#define IOCTL_VIDEO_ENABLE_VDM \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x00, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_DISABLE_VDM \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x01, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_REGISTER_VDM \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x02, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_SET_OUTPUT_DEVICE_POWER_STATE \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x03, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_GET_OUTPUT_DEVICE_POWER_STATE \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x04, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_MONITOR_DEVICE \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x05, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_ENUM_MONITOR_PDO \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x06, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_INIT_WIN32K_CALLBACKS \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x07, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_HANDLE_VIDEOPARAMETERS \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x08, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_IS_VGA_DEVICE \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x09, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_USE_DEVICE_IN_SESSION \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x0a, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_PREPARE_FOR_EARECOVERY \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x0b, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_DISABLE_CURSOR \
|
||||
CTL_CODE (FILE_DEVICE_VIDEO, 0x109, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_DISABLE_POINTER \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x10f, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_ENABLE_CURSOR \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x108, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_ENABLE_POINTER \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x10e, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_FREE_PUBLIC_ACCESS_RANGES \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x119, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_GET_BANK_SELECT_CODE \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x115, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_GET_CHILD_STATE \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x120, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_GET_POWER_MANAGEMENT \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x11c, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_LOAD_AND_SET_FONT \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x105, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_MAP_VIDEO_MEMORY \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x116, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_QUERY_AVAIL_MODES \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x100, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_QUERY_COLOR_CAPABILITIES \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x11a, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_QUERY_CURRENT_MODE \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x102, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_QUERY_CURSOR_ATTR \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x10b, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_QUERY_CURSOR_POSITION \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x10d, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_QUERY_NUM_AVAIL_MODES \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x101, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_QUERY_POINTER_ATTR \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x111, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_QUERY_POINTER_CAPABILITIES \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x114, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_QUERY_POINTER_POSITION \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x113, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_QUERY_PUBLIC_ACCESS_RANGES \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x118, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_RESET_DEVICE \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x104, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_RESTORE_HARDWARE_STATE \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x81, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_SAVE_HARDWARE_STATE \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x80, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_SET_CHILD_STATE_CONFIGURATION \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x122, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_SET_COLOR_REGISTERS \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x107, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_SET_CURRENT_MODE \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x103, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_SET_CURSOR_ATTR \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x10a, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_SET_CURSOR_POSITION \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x10c, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_SET_PALETTE_REGISTERS \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x106, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_SET_POINTER_ATTR \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x110, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_SET_POINTER_POSITION \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x112, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_SET_POWER_MANAGEMENT \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x11b, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_SHARE_VIDEO_MEMORY \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x11d, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_SWITCH_DUALVIEW \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x123, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_UNMAP_VIDEO_MEMORY \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x117, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_UNSHARE_VIDEO_MEMORY \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x11e, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VIDEO_VALIDATE_CHILD_STATE_CONFIGURATION \
|
||||
CTL_CODE(FILE_DEVICE_VIDEO, 0x121, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
|
||||
|
||||
typedef struct _VIDEO_MEMORY {
|
||||
PVOID RequestedVirtualAddress;
|
||||
} VIDEO_MEMORY, *PVIDEO_MEMORY;
|
||||
|
||||
typedef struct _VIDEO_MEMORY_INFORMATION {
|
||||
PVOID VideoRamBase;
|
||||
ULONG VideoRamLength;
|
||||
PVOID FrameBufferBase;
|
||||
ULONG FrameBufferLength;
|
||||
} VIDEO_MEMORY_INFORMATION, *PVIDEO_MEMORY_INFORMATION;
|
||||
|
||||
/* VIDEO_MODE.RequestedMode */
|
||||
#define VIDEO_MODE_MAP_MEM_LINEAR 0x40000000
|
||||
#define VIDEO_MODE_NO_ZERO_MEMORY 0x80000000
|
||||
|
||||
typedef struct _VIDEO_MODE {
|
||||
ULONG RequestedMode;
|
||||
} VIDEO_MODE, *PVIDEO_MODE;
|
||||
|
||||
/* VIDEO_MODE_INFORMATION.AttributeFlags */
|
||||
#define VIDEO_MODE_COLOR 0x0001
|
||||
#define VIDEO_MODE_GRAPHICS 0x0002
|
||||
#define VIDEO_MODE_PALETTE_DRIVEN 0x0004
|
||||
#define VIDEO_MODE_MANAGED_PALETTE 0x0008
|
||||
#define VIDEO_MODE_INTERLACED 0x0010
|
||||
#define VIDEO_MODE_NO_OFF_SCREEN 0x0020
|
||||
#define VIDEO_MODE_NO_64_BIT_ACCESS 0x0040
|
||||
#define VIDEO_MODE_BANKED 0x0080
|
||||
#define VIDEO_MODE_LINEAR 0x0100
|
||||
|
||||
typedef struct _VIDEO_MODE_INFORMATION {
|
||||
ULONG Length;
|
||||
ULONG ModeIndex;
|
||||
ULONG VisScreenWidth;
|
||||
ULONG VisScreenHeight;
|
||||
ULONG ScreenStride;
|
||||
ULONG NumberOfPlanes;
|
||||
ULONG BitsPerPlane;
|
||||
ULONG Frequency;
|
||||
ULONG XMillimeter;
|
||||
ULONG YMillimeter;
|
||||
ULONG NumberRedBits;
|
||||
ULONG NumberGreenBits;
|
||||
ULONG NumberBlueBits;
|
||||
ULONG RedMask;
|
||||
ULONG GreenMask;
|
||||
ULONG BlueMask;
|
||||
ULONG AttributeFlags;
|
||||
ULONG VideoMemoryBitmapWidth;
|
||||
ULONG VideoMemoryBitmapHeight;
|
||||
ULONG DriverSpecificAttributeFlags;
|
||||
} VIDEO_MODE_INFORMATION, *PVIDEO_MODE_INFORMATION;
|
||||
|
||||
typedef struct _VIDEO_NUM_MODES {
|
||||
ULONG NumModes;
|
||||
ULONG ModeInformationLength;
|
||||
} VIDEO_NUM_MODES, *PVIDEO_NUM_MODES;
|
||||
|
||||
typedef enum _VIDEO_POWER_STATE {
|
||||
VideoPowerUnspecified = 0,
|
||||
VideoPowerOn = 1,
|
||||
VideoPowerStandBy,
|
||||
VideoPowerSuspend,
|
||||
VideoPowerOff,
|
||||
VideoPowerHibernate,
|
||||
VideoPowerShutdown,
|
||||
VideoPowerMaximum
|
||||
} VIDEO_POWER_STATE, *PVIDEO_POWER_STATE;
|
||||
|
||||
typedef struct _VIDEO_POWER_MANAGEMENT {
|
||||
ULONG Length;
|
||||
ULONG DPMSVersion;
|
||||
ULONG PowerState;
|
||||
} VIDEO_POWER_MANAGEMENT, *PVIDEO_POWER_MANAGEMENT;
|
||||
|
||||
typedef struct _VIDEO_PUBLIC_ACCESS_RANGES {
|
||||
ULONG InIoSpace;
|
||||
ULONG MappedInIoSpace;
|
||||
PVOID VirtualAddress;
|
||||
} VIDEO_PUBLIC_ACCESS_RANGES, *PVIDEO_PUBLIC_ACCESS_RANGES;
|
||||
|
||||
typedef struct _VIDEO_SHARE_MEMORY {
|
||||
HANDLE ProcessHandle;
|
||||
ULONG ViewOffset;
|
||||
ULONG ViewSize;
|
||||
PVOID RequestedVirtualAddress;
|
||||
} VIDEO_SHARE_MEMORY, *PVIDEO_SHARE_MEMORY;
|
||||
|
||||
typedef struct _VIDEO_SHARE_MEMORY_INFORMATION {
|
||||
ULONG SharedViewOffset;
|
||||
ULONG SharedViewSize;
|
||||
PVOID VirtualAddress;
|
||||
} VIDEO_SHARE_MEMORY_INFORMATION, *PVIDEO_SHARE_MEMORY_INFORMATION;
|
||||
|
||||
/* VIDEO_BANK_SELECT.BankingFlags constants */
|
||||
#define PLANAR_HC 0x00000001
|
||||
|
||||
/* VIDEO_BANK_SELECT.BankingType and PlanarHCBankingType constants */
|
||||
typedef enum _VIDEO_BANK_TYPE {
|
||||
VideoNotBanked = 0,
|
||||
VideoBanked1RW,
|
||||
VideoBanked1R1W,
|
||||
VideoBanked2RW,
|
||||
NumVideoBankTypes
|
||||
} VIDEO_BANK_TYPE, *PVIDEO_BANK_TYPE;
|
||||
|
||||
typedef struct _VIDEO_BANK_SELECT {
|
||||
ULONG Length;
|
||||
ULONG Size;
|
||||
ULONG BankingFlags;
|
||||
ULONG BankingType;
|
||||
ULONG PlanarHCBankingType;
|
||||
ULONG BitmapWidthInBytes;
|
||||
ULONG BitmapSize;
|
||||
ULONG Granularity;
|
||||
ULONG PlanarHCGranularity;
|
||||
ULONG CodeOffset;
|
||||
ULONG PlanarHCBankCodeOffset;
|
||||
ULONG PlanarHCEnableCodeOffset;
|
||||
ULONG PlanarHCDisableCodeOffset;
|
||||
} VIDEO_BANK_SELECT, *PVIDEO_BANK_SELECT;
|
||||
|
||||
typedef struct _VIDEO_LOAD_FONT_INFORMATION {
|
||||
USHORT WidthInPixels;
|
||||
USHORT HeightInPixels;
|
||||
ULONG FontSize;
|
||||
UCHAR Font[1];
|
||||
} VIDEO_LOAD_FONT_INFORMATION, *PVIDEO_LOAD_FONT_INFORMATION;
|
||||
|
||||
/* VIDEO_COLOR_CAPABILITIES.AttributeFlags constants */
|
||||
#define VIDEO_DEVICE_COLOR 0x00000001
|
||||
#define VIDEO_OPTIONAL_GAMMET_TABLE 0x00000002
|
||||
|
||||
typedef struct _VIDEO_COLOR_CAPABILITIES {
|
||||
ULONG Length;
|
||||
ULONG AttributeFlags;
|
||||
LONG RedPhosphoreDecay;
|
||||
LONG GreenPhosphoreDecay;
|
||||
LONG BluePhosphoreDecay;
|
||||
LONG WhiteChromaticity_x;
|
||||
LONG WhiteChromaticity_y;
|
||||
LONG WhiteChromaticity_Y;
|
||||
LONG RedChromaticity_x;
|
||||
LONG RedChromaticity_y;
|
||||
LONG GreenChromaticity_x;
|
||||
LONG GreenChromaticity_y;
|
||||
LONG BlueChromaticity_x;
|
||||
LONG BlueChromaticity_y;
|
||||
LONG WhiteGamma;
|
||||
LONG RedGamma;
|
||||
LONG GreenGamma;
|
||||
LONG BlueGamma;
|
||||
} VIDEO_COLOR_CAPABILITIES, *PVIDEO_COLOR_CAPABILITIES;
|
||||
|
||||
typedef struct _VIDEO_CURSOR_ATTRIBUTES {
|
||||
USHORT Width;
|
||||
USHORT Height;
|
||||
SHORT Column;
|
||||
SHORT Row;
|
||||
UCHAR Rate;
|
||||
UCHAR Enable;
|
||||
} VIDEO_CURSOR_ATTRIBUTES, *PVIDEO_CURSOR_ATTRIBUTES;
|
||||
|
||||
typedef struct _VIDEO_CURSOR_POSITION {
|
||||
SHORT Column;
|
||||
SHORT Row;
|
||||
} VIDEO_CURSOR_POSITION, *PVIDEO_CURSOR_POSITION;
|
||||
|
||||
typedef struct _VIDEO_POINTER_ATTRIBUTES {
|
||||
ULONG Flags;
|
||||
ULONG Width;
|
||||
ULONG Height;
|
||||
ULONG WidthInBytes;
|
||||
ULONG Enable;
|
||||
SHORT Column;
|
||||
SHORT Row;
|
||||
UCHAR Pixels[1];
|
||||
} VIDEO_POINTER_ATTRIBUTES, *PVIDEO_POINTER_ATTRIBUTES;
|
||||
|
||||
/* VIDEO_POINTER_CAPABILITIES.Flags */
|
||||
#define VIDEO_MODE_ASYNC_POINTER 0x01
|
||||
#define VIDEO_MODE_MONO_POINTER 0x02
|
||||
#define VIDEO_MODE_COLOR_POINTER 0x04
|
||||
#define VIDEO_MODE_ANIMATE_START 0x08
|
||||
#define VIDEO_MODE_ANIMATE_UPDATE 0x10
|
||||
|
||||
typedef struct _VIDEO_POINTER_CAPABILITIES {
|
||||
ULONG Flags;
|
||||
ULONG MaxWidth;
|
||||
ULONG MaxHeight;
|
||||
ULONG HWPtrBitmapStart;
|
||||
ULONG HWPtrBitmapEnd;
|
||||
} VIDEO_POINTER_CAPABILITIES, *PVIDEO_POINTER_CAPABILITIES;
|
||||
|
||||
typedef struct _VIDEO_POINTER_POSITION {
|
||||
SHORT Column;
|
||||
SHORT Row;
|
||||
} VIDEO_POINTER_POSITION, *PVIDEO_POINTER_POSITION;
|
||||
|
||||
|
||||
/* VIDEO_HARDWARE_STATE_HEADER.VGAStateFlags constants */
|
||||
#define VIDEO_STATE_NON_STANDARD_VGA 0x00000001
|
||||
#define VIDEO_STATE_UNEMULATED_VGA_STATE 0x00000002
|
||||
#define VIDEO_STATE_PACKED_CHAIN4_MODE 0x00000004
|
||||
|
||||
typedef struct _VIDEO_HARDWARE_STATE_HEADER {
|
||||
ULONG Length;
|
||||
UCHAR PortValue[0x30];
|
||||
ULONG AttribIndexDataState;
|
||||
ULONG BasicSequencerOffset;
|
||||
ULONG BasicCrtContOffset;
|
||||
ULONG BasicGraphContOffset;
|
||||
ULONG BasicAttribContOffset;
|
||||
ULONG BasicDacOffset;
|
||||
ULONG BasicLatchesOffset;
|
||||
ULONG ExtendedSequencerOffset;
|
||||
ULONG ExtendedCrtContOffset;
|
||||
ULONG ExtendedGraphContOffset;
|
||||
ULONG ExtendedAttribContOffset;
|
||||
ULONG ExtendedDacOffset;
|
||||
ULONG ExtendedValidatorStateOffset;
|
||||
ULONG ExtendedMiscDataOffset;
|
||||
ULONG PlaneLength;
|
||||
ULONG Plane1Offset;
|
||||
ULONG Plane2Offset;
|
||||
ULONG Plane3Offset;
|
||||
ULONG Plane4Offset;
|
||||
ULONG VGAStateFlags;
|
||||
ULONG DIBOffset;
|
||||
ULONG DIBBitsPerPixel;
|
||||
ULONG DIBXResolution;
|
||||
ULONG DIBYResolution;
|
||||
ULONG DIBXlatOffset;
|
||||
ULONG DIBXlatLength;
|
||||
ULONG VesaInfoOffset;
|
||||
PVOID FrameBufferData;
|
||||
} VIDEO_HARDWARE_STATE_HEADER, *PVIDEO_HARDWARE_STATE_HEADER;
|
||||
|
||||
typedef struct _VIDEO_CLUTDATA {
|
||||
UCHAR Red;
|
||||
UCHAR Green;
|
||||
UCHAR Blue;
|
||||
UCHAR Unused;
|
||||
} VIDEO_CLUTDATA, *PVIDEO_CLUTDATA;
|
||||
|
||||
typedef struct {
|
||||
USHORT NumEntries;
|
||||
USHORT FirstEntry;
|
||||
union {
|
||||
VIDEO_CLUTDATA RgbArray;
|
||||
ULONG RgbLong;
|
||||
} LookupTable[1];
|
||||
} VIDEO_CLUT, *PVIDEO_CLUT;
|
||||
|
||||
typedef struct _VIDEO_PALETTE_DATA {
|
||||
USHORT NumEntries;
|
||||
USHORT FirstEntry;
|
||||
USHORT Colors[1];
|
||||
} VIDEO_PALETTE_DATA, *PVIDEO_PALETTE_DATA;
|
||||
|
||||
typedef struct _VIDEO_HARDWARE_STATE {
|
||||
PVIDEO_HARDWARE_STATE_HEADER StateHeader;
|
||||
ULONG StateLength;
|
||||
} VIDEO_HARDWARE_STATE, *PVIDEO_HARDWARE_STATE;
|
||||
|
||||
#define VIDEO_CHILD_ACTIVE 0x00000001
|
||||
#define VIDEO_CHILD_DETACHED 0x00000002
|
||||
#define VIDEO_CHILD_NOPRUNE_FREQ 0x80000000
|
||||
#define VIDEO_CHILD_NOPRUNE_RESOLUTION 0x40000000
|
||||
|
||||
#define VIDEO_DUALVIEW_REMOVABLE 0x00000001
|
||||
#define VIDEO_DUALVIEW_PRIMARY 0x80000000
|
||||
#define VIDEO_DUALVIEW_SECONDARY 0x40000000
|
||||
|
||||
#ifndef _WINDDI_
|
||||
typedef struct _ENG_EVENT *PEVENT;
|
||||
#endif
|
||||
|
||||
typedef struct _ENG_EVENT {
|
||||
PVOID pKEvent;
|
||||
ULONG fFlags;
|
||||
} ENG_EVENT, *PENG_EVENT;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _NTDDVDEO_ */
|
135
mingw-w64-headers/include/ntddvol.h
Normal file
135
mingw-w64-headers/include/ntddvol.h
Normal file
@ -0,0 +1,135 @@
|
||||
/*
|
||||
* ntddvol.h
|
||||
*
|
||||
* Volume IOCTL interface.
|
||||
*
|
||||
* This file is part of the w32api package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NTDDVOL_
|
||||
#define _NTDDVOL_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define IOCTL_VOLUME_BASE ((ULONG) 'V')
|
||||
|
||||
#define IOCTL_VOLUME_LOGICAL_TO_PHYSICAL \
|
||||
CTL_CODE(IOCTL_VOLUME_BASE, 8, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VOLUME_PHYSICAL_TO_LOGICAL \
|
||||
CTL_CODE(IOCTL_VOLUME_BASE, 9, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VOLUME_READ_PLEX \
|
||||
CTL_CODE(IOCTL_VOLUME_BASE, 11, METHOD_OUT_DIRECT, FILE_READ_ACCESS)
|
||||
|
||||
#define IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS \
|
||||
CTL_CODE(IOCTL_VOLUME_BASE, 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VOLUME_IS_CLUSTERED \
|
||||
CTL_CODE(IOCTL_VOLUME_BASE, 12, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VOLUME_QUERY_VOLUME_NUMBER \
|
||||
CTL_CODE(IOCTL_VOLUME_BASE, 7, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VOLUME_IS_PARTITION \
|
||||
CTL_CODE(IOCTL_VOLUME_BASE, 10, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VOLUME_SET_GPT_ATTRIBUTES \
|
||||
CTL_CODE(IOCTL_VOLUME_BASE, 13, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VOLUME_GET_GPT_ATTRIBUTES \
|
||||
CTL_CODE(IOCTL_VOLUME_BASE, 14, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VOLUME_SUPPORTS_ONLINE_OFFLINE \
|
||||
CTL_CODE(IOCTL_VOLUME_BASE, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VOLUME_ONLINE \
|
||||
CTL_CODE(IOCTL_VOLUME_BASE, 2, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_VOLUME_OFFLINE \
|
||||
CTL_CODE(IOCTL_VOLUME_BASE, 3, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
|
||||
#define IOCTL_VOLUME_IS_OFFLINE \
|
||||
CTL_CODE(IOCTL_VOLUME_BASE, 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VOLUME_IS_IO_CAPABLE \
|
||||
CTL_CODE(IOCTL_VOLUME_BASE, 5, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
#define IOCTL_VOLUME_QUERY_FAILOVER_SET \
|
||||
CTL_CODE(IOCTL_VOLUME_BASE, 6, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
|
||||
typedef struct _VOLUME_LOGICAL_OFFSET {
|
||||
LONGLONG LogicalOffset;
|
||||
} VOLUME_LOGICAL_OFFSET, *PVOLUME_LOGICAL_OFFSET;
|
||||
|
||||
typedef struct _VOLUME_PHYSICAL_OFFSET {
|
||||
ULONG DiskNumber;
|
||||
LONGLONG Offset;
|
||||
} VOLUME_PHYSICAL_OFFSET, *PVOLUME_PHYSICAL_OFFSET;
|
||||
|
||||
typedef struct _VOLUME_PHYSICAL_OFFSETS {
|
||||
ULONG NumberOfPhysicalOffsets;
|
||||
VOLUME_PHYSICAL_OFFSET PhysicalOffset[1];
|
||||
} VOLUME_PHYSICAL_OFFSETS, *PVOLUME_PHYSICAL_OFFSETS;
|
||||
|
||||
typedef struct _VOLUME_READ_PLEX_INPUT {
|
||||
LARGE_INTEGER ByteOffset;
|
||||
ULONG Length;
|
||||
ULONG PlexNumber;
|
||||
} VOLUME_READ_PLEX_INPUT, *PVOLUME_READ_PLEX_INPUT;
|
||||
|
||||
typedef struct _VOLUME_GET_GPT_ATTRIBUTES_INFORMATION {
|
||||
ULONGLONG GptAttributes;
|
||||
} VOLUME_GET_GPT_ATTRIBUTES_INFORMATION, *PVOLUME_GET_GPT_ATTRIBUTES_INFORMATION;
|
||||
|
||||
typedef struct _VOLUME_SET_GPT_ATTRIBUTES_INFORMATION {
|
||||
ULONGLONG GptAttributes;
|
||||
BOOLEAN RevertOnClose;
|
||||
BOOLEAN ApplyToAllConnectedVolumes;
|
||||
USHORT Reserved1;
|
||||
ULONG Reserved2;
|
||||
} VOLUME_SET_GPT_ATTRIBUTES_INFORMATION, *PVOLUME_SET_GPT_ATTRIBUTES_INFORMATION;
|
||||
|
||||
typedef struct _DISK_EXTENT {
|
||||
ULONG DiskNumber;
|
||||
LARGE_INTEGER StartingOffset;
|
||||
LARGE_INTEGER ExtentLength;
|
||||
} DISK_EXTENT, *PDISK_EXTENT;
|
||||
|
||||
typedef struct _VOLUME_DISK_EXTENTS {
|
||||
ULONG NumberOfDiskExtents;
|
||||
DISK_EXTENT Extents[1];
|
||||
} VOLUME_DISK_EXTENTS, *PVOLUME_DISK_EXTENTS;
|
||||
|
||||
typedef struct _VOLUME_NUMBER {
|
||||
ULONG VolumeNumber;
|
||||
WCHAR VolumeManagerName[8];
|
||||
} VOLUME_NUMBER, *PVOLUME_NUMBER;
|
||||
|
||||
typedef struct _VOLUME_FAILOVER_SET {
|
||||
ULONG NumberOfDisks;
|
||||
ULONG DiskNumbers[1];
|
||||
} VOLUME_FAILOVER_SET, *PVOLUME_FAILOVER_SET;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _NTDDVOL_ */
|
286
mingw-w64-headers/include/prntfont.h
Normal file
286
mingw-w64-headers/include/prntfont.h
Normal file
@ -0,0 +1,286 @@
|
||||
/*
|
||||
* prntfont.h
|
||||
*
|
||||
* Declarations for Windows NT printer driver font metrics
|
||||
*
|
||||
* This file is part of the w32api package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Filip Navara <xnavara@volny.cz>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __PRNTFONT_H
|
||||
#define __PRNTFONT_H
|
||||
|
||||
#define UNIFM_VERSION_1_0 0x10000
|
||||
#define UNI_GLYPHSETDATA_VERSION_1_0 0x10000
|
||||
|
||||
#define UFM_SOFT 1
|
||||
#define UFM_CART 2
|
||||
#define UFM_SCALABLE 4
|
||||
|
||||
#define DF_TYPE_HPINTELLIFONT 0
|
||||
#define DF_TYPE_TRUETYPE 1
|
||||
#define DF_TYPE_PST1 2
|
||||
#define DF_TYPE_CAPSL 3
|
||||
#define DF_TYPE_OEM1 4
|
||||
#define DF_TYPE_OEM2 5
|
||||
#define DF_NOITALIC 1
|
||||
#define DF_NOUNDER 2
|
||||
#define DF_XM_CR 4
|
||||
#define DF_NO_BOLD 8
|
||||
#define DF_NO_DOUBLE_UNDERLINE 16
|
||||
#define DF_NO_STRIKETHRU 32
|
||||
#define DF_BKSP_OK 64
|
||||
|
||||
#define MTYPE_COMPOSE 1
|
||||
#define MTYPE_DIRECT 2
|
||||
#define MTYPE_PAIRED 4
|
||||
#define MTYPE_FORMAT_MASK 7
|
||||
#define MTYPE_SINGLE 8
|
||||
#define MTYPE_DOUBLE 16
|
||||
#define MTYPE_DOUBLEBYTECHAR_MASK 24
|
||||
#define MTYPE_REPLACE 32
|
||||
#define MTYPE_ADD 64
|
||||
#define MTYPE_DISABLE 128
|
||||
#define MTYPE_PREDEFIN_MASK 192
|
||||
|
||||
#define CC_NOPRECNV 0x0000FFFF
|
||||
#define CC_DEFAULT 0
|
||||
#define CC_CP437 -1
|
||||
#define CC_CP850 -2
|
||||
#define CC_CP863 -3
|
||||
#define CC_BIG5 -10
|
||||
#define CC_ISC -11
|
||||
#define CC_JIS -12
|
||||
#define CC_JIS_ANK -13
|
||||
#define CC_NS86 -14
|
||||
#define CC_TCA -15
|
||||
#define CC_GB2312 -16
|
||||
#define CC_SJIS -17
|
||||
#define CC_WANSUNG -18
|
||||
|
||||
#define UFF_FILE_MAGIC 'UFF1'
|
||||
#define UFF_VERSION_NUMBER 0x10001
|
||||
#define FONT_DIR_SORTED 1
|
||||
#define FONT_REC_SIG 'CERF'
|
||||
#define WINNT_INSTALLER_SIG 'IFTN'
|
||||
|
||||
#define FONT_FL_UFM 0x0001
|
||||
#define FONT_FL_IFI 0x0002
|
||||
#define FONT_FL_SOFTFONT 0x0004
|
||||
#define FONT_FL_PERMANENT_SF 0x0008
|
||||
#define FONT_FL_DEVICEFONT 0x0010
|
||||
#define FONT_FL_GLYPHSET_GTT 0x0020
|
||||
#define FONT_FL_GLYPHSET_RLE 0x0040
|
||||
#define FONT_FL_RESERVED 0x8000
|
||||
|
||||
#define DATA_UFM_SIG 'MFUD'
|
||||
#define DATA_IFI_SIG 'IFID'
|
||||
#define DATA_GTT_SIG 'TTGD'
|
||||
#define DATA_CTT_SIG 'TTCD'
|
||||
#define DATA_VAR_SIG 'RAVD'
|
||||
|
||||
#define FG_CANCHANGE 128
|
||||
#define WM_FI_FILENAME 900
|
||||
|
||||
#define GET_UNIDRVINFO(pUFM) ((PUNIDRVINFO)((ULONG_PTR)(pUFM) + (pUFM)->loUnidrvInfo))
|
||||
#define GET_IFIMETRICS(pUFM) ((IFIMETRICS*)((ULONG_PTR)(pUFM) + (pUFM)->loIFIMetrics))
|
||||
#define GET_EXTTEXTMETRIC(pUFM) ((EXTTEXTMETRIC*)((ULONG_PTR)(pUFM) + (pUFM)->loExtTextMetric))
|
||||
#define GET_WIDTHTABLE(pUFM) ((PWIDTHTABLE)((ULONG_PTR)(pUFM) + (pUFM)->loWidthTable))
|
||||
#define GET_KERNDATA(pUFM) ((PKERNDATA)((ULONG_PTR)(pUFM) + (pUFM)->loKernPair))
|
||||
#define GET_SELECT_CMD(pUni) ((PCHAR)(pUni) + (pUni)->SelectFont.loOffset)
|
||||
#define GET_UNSELECT_CMD(pUni) ((PCHAR)(pUni) + (pUni)->UnSelectFont.loOffset)
|
||||
#define GET_GLYPHRUN(pGTT) ((PGLYPHRUN)((ULONG_PTR)(pGTT) + ((PUNI_GLYPHSETDATA)pGTT)->loRunOffset))
|
||||
#define GET_CODEPAGEINFO(pGTT) ((PUNI_CODEPAGEINFO)((ULONG_PTR)(pGTT) + ((PUNI_GLYPHSETDATA)pGTT)->loCodePageOffset))
|
||||
#define GET_MAPTABLE(pGTT) ((PMAPTABLE)((ULONG_PTR)(pGTT) + ((PUNI_GLYPHSETDATA)pGTT)->loMapTableOffset))
|
||||
|
||||
typedef struct _UNIFM_HDR
|
||||
{
|
||||
DWORD dwSize;
|
||||
DWORD dwVersion;
|
||||
ULONG ulDefaultCodepage;
|
||||
LONG lGlyphSetDataRCID;
|
||||
DWORD loUnidrvInfo;
|
||||
DWORD loIFIMetrics;
|
||||
DWORD loExtTextMetric;
|
||||
DWORD loWidthTable;
|
||||
DWORD loKernPair;
|
||||
DWORD dwReserved[2];
|
||||
} UNIFM_HDR, *PUNIFM_HDR;
|
||||
|
||||
typedef struct _INVOC
|
||||
{
|
||||
DWORD dwCount;
|
||||
DWORD loOffset;
|
||||
} INVOC, *PINVOC;
|
||||
|
||||
typedef struct _UNIDRVINFO
|
||||
{
|
||||
DWORD dwSize;
|
||||
DWORD flGenFlags;
|
||||
WORD wType;
|
||||
WORD fCaps;
|
||||
WORD wXRes;
|
||||
WORD wYRes;
|
||||
SHORT sYAdjust;
|
||||
SHORT sYMoved;
|
||||
WORD wPrivateData;
|
||||
SHORT sShift;
|
||||
INVOC SelectFont;
|
||||
INVOC UnSelectFont;
|
||||
WORD wReserved[4];
|
||||
} UNIDRVINFO, *PUNIDRVINFO;
|
||||
|
||||
typedef struct _EXTTEXTMETRIC
|
||||
{
|
||||
SHORT emSize;
|
||||
SHORT emPointSize;
|
||||
SHORT emOrientation;
|
||||
SHORT emMasterHeight;
|
||||
SHORT emMinScale;
|
||||
SHORT emMaxScale;
|
||||
SHORT emMasterUnits;
|
||||
SHORT emCapHeight;
|
||||
SHORT emXHeight;
|
||||
SHORT emLowerCaseAscent;
|
||||
SHORT emLowerCaseDescent;
|
||||
SHORT emSlant;
|
||||
SHORT emSuperScript;
|
||||
SHORT emSubScript;
|
||||
SHORT emSuperScriptSize;
|
||||
SHORT emSubScriptSize;
|
||||
SHORT emUnderlineOffset;
|
||||
SHORT emUnderlineWidth;
|
||||
SHORT emDoubleUpperUnderlineOffset;
|
||||
SHORT emDoubleLowerUnderlineOffset;
|
||||
SHORT emDoubleUpperUnderlineWidth;
|
||||
SHORT emDoubleLowerUnderlineWidth;
|
||||
SHORT emStrikeOutOffset;
|
||||
SHORT emStrikeOutWidth;
|
||||
WORD emKernPairs;
|
||||
WORD emKernTracks;
|
||||
} EXTTEXTMETRIC, *PEXTTEXTMETRIC;
|
||||
|
||||
typedef struct _WIDTHRUN
|
||||
{
|
||||
WORD wStartGlyph;
|
||||
WORD wGlyphCount;
|
||||
DWORD loCharWidthOffset;
|
||||
} WIDTHRUN, *PWIDTHRUN;
|
||||
|
||||
typedef struct _WIDTHTABLE
|
||||
{
|
||||
DWORD dwSize;
|
||||
DWORD dwRunNum;
|
||||
WIDTHRUN WidthRun[1];
|
||||
} WIDTHTABLE, *PWIDTHTABLE;
|
||||
|
||||
typedef struct _KERNDATA
|
||||
{
|
||||
DWORD dwSize;
|
||||
DWORD dwKernPairNum;
|
||||
FD_KERNINGPAIR KernPair[1];
|
||||
} KERNDATA, *PKERNDATA;
|
||||
|
||||
typedef struct _UNI_GLYPHSETDATA
|
||||
{
|
||||
DWORD dwSize;
|
||||
DWORD dwVersion;
|
||||
DWORD dwFlags;
|
||||
LONG lPredefinedID;
|
||||
DWORD dwGlyphCount;
|
||||
DWORD dwRunCount;
|
||||
DWORD loRunOffset;
|
||||
DWORD dwCodePageCount;
|
||||
DWORD loCodePageOffset;
|
||||
DWORD loMapTableOffset;
|
||||
DWORD dwReserved[2];
|
||||
} UNI_GLYPHSETDATA, *PUNI_GLYPHSETDATA;
|
||||
|
||||
typedef struct _UNI_CODEPAGEINFO
|
||||
{
|
||||
DWORD dwCodePage;
|
||||
INVOC SelectSymbolSet;
|
||||
INVOC UnSelectSymbolSet;
|
||||
} UNI_CODEPAGEINFO, *PUNI_CODEPAGEINFO;
|
||||
|
||||
typedef struct _GLYPHRUN
|
||||
{
|
||||
WCHAR wcLow;
|
||||
WORD wGlyphCount;
|
||||
} GLYPHRUN, *PGLYPHRUN;
|
||||
|
||||
typedef struct _TRANSDATA
|
||||
{
|
||||
BYTE ubCodePageID;
|
||||
BYTE ubType;
|
||||
union
|
||||
{
|
||||
SHORT sCode;
|
||||
BYTE ubCode;
|
||||
BYTE ubPairs[2];
|
||||
} uCode;
|
||||
} TRANSDATA, *PTRANSDATA;
|
||||
|
||||
typedef struct _MAPTABLE {
|
||||
DWORD dwSize;
|
||||
DWORD dwGlyphNum;
|
||||
TRANSDATA Trans[1];
|
||||
} MAPTABLE, *PMAPTABLE;
|
||||
|
||||
typedef struct _UFF_FILEHEADER {
|
||||
DWORD dwSignature;
|
||||
DWORD dwVersion;
|
||||
DWORD dwSize;
|
||||
DWORD nFonts;
|
||||
DWORD nGlyphSets;
|
||||
DWORD nVarData;
|
||||
DWORD offFontDir;
|
||||
DWORD dwFlags;
|
||||
DWORD dwReserved[4];
|
||||
} UFF_FILEHEADER, *PUFF_FILEHEADER;
|
||||
|
||||
typedef struct _UFF_FONTDIRECTORY {
|
||||
DWORD dwSignature;
|
||||
WORD wSize;
|
||||
WORD wFontID;
|
||||
SHORT sGlyphID;
|
||||
WORD wFlags;
|
||||
DWORD dwInstallerSig;
|
||||
DWORD offFontName;
|
||||
DWORD offCartridgeName;
|
||||
DWORD offFontData;
|
||||
DWORD offGlyphData;
|
||||
DWORD offVarData;
|
||||
} UFF_FONTDIRECTORY, *PUFF_FONTDIRECTORY;
|
||||
|
||||
typedef struct _DATA_HEADER {
|
||||
DWORD dwSignature;
|
||||
WORD wSize;
|
||||
WORD wDataID;
|
||||
DWORD dwDataSize;
|
||||
DWORD dwReserved;
|
||||
} DATA_HEADER, *PDATA_HEADER;
|
||||
|
||||
typedef struct _OEMFONTINSTPARAM {
|
||||
DWORD cbSize;
|
||||
HANDLE hPrinter;
|
||||
HANDLE hModule;
|
||||
HANDLE hHeap;
|
||||
DWORD dwFlags;
|
||||
PWSTR pFontInstallerName;
|
||||
} OEMFONTINSTPARAM, *POEMFONTINSTPARAM;
|
||||
|
||||
#endif /* __PRNTFONT_H */
|
588
mingw-w64-headers/include/tdi.h
Normal file
588
mingw-w64-headers/include/tdi.h
Normal file
@ -0,0 +1,588 @@
|
||||
/*
|
||||
* tdi.h
|
||||
*
|
||||
* TDI user mode definitions
|
||||
*
|
||||
* This file is part of the w32api package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __TDI_H
|
||||
#define __TDI_H
|
||||
|
||||
#include "ntddtdi.h"
|
||||
#include "tdistat.h"
|
||||
#include "netpnp.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Basic types */
|
||||
|
||||
typedef LONG TDI_STATUS;
|
||||
typedef PVOID CONNECTION_CONTEXT;
|
||||
|
||||
typedef struct _TDI_CONNECTION_INFORMATION {
|
||||
LONG UserDataLength;
|
||||
PVOID UserData;
|
||||
LONG OptionsLength;
|
||||
PVOID Options;
|
||||
LONG RemoteAddressLength;
|
||||
PVOID RemoteAddress;
|
||||
} TDI_CONNECTION_INFORMATION, *PTDI_CONNECTION_INFORMATION;
|
||||
|
||||
typedef struct _TDI_REQUEST {
|
||||
union {
|
||||
HANDLE AddressHandle;
|
||||
CONNECTION_CONTEXT ConnectionContext;
|
||||
HANDLE ControlChannel;
|
||||
} Handle;
|
||||
PVOID RequestNotifyObject;
|
||||
PVOID RequestContext;
|
||||
TDI_STATUS TdiStatus;
|
||||
} TDI_REQUEST, *PTDI_REQUEST;
|
||||
|
||||
typedef struct _TDI_REQUEST_STATUS {
|
||||
TDI_STATUS Status;
|
||||
PVOID RequestContext;
|
||||
ULONG BytesTransferred;
|
||||
} TDI_REQUEST_STATUS, *PTDI_REQUEST_STATUS;
|
||||
|
||||
typedef struct _TDI_CONNECT_REQUEST {
|
||||
TDI_REQUEST Request;
|
||||
PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
|
||||
PTDI_CONNECTION_INFORMATION ReturnConnectionInformation;
|
||||
LARGE_INTEGER Timeout;
|
||||
} TDI_REQUEST_CONNECT, *PTDI_REQUEST_CONNECT;
|
||||
|
||||
typedef struct _TDI_REQUEST_ACCEPT {
|
||||
TDI_REQUEST Request;
|
||||
PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
|
||||
PTDI_CONNECTION_INFORMATION ReturnConnectionInformation;
|
||||
} TDI_REQUEST_ACCEPT, *PTDI_REQUEST_ACCEPT;
|
||||
|
||||
typedef struct _TDI_REQUEST_LISTEN {
|
||||
TDI_REQUEST Request;
|
||||
PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
|
||||
PTDI_CONNECTION_INFORMATION ReturnConnectionInformation;
|
||||
USHORT ListenFlags;
|
||||
} TDI_REQUEST_LISTEN, *PTDI_REQUEST_LISTEN;
|
||||
|
||||
typedef struct _TDI_DISCONNECT_REQUEST {
|
||||
TDI_REQUEST Request;
|
||||
LARGE_INTEGER Timeout;
|
||||
} TDI_REQUEST_DISCONNECT, *PTDI_REQUEST_DISCONNECT;
|
||||
|
||||
typedef struct _TDI_REQUEST_SEND {
|
||||
TDI_REQUEST Request;
|
||||
USHORT SendFlags;
|
||||
} TDI_REQUEST_SEND, *PTDI_REQUEST_SEND;
|
||||
|
||||
typedef struct _TDI_REQUEST_RECEIVE {
|
||||
TDI_REQUEST Request;
|
||||
USHORT ReceiveFlags;
|
||||
} TDI_REQUEST_RECEIVE, *PTDI_REQUEST_RECEIVE;
|
||||
|
||||
typedef struct _TDI_REQUEST_SEND_DATAGRAM {
|
||||
TDI_REQUEST Request;
|
||||
PTDI_CONNECTION_INFORMATION SendDatagramInformation;
|
||||
} TDI_REQUEST_SEND_DATAGRAM, *PTDI_REQUEST_SEND_DATAGRAM;
|
||||
|
||||
typedef struct _TDI_REQUEST_RECEIVE_DATAGRAM {
|
||||
TDI_REQUEST Request;
|
||||
PTDI_CONNECTION_INFORMATION ReceiveDatagramInformation;
|
||||
PTDI_CONNECTION_INFORMATION ReturnInformation;
|
||||
USHORT ReceiveFlags;
|
||||
} TDI_REQUEST_RECEIVE_DATAGRAM, *PTDI_REQUEST_RECEIVE_DATAGRAM;
|
||||
|
||||
typedef struct _TDI_REQUEST_SET_EVENT {
|
||||
TDI_REQUEST Request;
|
||||
LONG EventType;
|
||||
PVOID EventHandler;
|
||||
PVOID EventContext;
|
||||
} TDI_REQUEST_SET_EVENT_HANDLER, *PTDI_REQUEST_SET_EVENT_HANDLER;
|
||||
|
||||
#define TDI_RECEIVE_BROADCAST 0x00000004
|
||||
#define TDI_RECEIVE_MULTICAST 0x00000008
|
||||
#define TDI_RECEIVE_PARTIAL 0x00000010
|
||||
#define TDI_RECEIVE_NORMAL 0x00000020
|
||||
#define TDI_RECEIVE_EXPEDITED 0x00000040
|
||||
#define TDI_RECEIVE_PEEK 0x00000080
|
||||
#define TDI_RECEIVE_NO_RESPONSE_EXP 0x00000100
|
||||
#define TDI_RECEIVE_COPY_LOOKAHEAD 0x00000200
|
||||
#define TDI_RECEIVE_ENTIRE_MESSAGE 0x00000400
|
||||
#define TDI_RECEIVE_AT_DISPATCH_LEVEL 0x00000800
|
||||
#define TDI_RECEIVE_CONTROL_INFO 0x00001000
|
||||
|
||||
/* Listen flags */
|
||||
#define TDI_QUERY_ACCEPT 0x00000001
|
||||
|
||||
/* Options used for both SendOptions and ReceiveIndicators */
|
||||
#define TDI_SEND_EXPEDITED 0x0020
|
||||
#define TDI_SEND_PARTIAL 0x0040
|
||||
#define TDI_SEND_NO_RESPONSE_EXPECTED 0x0080
|
||||
#define TDI_SEND_NON_BLOCKING 0x0100
|
||||
#define TDI_SEND_AND_DISCONNECT 0x0200
|
||||
|
||||
/* Disconnect Flags */
|
||||
#define TDI_DISCONNECT_WAIT 0x0001
|
||||
#define TDI_DISCONNECT_ABORT 0x0002
|
||||
#define TDI_DISCONNECT_RELEASE 0x0004
|
||||
|
||||
/* TdiRequest structure for TdiQueryInformation request */
|
||||
typedef struct _TDI_REQUEST_QUERY_INFORMATION {
|
||||
TDI_REQUEST Request;
|
||||
ULONG QueryType;
|
||||
PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
|
||||
} TDI_REQUEST_QUERY_INFORMATION, *PTDI_REQUEST_QUERY_INFORMATION;
|
||||
|
||||
/* TdiRequest structure for TdiSetInformation request */
|
||||
typedef struct _TDI_REQUEST_SET_INFORMATION {
|
||||
TDI_REQUEST Request;
|
||||
ULONG SetType;
|
||||
PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
|
||||
} TDI_REQUEST_SET_INFORMATION, *PTDI_REQUEST_SET_INFORMATION;
|
||||
|
||||
typedef TDI_REQUEST_SET_INFORMATION TDI_REQ_SET_INFORMATION, *PTDI_REQ_SET_INFORMATION;
|
||||
|
||||
typedef union _TDI_REQUEST_TYPE {
|
||||
TDI_REQUEST_ACCEPT TdiAccept;
|
||||
TDI_REQUEST_CONNECT TdiConnect;
|
||||
TDI_REQUEST_DISCONNECT TdiDisconnect;
|
||||
TDI_REQUEST_LISTEN TdiListen;
|
||||
TDI_REQUEST_QUERY_INFORMATION TdiQueryInformation;
|
||||
TDI_REQUEST_RECEIVE TdiReceive;
|
||||
TDI_REQUEST_RECEIVE_DATAGRAM TdiReceiveDatagram;
|
||||
TDI_REQUEST_SEND TdiSend;
|
||||
TDI_REQUEST_SEND_DATAGRAM TdiSendDatagram;
|
||||
TDI_REQUEST_SET_EVENT_HANDLER TdiSetEventHandler;
|
||||
TDI_REQUEST_SET_INFORMATION TdiSetInformation;
|
||||
} TDI_REQUEST_TYPE, *PTDI_REQUEST_TYPE;
|
||||
|
||||
/* Query information types */
|
||||
|
||||
/* Generic query info types that must be supported by all transports */
|
||||
#define TDI_QUERY_BROADCAST_ADDRESS 0x00000001
|
||||
#define TDI_QUERY_PROVIDER_INFO 0x00000002
|
||||
#define TDI_QUERY_ADDRESS_INFO 0x00000003
|
||||
#define TDI_QUERY_CONNECTION_INFO 0x00000004
|
||||
#define TDI_QUERY_PROVIDER_STATISTICS 0x00000005
|
||||
#define TDI_QUERY_DATAGRAM_INFO 0x00000006
|
||||
#define TDI_QUERY_DATA_LINK_ADDRESS 0x00000007
|
||||
#define TDI_QUERY_NETWORK_ADDRESS 0x00000008
|
||||
#define TDI_QUERY_MAX_DATAGRAM_INFO 0x00000009
|
||||
|
||||
/* Netbios specific query information types */
|
||||
#define TDI_QUERY_ADAPTER_STATUS 0x00000100
|
||||
#define TDI_QUERY_SESSION_STATUS 0x00000200
|
||||
#define TDI_QUERY_FIND_NAME 0x00000300
|
||||
|
||||
/* Structures used for TdiQueryInformation and TdiSetInformation */
|
||||
|
||||
typedef struct _TDI_ENDPOINT_INFO {
|
||||
ULONG State;
|
||||
ULONG Event;
|
||||
ULONG TransmittedTsdus;
|
||||
ULONG ReceivedTsdus;
|
||||
ULONG TransmissionErrors;
|
||||
ULONG ReceiveErrors;
|
||||
ULONG MinimumLookaheadData;
|
||||
ULONG MaximumLookaheadData;
|
||||
ULONG PriorityLevel;
|
||||
ULONG SecurityLevel;
|
||||
ULONG SecurityCompartment;
|
||||
} TDI_ENDPOINT_INFO, *PTDI_ENDPOINT_INFO;
|
||||
|
||||
typedef struct _TDI_CONNECTION_INFO {
|
||||
ULONG State;
|
||||
ULONG Event;
|
||||
ULONG TransmittedTsdus;
|
||||
ULONG ReceivedTsdus;
|
||||
ULONG TransmissionErrors;
|
||||
ULONG ReceiveErrors;
|
||||
LARGE_INTEGER Throughput;
|
||||
LARGE_INTEGER Delay;
|
||||
ULONG SendBufferSize;
|
||||
ULONG ReceiveBufferSize;
|
||||
BOOLEAN Unreliable;
|
||||
} TDI_CONNECTION_INFO, *PTDI_CONNECTION_INFO;
|
||||
|
||||
typedef struct _TDI_DATAGRAM_INFO {
|
||||
ULONG MaximumDatagramBytes;
|
||||
ULONG MaximumDatagramCount;
|
||||
} TDI_DATAGRAM_INFO, *PTDI_DATAGRAM_INFO;
|
||||
|
||||
typedef struct _TDI_MAX_DATAGRAM_INFO {
|
||||
ULONG MaxDatagramSize;
|
||||
} TDI_MAX_DATAGRAM_INFO, *PTDI_MAX_DATAGRAM_INFO;
|
||||
|
||||
typedef struct _TDI_PROVIDER_INFO {
|
||||
ULONG Version;
|
||||
ULONG MaxSendSize;
|
||||
ULONG MaxConnectionUserData;
|
||||
ULONG MaxDatagramSize;
|
||||
ULONG ServiceFlags;
|
||||
ULONG MinimumLookaheadData;
|
||||
ULONG MaximumLookaheadData;
|
||||
ULONG NumberOfResources;
|
||||
LARGE_INTEGER StartTime;
|
||||
} TDI_PROVIDER_INFO, *PTDI_PROVIDER_INFO;
|
||||
|
||||
#define TDI_SERVICE_CONNECTION_MODE 0x00000001
|
||||
#define TDI_SERVICE_ORDERLY_RELEASE 0x00000002
|
||||
#define TDI_SERVICE_CONNECTIONLESS_MODE 0x00000004
|
||||
#define TDI_SERVICE_ERROR_FREE_DELIVERY 0x00000008
|
||||
#define TDI_SERVICE_SECURITY_LEVEL 0x00000010
|
||||
#define TDI_SERVICE_BROADCAST_SUPPORTED 0x00000020
|
||||
#define TDI_SERVICE_MULTICAST_SUPPORTED 0x00000040
|
||||
#define TDI_SERVICE_DELAYED_ACCEPTANCE 0x00000080
|
||||
#define TDI_SERVICE_EXPEDITED_DATA 0x00000100
|
||||
#define TDI_SERVICE_INTERNAL_BUFFERING 0x00000200
|
||||
#define TDI_SERVICE_ROUTE_DIRECTED 0x00000400
|
||||
#define TDI_SERVICE_NO_ZERO_LENGTH 0x00000800
|
||||
#define TDI_SERVICE_POINT_TO_POINT 0x00001000
|
||||
#define TDI_SERVICE_MESSAGE_MODE 0x00002000
|
||||
#define TDI_SERVICE_HALF_DUPLEX 0x00004000
|
||||
#define TDI_SERVICE_DGRAM_CONNECTION 0x00008000
|
||||
#define TDI_SERVICE_FORCE_ACCESS_CHECK 0x00010000
|
||||
#define TDI_SERVICE_SEND_AND_DISCONNECT 0x00020000
|
||||
#define TDI_SERVICE_DIRECT_ACCEPT 0x00040000
|
||||
#define TDI_SERVICE_ACCEPT_LOCAL_ADDR 0x00080000
|
||||
|
||||
typedef struct _TDI_PROVIDER_RESOURCE_STATS {
|
||||
ULONG ResourceId;
|
||||
ULONG MaximumResourceUsed;
|
||||
ULONG AverageResourceUsed;
|
||||
ULONG ResourceExhausted;
|
||||
} TDI_PROVIDER_RESOURCE_STATS, *PTDI_PROVIDER_RESOURCE_STATS;
|
||||
|
||||
typedef struct _TDI_PROVIDER_STATISTICS {
|
||||
ULONG Version;
|
||||
ULONG OpenConnections;
|
||||
ULONG ConnectionsAfterNoRetry;
|
||||
ULONG ConnectionsAfterRetry;
|
||||
ULONG LocalDisconnects;
|
||||
ULONG RemoteDisconnects;
|
||||
ULONG LinkFailures;
|
||||
ULONG AdapterFailures;
|
||||
ULONG SessionTimeouts;
|
||||
ULONG CancelledConnections;
|
||||
ULONG RemoteResourceFailures;
|
||||
ULONG LocalResourceFailures;
|
||||
ULONG NotFoundFailures;
|
||||
ULONG NoListenFailures;
|
||||
ULONG DatagramsSent;
|
||||
LARGE_INTEGER DatagramBytesSent;
|
||||
ULONG DatagramsReceived;
|
||||
LARGE_INTEGER DatagramBytesReceived;
|
||||
ULONG PacketsSent;
|
||||
ULONG PacketsReceived;
|
||||
ULONG DataFramesSent;
|
||||
LARGE_INTEGER DataFrameBytesSent;
|
||||
ULONG DataFramesReceived;
|
||||
LARGE_INTEGER DataFrameBytesReceived;
|
||||
ULONG DataFramesResent;
|
||||
LARGE_INTEGER DataFrameBytesResent;
|
||||
ULONG DataFramesRejected;
|
||||
LARGE_INTEGER DataFrameBytesRejected;
|
||||
ULONG ResponseTimerExpirations;
|
||||
ULONG AckTimerExpirations;
|
||||
ULONG MaximumSendWindow;
|
||||
ULONG AverageSendWindow;
|
||||
ULONG PiggybackAckQueued;
|
||||
ULONG PiggybackAckTimeouts;
|
||||
LARGE_INTEGER WastedPacketSpace;
|
||||
ULONG WastedSpacePackets;
|
||||
ULONG NumberOfResources;
|
||||
TDI_PROVIDER_RESOURCE_STATS ResourceStats[1];
|
||||
} TDI_PROVIDER_STATISTICS, *PTDI_PROVIDER_STATISTICS;
|
||||
|
||||
#define TDI_EVENT_CONNECT 0
|
||||
#define TDI_EVENT_DISCONNECT 1
|
||||
#define TDI_EVENT_ERROR 2
|
||||
#define TDI_EVENT_RECEIVE 3
|
||||
#define TDI_EVENT_RECEIVE_DATAGRAM 4
|
||||
#define TDI_EVENT_RECEIVE_EXPEDITED 5
|
||||
#define TDI_EVENT_SEND_POSSIBLE 6
|
||||
|
||||
typedef struct _TDI_REQUEST_ASSOCIATE {
|
||||
TDI_REQUEST Request;
|
||||
HANDLE AddressHandle;
|
||||
} TDI_REQUEST_ASSOCIATE_ADDRESS, *PTDI_REQUEST_ASSOCIATE_ADDRESS;
|
||||
|
||||
#define NDIS_PACKET_POOL_TAG_FOR_NWLNKIPX 'iPDN'
|
||||
#define NDIS_PACKET_POOL_TAG_FOR_NWLNKSPX 'sPDN'
|
||||
#define NDIS_PACKET_POOL_TAG_FOR_NWLNKNB 'nPDN'
|
||||
#define NDIS_PACKET_POOL_TAG_FOR_TCPIP 'tPDN'
|
||||
#define NDIS_PACKET_POOL_TAG_FOR_NBF 'bPDN'
|
||||
#define NDIS_PACKET_POOL_TAG_FOR_APPLETALK 'aPDN'
|
||||
|
||||
typedef struct _TA_ADDRESS {
|
||||
USHORT AddressLength;
|
||||
USHORT AddressType;
|
||||
UCHAR Address[1];
|
||||
} TA_ADDRESS, *PTA_ADDRESS;
|
||||
|
||||
#define TDI_ADDRESS_TYPE_UNSPEC 0
|
||||
#define TDI_ADDRESS_TYPE_UNIX 1
|
||||
#define TDI_ADDRESS_TYPE_IP 2
|
||||
#define TDI_ADDRESS_TYPE_IMPLINK 3
|
||||
#define TDI_ADDRESS_TYPE_PUP 4
|
||||
#define TDI_ADDRESS_TYPE_CHAOS 5
|
||||
#define TDI_ADDRESS_TYPE_NS 6
|
||||
#define TDI_ADDRESS_TYPE_IPX 6
|
||||
#define TDI_ADDRESS_TYPE_NBS 7
|
||||
#define TDI_ADDRESS_TYPE_ECMA 8
|
||||
#define TDI_ADDRESS_TYPE_DATAKIT 9
|
||||
#define TDI_ADDRESS_TYPE_CCITT 10
|
||||
#define TDI_ADDRESS_TYPE_SNA 11
|
||||
#define TDI_ADDRESS_TYPE_DECnet 12
|
||||
#define TDI_ADDRESS_TYPE_DLI 13
|
||||
#define TDI_ADDRESS_TYPE_LAT 14
|
||||
#define TDI_ADDRESS_TYPE_HYLINK 15
|
||||
#define TDI_ADDRESS_TYPE_APPLETALK 16
|
||||
#define TDI_ADDRESS_TYPE_NETBIOS 17
|
||||
#define TDI_ADDRESS_TYPE_8022 18
|
||||
#define TDI_ADDRESS_TYPE_OSI_TSAP 19
|
||||
#define TDI_ADDRESS_TYPE_NETONE 20
|
||||
#define TDI_ADDRESS_TYPE_VNS 21
|
||||
#define TDI_ADDRESS_TYPE_NETBIOS_EX 22
|
||||
#define TDI_ADDRESS_TYPE_IP6 23
|
||||
#define TDI_ADDRESS_TYPE_NETBIOS_UNICODE_EX 24
|
||||
|
||||
#define TdiTransportAddress "TransportAddress"
|
||||
#define TdiConnectionContext "ConnectionContext"
|
||||
#define TDI_TRANSPORT_ADDRESS_LENGTH (sizeof(TdiTransportAddress) - 1)
|
||||
#define TDI_CONNECTION_CONTEXT_LENGTH (sizeof(TdiConnectionContext) - 1)
|
||||
|
||||
typedef struct _TRANSPORT_ADDRESS {
|
||||
LONG TAAddressCount;
|
||||
TA_ADDRESS Address[1];
|
||||
} TRANSPORT_ADDRESS, *PTRANSPORT_ADDRESS;
|
||||
|
||||
typedef struct _TDI_ACTION_HEADER {
|
||||
ULONG TransportId;
|
||||
USHORT ActionCode;
|
||||
USHORT Reserved;
|
||||
} TDI_ACTION_HEADER, *PTDI_ACTION_HEADER;
|
||||
|
||||
typedef struct _TDI_ADDRESS_INFO {
|
||||
ULONG ActivityCount;
|
||||
TRANSPORT_ADDRESS Address;
|
||||
} TDI_ADDRESS_INFO, *PTDI_ADDRESS_INFO;
|
||||
|
||||
#include "pshpack1.h"
|
||||
|
||||
typedef struct _TDI_ADDRESS_8022 {
|
||||
UCHAR MACAddress[6];
|
||||
} TDI_ADDRESS_8022, *PTDI_ADDRESS_8022;
|
||||
|
||||
#define TDI_ADDRESS_LENGTH_8022 sizeof(TDI_ADDRESS_8022);
|
||||
|
||||
typedef struct _TDI_ADDRESS_APPLETALK {
|
||||
USHORT Network;
|
||||
UCHAR Node;
|
||||
UCHAR Socket;
|
||||
} TDI_ADDRESS_APPLETALK, *PTDI_ADDRESS_APPLETALK;
|
||||
|
||||
#define TDI_ADDRESS_LENGTH_APPLETALK sizeof(TDI_ADDRESS_APPLETALK)
|
||||
|
||||
typedef struct _TDI_ADDRESS_IP {
|
||||
USHORT sin_port;
|
||||
ULONG in_addr;
|
||||
UCHAR sin_zero[8];
|
||||
} TDI_ADDRESS_IP, *PTDI_ADDRESS_IP;
|
||||
|
||||
#define TDI_ADDRESS_LENGTH_IP sizeof(TDI_ADDRESS_IP)
|
||||
|
||||
typedef struct _TDI_ADDRESS_IPX {
|
||||
ULONG NetworkAddress;
|
||||
UCHAR NodeAddress[6];
|
||||
USHORT Socket;
|
||||
} TDI_ADDRESS_IPX, *PTDI_ADDRESS_IPX;
|
||||
|
||||
#define TDI_ADDRESS_LENGTH_IPX sizeof(TDI_ADDRESS_IPX)
|
||||
|
||||
/* TDI_ADDRESS_NETBIOS.NetbiosNameType constants */
|
||||
#define TDI_ADDRESS_NETBIOS_TYPE_UNIQUE 0x0000
|
||||
#define TDI_ADDRESS_NETBIOS_TYPE_GROUP 0x0001
|
||||
#define TDI_ADDRESS_NETBIOS_TYPE_QUICK_UNIQUE 0x0002
|
||||
#define TDI_ADDRESS_NETBIOS_TYPE_QUICK_GROUP 0x0003
|
||||
|
||||
typedef struct _TDI_ADDRESS_NETBIOS {
|
||||
USHORT NetbiosNameType;
|
||||
UCHAR NetbiosName[16];
|
||||
} TDI_ADDRESS_NETBIOS, *PTDI_ADDRESS_NETBIOS;
|
||||
|
||||
#define TDI_ADDRESS_LENGTH_NETBIOS sizeof(TDI_ADDRESS_NETBIOS)
|
||||
|
||||
typedef struct _TDI_ADDRESS_NETBIOS_EX {
|
||||
UCHAR EndpointName[16];
|
||||
TDI_ADDRESS_NETBIOS NetbiosAddress;
|
||||
} TDI_ADDRESS_NETBIOS_EX, *PTDI_ADDRESS_NETBIOS_EX;
|
||||
|
||||
#define TDI_ADDRESS_LENGTH_NETBIOS_EX sizeof(TDI_ADDRESS_NETBIOS_EX)
|
||||
|
||||
/* TDI_ADDRESS_NETONE.NetoneNameType constants */
|
||||
#define TDI_ADDRESS_NETONE_TYPE_UNIQUE 0x0000
|
||||
#define TDI_ADDRESS_NETONE_TYPE_ROTORED 0x0001
|
||||
|
||||
typedef struct _TDI_ADDRESS_NETONE {
|
||||
USHORT NetoneNameType;
|
||||
UCHAR NetoneName[20];
|
||||
} TDI_ADDRESS_NETONE, *PTDI_ADDRESS_NETONE;
|
||||
|
||||
#define TDI_ADDRESS_LENGTH_NETONE sizeof(TDI_ADDRESS_NETONE)
|
||||
|
||||
typedef struct _TDI_ADDRESS_NS
|
||||
{
|
||||
ULONG NetworkAddress;
|
||||
UCHAR NodeAddress[6];
|
||||
USHORT Socket;
|
||||
} TDI_ADDRESS_NS, *PTDI_ADDRESS_NS;
|
||||
|
||||
#define TDI_ADDRESS_LENGTH_NS sizeof(TDI_ADDRESS_NS)
|
||||
|
||||
#define ISO_MAX_ADDR_LENGTH 64
|
||||
|
||||
/* TDI_ADDRESS_OSI_TSAP.tp_addr_type constants */
|
||||
#define ISO_HIERARCHICAL 0
|
||||
#define ISO_NON_HIERARCHICAL 1
|
||||
|
||||
typedef struct _TDI_ADDRESS_OSI_TSAP {
|
||||
USHORT tp_addr_type;
|
||||
USHORT tp_taddr_len;
|
||||
USHORT tp_tsel_len;
|
||||
UCHAR tp_addr[ISO_MAX_ADDR_LENGTH];
|
||||
} TDI_ADDRESS_OSI_TSAP, *PTDI_ADDRESS_OSI_TSAP;
|
||||
|
||||
#define TDI_ADDRESS_LENGTH_OSI_TSAP sizeof(TDI_ADDRESS_OSI_TSAP)
|
||||
|
||||
typedef struct _TDI_ADDRESS_VNS {
|
||||
UCHAR net_address[4];
|
||||
UCHAR subnet_addr[2];
|
||||
UCHAR port[2];
|
||||
UCHAR hops;
|
||||
UCHAR filler[5];
|
||||
} TDI_ADDRESS_VNS, *PTDI_ADDRESS_VNS;
|
||||
|
||||
#define TDI_ADDRESS_LENGTH_VNS sizeof(TDI_ADDRESS_VNS)
|
||||
|
||||
typedef struct _TDI_ADDRESS_IP6 {
|
||||
USHORT sin6_port;
|
||||
ULONG sin6_flowinfo;
|
||||
USHORT sin6_addr[8];
|
||||
ULONG sin6_scope_id;
|
||||
} TDI_ADDRESS_IP6, *PTDI_ADDRESS_IP6;
|
||||
|
||||
#define TDI_ADDRESS_LENGTH_IP6 sizeof(TDI_ADDRESS_IP6)
|
||||
|
||||
enum eNameBufferType {
|
||||
NBT_READONLY = 0,
|
||||
NBT_WRITEONLY,
|
||||
NBT_READWRITE,
|
||||
NBT_WRITTEN
|
||||
};
|
||||
|
||||
typedef struct _TDI_ADDRESS_NETBIOS_UNICODE_EX {
|
||||
USHORT NetbiosNameType;
|
||||
enum eNameBufferType NameBufferType;
|
||||
UNICODE_STRING EndpointName;
|
||||
UNICODE_STRING RemoteName;
|
||||
WCHAR EndpointBuffer[17];
|
||||
WCHAR RemoteNameBuffer[1];
|
||||
} TDI_ADDRESS_NETBIOS_UNICODE_EX, *PTDI_ADDRESS_NETBIOS_UNICODE_EX;
|
||||
|
||||
typedef struct _TA_APPLETALK_ADDR {
|
||||
LONG TAAddressCount;
|
||||
struct _AddrAtalk {
|
||||
USHORT AddressLength;
|
||||
USHORT AddressType;
|
||||
TDI_ADDRESS_APPLETALK Address[1];
|
||||
} Address[1];
|
||||
} TA_APPLETALK_ADDRESS, *PTA_APPLETALK_ADDRESS;
|
||||
|
||||
typedef struct _TA_ADDRESS_IP {
|
||||
LONG TAAddressCount;
|
||||
struct _AddrIp {
|
||||
USHORT AddressLength;
|
||||
USHORT AddressType;
|
||||
TDI_ADDRESS_IP Address[1];
|
||||
} Address[1];
|
||||
} TA_IP_ADDRESS, *PTA_IP_ADDRESS;
|
||||
|
||||
typedef struct _TA_ADDRESS_IPX {
|
||||
LONG TAAddressCount;
|
||||
struct _AddrIpx {
|
||||
USHORT AddressLength;
|
||||
USHORT AddressType;
|
||||
TDI_ADDRESS_IPX Address[1];
|
||||
} Address[1];
|
||||
} TA_IPX_ADDRESS, *PTA_IPX_ADDRESS;
|
||||
|
||||
typedef struct _TA_NETBIOS_ADDRESS {
|
||||
LONG TAAddressCount;
|
||||
struct _Addr{
|
||||
USHORT AddressLength;
|
||||
USHORT AddressType;
|
||||
TDI_ADDRESS_NETBIOS Address[1];
|
||||
} Address[1];
|
||||
} TA_NETBIOS_ADDRESS, *PTA_NETBIOS_ADDRESS;
|
||||
|
||||
typedef struct _TA_ADDRESS_NS {
|
||||
LONG TAAddressCount;
|
||||
struct _AddrNs {
|
||||
USHORT AddressLength;
|
||||
USHORT AddressType;
|
||||
TDI_ADDRESS_NS Address[1];
|
||||
} Address[1];
|
||||
} TA_NS_ADDRESS, *PTA_NS_ADDRESS;
|
||||
|
||||
typedef struct _TA_ADDRESS_VNS {
|
||||
LONG TAAddressCount;
|
||||
struct _AddrVns {
|
||||
USHORT AddressLength;
|
||||
USHORT AddressType;
|
||||
TDI_ADDRESS_VNS Address[1];
|
||||
} Address[1];
|
||||
} TA_VNS_ADDRESS, *PTA_VNS_ADDRESS;
|
||||
|
||||
typedef struct _TA_ADDRESS_IP6 {
|
||||
LONG TAAddressCount;
|
||||
struct _AddrIp6 {
|
||||
USHORT AddressLength;
|
||||
USHORT AddressType;
|
||||
TDI_ADDRESS_IP6 Address[1];
|
||||
} Address [1];
|
||||
} TA_IP6_ADDRESS, *PTA_IP6_ADDRESS;
|
||||
|
||||
typedef struct _TA_ADDRESS_NETBIOS_UNICODE_EX {
|
||||
LONG TAAddressCount;
|
||||
struct _AddrNetbiosWCharEx {
|
||||
USHORT AddressLength;
|
||||
USHORT AddressType;
|
||||
TDI_ADDRESS_NETBIOS_UNICODE_EX Address[1];
|
||||
} Address [1];
|
||||
} TA_NETBIOS_UNICODE_EX_ADDRESS, *PTA_NETBIOS_UNICODE_EX_ADDRESS;
|
||||
|
||||
#include "poppack.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __TDI_H */
|
104
mingw-w64-headers/include/tdiinfo.h
Normal file
104
mingw-w64-headers/include/tdiinfo.h
Normal file
@ -0,0 +1,104 @@
|
||||
/*
|
||||
* tdiinfo.h
|
||||
*
|
||||
* TDI set and query information interface
|
||||
*
|
||||
* This file is part of the w32api package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __TDIINFO_H
|
||||
#define __TDIINFO_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct TDIEntityID {
|
||||
ULONG tei_entity;
|
||||
ULONG tei_instance;
|
||||
} TDIEntityID;
|
||||
|
||||
#define MAX_TDI_ENTITIES 4096
|
||||
#define INVALID_ENTITY_INSTANCE -1
|
||||
#define GENERIC_ENTITY 0
|
||||
#define ENTITY_LIST_ID 0
|
||||
#define ENTITY_TYPE_ID 1
|
||||
|
||||
#define AT_ENTITY 0x280
|
||||
#define CL_NL_ENTITY 0x301
|
||||
#define CL_TL_ENTITY 0x401
|
||||
#define CO_NL_ENTITY 0x300
|
||||
#define CO_TL_ENTITY 0x400
|
||||
#define ER_ENTITY 0x380
|
||||
#define IF_ENTITY 0x200
|
||||
|
||||
#define AT_ARP 0x280
|
||||
#define AT_NULL 0x282
|
||||
#define CL_TL_NBF 0x401
|
||||
#define CL_TL_UDP 0x403
|
||||
#define CL_NL_IPX 0x301
|
||||
#define CL_NL_IP 0x303
|
||||
#define CO_TL_NBF 0x400
|
||||
#define CO_TL_SPX 0x402
|
||||
#define CO_TL_TCP 0x404
|
||||
#define CO_TL_SPP 0x406
|
||||
#define ER_ICMP 0x380
|
||||
#define IF_GENERIC 0x200
|
||||
#define IF_MIB 0x202
|
||||
|
||||
/* TDIObjectID.toi_class constants */
|
||||
#define INFO_CLASS_GENERIC 0x100
|
||||
#define INFO_CLASS_PROTOCOL 0x200
|
||||
#define INFO_CLASS_IMPLEMENTATION 0x300
|
||||
|
||||
/* TDIObjectID.toi_type constants */
|
||||
#define INFO_TYPE_PROVIDER 0x100
|
||||
#define INFO_TYPE_ADDRESS_OBJECT 0x200
|
||||
#define INFO_TYPE_CONNECTION 0x300
|
||||
|
||||
typedef struct _TDIObjectID {
|
||||
TDIEntityID toi_entity;
|
||||
ULONG toi_class;
|
||||
ULONG toi_type;
|
||||
ULONG toi_id;
|
||||
} TDIObjectID;
|
||||
|
||||
#define CONTEXT_SIZE 16
|
||||
|
||||
typedef struct _TCP_REQUEST_QUERY_INFORMATION_EX {
|
||||
TDIObjectID ID;
|
||||
ULONG_PTR Context[CONTEXT_SIZE / sizeof(ULONG_PTR)];
|
||||
} TCP_REQUEST_QUERY_INFORMATION_EX, *PTCP_REQUEST_QUERY_INFORMATION_EX;
|
||||
|
||||
#if defined(_WIN64)
|
||||
typedef struct _TCP_REQUEST_QUERY_INFORMATION_EX32 {
|
||||
TDIObjectID ID;
|
||||
ULONG32 Context[CONTEXT_SIZE / sizeof(ULONG32)];
|
||||
} TCP_REQUEST_QUERY_INFORMATION_EX32, *PTCP_REQUEST_QUERY_INFORMATION_EX32;
|
||||
#endif /* _WIN64 */
|
||||
|
||||
typedef struct _TCP_REQUEST_SET_INFORMATION_EX {
|
||||
TDIObjectID ID;
|
||||
unsigned int BufferSize;
|
||||
unsigned char Buffer[1];
|
||||
} TCP_REQUEST_SET_INFORMATION_EX, *PTCP_REQUEST_SET_INFORMATION_EX;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __TDIINFO_H */
|
74
mingw-w64-headers/include/unknown.h
Normal file
74
mingw-w64-headers/include/unknown.h
Normal file
@ -0,0 +1,74 @@
|
||||
/*
|
||||
* unknown.h
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Magnus Olsen
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __unknwn_h__
|
||||
#define __unknwn_h__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#include <wdm.h>
|
||||
}
|
||||
#else
|
||||
#include <wdm.h>
|
||||
#endif
|
||||
|
||||
#include <windef.h>
|
||||
#define COM_NO_WINDOWS_H
|
||||
#include <basetyps.h>
|
||||
#ifdef PUT_GUIDS_HERE
|
||||
#include <initguid.h>
|
||||
#endif
|
||||
|
||||
DEFINE_GUID(IID_IUnknown, 0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
|
||||
#if defined(__cplusplus) && _MSC_VER >= 1100
|
||||
struct __declspec(uuid("00000000-0000-0000-C000-000000000046")) IUnknown;
|
||||
#endif
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IUnknown
|
||||
DECLARE_INTERFACE(IUnknown)
|
||||
{
|
||||
STDMETHOD(QueryInterface)
|
||||
( THIS_
|
||||
IN REFIID,
|
||||
OUT PVOID *
|
||||
) PURE;
|
||||
|
||||
STDMETHOD_(ULONG,AddRef)
|
||||
( THIS
|
||||
) PURE;
|
||||
|
||||
STDMETHOD_(ULONG,Release)
|
||||
( THIS
|
||||
) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
typedef IUnknown *PUNKNOWN;
|
||||
typedef
|
||||
HRESULT
|
||||
(NTAPI *PFNCREATEINSTANCE)
|
||||
(
|
||||
OUT PUNKNOWN * Unknown,
|
||||
IN REFCLSID ClassId,
|
||||
IN PUNKNOWN OuterUnknown,
|
||||
IN POOL_TYPE PoolType
|
||||
);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user