ホーム › System.Com.Urlmon › RemBINDINFO
RemBINDINFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| cbSize | DWORD | 4 | +0 | +0 | この構造体のバイトサイズ。 |
| szExtraInfo | LPWSTR | 8/4 | +8 | +4 | URLに付随する追加情報文字列。検索やPOSTデータなど。NULL可。 |
| grfBindInfoF | DWORD | 4 | +16 | +8 | 設定されたBINDINFOフィールドを示すフラグ。 |
| dwBindVerb | DWORD | 4 | +20 | +12 | バインド動作の種類を示す値。GET/POST/PUTなどを表す。 |
| szCustomVerb | LPWSTR | 8/4 | +24 | +16 | カスタムHTTP動詞を指定する文字列。標準動詞以外を使う場合に有効。 |
| cbstgmedData | DWORD | 4 | +32 | +20 | 送信するストレージメディアデータのバイト数。 |
| dwOptions | DWORD | 4 | +36 | +24 | バインドオプションを示す値。 |
| dwOptionsFlags | DWORD | 4 | +40 | +28 | バインドオプションの追加フラグ。 |
| dwCodePage | DWORD | 4 | +44 | +32 | データのエンコードに用いるコードページ。 |
| securityAttributes | REMSECURITY_ATTRIBUTES | 12 | +48 | +36 | リモートセキュリティ属性(REMSECURITY_ATTRIBUTES)。 |
| iid | GUID | 16 | +60 | +48 | 要求するインターフェイスの識別子(IID)。 |
| pUnk | IUnknown* | 8/4 | +80 | +64 | 関連付けられたオブジェクトのIUnknownポインタ。不要時はNULL。 |
| dwReserved | DWORD | 4 | +88 | +68 | 予約フィールド。将来の使用のため0を設定する。 |
各言語での定義
#include <windows.h>
// REMSECURITY_ATTRIBUTES (x64 12 / x86 12 バイト)
typedef struct REMSECURITY_ATTRIBUTES {
DWORD nLength;
DWORD lpSecurityDescriptor;
BOOL bInheritHandle;
} REMSECURITY_ATTRIBUTES;
// RemBINDINFO (x64 96 / x86 72 バイト)
typedef struct RemBINDINFO {
DWORD cbSize;
LPWSTR szExtraInfo;
DWORD grfBindInfoF;
DWORD dwBindVerb;
LPWSTR szCustomVerb;
DWORD cbstgmedData;
DWORD dwOptions;
DWORD dwOptionsFlags;
DWORD dwCodePage;
REMSECURITY_ATTRIBUTES securityAttributes;
GUID iid;
IUnknown* pUnk;
DWORD dwReserved;
} RemBINDINFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct REMSECURITY_ATTRIBUTES
{
public uint nLength;
public uint lpSecurityDescriptor;
[MarshalAs(UnmanagedType.Bool)] public bool bInheritHandle;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct RemBINDINFO
{
public uint cbSize;
public IntPtr szExtraInfo;
public uint grfBindInfoF;
public uint dwBindVerb;
public IntPtr szCustomVerb;
public uint cbstgmedData;
public uint dwOptions;
public uint dwOptionsFlags;
public uint dwCodePage;
public REMSECURITY_ATTRIBUTES securityAttributes;
public Guid iid;
public IntPtr pUnk;
public uint dwReserved;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure REMSECURITY_ATTRIBUTES
Public nLength As UInteger
Public lpSecurityDescriptor As UInteger
<MarshalAs(UnmanagedType.Bool)> Public bInheritHandle As Boolean
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure RemBINDINFO
Public cbSize As UInteger
Public szExtraInfo As IntPtr
Public grfBindInfoF As UInteger
Public dwBindVerb As UInteger
Public szCustomVerb As IntPtr
Public cbstgmedData As UInteger
Public dwOptions As UInteger
Public dwOptionsFlags As UInteger
Public dwCodePage As UInteger
Public securityAttributes As REMSECURITY_ATTRIBUTES
Public iid As Guid
Public pUnk As IntPtr
Public dwReserved As UInteger
End Structureimport ctypes
from ctypes import wintypes
class REMSECURITY_ATTRIBUTES(ctypes.Structure):
_fields_ = [
("nLength", wintypes.DWORD),
("lpSecurityDescriptor", wintypes.DWORD),
("bInheritHandle", wintypes.BOOL),
]
class RemBINDINFO(ctypes.Structure):
_fields_ = [
("cbSize", wintypes.DWORD),
("szExtraInfo", ctypes.c_void_p),
("grfBindInfoF", wintypes.DWORD),
("dwBindVerb", wintypes.DWORD),
("szCustomVerb", ctypes.c_void_p),
("cbstgmedData", wintypes.DWORD),
("dwOptions", wintypes.DWORD),
("dwOptionsFlags", wintypes.DWORD),
("dwCodePage", wintypes.DWORD),
("securityAttributes", REMSECURITY_ATTRIBUTES),
("iid", GUID),
("pUnk", ctypes.c_void_p),
("dwReserved", wintypes.DWORD),
]#[repr(C)]
pub struct REMSECURITY_ATTRIBUTES {
pub nLength: u32,
pub lpSecurityDescriptor: u32,
pub bInheritHandle: i32,
}
#[repr(C)]
pub struct RemBINDINFO {
pub cbSize: u32,
pub szExtraInfo: *mut core::ffi::c_void,
pub grfBindInfoF: u32,
pub dwBindVerb: u32,
pub szCustomVerb: *mut core::ffi::c_void,
pub cbstgmedData: u32,
pub dwOptions: u32,
pub dwOptionsFlags: u32,
pub dwCodePage: u32,
pub securityAttributes: REMSECURITY_ATTRIBUTES,
pub iid: GUID,
pub pUnk: *mut core::ffi::c_void,
pub dwReserved: u32,
}import "golang.org/x/sys/windows"
type REMSECURITY_ATTRIBUTES struct {
nLength uint32
lpSecurityDescriptor uint32
bInheritHandle int32
}
type RemBINDINFO struct {
cbSize uint32
szExtraInfo uintptr
grfBindInfoF uint32
dwBindVerb uint32
szCustomVerb uintptr
cbstgmedData uint32
dwOptions uint32
dwOptionsFlags uint32
dwCodePage uint32
securityAttributes REMSECURITY_ATTRIBUTES
iid windows.GUID
pUnk uintptr
dwReserved uint32
}type
REMSECURITY_ATTRIBUTES = record
nLength: DWORD;
lpSecurityDescriptor: DWORD;
bInheritHandle: BOOL;
end;
RemBINDINFO = record
cbSize: DWORD;
szExtraInfo: Pointer;
grfBindInfoF: DWORD;
dwBindVerb: DWORD;
szCustomVerb: Pointer;
cbstgmedData: DWORD;
dwOptions: DWORD;
dwOptionsFlags: DWORD;
dwCodePage: DWORD;
securityAttributes: REMSECURITY_ATTRIBUTES;
iid: TGUID;
pUnk: Pointer;
dwReserved: DWORD;
end;const REMSECURITY_ATTRIBUTES = extern struct {
nLength: u32,
lpSecurityDescriptor: u32,
bInheritHandle: i32,
};
const RemBINDINFO = extern struct {
cbSize: u32,
szExtraInfo: ?*anyopaque,
grfBindInfoF: u32,
dwBindVerb: u32,
szCustomVerb: ?*anyopaque,
cbstgmedData: u32,
dwOptions: u32,
dwOptionsFlags: u32,
dwCodePage: u32,
securityAttributes: REMSECURITY_ATTRIBUTES,
iid: GUID,
pUnk: ?*anyopaque,
dwReserved: u32,
};type
REMSECURITY_ATTRIBUTES {.bycopy.} = object
nLength: uint32
lpSecurityDescriptor: uint32
bInheritHandle: int32
RemBINDINFO {.bycopy.} = object
cbSize: uint32
szExtraInfo: pointer
grfBindInfoF: uint32
dwBindVerb: uint32
szCustomVerb: pointer
cbstgmedData: uint32
dwOptions: uint32
dwOptionsFlags: uint32
dwCodePage: uint32
securityAttributes: REMSECURITY_ATTRIBUTES
iid: GUID
pUnk: pointer
dwReserved: uint32struct REMSECURITY_ATTRIBUTES
{
uint nLength;
uint lpSecurityDescriptor;
int bInheritHandle;
}
struct RemBINDINFO
{
uint cbSize;
void* szExtraInfo;
uint grfBindInfoF;
uint dwBindVerb;
void* szCustomVerb;
uint cbstgmedData;
uint dwOptions;
uint dwOptionsFlags;
uint dwCodePage;
REMSECURITY_ATTRIBUTES securityAttributes;
GUID iid;
void* pUnk;
uint dwReserved;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; RemBINDINFO サイズ: 72 バイト(x86)
dim st, 18 ; 4byte整数×18(構造体サイズ 72 / 4 切り上げ)
; cbSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; szExtraInfo : LPWSTR (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; grfBindInfoF : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; dwBindVerb : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; szCustomVerb : LPWSTR (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; cbstgmedData : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; dwOptions : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; dwOptionsFlags : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; dwCodePage : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; securityAttributes : REMSECURITY_ATTRIBUTES (+36, 12byte) varptr(st)+36 を基点に操作(12byte:入れ子/配列)
; iid : GUID (+48, 16byte) varptr(st)+48 を基点に操作(16byte:入れ子/配列)
; pUnk : IUnknown* (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; dwReserved : DWORD (+68, 4byte) st.17 = 値 / 値 = st.17 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; RemBINDINFO サイズ: 96 バイト(x64)
dim st, 24 ; 4byte整数×24(構造体サイズ 96 / 4 切り上げ)
; cbSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; szExtraInfo : LPWSTR (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; grfBindInfoF : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; dwBindVerb : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; szCustomVerb : LPWSTR (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; cbstgmedData : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; dwOptions : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; dwOptionsFlags : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; dwCodePage : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; securityAttributes : REMSECURITY_ATTRIBUTES (+48, 12byte) varptr(st)+48 を基点に操作(12byte:入れ子/配列)
; iid : GUID (+60, 16byte) varptr(st)+60 を基点に操作(16byte:入れ子/配列)
; pUnk : IUnknown* (+80, 8byte) qpoke st,80,値 / qpeek(st,80) ※IronHSPのみ。3.7/3.8は lpoke st,80,下位 : lpoke st,84,上位
; dwReserved : DWORD (+88, 4byte) st.22 = 値 / 値 = st.22 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global REMSECURITY_ATTRIBUTES
#field int nLength
#field int lpSecurityDescriptor
#field bool bInheritHandle
#endstruct
#defstruct global GUID, pack=1
#field int Data1
#field short Data2
#field short Data3
#field byte Data4 8
#endstruct
#defstruct global RemBINDINFO
#field int cbSize
#field intptr szExtraInfo
#field int grfBindInfoF
#field int dwBindVerb
#field intptr szCustomVerb
#field int cbstgmedData
#field int dwOptions
#field int dwOptionsFlags
#field int dwCodePage
#field REMSECURITY_ATTRIBUTES securityAttributes
#field GUID iid
#field intptr pUnk
#field int dwReserved
#endstruct
stdim st, RemBINDINFO ; NSTRUCT 変数を確保
st->cbSize = 100
mes "cbSize=" + st->cbSize