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

CRYPT_XML_STATUS

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

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

フィールド

フィールドサイズx64x86説明
cbSizeDWORD4+0+0この構造体のバイト単位サイズ。呼び出し前に設定する。
dwErrorStatusCRYPT_XML_STATUS_ERROR_STATUS4+4+4XML署名処理のエラー状態を示すフラグ。
dwInfoStatusCRYPT_XML_STATUS_INFO_STATUS4+8+8XML署名処理の情報状態を示すフラグ。

各言語での定義

#include <windows.h>

// CRYPT_XML_STATUS  (x64 12 / x86 12 バイト)
typedef struct CRYPT_XML_STATUS {
    DWORD cbSize;
    CRYPT_XML_STATUS_ERROR_STATUS dwErrorStatus;
    CRYPT_XML_STATUS_INFO_STATUS dwInfoStatus;
} CRYPT_XML_STATUS;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CRYPT_XML_STATUS
{
    public uint cbSize;
    public uint dwErrorStatus;
    public uint dwInfoStatus;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure CRYPT_XML_STATUS
    Public cbSize As UInteger
    Public dwErrorStatus As UInteger
    Public dwInfoStatus As UInteger
End Structure
import ctypes
from ctypes import wintypes

class CRYPT_XML_STATUS(ctypes.Structure):
    _fields_ = [
        ("cbSize", wintypes.DWORD),
        ("dwErrorStatus", wintypes.DWORD),
        ("dwInfoStatus", wintypes.DWORD),
    ]
#[repr(C)]
pub struct CRYPT_XML_STATUS {
    pub cbSize: u32,
    pub dwErrorStatus: u32,
    pub dwInfoStatus: u32,
}
import "golang.org/x/sys/windows"

type CRYPT_XML_STATUS struct {
	cbSize uint32
	dwErrorStatus uint32
	dwInfoStatus uint32
}
type
  CRYPT_XML_STATUS = record
    cbSize: DWORD;
    dwErrorStatus: DWORD;
    dwInfoStatus: DWORD;
  end;
const CRYPT_XML_STATUS = extern struct {
    cbSize: u32,
    dwErrorStatus: u32,
    dwInfoStatus: u32,
};
type
  CRYPT_XML_STATUS {.bycopy.} = object
    cbSize: uint32
    dwErrorStatus: uint32
    dwInfoStatus: uint32
struct CRYPT_XML_STATUS
{
    uint cbSize;
    uint dwErrorStatus;
    uint dwInfoStatus;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; CRYPT_XML_STATUS サイズ: 12 バイト(x64)
dim st, 3    ; 4byte整数×3(構造体サイズ 12 / 4 切り上げ)
; cbSize : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; dwErrorStatus : CRYPT_XML_STATUS_ERROR_STATUS (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; dwInfoStatus : CRYPT_XML_STATUS_INFO_STATUS (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global CRYPT_XML_STATUS
    #field int cbSize
    #field int dwErrorStatus
    #field int dwInfoStatus
#endstruct

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