Win32 API 日本語リファレンス
ホームSecurity.Cryptography.UI › CERT_VIEWPROPERTIES_STRUCT_A

CERT_VIEWPROPERTIES_STRUCT_A

構造体
サイズx64: 160 バイト / x86: 88 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
dwSizeDWORD4+0+0この構造体のバイト単位サイズ。呼び出し前に設定する。
hwndParentHWND8/4+8+4プロパティダイアログの親ウィンドウハンドル。NULL可。
hInstanceHINSTANCE8/4+16+8リソースを含むモジュールのインスタンスハンドル。
dwFlagsCERT_VIEWPROPERTIES_STRUCT_FLAGS4+24+12プロパティ表示ダイアログの動作を制御するフラグ。
szTitleLPSTR8/4+32+16ダイアログのタイトルを示すANSI文字列。NULL可。
pCertContextCERT_CONTEXT*8/4+40+20表示対象の証明書コンテキストへのポインタ。
arrayPurposesLPSTR*8/4+48+24表示する用途OIDのANSI文字列配列。NULL可。
cArrayPurposesDWORD4+56+28arrayPurposes配列の要素数。
cRootStoresDWORD4+60+32rghstoreRoots配列のルートストア数。
rghstoreRootsHCERTSTORE*8/4+64+36ルート証明書ストアハンドルの配列。
cStoresDWORD4+72+40rghstoreCAs配列の中間CAストア数。
rghstoreCAsHCERTSTORE*8/4+80+44中間CA証明書ストアハンドルの配列。
cTrustStoresDWORD4+88+48rghstoreTrust配列の信頼ストア数。
rghstoreTrustHCERTSTORE*8/4+96+52信頼された証明書ストアハンドルの配列。
hprovUINT_PTR8/4+104+56暗号化サービスプロバイダーのハンドル。
lCustDataLPARAM8/4+112+60コールバックに渡されるユーザー定義データ。
dwPadDWORD4+120+64アライメント用パディング。0を設定する。
szHelpFileNameLPSTR8/4+128+68ヘルプファイル名を示すANSI文字列。NULL可。
dwHelpIdDWORD4+136+72ヘルプトピックの識別子。
nStartPageDWORD4+140+76最初に表示するプロパティページのインデックス。
cArrayPropSheetPagesDWORD4+144+80arrayPropSheetPages配列のページ数。
arrayPropSheetPagesPROPSHEETPAGEA*8/4+152+84追加するプロパティシートページの配列。

各言語での定義

#include <windows.h>

