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

CREDUI_INFOA

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

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

フィールド

フィールドサイズx64x86説明
cbSizeDWORD4+0+0この構造体のバイトサイズ。
hwndParentHWND8/4+8+4資格情報ダイアログの親ウィンドウハンドル。NULL可。
pszMessageTextLPSTR8/4+16+8ダイアログに表示する説明メッセージ(ANSI)。
pszCaptionTextLPSTR8/4+24+12ダイアログのタイトル文字列(ANSI)。
hbmBannerHBITMAP8/4+32+16ダイアログに表示するバナービットマップ。NULL可。

各言語での定義

#include <windows.h>

// CREDUI_INFOA  (x64 40 / x86 20 バイト)
typedef struct CREDUI_INFOA {
    DWORD cbSize;
    HWND hwndParent;
    LPSTR pszMessageText;
    LPSTR pszCaptionText;
    HBITMAP hbmBanner;
} CREDUI_INFOA;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CREDUI_INFOA
{
    public uint cbSize;
    public IntPtr hwndParent;
    public IntPtr pszMessageText;
    public IntPtr pszCaptionText;
    public IntPtr hbmBanner;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure CREDUI_INFOA
    Public cbSize As UInteger
    Public hwndParent As IntPtr
    Public pszMessageText As IntPtr
    Public pszCaptionText As IntPtr
    Public hbmBanner As IntPtr
End Structure
import ctypes
from ctypes import wintypes

class CREDUI_INFOA(ctypes.Structure):
    _fields_ = [
        ("cbSize", wintypes.DWORD),
        ("hwndParent", ctypes.c_void_p),
        ("pszMessageText", ctypes.c_void_p),
        ("pszCaptionText", ctypes.c_void_p),
        ("hbmBanner", ctypes.c_void_p),
    ]
#[repr(C)]
pub struct CREDUI_INFOA {
    pub cbSize: u32,
    pub hwndParent: *mut core::ffi::c_void,
    pub pszMessageText: *mut core::ffi::c_void,
    pub pszCaptionText: *mut core::ffi::c_void,
    pub hbmBanner: *mut core::ffi::c_void,
}
import "golang.org/x/sys/windows"

type CREDUI_INFOA struct {
	cbSize uint32
	hwndParent uintptr
	pszMessageText uintptr
	pszCaptionText uintptr
	hbmBanner uintptr
}
type
  CREDUI_INFOA = record
    cbSize: DWORD;
    hwndParent: Pointer;
    pszMessageText: Pointer;
    pszCaptionText: Pointer;
    hbmBanner: Pointer;
  end;
const CREDUI_INFOA = extern struct {
    cbSize: u32,
    hwndParent: ?*anyopaque,
    pszMessageText: ?*anyopaque,
    pszCaptionText: ?*anyopaque,
    hbmBanner: ?*anyopaque,
};
type
  CREDUI_INFOA {.bycopy.} = object
    cbSize: uint32
    hwndParent: pointer
    pszMessageText: pointer
    pszCaptionText: pointer
    hbmBanner: pointer
struct CREDUI_INFOA
{
    uint cbSize;
    void* hwndParent;
    void* pszMessageText;
    void* pszCaptionText;
    void* hbmBanner;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; CREDUI_INFOA サイズ: 20 バイト(x86)
dim st, 5    ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; cbSize : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; hwndParent : HWND (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; pszMessageText : LPSTR (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; pszCaptionText : LPSTR (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; hbmBanner : HBITMAP (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; CREDUI_INFOA サイズ: 40 バイト(x64)
dim st, 10    ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; cbSize : 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,上位
; pszMessageText : LPSTR (+16, 8byte)  qpoke st,16,値 / qpeek(st,16)  ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; pszCaptionText : LPSTR (+24, 8byte)  qpoke st,24,値 / qpeek(st,24)  ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; hbmBanner : HBITMAP (+32, 8byte)  qpoke st,32,値 / qpeek(st,32)  ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global CREDUI_INFOA
    #field int cbSize
    #field intptr hwndParent
    #field intptr pszMessageText
    #field intptr pszCaptionText
    #field intptr hbmBanner
#endstruct

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