ホーム › Media.DirectShow › BDA_RATING_PINRESET
BDA_RATING_PINRESET
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| bPinLength | BYTE | 1 | +0 | +0 | 新しい暗証番号(PIN)のバイト長。 |
| argbNewPin | BYTE | 1 | +1 | +1 | 新しい暗証番号データの可変長配列。先頭1バイトを起点とする。 |
各言語での定義
#include <windows.h>
// BDA_RATING_PINRESET (x64 2 / x86 2 バイト)
typedef struct BDA_RATING_PINRESET {
BYTE bPinLength;
BYTE argbNewPin[1];
} BDA_RATING_PINRESET;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct BDA_RATING_PINRESET
{
public byte bPinLength;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public byte[] argbNewPin;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure BDA_RATING_PINRESET
Public bPinLength As Byte
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=1)> Public argbNewPin() As Byte
End Structureimport ctypes
from ctypes import wintypes
class BDA_RATING_PINRESET(ctypes.Structure):
_fields_ = [
("bPinLength", ctypes.c_ubyte),
("argbNewPin", ctypes.c_ubyte * 1),
]#[repr(C)]
pub struct BDA_RATING_PINRESET {
pub bPinLength: u8,
pub argbNewPin: [u8; 1],
}import "golang.org/x/sys/windows"
type BDA_RATING_PINRESET struct {
bPinLength byte
argbNewPin [1]byte
}type
BDA_RATING_PINRESET = record
bPinLength: Byte;
argbNewPin: array[0..0] of Byte;
end;const BDA_RATING_PINRESET = extern struct {
bPinLength: u8,
argbNewPin: [1]u8,
};type
BDA_RATING_PINRESET {.bycopy.} = object
bPinLength: uint8
argbNewPin: array[1, uint8]struct BDA_RATING_PINRESET
{
ubyte bPinLength;
ubyte[1] argbNewPin;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; BDA_RATING_PINRESET サイズ: 2 バイト(x64)
dim st, 1 ; 4byte整数×1(構造体サイズ 2 / 4 切り上げ)
; bPinLength : BYTE (+0, 1byte) poke st,0,値 / 値 = peek(st,0)
; argbNewPin : BYTE (+1, 1byte) varptr(st)+1 を基点に操作(1byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global BDA_RATING_PINRESET
#field byte bPinLength
#field byte argbNewPin 1
#endstruct
stdim st, BDA_RATING_PINRESET ; NSTRUCT 変数を確保
st->bPinLength = 100
mes "bPinLength=" + st->bPinLength