APPINFODATA
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| cbSize | DWORD | 4 | +0 | +0 | この構造体のサイズをバイト単位で指定する。 |
| dwMask | DWORD | 4 | +4 | +4 | 有効なメンバーを示すマスクフラグ(AIM_ 系)。 |
| pszDisplayName | LPWSTR | 8/4 | +8 | +8 | アプリケーションの表示名。NULL 可。 |
| pszVersion | LPWSTR | 8/4 | +16 | +12 | アプリケーションのバージョン文字列。NULL 可。 |
| pszPublisher | LPWSTR | 8/4 | +24 | +16 | 発行元(発売元)の名称。NULL 可。 |
| pszProductID | LPWSTR | 8/4 | +32 | +20 | 製品ID文字列。NULL 可。 |
| pszRegisteredOwner | LPWSTR | 8/4 | +40 | +24 | 登録ユーザー名。NULL 可。 |
| pszRegisteredCompany | LPWSTR | 8/4 | +48 | +28 | 登録会社名。NULL 可。 |
| pszLanguage | LPWSTR | 8/4 | +56 | +32 | アプリケーションの言語。NULL 可。 |
| pszSupportUrl | LPWSTR | 8/4 | +64 | +36 | サポート用 URL。NULL 可。 |
| pszSupportTelephone | LPWSTR | 8/4 | +72 | +40 | サポート電話番号。NULL 可。 |
| pszHelpLink | LPWSTR | 8/4 | +80 | +44 | ヘルプへのリンク。NULL 可。 |
| pszInstallLocation | LPWSTR | 8/4 | +88 | +48 | インストール先のパス。NULL 可。 |
| pszInstallSource | LPWSTR | 8/4 | +96 | +52 | インストール元のパス。NULL 可。 |
| pszInstallDate | LPWSTR | 8/4 | +104 | +56 | インストール日付の文字列。NULL 可。 |
| pszContact | LPWSTR | 8/4 | +112 | +60 | 連絡先情報。NULL 可。 |
| pszComments | LPWSTR | 8/4 | +120 | +64 | 補足コメント。NULL 可。 |
| pszImage | LPWSTR | 8/4 | +128 | +68 | 実行イメージ(EXE)のパス。NULL 可。 |
| pszReadmeUrl | LPWSTR | 8/4 | +136 | +72 | Readme へのリンク。NULL 可。 |
| pszUpdateInfoUrl | LPWSTR | 8/4 | +144 | +76 | 更新情報の URL。NULL 可。 |
各言語での定義
#include <windows.h>
// APPINFODATA (x64 152 / x86 80 バイト)
typedef struct APPINFODATA {
DWORD cbSize;
DWORD dwMask;
LPWSTR pszDisplayName;
LPWSTR pszVersion;
LPWSTR pszPublisher;
LPWSTR pszProductID;
LPWSTR pszRegisteredOwner;
LPWSTR pszRegisteredCompany;
LPWSTR pszLanguage;
LPWSTR pszSupportUrl;
LPWSTR pszSupportTelephone;
LPWSTR pszHelpLink;
LPWSTR pszInstallLocation;
LPWSTR pszInstallSource;
LPWSTR pszInstallDate;
LPWSTR pszContact;
LPWSTR pszComments;
LPWSTR pszImage;
LPWSTR pszReadmeUrl;
LPWSTR pszUpdateInfoUrl;
} APPINFODATA;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct APPINFODATA
{
public uint cbSize;
public uint dwMask;
public IntPtr pszDisplayName;
public IntPtr pszVersion;
public IntPtr pszPublisher;
public IntPtr pszProductID;
public IntPtr pszRegisteredOwner;
public IntPtr pszRegisteredCompany;
public IntPtr pszLanguage;
public IntPtr pszSupportUrl;
public IntPtr pszSupportTelephone;
public IntPtr pszHelpLink;
public IntPtr pszInstallLocation;
public IntPtr pszInstallSource;
public IntPtr pszInstallDate;
public IntPtr pszContact;
public IntPtr pszComments;
public IntPtr pszImage;
public IntPtr pszReadmeUrl;
public IntPtr pszUpdateInfoUrl;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure APPINFODATA
Public cbSize As UInteger
Public dwMask As UInteger
Public pszDisplayName As IntPtr
Public pszVersion As IntPtr
Public pszPublisher As IntPtr
Public pszProductID As IntPtr
Public pszRegisteredOwner As IntPtr
Public pszRegisteredCompany As IntPtr
Public pszLanguage As IntPtr
Public pszSupportUrl As IntPtr
Public pszSupportTelephone As IntPtr
Public pszHelpLink As IntPtr
Public pszInstallLocation As IntPtr
Public pszInstallSource As IntPtr
Public pszInstallDate As IntPtr
Public pszContact As IntPtr
Public pszComments As IntPtr
Public pszImage As IntPtr
Public pszReadmeUrl As IntPtr
Public pszUpdateInfoUrl As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class APPINFODATA(ctypes.Structure):
_fields_ = [
("cbSize", wintypes.DWORD),
("dwMask", wintypes.DWORD),
("pszDisplayName", ctypes.c_void_p),
("pszVersion", ctypes.c_void_p),
("pszPublisher", ctypes.c_void_p),
("pszProductID", ctypes.c_void_p),
("pszRegisteredOwner", ctypes.c_void_p),
("pszRegisteredCompany", ctypes.c_void_p),
("pszLanguage", ctypes.c_void_p),
("pszSupportUrl", ctypes.c_void_p),
("pszSupportTelephone", ctypes.c_void_p),
("pszHelpLink", ctypes.c_void_p),
("pszInstallLocation", ctypes.c_void_p),
("pszInstallSource", ctypes.c_void_p),
("pszInstallDate", ctypes.c_void_p),
("pszContact", ctypes.c_void_p),
("pszComments", ctypes.c_void_p),
("pszImage", ctypes.c_void_p),
("pszReadmeUrl", ctypes.c_void_p),
("pszUpdateInfoUrl", ctypes.c_void_p),
]#[repr(C)]
pub struct APPINFODATA {
pub cbSize: u32,
pub dwMask: u32,
pub pszDisplayName: *mut core::ffi::c_void,
pub pszVersion: *mut core::ffi::c_void,
pub pszPublisher: *mut core::ffi::c_void,
pub pszProductID: *mut core::ffi::c_void,
pub pszRegisteredOwner: *mut core::ffi::c_void,
pub pszRegisteredCompany: *mut core::ffi::c_void,
pub pszLanguage: *mut core::ffi::c_void,
pub pszSupportUrl: *mut core::ffi::c_void,
pub pszSupportTelephone: *mut core::ffi::c_void,
pub pszHelpLink: *mut core::ffi::c_void,
pub pszInstallLocation: *mut core::ffi::c_void,
pub pszInstallSource: *mut core::ffi::c_void,
pub pszInstallDate: *mut core::ffi::c_void,
pub pszContact: *mut core::ffi::c_void,
pub pszComments: *mut core::ffi::c_void,
pub pszImage: *mut core::ffi::c_void,
pub pszReadmeUrl: *mut core::ffi::c_void,
pub pszUpdateInfoUrl: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type APPINFODATA struct {
cbSize uint32
dwMask uint32
pszDisplayName uintptr
pszVersion uintptr
pszPublisher uintptr
pszProductID uintptr
pszRegisteredOwner uintptr
pszRegisteredCompany uintptr
pszLanguage uintptr
pszSupportUrl uintptr
pszSupportTelephone uintptr
pszHelpLink uintptr
pszInstallLocation uintptr
pszInstallSource uintptr
pszInstallDate uintptr
pszContact uintptr
pszComments uintptr
pszImage uintptr
pszReadmeUrl uintptr
pszUpdateInfoUrl uintptr
}type
APPINFODATA = record
cbSize: DWORD;
dwMask: DWORD;
pszDisplayName: Pointer;
pszVersion: Pointer;
pszPublisher: Pointer;
pszProductID: Pointer;
pszRegisteredOwner: Pointer;
pszRegisteredCompany: Pointer;
pszLanguage: Pointer;
pszSupportUrl: Pointer;
pszSupportTelephone: Pointer;
pszHelpLink: Pointer;
pszInstallLocation: Pointer;
pszInstallSource: Pointer;
pszInstallDate: Pointer;
pszContact: Pointer;
pszComments: Pointer;
pszImage: Pointer;
pszReadmeUrl: Pointer;
pszUpdateInfoUrl: Pointer;
end;const APPINFODATA = extern struct {
cbSize: u32,
dwMask: u32,
pszDisplayName: ?*anyopaque,
pszVersion: ?*anyopaque,
pszPublisher: ?*anyopaque,
pszProductID: ?*anyopaque,
pszRegisteredOwner: ?*anyopaque,
pszRegisteredCompany: ?*anyopaque,
pszLanguage: ?*anyopaque,
pszSupportUrl: ?*anyopaque,
pszSupportTelephone: ?*anyopaque,
pszHelpLink: ?*anyopaque,
pszInstallLocation: ?*anyopaque,
pszInstallSource: ?*anyopaque,
pszInstallDate: ?*anyopaque,
pszContact: ?*anyopaque,
pszComments: ?*anyopaque,
pszImage: ?*anyopaque,
pszReadmeUrl: ?*anyopaque,
pszUpdateInfoUrl: ?*anyopaque,
};type
APPINFODATA {.bycopy.} = object
cbSize: uint32
dwMask: uint32
pszDisplayName: pointer
pszVersion: pointer
pszPublisher: pointer
pszProductID: pointer
pszRegisteredOwner: pointer
pszRegisteredCompany: pointer
pszLanguage: pointer
pszSupportUrl: pointer
pszSupportTelephone: pointer
pszHelpLink: pointer
pszInstallLocation: pointer
pszInstallSource: pointer
pszInstallDate: pointer
pszContact: pointer
pszComments: pointer
pszImage: pointer
pszReadmeUrl: pointer
pszUpdateInfoUrl: pointerstruct APPINFODATA
{
uint cbSize;
uint dwMask;
void* pszDisplayName;
void* pszVersion;
void* pszPublisher;
void* pszProductID;
void* pszRegisteredOwner;
void* pszRegisteredCompany;
void* pszLanguage;
void* pszSupportUrl;
void* pszSupportTelephone;
void* pszHelpLink;
void* pszInstallLocation;
void* pszInstallSource;
void* pszInstallDate;
void* pszContact;
void* pszComments;
void* pszImage;
void* pszReadmeUrl;
void* pszUpdateInfoUrl;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; APPINFODATA サイズ: 80 バイト(x86)
dim st, 20 ; 4byte整数×20(構造体サイズ 80 / 4 切り上げ)
; cbSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwMask : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; pszDisplayName : LPWSTR (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; pszVersion : LPWSTR (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; pszPublisher : LPWSTR (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; pszProductID : LPWSTR (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; pszRegisteredOwner : LPWSTR (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; pszRegisteredCompany : LPWSTR (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; pszLanguage : LPWSTR (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; pszSupportUrl : LPWSTR (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; pszSupportTelephone : LPWSTR (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; pszHelpLink : LPWSTR (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; pszInstallLocation : LPWSTR (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; pszInstallSource : LPWSTR (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; pszInstallDate : LPWSTR (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; pszContact : LPWSTR (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; pszComments : LPWSTR (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; pszImage : LPWSTR (+68, 4byte) st.17 = 値 / 値 = st.17 (lpoke/lpeek も可)
; pszReadmeUrl : LPWSTR (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; pszUpdateInfoUrl : LPWSTR (+76, 4byte) st.19 = 値 / 値 = st.19 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; APPINFODATA サイズ: 152 バイト(x64)
dim st, 38 ; 4byte整数×38(構造体サイズ 152 / 4 切り上げ)
; cbSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwMask : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; pszDisplayName : LPWSTR (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; pszVersion : LPWSTR (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; pszPublisher : LPWSTR (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; pszProductID : LPWSTR (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; pszRegisteredOwner : LPWSTR (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; pszRegisteredCompany : LPWSTR (+48, 8byte) qpoke st,48,値 / qpeek(st,48) ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; pszLanguage : LPWSTR (+56, 8byte) qpoke st,56,値 / qpeek(st,56) ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; pszSupportUrl : LPWSTR (+64, 8byte) qpoke st,64,値 / qpeek(st,64) ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; pszSupportTelephone : LPWSTR (+72, 8byte) qpoke st,72,値 / qpeek(st,72) ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; pszHelpLink : LPWSTR (+80, 8byte) qpoke st,80,値 / qpeek(st,80) ※IronHSPのみ。3.7/3.8は lpoke st,80,下位 : lpoke st,84,上位
; pszInstallLocation : LPWSTR (+88, 8byte) qpoke st,88,値 / qpeek(st,88) ※IronHSPのみ。3.7/3.8は lpoke st,88,下位 : lpoke st,92,上位
; pszInstallSource : LPWSTR (+96, 8byte) qpoke st,96,値 / qpeek(st,96) ※IronHSPのみ。3.7/3.8は lpoke st,96,下位 : lpoke st,100,上位
; pszInstallDate : LPWSTR (+104, 8byte) qpoke st,104,値 / qpeek(st,104) ※IronHSPのみ。3.7/3.8は lpoke st,104,下位 : lpoke st,108,上位
; pszContact : LPWSTR (+112, 8byte) qpoke st,112,値 / qpeek(st,112) ※IronHSPのみ。3.7/3.8は lpoke st,112,下位 : lpoke st,116,上位
; pszComments : LPWSTR (+120, 8byte) qpoke st,120,値 / qpeek(st,120) ※IronHSPのみ。3.7/3.8は lpoke st,120,下位 : lpoke st,124,上位
; pszImage : LPWSTR (+128, 8byte) qpoke st,128,値 / qpeek(st,128) ※IronHSPのみ。3.7/3.8は lpoke st,128,下位 : lpoke st,132,上位
; pszReadmeUrl : LPWSTR (+136, 8byte) qpoke st,136,値 / qpeek(st,136) ※IronHSPのみ。3.7/3.8は lpoke st,136,下位 : lpoke st,140,上位
; pszUpdateInfoUrl : LPWSTR (+144, 8byte) qpoke st,144,値 / qpeek(st,144) ※IronHSPのみ。3.7/3.8は lpoke st,144,下位 : lpoke st,148,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global APPINFODATA
#field int cbSize
#field int dwMask
#field intptr pszDisplayName
#field intptr pszVersion
#field intptr pszPublisher
#field intptr pszProductID
#field intptr pszRegisteredOwner
#field intptr pszRegisteredCompany
#field intptr pszLanguage
#field intptr pszSupportUrl
#field intptr pszSupportTelephone
#field intptr pszHelpLink
#field intptr pszInstallLocation
#field intptr pszInstallSource
#field intptr pszInstallDate
#field intptr pszContact
#field intptr pszComments
#field intptr pszImage
#field intptr pszReadmeUrl
#field intptr pszUpdateInfoUrl
#endstruct
stdim st, APPINFODATA ; NSTRUCT 変数を確保
st->cbSize = 100
mes "cbSize=" + st->cbSize