ホーム › System.RemoteDesktop › WTS_CLIENT_DATA
WTS_CLIENT_DATA
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| fDisableCtrlAltDel | BOOLEAN | 1 | +0 | +0 | Ctrl+Alt+Delの無効化フラグ。TRUEで無効化する。 |
| fDoubleClickDetect | BOOLEAN | 1 | +1 | +1 | ダブルクリック検出を有効にするかのフラグ。 |
| fEnableWindowsKey | BOOLEAN | 1 | +2 | +2 | Windowsキーを有効にするかのフラグ。 |
| fHideTitleBar | BOOLEAN | 1 | +3 | +3 | タイトルバーを非表示にするかのフラグ。 |
| fInheritAutoLogon | BOOL | 4 | +4 | +4 | 自動ログオン設定を継承するかのフラグ。BOOL型。 |
| fPromptForPassword | BOOLEAN | 1 | +8 | +8 | 接続時にパスワード入力を要求するかのフラグ。 |
| fUsingSavedCreds | BOOLEAN | 1 | +9 | +9 | 保存済み資格情報を使用するかのフラグ。 |
| Domain | WCHAR | 512 | +10 | +10 | ログオンに用いるドメイン名。WCHARの固定長バッファ。 |
| UserName | WCHAR | 512 | +522 | +522 | ログオンに用いるユーザー名。WCHARの固定長バッファ。 |
| Password | WCHAR | 512 | +1034 | +1034 | ログオンに用いるパスワード。WCHARの固定長バッファに格納される機微情報。 |
| fPasswordIsScPin | BOOLEAN | 1 | +1546 | +1546 | パスワードフィールドがスマートカードPINであるかのフラグ。 |
| fInheritInitialProgram | BOOL | 4 | +1548 | +1548 | 初期実行プログラム設定を継承するかのフラグ。BOOL型。 |
| WorkDirectory | WCHAR | 514 | +1552 | +1552 | 初期プログラムの作業ディレクトリ。WCHARの固定長バッファ。 |
| InitialProgram | WCHAR | 514 | +2066 | +2066 | セッション開始時に起動する初期プログラムのパス。WCHARバッファ。 |
| fMaximizeShell | BOOLEAN | 1 | +2580 | +2580 | シェルを最大化表示するかのフラグ。 |
| EncryptionLevel | BYTE | 1 | +2581 | +2581 | 接続の暗号化レベル。BYTE値で指定する。 |
| PerformanceFlags | DWORD | 4 | +2584 | +2584 | 表示効果の抑制などパフォーマンス最適化フラグの集合。 |
| ProtocolName | WCHAR | 18 | +2588 | +2588 | 使用するプロトコル名。WCHARの固定長バッファ。 |
| ProtocolType | WORD | 2 | +2606 | +2606 | プロトコル種別を示す数値。コンソール/RDP等を区別する。 |
| fInheritColorDepth | BOOL | 4 | +2608 | +2608 | 色深度設定を継承するかのフラグ。BOOL型。 |
| HRes | WORD | 2 | +2612 | +2612 | クライアント画面の水平解像度をピクセル単位で表す。 |
| VRes | WORD | 2 | +2614 | +2614 | クライアント画面の垂直解像度をピクセル単位で表す。 |
| ColorDepth | WORD | 2 | +2616 | +2616 | 画面の色深度を示す数値。ビット数に対応する。 |
| DisplayDriverName | WCHAR | 18 | +2618 | +2618 | 表示ドライバー名。WCHARの固定長バッファ。 |
| DisplayDeviceName | WCHAR | 40 | +2636 | +2636 | 表示デバイス名。WCHARの固定長バッファ。 |
| fMouse | BOOLEAN | 1 | +2676 | +2676 | マウスを有効にするかのフラグ。 |
| KeyboardLayout | DWORD | 4 | +2680 | +2680 | キーボードレイアウト識別子。HKLに相当する値。 |
| KeyboardType | DWORD | 4 | +2684 | +2684 | キーボードの種類を示す数値。 |
| KeyboardSubType | DWORD | 4 | +2688 | +2688 | キーボードのサブタイプを示す数値。 |
| KeyboardFunctionKey | DWORD | 4 | +2692 | +2692 | ファンクションキーの個数。 |
| imeFileName | WCHAR | 66 | +2696 | +2696 | IME(入力方式エディター)のファイル名。WCHARバッファ。 |
| ActiveInputLocale | DWORD | 4 | +2764 | +2764 | アクティブな入力ロケール識別子。 |
| fNoAudioPlayback | BOOLEAN | 1 | +2768 | +2768 | 音声再生を無効にするかのフラグ。 |
| fRemoteConsoleAudio | BOOLEAN | 1 | +2769 | +2769 | リモートコンソールでの音声再生フラグ。 |
| AudioDriverName | WCHAR | 18 | +2770 | +2770 | オーディオドライバー名。WCHARの固定長バッファ。 |
| ClientTimeZone | WTS_TIME_ZONE_INFORMATION | 172 | +2788 | +2788 | クライアントのタイムゾーン情報。WTS_TIME_ZONE_INFORMATIONで表す。 |
| ClientName | WCHAR | 42 | +2960 | +2960 | クライアントコンピューター名。WCHARの固定長バッファ。 |
| SerialNumber | DWORD | 4 | +3004 | +3004 | クライアントのシリアル番号。 |
| ClientAddressFamily | DWORD | 4 | +3008 | +3008 | クライアントアドレスのアドレスファミリ。AF_INET等を示す。 |
| ClientAddress | WCHAR | 62 | +3012 | +3012 | クライアントのネットワークアドレス。WCHARの固定長バッファ。 |
| ClientSockAddress | WTS_SOCKADDR | 16/8 | +3080 | +3076 | クライアントのソケットアドレス。WTS_SOCKADDRで表す。 |
| ClientDirectory | WCHAR | 514 | +3096 | +3084 | クライアントのインストールディレクトリ。WCHARバッファ。 |
| ClientBuildNumber | DWORD | 4 | +3612 | +3600 | クライアントソフトウェアのビルド番号。 |
| ClientProductId | WORD | 2 | +3616 | +3604 | クライアントの製品ID。 |
| OutBufCountHost | WORD | 2 | +3618 | +3606 | ホスト側出力バッファ数。 |
| OutBufCountClient | WORD | 2 | +3620 | +3608 | クライアント側出力バッファ数。 |
| OutBufLength | WORD | 2 | +3622 | +3610 | 出力バッファ長をバイト単位で表す。 |
| ClientSessionId | DWORD | 4 | +3624 | +3612 | クライアント側のセッションID。 |
| ClientDigProductId | WCHAR | 66 | +3628 | +3616 | クライアントのデジタル製品ID。WCHARバッファ。 |
| fDisableCpm | BOOLEAN | 1 | +3694 | +3682 | プリンターリダイレクト(CPM)を無効にするかのフラグ。 |
| fDisableCdm | BOOLEAN | 1 | +3695 | +3683 | ドライブリダイレクト(CDM)を無効にするかのフラグ。 |
| fDisableCcm | BOOLEAN | 1 | +3696 | +3684 | COMポートリダイレクト(CCM)を無効にするかのフラグ。 |
| fDisableLPT | BOOLEAN | 1 | +3697 | +3685 | LPTポートリダイレクトを無効にするかのフラグ。 |
| fDisableClip | BOOLEAN | 1 | +3698 | +3686 | クリップボードリダイレクトを無効にするかのフラグ。 |
| fDisablePNP | BOOLEAN | 1 | +3699 | +3687 | プラグアンドプレイデバイスリダイレクトを無効にするかのフラグ。 |
各言語での定義
#include <windows.h>
// WTS_SYSTEMTIME (x64 16 / x86 16 バイト)
typedef struct WTS_SYSTEMTIME {
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} WTS_SYSTEMTIME;
// WTS_TIME_ZONE_INFORMATION (x64 172 / x86 172 バイト)
typedef struct WTS_TIME_ZONE_INFORMATION {
INT Bias;
WCHAR StandardName[32];
WTS_SYSTEMTIME StandardDate;
INT StandardBias;
WCHAR DaylightName[32];
WTS_SYSTEMTIME DaylightDate;
INT DaylightBias;
} WTS_TIME_ZONE_INFORMATION;
// WTS_SOCKADDR (x64 16 / x86 8 バイト)
typedef struct WTS_SOCKADDR {
WORD sin_family;
_u_e__Union u;
} WTS_SOCKADDR;
// WTS_CLIENT_DATA (x64 3704 / x86 3688 バイト)
typedef struct WTS_CLIENT_DATA {
BOOLEAN fDisableCtrlAltDel;
BOOLEAN fDoubleClickDetect;
BOOLEAN fEnableWindowsKey;
BOOLEAN fHideTitleBar;
BOOL fInheritAutoLogon;
BOOLEAN fPromptForPassword;
BOOLEAN fUsingSavedCreds;
WCHAR Domain[256];
WCHAR UserName[256];
WCHAR Password[256];
BOOLEAN fPasswordIsScPin;
BOOL fInheritInitialProgram;
WCHAR WorkDirectory[257];
WCHAR InitialProgram[257];
BOOLEAN fMaximizeShell;
BYTE EncryptionLevel;
DWORD PerformanceFlags;
WCHAR ProtocolName[9];
WORD ProtocolType;
BOOL fInheritColorDepth;
WORD HRes;
WORD VRes;
WORD ColorDepth;
WCHAR DisplayDriverName[9];
WCHAR DisplayDeviceName[20];
BOOLEAN fMouse;
DWORD KeyboardLayout;
DWORD KeyboardType;
DWORD KeyboardSubType;
DWORD KeyboardFunctionKey;
WCHAR imeFileName[33];
DWORD ActiveInputLocale;
BOOLEAN fNoAudioPlayback;
BOOLEAN fRemoteConsoleAudio;
WCHAR AudioDriverName[9];
WTS_TIME_ZONE_INFORMATION ClientTimeZone;
WCHAR ClientName[21];
DWORD SerialNumber;
DWORD ClientAddressFamily;
WCHAR ClientAddress[31];
WTS_SOCKADDR ClientSockAddress;
WCHAR ClientDirectory[257];
DWORD ClientBuildNumber;
WORD ClientProductId;
WORD OutBufCountHost;
WORD OutBufCountClient;
WORD OutBufLength;
DWORD ClientSessionId;
WCHAR ClientDigProductId[33];
BOOLEAN fDisableCpm;
BOOLEAN fDisableCdm;
BOOLEAN fDisableCcm;
BOOLEAN fDisableLPT;
BOOLEAN fDisableClip;
BOOLEAN fDisablePNP;
} WTS_CLIENT_DATA;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WTS_SYSTEMTIME
{
public ushort wYear;
public ushort wMonth;
public ushort wDayOfWeek;
public ushort wDay;
public ushort wHour;
public ushort wMinute;
public ushort wSecond;
public ushort wMilliseconds;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WTS_TIME_ZONE_INFORMATION
{
public int Bias;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] public string StandardName;
public WTS_SYSTEMTIME StandardDate;
public int StandardBias;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] public string DaylightName;
public WTS_SYSTEMTIME DaylightDate;
public int DaylightBias;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WTS_SOCKADDR
{
public ushort sin_family;
public _u_e__Union u;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WTS_CLIENT_DATA
{
[MarshalAs(UnmanagedType.U1)] public bool fDisableCtrlAltDel;
[MarshalAs(UnmanagedType.U1)] public bool fDoubleClickDetect;
[MarshalAs(UnmanagedType.U1)] public bool fEnableWindowsKey;
[MarshalAs(UnmanagedType.U1)] public bool fHideTitleBar;
[MarshalAs(UnmanagedType.Bool)] public bool fInheritAutoLogon;
[MarshalAs(UnmanagedType.U1)] public bool fPromptForPassword;
[MarshalAs(UnmanagedType.U1)] public bool fUsingSavedCreds;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string Domain;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string UserName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string Password;
[MarshalAs(UnmanagedType.U1)] public bool fPasswordIsScPin;
[MarshalAs(UnmanagedType.Bool)] public bool fInheritInitialProgram;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 257)] public string WorkDirectory;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 257)] public string InitialProgram;
[MarshalAs(UnmanagedType.U1)] public bool fMaximizeShell;
public byte EncryptionLevel;
public uint PerformanceFlags;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 9)] public string ProtocolName;
public ushort ProtocolType;
[MarshalAs(UnmanagedType.Bool)] public bool fInheritColorDepth;
public ushort HRes;
public ushort VRes;
public ushort ColorDepth;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 9)] public string DisplayDriverName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)] public string DisplayDeviceName;
[MarshalAs(UnmanagedType.U1)] public bool fMouse;
public uint KeyboardLayout;
public uint KeyboardType;
public uint KeyboardSubType;
public uint KeyboardFunctionKey;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 33)] public string imeFileName;
public uint ActiveInputLocale;
[MarshalAs(UnmanagedType.U1)] public bool fNoAudioPlayback;
[MarshalAs(UnmanagedType.U1)] public bool fRemoteConsoleAudio;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 9)] public string AudioDriverName;
public WTS_TIME_ZONE_INFORMATION ClientTimeZone;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 21)] public string ClientName;
public uint SerialNumber;
public uint ClientAddressFamily;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 31)] public string ClientAddress;
public WTS_SOCKADDR ClientSockAddress;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 257)] public string ClientDirectory;
public uint ClientBuildNumber;
public ushort ClientProductId;
public ushort OutBufCountHost;
public ushort OutBufCountClient;
public ushort OutBufLength;
public uint ClientSessionId;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 33)] public string ClientDigProductId;
[MarshalAs(UnmanagedType.U1)] public bool fDisableCpm;
[MarshalAs(UnmanagedType.U1)] public bool fDisableCdm;
[MarshalAs(UnmanagedType.U1)] public bool fDisableCcm;
[MarshalAs(UnmanagedType.U1)] public bool fDisableLPT;
[MarshalAs(UnmanagedType.U1)] public bool fDisableClip;
[MarshalAs(UnmanagedType.U1)] public bool fDisablePNP;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WTS_SYSTEMTIME
Public wYear As UShort
Public wMonth As UShort
Public wDayOfWeek As UShort
Public wDay As UShort
Public wHour As UShort
Public wMinute As UShort
Public wSecond As UShort
Public wMilliseconds As UShort
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WTS_TIME_ZONE_INFORMATION
Public Bias As Integer
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=32)> Public StandardName As String
Public StandardDate As WTS_SYSTEMTIME
Public StandardBias As Integer
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=32)> Public DaylightName As String
Public DaylightDate As WTS_SYSTEMTIME
Public DaylightBias As Integer
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WTS_SOCKADDR
Public sin_family As UShort
Public u As _u_e__Union
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WTS_CLIENT_DATA
<MarshalAs(UnmanagedType.U1)> Public fDisableCtrlAltDel As Boolean
<MarshalAs(UnmanagedType.U1)> Public fDoubleClickDetect As Boolean
<MarshalAs(UnmanagedType.U1)> Public fEnableWindowsKey As Boolean
<MarshalAs(UnmanagedType.U1)> Public fHideTitleBar As Boolean
<MarshalAs(UnmanagedType.Bool)> Public fInheritAutoLogon As Boolean
<MarshalAs(UnmanagedType.U1)> Public fPromptForPassword As Boolean
<MarshalAs(UnmanagedType.U1)> Public fUsingSavedCreds As Boolean
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=256)> Public Domain As String
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=256)> Public UserName As String
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=256)> Public Password As String
<MarshalAs(UnmanagedType.U1)> Public fPasswordIsScPin As Boolean
<MarshalAs(UnmanagedType.Bool)> Public fInheritInitialProgram As Boolean
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=257)> Public WorkDirectory As String
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=257)> Public InitialProgram As String
<MarshalAs(UnmanagedType.U1)> Public fMaximizeShell As Boolean
Public EncryptionLevel As Byte
Public PerformanceFlags As UInteger
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=9)> Public ProtocolName As String
Public ProtocolType As UShort
<MarshalAs(UnmanagedType.Bool)> Public fInheritColorDepth As Boolean
Public HRes As UShort
Public VRes As UShort
Public ColorDepth As UShort
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=9)> Public DisplayDriverName As String
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=20)> Public DisplayDeviceName As String
<MarshalAs(UnmanagedType.U1)> Public fMouse As Boolean
Public KeyboardLayout As UInteger
Public KeyboardType As UInteger
Public KeyboardSubType As UInteger
Public KeyboardFunctionKey As UInteger
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=33)> Public imeFileName As String
Public ActiveInputLocale As UInteger
<MarshalAs(UnmanagedType.U1)> Public fNoAudioPlayback As Boolean
<MarshalAs(UnmanagedType.U1)> Public fRemoteConsoleAudio As Boolean
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=9)> Public AudioDriverName As String
Public ClientTimeZone As WTS_TIME_ZONE_INFORMATION
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=21)> Public ClientName As String
Public SerialNumber As UInteger
Public ClientAddressFamily As UInteger
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=31)> Public ClientAddress As String
Public ClientSockAddress As WTS_SOCKADDR
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=257)> Public ClientDirectory As String
Public ClientBuildNumber As UInteger
Public ClientProductId As UShort
Public OutBufCountHost As UShort
Public OutBufCountClient As UShort
Public OutBufLength As UShort
Public ClientSessionId As UInteger
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=33)> Public ClientDigProductId As String
<MarshalAs(UnmanagedType.U1)> Public fDisableCpm As Boolean
<MarshalAs(UnmanagedType.U1)> Public fDisableCdm As Boolean
<MarshalAs(UnmanagedType.U1)> Public fDisableCcm As Boolean
<MarshalAs(UnmanagedType.U1)> Public fDisableLPT As Boolean
<MarshalAs(UnmanagedType.U1)> Public fDisableClip As Boolean
<MarshalAs(UnmanagedType.U1)> Public fDisablePNP As Boolean
End Structureimport ctypes
from ctypes import wintypes
class WTS_SYSTEMTIME(ctypes.Structure):
_fields_ = [
("wYear", ctypes.c_ushort),
("wMonth", ctypes.c_ushort),
("wDayOfWeek", ctypes.c_ushort),
("wDay", ctypes.c_ushort),
("wHour", ctypes.c_ushort),
("wMinute", ctypes.c_ushort),
("wSecond", ctypes.c_ushort),
("wMilliseconds", ctypes.c_ushort),
]
class WTS_TIME_ZONE_INFORMATION(ctypes.Structure):
_fields_ = [
("Bias", ctypes.c_int),
("StandardName", ctypes.c_wchar * 32),
("StandardDate", WTS_SYSTEMTIME),
("StandardBias", ctypes.c_int),
("DaylightName", ctypes.c_wchar * 32),
("DaylightDate", WTS_SYSTEMTIME),
("DaylightBias", ctypes.c_int),
]
class WTS_SOCKADDR(ctypes.Structure):
_fields_ = [
("sin_family", ctypes.c_ushort),
("u", _u_e__Union),
]
class WTS_CLIENT_DATA(ctypes.Structure):
_fields_ = [
("fDisableCtrlAltDel", ctypes.c_byte),
("fDoubleClickDetect", ctypes.c_byte),
("fEnableWindowsKey", ctypes.c_byte),
("fHideTitleBar", ctypes.c_byte),
("fInheritAutoLogon", wintypes.BOOL),
("fPromptForPassword", ctypes.c_byte),
("fUsingSavedCreds", ctypes.c_byte),
("Domain", ctypes.c_wchar * 256),
("UserName", ctypes.c_wchar * 256),
("Password", ctypes.c_wchar * 256),
("fPasswordIsScPin", ctypes.c_byte),
("fInheritInitialProgram", wintypes.BOOL),
("WorkDirectory", ctypes.c_wchar * 257),
("InitialProgram", ctypes.c_wchar * 257),
("fMaximizeShell", ctypes.c_byte),
("EncryptionLevel", ctypes.c_ubyte),
("PerformanceFlags", wintypes.DWORD),
("ProtocolName", ctypes.c_wchar * 9),
("ProtocolType", ctypes.c_ushort),
("fInheritColorDepth", wintypes.BOOL),
("HRes", ctypes.c_ushort),
("VRes", ctypes.c_ushort),
("ColorDepth", ctypes.c_ushort),
("DisplayDriverName", ctypes.c_wchar * 9),
("DisplayDeviceName", ctypes.c_wchar * 20),
("fMouse", ctypes.c_byte),
("KeyboardLayout", wintypes.DWORD),
("KeyboardType", wintypes.DWORD),
("KeyboardSubType", wintypes.DWORD),
("KeyboardFunctionKey", wintypes.DWORD),
("imeFileName", ctypes.c_wchar * 33),
("ActiveInputLocale", wintypes.DWORD),
("fNoAudioPlayback", ctypes.c_byte),
("fRemoteConsoleAudio", ctypes.c_byte),
("AudioDriverName", ctypes.c_wchar * 9),
("ClientTimeZone", WTS_TIME_ZONE_INFORMATION),
("ClientName", ctypes.c_wchar * 21),
("SerialNumber", wintypes.DWORD),
("ClientAddressFamily", wintypes.DWORD),
("ClientAddress", ctypes.c_wchar * 31),
("ClientSockAddress", WTS_SOCKADDR),
("ClientDirectory", ctypes.c_wchar * 257),
("ClientBuildNumber", wintypes.DWORD),
("ClientProductId", ctypes.c_ushort),
("OutBufCountHost", ctypes.c_ushort),
("OutBufCountClient", ctypes.c_ushort),
("OutBufLength", ctypes.c_ushort),
("ClientSessionId", wintypes.DWORD),
("ClientDigProductId", ctypes.c_wchar * 33),
("fDisableCpm", ctypes.c_byte),
("fDisableCdm", ctypes.c_byte),
("fDisableCcm", ctypes.c_byte),
("fDisableLPT", ctypes.c_byte),
("fDisableClip", ctypes.c_byte),
("fDisablePNP", ctypes.c_byte),
]#[repr(C)]
pub struct WTS_SYSTEMTIME {
pub wYear: u16,
pub wMonth: u16,
pub wDayOfWeek: u16,
pub wDay: u16,
pub wHour: u16,
pub wMinute: u16,
pub wSecond: u16,
pub wMilliseconds: u16,
}
#[repr(C)]
pub struct WTS_TIME_ZONE_INFORMATION {
pub Bias: i32,
pub StandardName: [u16; 32],
pub StandardDate: WTS_SYSTEMTIME,
pub StandardBias: i32,
pub DaylightName: [u16; 32],
pub DaylightDate: WTS_SYSTEMTIME,
pub DaylightBias: i32,
}
#[repr(C)]
pub struct WTS_SOCKADDR {
pub sin_family: u16,
pub u: _u_e__Union,
}
#[repr(C)]
pub struct WTS_CLIENT_DATA {
pub fDisableCtrlAltDel: u8,
pub fDoubleClickDetect: u8,
pub fEnableWindowsKey: u8,
pub fHideTitleBar: u8,
pub fInheritAutoLogon: i32,
pub fPromptForPassword: u8,
pub fUsingSavedCreds: u8,
pub Domain: [u16; 256],
pub UserName: [u16; 256],
pub Password: [u16; 256],
pub fPasswordIsScPin: u8,
pub fInheritInitialProgram: i32,
pub WorkDirectory: [u16; 257],
pub InitialProgram: [u16; 257],
pub fMaximizeShell: u8,
pub EncryptionLevel: u8,
pub PerformanceFlags: u32,
pub ProtocolName: [u16; 9],
pub ProtocolType: u16,
pub fInheritColorDepth: i32,
pub HRes: u16,
pub VRes: u16,
pub ColorDepth: u16,
pub DisplayDriverName: [u16; 9],
pub DisplayDeviceName: [u16; 20],
pub fMouse: u8,
pub KeyboardLayout: u32,
pub KeyboardType: u32,
pub KeyboardSubType: u32,
pub KeyboardFunctionKey: u32,
pub imeFileName: [u16; 33],
pub ActiveInputLocale: u32,
pub fNoAudioPlayback: u8,
pub fRemoteConsoleAudio: u8,
pub AudioDriverName: [u16; 9],
pub ClientTimeZone: WTS_TIME_ZONE_INFORMATION,
pub ClientName: [u16; 21],
pub SerialNumber: u32,
pub ClientAddressFamily: u32,
pub ClientAddress: [u16; 31],
pub ClientSockAddress: WTS_SOCKADDR,
pub ClientDirectory: [u16; 257],
pub ClientBuildNumber: u32,
pub ClientProductId: u16,
pub OutBufCountHost: u16,
pub OutBufCountClient: u16,
pub OutBufLength: u16,
pub ClientSessionId: u32,
pub ClientDigProductId: [u16; 33],
pub fDisableCpm: u8,
pub fDisableCdm: u8,
pub fDisableCcm: u8,
pub fDisableLPT: u8,
pub fDisableClip: u8,
pub fDisablePNP: u8,
}import "golang.org/x/sys/windows"
type WTS_SYSTEMTIME struct {
wYear uint16
wMonth uint16
wDayOfWeek uint16
wDay uint16
wHour uint16
wMinute uint16
wSecond uint16
wMilliseconds uint16
}
type WTS_TIME_ZONE_INFORMATION struct {
Bias int32
StandardName [32]uint16
StandardDate WTS_SYSTEMTIME
StandardBias int32
DaylightName [32]uint16
DaylightDate WTS_SYSTEMTIME
DaylightBias int32
}
type WTS_SOCKADDR struct {
sin_family uint16
u _u_e__Union
}
type WTS_CLIENT_DATA struct {
fDisableCtrlAltDel byte
fDoubleClickDetect byte
fEnableWindowsKey byte
fHideTitleBar byte
fInheritAutoLogon int32
fPromptForPassword byte
fUsingSavedCreds byte
Domain [256]uint16
UserName [256]uint16
Password [256]uint16
fPasswordIsScPin byte
fInheritInitialProgram int32
WorkDirectory [257]uint16
InitialProgram [257]uint16
fMaximizeShell byte
EncryptionLevel byte
PerformanceFlags uint32
ProtocolName [9]uint16
ProtocolType uint16
fInheritColorDepth int32
HRes uint16
VRes uint16
ColorDepth uint16
DisplayDriverName [9]uint16
DisplayDeviceName [20]uint16
fMouse byte
KeyboardLayout uint32
KeyboardType uint32
KeyboardSubType uint32
KeyboardFunctionKey uint32
imeFileName [33]uint16
ActiveInputLocale uint32
fNoAudioPlayback byte
fRemoteConsoleAudio byte
AudioDriverName [9]uint16
ClientTimeZone WTS_TIME_ZONE_INFORMATION
ClientName [21]uint16
SerialNumber uint32
ClientAddressFamily uint32
ClientAddress [31]uint16
ClientSockAddress WTS_SOCKADDR
ClientDirectory [257]uint16
ClientBuildNumber uint32
ClientProductId uint16
OutBufCountHost uint16
OutBufCountClient uint16
OutBufLength uint16
ClientSessionId uint32
ClientDigProductId [33]uint16
fDisableCpm byte
fDisableCdm byte
fDisableCcm byte
fDisableLPT byte
fDisableClip byte
fDisablePNP byte
}type
WTS_SYSTEMTIME = record
wYear: Word;
wMonth: Word;
wDayOfWeek: Word;
wDay: Word;
wHour: Word;
wMinute: Word;
wSecond: Word;
wMilliseconds: Word;
end;
WTS_TIME_ZONE_INFORMATION = record
Bias: Integer;
StandardName: array[0..31] of WideChar;
StandardDate: WTS_SYSTEMTIME;
StandardBias: Integer;
DaylightName: array[0..31] of WideChar;
DaylightDate: WTS_SYSTEMTIME;
DaylightBias: Integer;
end;
WTS_SOCKADDR = record
sin_family: Word;
u: _u_e__Union;
end;
WTS_CLIENT_DATA = record
fDisableCtrlAltDel: ByteBool;
fDoubleClickDetect: ByteBool;
fEnableWindowsKey: ByteBool;
fHideTitleBar: ByteBool;
fInheritAutoLogon: BOOL;
fPromptForPassword: ByteBool;
fUsingSavedCreds: ByteBool;
Domain: array[0..255] of WideChar;
UserName: array[0..255] of WideChar;
Password: array[0..255] of WideChar;
fPasswordIsScPin: ByteBool;
fInheritInitialProgram: BOOL;
WorkDirectory: array[0..256] of WideChar;
InitialProgram: array[0..256] of WideChar;
fMaximizeShell: ByteBool;
EncryptionLevel: Byte;
PerformanceFlags: DWORD;
ProtocolName: array[0..8] of WideChar;
ProtocolType: Word;
fInheritColorDepth: BOOL;
HRes: Word;
VRes: Word;
ColorDepth: Word;
DisplayDriverName: array[0..8] of WideChar;
DisplayDeviceName: array[0..19] of WideChar;
fMouse: ByteBool;
KeyboardLayout: DWORD;
KeyboardType: DWORD;
KeyboardSubType: DWORD;
KeyboardFunctionKey: DWORD;
imeFileName: array[0..32] of WideChar;
ActiveInputLocale: DWORD;
fNoAudioPlayback: ByteBool;
fRemoteConsoleAudio: ByteBool;
AudioDriverName: array[0..8] of WideChar;
ClientTimeZone: WTS_TIME_ZONE_INFORMATION;
ClientName: array[0..20] of WideChar;
SerialNumber: DWORD;
ClientAddressFamily: DWORD;
ClientAddress: array[0..30] of WideChar;
ClientSockAddress: WTS_SOCKADDR;
ClientDirectory: array[0..256] of WideChar;
ClientBuildNumber: DWORD;
ClientProductId: Word;
OutBufCountHost: Word;
OutBufCountClient: Word;
OutBufLength: Word;
ClientSessionId: DWORD;
ClientDigProductId: array[0..32] of WideChar;
fDisableCpm: ByteBool;
fDisableCdm: ByteBool;
fDisableCcm: ByteBool;
fDisableLPT: ByteBool;
fDisableClip: ByteBool;
fDisablePNP: ByteBool;
end;const WTS_SYSTEMTIME = extern struct {
wYear: u16,
wMonth: u16,
wDayOfWeek: u16,
wDay: u16,
wHour: u16,
wMinute: u16,
wSecond: u16,
wMilliseconds: u16,
};
const WTS_TIME_ZONE_INFORMATION = extern struct {
Bias: i32,
StandardName: [32]u16,
StandardDate: WTS_SYSTEMTIME,
StandardBias: i32,
DaylightName: [32]u16,
DaylightDate: WTS_SYSTEMTIME,
DaylightBias: i32,
};
const WTS_SOCKADDR = extern struct {
sin_family: u16,
u: _u_e__Union,
};
const WTS_CLIENT_DATA = extern struct {
fDisableCtrlAltDel: u8,
fDoubleClickDetect: u8,
fEnableWindowsKey: u8,
fHideTitleBar: u8,
fInheritAutoLogon: i32,
fPromptForPassword: u8,
fUsingSavedCreds: u8,
Domain: [256]u16,
UserName: [256]u16,
Password: [256]u16,
fPasswordIsScPin: u8,
fInheritInitialProgram: i32,
WorkDirectory: [257]u16,
InitialProgram: [257]u16,
fMaximizeShell: u8,
EncryptionLevel: u8,
PerformanceFlags: u32,
ProtocolName: [9]u16,
ProtocolType: u16,
fInheritColorDepth: i32,
HRes: u16,
VRes: u16,
ColorDepth: u16,
DisplayDriverName: [9]u16,
DisplayDeviceName: [20]u16,
fMouse: u8,
KeyboardLayout: u32,
KeyboardType: u32,
KeyboardSubType: u32,
KeyboardFunctionKey: u32,
imeFileName: [33]u16,
ActiveInputLocale: u32,
fNoAudioPlayback: u8,
fRemoteConsoleAudio: u8,
AudioDriverName: [9]u16,
ClientTimeZone: WTS_TIME_ZONE_INFORMATION,
ClientName: [21]u16,
SerialNumber: u32,
ClientAddressFamily: u32,
ClientAddress: [31]u16,
ClientSockAddress: WTS_SOCKADDR,
ClientDirectory: [257]u16,
ClientBuildNumber: u32,
ClientProductId: u16,
OutBufCountHost: u16,
OutBufCountClient: u16,
OutBufLength: u16,
ClientSessionId: u32,
ClientDigProductId: [33]u16,
fDisableCpm: u8,
fDisableCdm: u8,
fDisableCcm: u8,
fDisableLPT: u8,
fDisableClip: u8,
fDisablePNP: u8,
};type
WTS_SYSTEMTIME {.bycopy.} = object
wYear: uint16
wMonth: uint16
wDayOfWeek: uint16
wDay: uint16
wHour: uint16
wMinute: uint16
wSecond: uint16
wMilliseconds: uint16
WTS_TIME_ZONE_INFORMATION {.bycopy.} = object
Bias: int32
StandardName: array[32, uint16]
StandardDate: WTS_SYSTEMTIME
StandardBias: int32
DaylightName: array[32, uint16]
DaylightDate: WTS_SYSTEMTIME
DaylightBias: int32
WTS_SOCKADDR {.bycopy.} = object
sin_family: uint16
u: _u_e__Union
WTS_CLIENT_DATA {.bycopy.} = object
fDisableCtrlAltDel: uint8
fDoubleClickDetect: uint8
fEnableWindowsKey: uint8
fHideTitleBar: uint8
fInheritAutoLogon: int32
fPromptForPassword: uint8
fUsingSavedCreds: uint8
Domain: array[256, uint16]
UserName: array[256, uint16]
Password: array[256, uint16]
fPasswordIsScPin: uint8
fInheritInitialProgram: int32
WorkDirectory: array[257, uint16]
InitialProgram: array[257, uint16]
fMaximizeShell: uint8
EncryptionLevel: uint8
PerformanceFlags: uint32
ProtocolName: array[9, uint16]
ProtocolType: uint16
fInheritColorDepth: int32
HRes: uint16
VRes: uint16
ColorDepth: uint16
DisplayDriverName: array[9, uint16]
DisplayDeviceName: array[20, uint16]
fMouse: uint8
KeyboardLayout: uint32
KeyboardType: uint32
KeyboardSubType: uint32
KeyboardFunctionKey: uint32
imeFileName: array[33, uint16]
ActiveInputLocale: uint32
fNoAudioPlayback: uint8
fRemoteConsoleAudio: uint8
AudioDriverName: array[9, uint16]
ClientTimeZone: WTS_TIME_ZONE_INFORMATION
ClientName: array[21, uint16]
SerialNumber: uint32
ClientAddressFamily: uint32
ClientAddress: array[31, uint16]
ClientSockAddress: WTS_SOCKADDR
ClientDirectory: array[257, uint16]
ClientBuildNumber: uint32
ClientProductId: uint16
OutBufCountHost: uint16
OutBufCountClient: uint16
OutBufLength: uint16
ClientSessionId: uint32
ClientDigProductId: array[33, uint16]
fDisableCpm: uint8
fDisableCdm: uint8
fDisableCcm: uint8
fDisableLPT: uint8
fDisableClip: uint8
fDisablePNP: uint8struct WTS_SYSTEMTIME
{
ushort wYear;
ushort wMonth;
ushort wDayOfWeek;
ushort wDay;
ushort wHour;
ushort wMinute;
ushort wSecond;
ushort wMilliseconds;
}
struct WTS_TIME_ZONE_INFORMATION
{
int Bias;
wchar[32] StandardName;
WTS_SYSTEMTIME StandardDate;
int StandardBias;
wchar[32] DaylightName;
WTS_SYSTEMTIME DaylightDate;
int DaylightBias;
}
struct WTS_SOCKADDR
{
ushort sin_family;
_u_e__Union u;
}
struct WTS_CLIENT_DATA
{
ubyte fDisableCtrlAltDel;
ubyte fDoubleClickDetect;
ubyte fEnableWindowsKey;
ubyte fHideTitleBar;
int fInheritAutoLogon;
ubyte fPromptForPassword;
ubyte fUsingSavedCreds;
wchar[256] Domain;
wchar[256] UserName;
wchar[256] Password;
ubyte fPasswordIsScPin;
int fInheritInitialProgram;
wchar[257] WorkDirectory;
wchar[257] InitialProgram;
ubyte fMaximizeShell;
ubyte EncryptionLevel;
uint PerformanceFlags;
wchar[9] ProtocolName;
ushort ProtocolType;
int fInheritColorDepth;
ushort HRes;
ushort VRes;
ushort ColorDepth;
wchar[9] DisplayDriverName;
wchar[20] DisplayDeviceName;
ubyte fMouse;
uint KeyboardLayout;
uint KeyboardType;
uint KeyboardSubType;
uint KeyboardFunctionKey;
wchar[33] imeFileName;
uint ActiveInputLocale;
ubyte fNoAudioPlayback;
ubyte fRemoteConsoleAudio;
wchar[9] AudioDriverName;
WTS_TIME_ZONE_INFORMATION ClientTimeZone;
wchar[21] ClientName;
uint SerialNumber;
uint ClientAddressFamily;
wchar[31] ClientAddress;
WTS_SOCKADDR ClientSockAddress;
wchar[257] ClientDirectory;
uint ClientBuildNumber;
ushort ClientProductId;
ushort OutBufCountHost;
ushort OutBufCountClient;
ushort OutBufLength;
uint ClientSessionId;
wchar[33] ClientDigProductId;
ubyte fDisableCpm;
ubyte fDisableCdm;
ubyte fDisableCcm;
ubyte fDisableLPT;
ubyte fDisableClip;
ubyte fDisablePNP;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; WTS_CLIENT_DATA サイズ: 3688 バイト(x86)
dim st, 922 ; 4byte整数×922(構造体サイズ 3688 / 4 切り上げ)
; fDisableCtrlAltDel : BOOLEAN (+0, 1byte) poke st,0,値 / 値 = peek(st,0)
; fDoubleClickDetect : BOOLEAN (+1, 1byte) poke st,1,値 / 値 = peek(st,1)
; fEnableWindowsKey : BOOLEAN (+2, 1byte) poke st,2,値 / 値 = peek(st,2)
; fHideTitleBar : BOOLEAN (+3, 1byte) poke st,3,値 / 値 = peek(st,3)
; fInheritAutoLogon : BOOL (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; fPromptForPassword : BOOLEAN (+8, 1byte) poke st,8,値 / 値 = peek(st,8)
; fUsingSavedCreds : BOOLEAN (+9, 1byte) poke st,9,値 / 値 = peek(st,9)
; Domain : WCHAR (+10, 512byte) varptr(st)+10 を基点に操作(512byte:入れ子/配列)
; UserName : WCHAR (+522, 512byte) varptr(st)+522 を基点に操作(512byte:入れ子/配列)
; Password : WCHAR (+1034, 512byte) varptr(st)+1034 を基点に操作(512byte:入れ子/配列)
; fPasswordIsScPin : BOOLEAN (+1546, 1byte) poke st,1546,値 / 値 = peek(st,1546)
; fInheritInitialProgram : BOOL (+1548, 4byte) st.387 = 値 / 値 = st.387 (lpoke/lpeek も可)
; WorkDirectory : WCHAR (+1552, 514byte) varptr(st)+1552 を基点に操作(514byte:入れ子/配列)
; InitialProgram : WCHAR (+2066, 514byte) varptr(st)+2066 を基点に操作(514byte:入れ子/配列)
; fMaximizeShell : BOOLEAN (+2580, 1byte) poke st,2580,値 / 値 = peek(st,2580)
; EncryptionLevel : BYTE (+2581, 1byte) poke st,2581,値 / 値 = peek(st,2581)
; PerformanceFlags : DWORD (+2584, 4byte) st.646 = 値 / 値 = st.646 (lpoke/lpeek も可)
; ProtocolName : WCHAR (+2588, 18byte) varptr(st)+2588 を基点に操作(18byte:入れ子/配列)
; ProtocolType : WORD (+2606, 2byte) wpoke st,2606,値 / 値 = wpeek(st,2606)
; fInheritColorDepth : BOOL (+2608, 4byte) st.652 = 値 / 値 = st.652 (lpoke/lpeek も可)
; HRes : WORD (+2612, 2byte) wpoke st,2612,値 / 値 = wpeek(st,2612)
; VRes : WORD (+2614, 2byte) wpoke st,2614,値 / 値 = wpeek(st,2614)
; ColorDepth : WORD (+2616, 2byte) wpoke st,2616,値 / 値 = wpeek(st,2616)
; DisplayDriverName : WCHAR (+2618, 18byte) varptr(st)+2618 を基点に操作(18byte:入れ子/配列)
; DisplayDeviceName : WCHAR (+2636, 40byte) varptr(st)+2636 を基点に操作(40byte:入れ子/配列)
; fMouse : BOOLEAN (+2676, 1byte) poke st,2676,値 / 値 = peek(st,2676)
; KeyboardLayout : DWORD (+2680, 4byte) st.670 = 値 / 値 = st.670 (lpoke/lpeek も可)
; KeyboardType : DWORD (+2684, 4byte) st.671 = 値 / 値 = st.671 (lpoke/lpeek も可)
; KeyboardSubType : DWORD (+2688, 4byte) st.672 = 値 / 値 = st.672 (lpoke/lpeek も可)
; KeyboardFunctionKey : DWORD (+2692, 4byte) st.673 = 値 / 値 = st.673 (lpoke/lpeek も可)
; imeFileName : WCHAR (+2696, 66byte) varptr(st)+2696 を基点に操作(66byte:入れ子/配列)
; ActiveInputLocale : DWORD (+2764, 4byte) st.691 = 値 / 値 = st.691 (lpoke/lpeek も可)
; fNoAudioPlayback : BOOLEAN (+2768, 1byte) poke st,2768,値 / 値 = peek(st,2768)
; fRemoteConsoleAudio : BOOLEAN (+2769, 1byte) poke st,2769,値 / 値 = peek(st,2769)
; AudioDriverName : WCHAR (+2770, 18byte) varptr(st)+2770 を基点に操作(18byte:入れ子/配列)
; ClientTimeZone : WTS_TIME_ZONE_INFORMATION (+2788, 172byte) varptr(st)+2788 を基点に操作(172byte:入れ子/配列)
; ClientName : WCHAR (+2960, 42byte) varptr(st)+2960 を基点に操作(42byte:入れ子/配列)
; SerialNumber : DWORD (+3004, 4byte) st.751 = 値 / 値 = st.751 (lpoke/lpeek も可)
; ClientAddressFamily : DWORD (+3008, 4byte) st.752 = 値 / 値 = st.752 (lpoke/lpeek も可)
; ClientAddress : WCHAR (+3012, 62byte) varptr(st)+3012 を基点に操作(62byte:入れ子/配列)
; ClientSockAddress : WTS_SOCKADDR (+3076, 8byte) varptr(st)+3076 を基点に操作(8byte:入れ子/配列)
; ClientDirectory : WCHAR (+3084, 514byte) varptr(st)+3084 を基点に操作(514byte:入れ子/配列)
; ClientBuildNumber : DWORD (+3600, 4byte) st.900 = 値 / 値 = st.900 (lpoke/lpeek も可)
; ClientProductId : WORD (+3604, 2byte) wpoke st,3604,値 / 値 = wpeek(st,3604)
; OutBufCountHost : WORD (+3606, 2byte) wpoke st,3606,値 / 値 = wpeek(st,3606)
; OutBufCountClient : WORD (+3608, 2byte) wpoke st,3608,値 / 値 = wpeek(st,3608)
; OutBufLength : WORD (+3610, 2byte) wpoke st,3610,値 / 値 = wpeek(st,3610)
; ClientSessionId : DWORD (+3612, 4byte) st.903 = 値 / 値 = st.903 (lpoke/lpeek も可)
; ClientDigProductId : WCHAR (+3616, 66byte) varptr(st)+3616 を基点に操作(66byte:入れ子/配列)
; fDisableCpm : BOOLEAN (+3682, 1byte) poke st,3682,値 / 値 = peek(st,3682)
; fDisableCdm : BOOLEAN (+3683, 1byte) poke st,3683,値 / 値 = peek(st,3683)
; fDisableCcm : BOOLEAN (+3684, 1byte) poke st,3684,値 / 値 = peek(st,3684)
; fDisableLPT : BOOLEAN (+3685, 1byte) poke st,3685,値 / 値 = peek(st,3685)
; fDisableClip : BOOLEAN (+3686, 1byte) poke st,3686,値 / 値 = peek(st,3686)
; fDisablePNP : BOOLEAN (+3687, 1byte) poke st,3687,値 / 値 = peek(st,3687)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; WTS_CLIENT_DATA サイズ: 3704 バイト(x64)
dim st, 926 ; 4byte整数×926(構造体サイズ 3704 / 4 切り上げ)
; fDisableCtrlAltDel : BOOLEAN (+0, 1byte) poke st,0,値 / 値 = peek(st,0)
; fDoubleClickDetect : BOOLEAN (+1, 1byte) poke st,1,値 / 値 = peek(st,1)
; fEnableWindowsKey : BOOLEAN (+2, 1byte) poke st,2,値 / 値 = peek(st,2)
; fHideTitleBar : BOOLEAN (+3, 1byte) poke st,3,値 / 値 = peek(st,3)
; fInheritAutoLogon : BOOL (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; fPromptForPassword : BOOLEAN (+8, 1byte) poke st,8,値 / 値 = peek(st,8)
; fUsingSavedCreds : BOOLEAN (+9, 1byte) poke st,9,値 / 値 = peek(st,9)
; Domain : WCHAR (+10, 512byte) varptr(st)+10 を基点に操作(512byte:入れ子/配列)
; UserName : WCHAR (+522, 512byte) varptr(st)+522 を基点に操作(512byte:入れ子/配列)
; Password : WCHAR (+1034, 512byte) varptr(st)+1034 を基点に操作(512byte:入れ子/配列)
; fPasswordIsScPin : BOOLEAN (+1546, 1byte) poke st,1546,値 / 値 = peek(st,1546)
; fInheritInitialProgram : BOOL (+1548, 4byte) st.387 = 値 / 値 = st.387 (lpoke/lpeek も可)
; WorkDirectory : WCHAR (+1552, 514byte) varptr(st)+1552 を基点に操作(514byte:入れ子/配列)
; InitialProgram : WCHAR (+2066, 514byte) varptr(st)+2066 を基点に操作(514byte:入れ子/配列)
; fMaximizeShell : BOOLEAN (+2580, 1byte) poke st,2580,値 / 値 = peek(st,2580)
; EncryptionLevel : BYTE (+2581, 1byte) poke st,2581,値 / 値 = peek(st,2581)
; PerformanceFlags : DWORD (+2584, 4byte) st.646 = 値 / 値 = st.646 (lpoke/lpeek も可)
; ProtocolName : WCHAR (+2588, 18byte) varptr(st)+2588 を基点に操作(18byte:入れ子/配列)
; ProtocolType : WORD (+2606, 2byte) wpoke st,2606,値 / 値 = wpeek(st,2606)
; fInheritColorDepth : BOOL (+2608, 4byte) st.652 = 値 / 値 = st.652 (lpoke/lpeek も可)
; HRes : WORD (+2612, 2byte) wpoke st,2612,値 / 値 = wpeek(st,2612)
; VRes : WORD (+2614, 2byte) wpoke st,2614,値 / 値 = wpeek(st,2614)
; ColorDepth : WORD (+2616, 2byte) wpoke st,2616,値 / 値 = wpeek(st,2616)
; DisplayDriverName : WCHAR (+2618, 18byte) varptr(st)+2618 を基点に操作(18byte:入れ子/配列)
; DisplayDeviceName : WCHAR (+2636, 40byte) varptr(st)+2636 を基点に操作(40byte:入れ子/配列)
; fMouse : BOOLEAN (+2676, 1byte) poke st,2676,値 / 値 = peek(st,2676)
; KeyboardLayout : DWORD (+2680, 4byte) st.670 = 値 / 値 = st.670 (lpoke/lpeek も可)
; KeyboardType : DWORD (+2684, 4byte) st.671 = 値 / 値 = st.671 (lpoke/lpeek も可)
; KeyboardSubType : DWORD (+2688, 4byte) st.672 = 値 / 値 = st.672 (lpoke/lpeek も可)
; KeyboardFunctionKey : DWORD (+2692, 4byte) st.673 = 値 / 値 = st.673 (lpoke/lpeek も可)
; imeFileName : WCHAR (+2696, 66byte) varptr(st)+2696 を基点に操作(66byte:入れ子/配列)
; ActiveInputLocale : DWORD (+2764, 4byte) st.691 = 値 / 値 = st.691 (lpoke/lpeek も可)
; fNoAudioPlayback : BOOLEAN (+2768, 1byte) poke st,2768,値 / 値 = peek(st,2768)
; fRemoteConsoleAudio : BOOLEAN (+2769, 1byte) poke st,2769,値 / 値 = peek(st,2769)
; AudioDriverName : WCHAR (+2770, 18byte) varptr(st)+2770 を基点に操作(18byte:入れ子/配列)
; ClientTimeZone : WTS_TIME_ZONE_INFORMATION (+2788, 172byte) varptr(st)+2788 を基点に操作(172byte:入れ子/配列)
; ClientName : WCHAR (+2960, 42byte) varptr(st)+2960 を基点に操作(42byte:入れ子/配列)
; SerialNumber : DWORD (+3004, 4byte) st.751 = 値 / 値 = st.751 (lpoke/lpeek も可)
; ClientAddressFamily : DWORD (+3008, 4byte) st.752 = 値 / 値 = st.752 (lpoke/lpeek も可)
; ClientAddress : WCHAR (+3012, 62byte) varptr(st)+3012 を基点に操作(62byte:入れ子/配列)
; ClientSockAddress : WTS_SOCKADDR (+3080, 16byte) varptr(st)+3080 を基点に操作(16byte:入れ子/配列)
; ClientDirectory : WCHAR (+3096, 514byte) varptr(st)+3096 を基点に操作(514byte:入れ子/配列)
; ClientBuildNumber : DWORD (+3612, 4byte) st.903 = 値 / 値 = st.903 (lpoke/lpeek も可)
; ClientProductId : WORD (+3616, 2byte) wpoke st,3616,値 / 値 = wpeek(st,3616)
; OutBufCountHost : WORD (+3618, 2byte) wpoke st,3618,値 / 値 = wpeek(st,3618)
; OutBufCountClient : WORD (+3620, 2byte) wpoke st,3620,値 / 値 = wpeek(st,3620)
; OutBufLength : WORD (+3622, 2byte) wpoke st,3622,値 / 値 = wpeek(st,3622)
; ClientSessionId : DWORD (+3624, 4byte) st.906 = 値 / 値 = st.906 (lpoke/lpeek も可)
; ClientDigProductId : WCHAR (+3628, 66byte) varptr(st)+3628 を基点に操作(66byte:入れ子/配列)
; fDisableCpm : BOOLEAN (+3694, 1byte) poke st,3694,値 / 値 = peek(st,3694)
; fDisableCdm : BOOLEAN (+3695, 1byte) poke st,3695,値 / 値 = peek(st,3695)
; fDisableCcm : BOOLEAN (+3696, 1byte) poke st,3696,値 / 値 = peek(st,3696)
; fDisableLPT : BOOLEAN (+3697, 1byte) poke st,3697,値 / 値 = peek(st,3697)
; fDisableClip : BOOLEAN (+3698, 1byte) poke st,3698,値 / 値 = peek(st,3698)
; fDisablePNP : BOOLEAN (+3699, 1byte) poke st,3699,値 / 値 = peek(st,3699)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global WTS_SYSTEMTIME
#field short wYear
#field short wMonth
#field short wDayOfWeek
#field short wDay
#field short wHour
#field short wMinute
#field short wSecond
#field short wMilliseconds
#endstruct
#defstruct global WTS_TIME_ZONE_INFORMATION
#field int Bias
#field wchar StandardName 32
#field WTS_SYSTEMTIME StandardDate
#field int StandardBias
#field wchar DaylightName 32
#field WTS_SYSTEMTIME DaylightDate
#field int DaylightBias
#endstruct
#defstruct global WTS_SOCKADDR
#field short sin_family
#field byte u 8
#endstruct
#defstruct global WTS_CLIENT_DATA
#field bool1 fDisableCtrlAltDel
#field bool1 fDoubleClickDetect
#field bool1 fEnableWindowsKey
#field bool1 fHideTitleBar
#field bool fInheritAutoLogon
#field bool1 fPromptForPassword
#field bool1 fUsingSavedCreds
#field wchar Domain 256
#field wchar UserName 256
#field wchar Password 256
#field bool1 fPasswordIsScPin
#field bool fInheritInitialProgram
#field wchar WorkDirectory 257
#field wchar InitialProgram 257
#field bool1 fMaximizeShell
#field byte EncryptionLevel
#field int PerformanceFlags
#field wchar ProtocolName 9
#field short ProtocolType
#field bool fInheritColorDepth
#field short HRes
#field short VRes
#field short ColorDepth
#field wchar DisplayDriverName 9
#field wchar DisplayDeviceName 20
#field bool1 fMouse
#field int KeyboardLayout
#field int KeyboardType
#field int KeyboardSubType
#field int KeyboardFunctionKey
#field wchar imeFileName 33
#field int ActiveInputLocale
#field bool1 fNoAudioPlayback
#field bool1 fRemoteConsoleAudio
#field wchar AudioDriverName 9
#field WTS_TIME_ZONE_INFORMATION ClientTimeZone
#field wchar ClientName 21
#field int SerialNumber
#field int ClientAddressFamily
#field wchar ClientAddress 31
#field WTS_SOCKADDR ClientSockAddress
#field wchar ClientDirectory 257
#field int ClientBuildNumber
#field short ClientProductId
#field short OutBufCountHost
#field short OutBufCountClient
#field short OutBufLength
#field int ClientSessionId
#field wchar ClientDigProductId 33
#field bool1 fDisableCpm
#field bool1 fDisableCdm
#field bool1 fDisableCcm
#field bool1 fDisableLPT
#field bool1 fDisableClip
#field bool1 fDisablePNP
#endstruct
stdim st, WTS_CLIENT_DATA ; NSTRUCT 変数を確保
st->fDisableCtrlAltDel = 100
mes "fDisableCtrlAltDel=" + st->fDisableCtrlAltDel