// CERT_VIEWPROPERTIES_STRUCT_A  (x64 160 / x86 88 バイト)
typedef struct CERT_VIEWPROPERTIES_STRUCT_A {
    DWORD dwSize;
    HWND hwndParent;
    HINSTANCE hInstance;
    CERT_VIEWPROPERTIES_STRUCT_FLAGS dwFlags;
    LPSTR szTitle;
    CERT_CONTEXT* pCertContext;
    LPSTR* arrayPurposes;
    DWORD cArrayPurposes;
    DWORD cRootStores;
    HCERTSTORE* rghstoreRoots;
    DWORD cStores;
    HCERTSTORE* rghstoreCAs;
    DWORD cTrustStores;
    HCERTSTORE* rghstoreTrust;
    UINT_PTR hprov;
    LPARAM lCustData;
    DWORD dwPad;
    LPSTR szHelpFileName;
    DWORD dwHelpId;
    DWORD nStartPage;
    DWORD cArrayPropSheetPages;
    PROPSHEETPAGEA* arrayPropSheetPages;
} CERT_VIEWPROPERTIES_STRUCT_A;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CERT_VIEWPROPERTIES_STRUCT_A
{
    public uint dwSize;
    public IntPtr hwndParent;
    public IntPtr hInstance;
    public uint dwFlags;
    public IntPtr szTitle;
    public IntPtr pCertContext;
    public IntPtr arrayPurposes;
    public uint cArrayPurposes;
    public uint cRootStores;
    public IntPtr rghstoreRoots;
    public uint cStores;
    public IntPtr rghstoreCAs;
    public uint cTrustStores;
    public IntPtr rghstoreTrust;
    public UIntPtr hprov;
    public IntPtr lCustData;
    public uint dwPad;
    public IntPtr szHelpFileName;
    public uint dwHelpId;
    public uint nStartPage;
    public uint cArrayPropSheetPages;
    public IntPtr arrayPropSheetPages;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure CERT_VIEWPROPERTIES_STRUCT_A
    Public dwSize As UInteger
    Public hwndParent As IntPtr
    Public hInstance As IntPtr
    Public dwFlags As UInteger
    Public szTitle As IntPtr
    Public pCertContext As IntPtr
    Public arrayPurposes As IntPtr
    Public cArrayPurposes As UInteger
    Public cRootStores As UInteger
    Public rghstoreRoots As IntPtr
    Public cStores As UInteger
    Public rghstoreCAs As IntPtr
    Public cTrustStores As UInteger
    Public rghstoreTrust As IntPtr
    Public hprov As UIntPtr
    Public lCustData As IntPtr
    Public dwPad As UInteger
    Public szHelpFileName As IntPtr
    Public dwHelpId As UInteger
    Public nStartPage As UInteger
    Public cArrayPropSheetPages As UInteger
    Public arrayPropSheetPages As IntPtr
End Structure
import ctypes
from ctypes import wintypes

class CERT_VIEWPROPERTIES_STRUCT_A(ctypes.Structure):
    _fields_ = [
        ("dwSize", wintypes.DWORD),
        ("hwndParent", ctypes.c_void_p),
        ("hInstance", ctypes.c_void_p),
        ("dwFlags", wintypes.DWORD),
        ("szTitle", ctypes.c_void_p),
        ("pCertContext", ctypes.c_void_p),
        ("arrayPurposes", ctypes.c_void_p),
        ("cArrayPurposes", wintypes.DWORD),
        ("cRootStores", wintypes.DWORD),
        ("rghstoreRoots", ctypes.c_void_p),
        ("cStores", wintypes.DWORD),
        ("rghstoreCAs", ctypes.c_void_p),
        ("cTrustStores", wintypes.DWORD),
        ("rghstoreTrust", ctypes.c_void_p),
        ("hprov", ctypes.c_size_t),
        ("lCustData", ctypes.c_ssize_t),
        ("dwPad", wintypes.DWORD),
        ("szHelpFileName", ctypes.c_void_p),
        ("dwHelpId", wintypes.DWORD),
        ("nStartPage", wintypes.DWORD),
        ("cArrayPropSheetPages", wintypes.DWORD),
        ("arrayPropSheetPages", ctypes.c_void_p),
    ]
#[repr(C)]
pub struct CERT_VIEWPROPERTIES_STRUCT_A {
    pub dwSize: u32,
    pub hwndParent: *mut core::ffi::c_void,
    pub hInstance: *mut core::ffi::c_void,
    pub dwFlags: u32,
    pub szTitle: *mut core::ffi::c_void,
    pub pCertContext: *mut core::ffi::c_void,
    pub arrayPurposes: *mut core::ffi::c_void,
    pub cArrayPurposes: u32,
    pub cRootStores: u32,
    pub rghstoreRoots: *mut core::ffi::c_void,
    pub cStores: u32,
    pub rghstoreCAs: *mut core::ffi::c_void,
    pub cTrustStores: u32,
    pub rghstoreTrust: *mut core::ffi::c_void,
    pub hprov: usize,
    pub lCustData: isize,
    pub dwPad: u32,
    pub szHelpFileName: *mut core::ffi::c_void,
    pub dwHelpId: u32,
    pub nStartPage: u32,
    pub cArrayPropSheetPages: u32,
    pub arrayPropSheetPages: *mut core::ffi::c_void,
}
import "golang.org/x/sys/windows"

type CERT_VIEWPROPERTIES_STRUCT_A struct {
	dwSize uint32
	hwndParent uintptr
	hInstance uintptr
	dwFlags uint32
	szTitle uintptr
	pCertContext uintptr
	arrayPurposes uintptr
	cArrayPurposes uint32
	cRootStores uint32
	rghstoreRoots uintptr
	cStores uint32
	rghstoreCAs uintptr
	cTrustStores uint32
	rghstoreTrust uintptr
	hprov uintptr
	lCustData uintptr
	dwPad uint32
	szHelpFileName uintptr
	dwHelpId uint32
	nStartPage uint32
	cArrayPropSheetPages uint32
	arrayPropSheetPages uintptr
}
type
  CERT_VIEWPROPERTIES_STRUCT_A = record
    dwSize: DWORD;
    hwndParent: Pointer;
    hInstance: Pointer;
    dwFlags: DWORD;
    szTitle: Pointer;
    pCertContext: Pointer;
    arrayPurposes: Pointer;
    cArrayPurposes: DWORD;
    cRootStores: DWORD;
    rghstoreRoots: Pointer;
    cStores: DWORD;
    rghstoreCAs: Pointer;
    cTrustStores: DWORD;
    rghstoreTrust: Pointer;
    hprov: NativeUInt;
    lCustData: NativeInt;
    dwPad: DWORD;
    szHelpFileName: Pointer;
    dwHelpId: DWORD;
    nStartPage: DWORD;
    cArrayPropSheetPages: DWORD;
    arrayPropSheetPages: Pointer;
  end;
const CERT_VIEWPROPERTIES_STRUCT_A = extern struct {
    dwSize: u32,
    hwndParent: ?*anyopaque,
    hInstance: ?*anyopaque,
    dwFlags: u32,
    szTitle: ?*anyopaque,
    pCertContext: ?*anyopaque,
    arrayPurposes: ?*anyopaque,
    cArrayPurposes: u32,
    cRootStores: u32,
    rghstoreRoots: ?*anyopaque,
    cStores: u32,
    rghstoreCAs: ?*anyopaque,
    cTrustStores: u32,
    rghstoreTrust: ?*anyopaque,
    hprov: usize,
    lCustData: isize,
    dwPad: u32,
    szHelpFileName: ?*anyopaque,
    dwHelpId: u32,
    nStartPage: u32,
    cArrayPropSheetPages: u32,
    arrayPropSheetPages: ?*anyopaque,
};
type
  CERT_VIEWPROPERTIES_STRUCT_A {.bycopy.} = object
    dwSize: uint32
    hwndParent: pointer
    hInstance: pointer
    dwFlags: uint32
    szTitle: pointer
    pCertContext: pointer
    arrayPurposes: pointer
    cArrayPurposes: uint32
    cRootStores: uint32
    rghstoreRoots: pointer
    cStores: uint32
    rghstoreCAs: pointer
    cTrustStores: uint32
    rghstoreTrust: pointer
    hprov: uint
    lCustData: int
    dwPad: uint32
    szHelpFileName: pointer
    dwHelpId: uint32
    nStartPage: uint32
    cArrayPropSheetPages: uint32
    arrayPropSheetPages: pointer
struct CERT_VIEWPROPERTIES_STRUCT_A
{
    uint dwSize;
    void* hwndParent;
    void* hInstance;
    uint dwFlags;
    void* szTitle;
    void* pCertContext;
    void* arrayPurposes;
    uint cArrayPurposes;
    uint cRootStores;
    void* rghstoreRoots;
    uint cStores;
    void* rghstoreCAs;
    uint cTrustStores;
    void* rghstoreTrust;
    size_t hprov;
    ptrdiff_t lCustData;
    uint dwPad;
    void* szHelpFileName;
    uint dwHelpId;
    uint nStartPage;
    uint cArrayPropSheetPages;
    void* arrayPropSheetPages;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; CERT_VIEWPROPERTIES_STRUCT_A サイズ: 88 バイト(x86)
dim st, 22    ; 4byte整数×22(構造体サイズ 88 / 4 切り上げ)
; dwSize : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; hwndParent : HWND (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; hInstance : HINSTANCE (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; dwFlags : CERT_VIEWPROPERTIES_STRUCT_FLAGS (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; szTitle : LPSTR (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; pCertContext : CERT_CONTEXT* (+20, 4byte)  varptr(st)+20 を基点に操作(4byte:入れ子/配列)
; arrayPurposes : LPSTR* (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; cArrayPurposes : DWORD (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; cRootStores : DWORD (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; rghstoreRoots : HCERTSTORE* (+36, 4byte)  st.9 = 値  /  値 = st.9   (lpoke/lpeek も可)
; cStores : DWORD (+40, 4byte)  st.10 = 値  /  値 = st.10   (lpoke/lpeek も可)
; rghstoreCAs : HCERTSTORE* (+44, 4byte)  st.11 = 値  /  値 = st.11   (lpoke/lpeek も可)
; cTrustStores : DWORD (+48, 4byte)  st.12 = 値  /  値 = st.12   (lpoke/lpeek も可)
; rghstoreTrust : HCERTSTORE* (+52, 4byte)  st.13 = 値  /  値 = st.13   (lpoke/lpeek も可)
; hprov : UINT_PTR (+56, 4byte)  st.14 = 値  /  値 = st.14   (lpoke/lpeek も可)
; lCustData : LPARAM (+60, 4byte)  st.15 = 値  /  値 = st.15   (lpoke/lpeek も可)
; dwPad : DWORD (+64, 4byte)  st.16 = 値  /  値 = st.16   (lpoke/lpeek も可)
; szHelpFileName : LPSTR (+68, 4byte)  st.17 = 値  /  値 = st.17   (lpoke/lpeek も可)
; dwHelpId : DWORD (+72, 4byte)  st.18 = 値  /  値 = st.18   (lpoke/lpeek も可)
; nStartPage : DWORD (+76, 4byte)  st.19 = 値  /  値 = st.19   (lpoke/lpeek も可)
; cArrayPropSheetPages : DWORD (+80, 4byte)  st.20 = 値  /  値 = st.20   (lpoke/lpeek も可)
; arrayPropSheetPages : PROPSHEETPAGEA* (+84, 4byte)  varptr(st)+84 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; CERT_VIEWPROPERTIES_STRUCT_A サイズ: 160 バイト(x64)
dim st, 40    ; 4byte整数×40(構造体サイズ 160 / 4 切り上げ)
; dwSize : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; hwndParent : HWND (+8, 8byte)  qpoke st,8,値 / qpeek(st,8)  ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; hInstance : HINSTANCE (+16, 8byte)  qpoke st,16,値 / qpeek(st,16)  ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; dwFlags : CERT_VIEWPROPERTIES_STRUCT_FLAGS (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; szTitle : LPSTR (+32, 8byte)  qpoke st,32,値 / qpeek(st,32)  ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; pCertContext : CERT_CONTEXT* (+40, 8byte)  varptr(st)+40 を基点に操作(8byte:入れ子/配列)
; arrayPurposes : LPSTR* (+48, 8byte)  qpoke st,48,値 / qpeek(st,48)  ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; cArrayPurposes : DWORD (+56, 4byte)  st.14 = 値  /  値 = st.14   (lpoke/lpeek も可)
; cRootStores : DWORD (+60, 4byte)  st.15 = 値  /  値 = st.15   (lpoke/lpeek も可)
; rghstoreRoots : HCERTSTORE* (+64, 8byte)  qpoke st,64,値 / qpeek(st,64)  ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; cStores : DWORD (+72, 4byte)  st.18 = 値  /  値 = st.18   (lpoke/lpeek も可)
; rghstoreCAs : HCERTSTORE* (+80, 8byte)  qpoke st,80,値 / qpeek(st,80)  ※IronHSPのみ。3.7/3.8は lpoke st,80,下位 : lpoke st,84,上位
; cTrustStores : DWORD (+88, 4byte)  st.22 = 値  /  値 = st.22   (lpoke/lpeek も可)
; rghstoreTrust : HCERTSTORE* (+96, 8byte)  qpoke st,96,値 / qpeek(st,96)  ※IronHSPのみ。3.7/3.8は lpoke st,96,下位 : lpoke st,100,上位
; hprov : UINT_PTR (+104, 8byte)  qpoke st,104,値 / qpeek(st,104)  ※IronHSPのみ。3.7/3.8は lpoke st,104,下位 : lpoke st,108,上位
; lCustData : LPARAM (+112, 8byte)  qpoke st,112,値 / qpeek(st,112)  ※IronHSPのみ。3.7/3.8は lpoke st,112,下位 : lpoke st,116,上位
; dwPad : DWORD (+120, 4byte)  st.30 = 値  /  値 = st.30   (lpoke/lpeek も可)
; szHelpFileName : LPSTR (+128, 8byte)  qpoke st,128,値 / qpeek(st,128)  ※IronHSPのみ。3.7/3.8は lpoke st,128,下位 : lpoke st,132,上位
; dwHelpId : DWORD (+136, 4byte)  st.34 = 値  /  値 = st.34   (lpoke/lpeek も可)
; nStartPage : DWORD (+140, 4byte)  st.35 = 値  /  値 = st.35   (lpoke/lpeek も可)
; cArrayPropSheetPages : DWORD (+144, 4byte)  st.36 = 値  /  値 = st.36   (lpoke/lpeek も可)
; arrayPropSheetPages : PROPSHEETPAGEA* (+152, 8byte)  varptr(st)+152 を基点に操作(8byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global CERT_VIEWPROPERTIES_STRUCT_A
    #field int dwSize
    #field intptr hwndParent
    #field intptr hInstance
    #field int dwFlags
    #field intptr szTitle
    #field intptr pCertContext
    #field intptr arrayPurposes
    #field int cArrayPurposes
    #field int cRootStores
    #field intptr rghstoreRoots
    #field int cStores
    #field intptr rghstoreCAs
    #field int cTrustStores
    #field intptr rghstoreTrust
    #field intptr hprov
    #field intptr lCustData
    #field int dwPad
    #field intptr szHelpFileName
    #field int dwHelpId
    #field int nStartPage
    #field int cArrayPropSheetPages
    #field intptr arrayPropSheetPages
#endstruct

stdim st, CERT_VIEWPROPERTIES_STRUCT_A        ; NSTRUCT 変数を確保
st->dwSize = 100
mes "dwSize=" + st->dwSize