ホーム › Security.Cryptography.Sip › SIP_CAP_SET_V2
SIP_CAP_SET_V2
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| cbSize | DWORD | 4 | +0 | +0 | この構造体のバイト単位サイズ。呼び出し前に設定する。 |
| dwVersion | DWORD | 4 | +4 | +4 | SIP機能セットのバージョン番号。 |
| isMultiSign | BOOL | 4 | +8 | +8 | 複数署名に対応するか否かを示すBOOL。 |
| dwReserved | DWORD | 4 | +12 | +12 | 予約フィールド。0を設定する。 |
各言語での定義
#include <windows.h>
// SIP_CAP_SET_V2 (x64 16 / x86 16 バイト)
typedef struct SIP_CAP_SET_V2 {
DWORD cbSize;
DWORD dwVersion;
BOOL isMultiSign;
DWORD dwReserved;
} SIP_CAP_SET_V2;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct SIP_CAP_SET_V2
{
public uint cbSize;
public uint dwVersion;
[MarshalAs(UnmanagedType.Bool)] public bool isMultiSign;
public uint dwReserved;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure SIP_CAP_SET_V2
Public cbSize As UInteger
Public dwVersion As UInteger
<MarshalAs(UnmanagedType.Bool)> Public isMultiSign As Boolean
Public dwReserved As UInteger
End Structureimport ctypes
from ctypes import wintypes
class SIP_CAP_SET_V2(ctypes.Structure):
_fields_ = [
("cbSize", wintypes.DWORD),
("dwVersion", wintypes.DWORD),
("isMultiSign", wintypes.BOOL),
("dwReserved", wintypes.DWORD),
]#[repr(C)]
pub struct SIP_CAP_SET_V2 {
pub cbSize: u32,
pub dwVersion: u32,
pub isMultiSign: i32,
pub dwReserved: u32,
}import "golang.org/x/sys/windows"
type SIP_CAP_SET_V2 struct {
cbSize uint32
dwVersion uint32
isMultiSign int32
dwReserved uint32
}type
SIP_CAP_SET_V2 = record
cbSize: DWORD;
dwVersion: DWORD;
isMultiSign: BOOL;
dwReserved: DWORD;
end;const SIP_CAP_SET_V2 = extern struct {
cbSize: u32,
dwVersion: u32,
isMultiSign: i32,
dwReserved: u32,
};type
SIP_CAP_SET_V2 {.bycopy.} = object
cbSize: uint32
dwVersion: uint32
isMultiSign: int32
dwReserved: uint32struct SIP_CAP_SET_V2
{
uint cbSize;
uint dwVersion;
int isMultiSign;
uint dwReserved;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; SIP_CAP_SET_V2 サイズ: 16 バイト(x64)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; cbSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwVersion : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; isMultiSign : BOOL (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; dwReserved : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global SIP_CAP_SET_V2
#field int cbSize
#field int dwVersion
#field bool isMultiSign
#field int dwReserved
#endstruct
stdim st, SIP_CAP_SET_V2 ; NSTRUCT 変数を確保
st->cbSize = 100
mes "cbSize=" + st->cbSize