2025-04-27 07:49:33 -04:00

349 lines
8.6 KiB
Plaintext

// Copyright (c) 1999-2001 Microsoft Corporation, All Rights Reserved
enablemapdirect3216 = true;
typedef char * LPSTR;
typedef unsigned char * LPUSTR;
typedef unsigned short * LPUSHORT;
typedef unsigned long * LPULONG;
typedef long * LPLONG;
typedef long LONG;
typedef unsigned short USHORT;
typedef unsigned long ULONG;
typedef unsigned char BYTE;
typedef void* LPVOID;
typedef USHORT WORD;
typedef ULONG DWORD;
typedef DWORD DEVNODE;
typedef DEVNODE* PDEVNODE;
typedef DWORD CMBUSTYPE;
typedef CMBUSTYPE* PCMBUSTYPE;
typedef DWORD LOG_CONF;
typedef LOG_CONF* PLOG_CONF;
typedef DWORD RES_DES;
typedef RES_DES* PRES_DES;
typedef ULONG RESOURCEID;
typedef RESOURCEID* PRESOURCEID;
typedef DWORD RANGE_LIST;
typedef DWORD* PRANGE_LIST;
typedef DWORD RANGE_ELEMENT;
typedef DWORD* PRANGE_ELEMENT;
typedef struct _LOGONDETAILS
{
ULONG AuthorizationFlags;
LONG LastLogon;
LONG LastLogoff;
LONG AccountExpires;
ULONG MaximumStorage;
USHORT UnitsPerWeek;
unsigned char LogonHours[21];
USHORT BadPasswordCount;
USHORT NumberOfLogons;
USHORT CountryCode;
USHORT CodePage;
} LOGONDETAILS, *LPLOGONDETAILS;
typedef struct _use_info_1 {
char ui1_local[8+1];
char ui1_pad_1;
char * ui1_remote;
char * ui1_password;
unsigned short ui1_status;
short ui1_asg_type;
unsigned short ui1_refcount;
unsigned short ui1_usecount;
} use_info_1;
typedef struct _use_info_1Out {
char ui1_local[8+1];
char ui1_pad_1;
char ui1_remote[15+2+1+12+2];
unsigned short ui1_status;
short ui1_asg_type;
unsigned short ui1_refcount;
unsigned short ui1_usecount;
} use_info_1Out;
/*
Format of hard disk master boot sector:
Offset Size Description (Table 0574)
00h 446 BYTEs Master bootstrap loader code
1BEh 16 BYTEs partition record for partition 1 (see #0575)
1CEh 16 BYTEs partition record for partition 2
1DEh 16 BYTEs partition record for partition 3
1EEh 16 BYTEs partition record for partition 4
1FEh WORD signature, AA55h indicates valid boot block
Format of partition record:
Offset Size Description (Table 0575)
00h BYTE boot indicator (80h = active partition)
01h BYTE partition start head
02h BYTE partition start sector (bits 0-5)
03h BYTE partition start track (bits 8,9 in bits 6,7 of sector)
04h BYTE operating system indicator (see #0576)
05h BYTE partition end head
06h BYTE partition end sector (bits 0-5)
07h BYTE partition end track (bits 8,9 in bits 6,7 of sector)
08h DWORD sectors preceding partition
0Ch DWORD length of partition in sectors
*/
typedef struct
{
BYTE cBoot;
BYTE cStartHead;
BYTE cStartSector;
BYTE cStartTrack;
BYTE cOperatingSystem;
BYTE cEndHead;
BYTE cEndSector;
BYTE cEndTrack;
DWORD dwSectorsPreceding;
DWORD dwLengthInSectors;
} PartitionRecord;
typedef struct
{
BYTE cLoader[512];
// This was changed to a BYTE [512] to deal with the packing differences
// between default packing alignment in the thunking. This is casted properly
// in win32thk.h. If the thunk compiler supported it, I'd use #pragma pack(1).
/* BYTE cLoader[446];
PartitionRecord stPartition0;
PartitionRecord stPartition1;
PartitionRecord stPartition2;
PartitionRecord stPartition3;
WORD wSignature;
*/
} MasterBootSector;
typedef struct
{
WORD wDriveType;
WORD wMaxCylinder;
WORD wMaxSector;
WORD wMaxHead;
} Int13DriveParams;
//////////////////////////////////////////////////////////////////////
ULONG CIM16GetUserInfo1(LPSTR Name, LPSTR Comment, LPSTR HomeDirectory,
LPSTR ScriptPath, LPULONG PasswordAge,
LPUSHORT Privilges, LPUSHORT Flags)
{
Name = input;
HomeDirectory = inout;
ScriptPath = inout;
Comment = inout;
PasswordAge = inout;
Privilges = inout;
Flags = inout;
}
ULONG CIM16GetUserInfo2(LPSTR Name, LPSTR FullName,
LPSTR UserComment, LPSTR Parameters,
LPSTR Workstations, LPSTR LogonServer,
LPLOGONDETAILS LogonDetails )
{
Name = input;
FullName = inout;
UserComment = inout;
Parameters = inout;
Workstations = inout;
LogonServer = inout;
LogonDetails = inout;
}
ULONG CIM16GetUserInfo1Ex(LPSTR Domain, LPSTR Name, DWORD fGetDC, LPSTR Comment, LPSTR HomeDirectory,
LPSTR ScriptPath, LPULONG PasswordAge,
LPUSHORT Privilges, LPUSHORT Flags)
{
Domain = input;
Name = input;
HomeDirectory = inout;
ScriptPath = inout;
Comment = inout;
PasswordAge = inout;
Privilges = inout;
Flags = inout;
}
ULONG CIM16GetUserInfo2Ex(LPSTR Domain, LPSTR Name, DWORD fGetDC, LPSTR FullName,
LPSTR UserComment, LPSTR Parameters,
LPSTR Workstations, LPSTR LogonServer,
LPLOGONDETAILS LogonDetails )
{
Domain = input;
Name = input;
FullName = inout;
UserComment = inout;
Parameters = inout;
Workstations = inout;
LogonServer = inout;
LogonDetails = inout;
}
ULONG CIM16GetConfigManagerStatus(LPSTR HardwareKey)
{
HardwareKey = input;
}
WORD CIM16_CM_Locate_DevNode( PDEVNODE pdn, LPSTR HardwareKey, ULONG ulFlags )
{
pdn = inout;
HardwareKey = input;
}
WORD CIM16_CM_Get_Parent( PDEVNODE pdn, DEVNODE dnChild, ULONG ulFlags )
{
pdn = inout;
}
WORD CIM16_CM_Get_Child( PDEVNODE pdn, DEVNODE dnParent, ULONG ulFlags )
{
pdn = inout;
}
WORD CIM16_CM_Get_Sibling( PDEVNODE pdn, DEVNODE dnParent, ULONG ulFlags )
{
pdn = inout;
}
WORD CIM16_CM_Read_Registry_Value( DEVNODE dnDevNode, LPSTR pszSubKey, LPSTR pszValueName, ULONG ulExpectedType, LPVOID Buffer, LPULONG pulLength, ULONG ulFlags )
{
pszSubKey = input;
pszValueName = input;
Buffer = inout;
pulLength = inout;
}
WORD CIM16_CM_Get_DevNode_Status( LPULONG pulStatus, LPULONG pulProblemNumber, DEVNODE dnDevNode, ULONG ulFlags )
{
pulStatus = inout;
pulProblemNumber = inout;
}
WORD CIM16_CM_Get_Device_ID( DEVNODE dnDevNode, LPVOID Buffer, ULONG BufferLen, ULONG ulFlags )
{
Buffer = inout;
}
WORD CIM16_CM_Get_Device_ID_Size( LPULONG pulLen, DEVNODE dnDevNode, ULONG ulFlags )
{
pulLen = inout;
}
WORD CIM16_CM_Get_First_Log_Conf( PLOG_CONF plcLogConf, DEVNODE dnDevNode, ULONG ulFlags )
{
plcLogConf = inout;
}
WORD CIM16_CM_Get_Next_Res_Des( PRES_DES prdResDes, RES_DES rdResDes, RESOURCEID ForResource, PRESOURCEID pResourceID, ULONG ulFlags )
{
prdResDes = inout;
pResourceID = inout;
}
WORD CIM16_CM_Get_Res_Des_Data_Size( LPULONG pulSize, RES_DES rdResDes, ULONG ulFlags )
{
pulSize = inout;
}
WORD CIM16_CM_Get_Res_Des_Data( RES_DES rdResDes, LPVOID Buffer, ULONG BufferLen, ULONG ulFlags )
{
Buffer = inout;
}
WORD CIM16_CM_Get_Bus_Info(DEVNODE dnDevNode, PCMBUSTYPE pbtBusType, LPULONG pulSizeOfInfo, LPVOID pInfo, ULONG ulFlags)
{
pbtBusType = inout;
pulSizeOfInfo = inout;
pInfo = inout;
}
WORD CIM16_CM_Query_Arbitrator_Free_Data(PRANGE_LIST pList, ULONG DataLen, DEVNODE dnDevInst, RESOURCEID ResourceID, ULONG ulFlags)
{
pList = inout;
}
WORD CIM16_CM_Delete_Range(ULONG ulStartValue, ULONG ulEndValue, RANGE_LIST rlh, ULONG ulFlags)
{
}
WORD CIM16_CM_First_Range(RANGE_LIST rlh, LPULONG pulStart, LPULONG pulEnd, PRANGE_ELEMENT preElement, ULONG ulFlags)
{
pulStart = inout;
pulEnd = inout;
preElement = inout;
}
WORD CIM16_CM_Next_Range(PRANGE_ELEMENT preElement, LPULONG pulStart, LPULONG pullEnd, ULONG ulFlags)
{
preElement = inout;
pulStart = inout;
pullEnd = inout;
}
WORD CIM16_CM_Free_Range_List(RANGE_LIST rlh, ULONG ulFlags)
{
}
BYTE CIM16GetDrivePartitions(BYTE cDrive, MasterBootSector *MBR)
{
MBR = output;
}
BYTE CIM16GetDriveParams(BYTE cDrive, Int13DriveParams *Params)
{
Params = output;
}
WORD CIM16GetBiosUnit(LPSTR lpDeviceID)
{
lpDeviceID = input;
}
DWORD CIM16GetFreeSpace( DWORD option )
{
}
ULONG CIM16GetUseInfo1(
LPSTR Name,
LPSTR Local,
LPSTR Remote,
LPSTR Password,
LPULONG pdwStatus,
LPULONG pdwType,
LPULONG pdwRefCount,
LPULONG pdwUseCount)
{
Name = input;
Local = inout;
Remote = inout;
Password = inout;
pdwStatus = inout;
pdwType = inout;
pdwRefCount = inout;
pdwUseCount = inout;
}
ULONG CIM16NetUseEnum(
LPSTR pszServer,
short sLevel,
LPSTR pbBuffer,
use_info_1Out *pbBuffer2,
unsigned short cbBuffer,
unsigned short *pcEntriesRead,
unsigned short *pcTotalAvail
)
{
pszServer = input;
pbBuffer = output;
pbBuffer2 = output;
pcEntriesRead = output;
pcTotalAvail = output;
}