ホーム › System.RemoteDesktop › pluginResource
pluginResource
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| alias | WCHAR | 512 | +0 | +0 | リソースのエイリアス(別名)。 |
| name | WCHAR | 512 | +512 | +512 | リソースの表示名。 |
| resourceFileContents | LPWSTR | 8/4 | +1024 | +1024 | リソースファイル(RDP等)の内容を指す文字列。 |
| fileExtension | WCHAR | 512 | +1032 | +1028 | リソースファイルの拡張子。 |
| resourcePluginType | WCHAR | 512 | +1544 | +1540 | リソースプラグインの種別を示す文字列。 |
| isDiscoverable | BYTE | 1 | +2056 | +2052 | このリソースが検出可能かどうかを示すフラグ。 |
| resourceType | INT | 4 | +2060 | +2056 | リソースの種別を示す値。 |
| pceIconSize | DWORD | 4 | +2064 | +2060 | アイコンデータのサイズ。バイト数で表す。 |
| iconContents | BYTE* | 8/4 | +2072 | +2064 | アイコン画像データへのポインタ。 |
| pcePluginBlobSize | DWORD | 4 | +2080 | +2068 | プラグインBLOBデータのサイズ。バイト数で表す。 |
| blobContents | BYTE* | 8/4 | +2088 | +2072 | プラグイン固有のBLOBデータへのポインタ。 |
各言語での定義
#include <windows.h>
// pluginResource (x64 2096 / x86 2076 バイト)
typedef struct pluginResource {
WCHAR alias[256];
WCHAR name[256];
LPWSTR resourceFileContents;
WCHAR fileExtension[256];
WCHAR resourcePluginType[256];
BYTE isDiscoverable;
INT resourceType;
DWORD pceIconSize;
BYTE* iconContents;
DWORD pcePluginBlobSize;
BYTE* blobContents;
} pluginResource;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct pluginResource
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string alias;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string name;
public IntPtr resourceFileContents;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string fileExtension;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string resourcePluginType;
public byte isDiscoverable;
public int resourceType;
public uint pceIconSize;
public IntPtr iconContents;
public uint pcePluginBlobSize;
public IntPtr blobContents;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure pluginResource
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=256)> Public alias As String
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=256)> Public name As String
Public resourceFileContents As IntPtr
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=256)> Public fileExtension As String
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=256)> Public resourcePluginType As String
Public isDiscoverable As Byte
Public resourceType As Integer
Public pceIconSize As UInteger
Public iconContents As IntPtr
Public pcePluginBlobSize As UInteger
Public blobContents As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class pluginResource(ctypes.Structure):
_fields_ = [
("alias", ctypes.c_wchar * 256),
("name", ctypes.c_wchar * 256),
("resourceFileContents", ctypes.c_void_p),
("fileExtension", ctypes.c_wchar * 256),
("resourcePluginType", ctypes.c_wchar * 256),
("isDiscoverable", ctypes.c_ubyte),
("resourceType", ctypes.c_int),
("pceIconSize", wintypes.DWORD),
("iconContents", ctypes.c_void_p),
("pcePluginBlobSize", wintypes.DWORD),
("blobContents", ctypes.c_void_p),
]#[repr(C)]
pub struct pluginResource {
pub alias: [u16; 256],
pub name: [u16; 256],
pub resourceFileContents: *mut core::ffi::c_void,
pub fileExtension: [u16; 256],
pub resourcePluginType: [u16; 256],
pub isDiscoverable: u8,
pub resourceType: i32,
pub pceIconSize: u32,
pub iconContents: *mut core::ffi::c_void,
pub pcePluginBlobSize: u32,
pub blobContents: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type pluginResource struct {
alias [256]uint16
name [256]uint16
resourceFileContents uintptr
fileExtension [256]uint16
resourcePluginType [256]uint16
isDiscoverable byte
resourceType int32
pceIconSize uint32
iconContents uintptr
pcePluginBlobSize uint32
blobContents uintptr
}type
pluginResource = record
alias: array[0..255] of WideChar;
name: array[0..255] of WideChar;
resourceFileContents: Pointer;
fileExtension: array[0..255] of WideChar;
resourcePluginType: array[0..255] of WideChar;
isDiscoverable: Byte;
resourceType: Integer;
pceIconSize: DWORD;
iconContents: Pointer;
pcePluginBlobSize: DWORD;
blobContents: Pointer;
end;const pluginResource = extern struct {
alias: [256]u16,
name: [256]u16,
resourceFileContents: ?*anyopaque,
fileExtension: [256]u16,
resourcePluginType: [256]u16,
isDiscoverable: u8,
resourceType: i32,
pceIconSize: u32,
iconContents: ?*anyopaque,
pcePluginBlobSize: u32,
blobContents: ?*anyopaque,
};type
pluginResource {.bycopy.} = object
alias: array[256, uint16]
name: array[256, uint16]
resourceFileContents: pointer
fileExtension: array[256, uint16]
resourcePluginType: array[256, uint16]
isDiscoverable: uint8
resourceType: int32
pceIconSize: uint32
iconContents: pointer
pcePluginBlobSize: uint32
blobContents: pointerstruct pluginResource
{
wchar[256] alias;
wchar[256] name;
void* resourceFileContents;
wchar[256] fileExtension;
wchar[256] resourcePluginType;
ubyte isDiscoverable;
int resourceType;
uint pceIconSize;
void* iconContents;
uint pcePluginBlobSize;
void* blobContents;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; pluginResource サイズ: 2076 バイト(x86)
dim st, 519 ; 4byte整数×519(構造体サイズ 2076 / 4 切り上げ)
; alias : WCHAR (+0, 512byte) varptr(st)+0 を基点に操作(512byte:入れ子/配列)
; name : WCHAR (+512, 512byte) varptr(st)+512 を基点に操作(512byte:入れ子/配列)
; resourceFileContents : LPWSTR (+1024, 4byte) st.256 = 値 / 値 = st.256 (lpoke/lpeek も可)
; fileExtension : WCHAR (+1028, 512byte) varptr(st)+1028 を基点に操作(512byte:入れ子/配列)
; resourcePluginType : WCHAR (+1540, 512byte) varptr(st)+1540 を基点に操作(512byte:入れ子/配列)
; isDiscoverable : BYTE (+2052, 1byte) poke st,2052,値 / 値 = peek(st,2052)
; resourceType : INT (+2056, 4byte) st.514 = 値 / 値 = st.514 (lpoke/lpeek も可)
; pceIconSize : DWORD (+2060, 4byte) st.515 = 値 / 値 = st.515 (lpoke/lpeek も可)
; iconContents : BYTE* (+2064, 4byte) st.516 = 値 / 値 = st.516 (lpoke/lpeek も可)
; pcePluginBlobSize : DWORD (+2068, 4byte) st.517 = 値 / 値 = st.517 (lpoke/lpeek も可)
; blobContents : BYTE* (+2072, 4byte) st.518 = 値 / 値 = st.518 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; pluginResource サイズ: 2096 バイト(x64)
dim st, 524 ; 4byte整数×524(構造体サイズ 2096 / 4 切り上げ)
; alias : WCHAR (+0, 512byte) varptr(st)+0 を基点に操作(512byte:入れ子/配列)
; name : WCHAR (+512, 512byte) varptr(st)+512 を基点に操作(512byte:入れ子/配列)
; resourceFileContents : LPWSTR (+1024, 8byte) qpoke st,1024,値 / qpeek(st,1024) ※IronHSPのみ。3.7/3.8は lpoke st,1024,下位 : lpoke st,1028,上位
; fileExtension : WCHAR (+1032, 512byte) varptr(st)+1032 を基点に操作(512byte:入れ子/配列)
; resourcePluginType : WCHAR (+1544, 512byte) varptr(st)+1544 を基点に操作(512byte:入れ子/配列)
; isDiscoverable : BYTE (+2056, 1byte) poke st,2056,値 / 値 = peek(st,2056)
; resourceType : INT (+2060, 4byte) st.515 = 値 / 値 = st.515 (lpoke/lpeek も可)
; pceIconSize : DWORD (+2064, 4byte) st.516 = 値 / 値 = st.516 (lpoke/lpeek も可)
; iconContents : BYTE* (+2072, 8byte) qpoke st,2072,値 / qpeek(st,2072) ※IronHSPのみ。3.7/3.8は lpoke st,2072,下位 : lpoke st,2076,上位
; pcePluginBlobSize : DWORD (+2080, 4byte) st.520 = 値 / 値 = st.520 (lpoke/lpeek も可)
; blobContents : BYTE* (+2088, 8byte) qpoke st,2088,値 / qpeek(st,2088) ※IronHSPのみ。3.7/3.8は lpoke st,2088,下位 : lpoke st,2092,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global pluginResource
#field wchar alias 256
#field wchar name 256
#field intptr resourceFileContents
#field wchar fileExtension 256
#field wchar resourcePluginType 256
#field byte isDiscoverable
#field int resourceType
#field int pceIconSize
#field intptr iconContents
#field int pcePluginBlobSize
#field intptr blobContents
#endstruct
stdim st, pluginResource ; NSTRUCT 変数を確保
st->isDiscoverable = 100
mes "isDiscoverable=" + st->isDiscoverable