ホーム › Networking.WinSock › NAPI_PROVIDER_INSTALLATION_BLOB
NAPI_PROVIDER_INSTALLATION_BLOB
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwVersion | DWORD | 4 | +0 | +0 | BLOB構造のバージョン番号を示す。 |
| dwProviderType | DWORD | 4 | +4 | +4 | ネームスペースプロバイダの種別を示す。 |
| fSupportsWildCard | DWORD | 4 | +8 | +8 | プロバイダがワイルドカード照会に対応するかを示すフラグ。 |
| cDomains | DWORD | 4 | +12 | +12 | 含まれるドメイン記述の数を示す。 |
| OffsetFirstDomain | DWORD | 4 | +16 | +16 | 最初のドメイン記述へのオフセットをバイト単位で示す。 |
各言語での定義
#include <windows.h>
// NAPI_PROVIDER_INSTALLATION_BLOB (x64 20 / x86 20 バイト)
typedef struct NAPI_PROVIDER_INSTALLATION_BLOB {
DWORD dwVersion;
DWORD dwProviderType;
DWORD fSupportsWildCard;
DWORD cDomains;
DWORD OffsetFirstDomain;
} NAPI_PROVIDER_INSTALLATION_BLOB;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct NAPI_PROVIDER_INSTALLATION_BLOB
{
public uint dwVersion;
public uint dwProviderType;
public uint fSupportsWildCard;
public uint cDomains;
public uint OffsetFirstDomain;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure NAPI_PROVIDER_INSTALLATION_BLOB
Public dwVersion As UInteger
Public dwProviderType As UInteger
Public fSupportsWildCard As UInteger
Public cDomains As UInteger
Public OffsetFirstDomain As UInteger
End Structureimport ctypes
from ctypes import wintypes
class NAPI_PROVIDER_INSTALLATION_BLOB(ctypes.Structure):
_fields_ = [
("dwVersion", wintypes.DWORD),
("dwProviderType", wintypes.DWORD),
("fSupportsWildCard", wintypes.DWORD),
("cDomains", wintypes.DWORD),
("OffsetFirstDomain", wintypes.DWORD),
]#[repr(C)]
pub struct NAPI_PROVIDER_INSTALLATION_BLOB {
pub dwVersion: u32,
pub dwProviderType: u32,
pub fSupportsWildCard: u32,
pub cDomains: u32,
pub OffsetFirstDomain: u32,
}import "golang.org/x/sys/windows"
type NAPI_PROVIDER_INSTALLATION_BLOB struct {
dwVersion uint32
dwProviderType uint32
fSupportsWildCard uint32
cDomains uint32
OffsetFirstDomain uint32
}type
NAPI_PROVIDER_INSTALLATION_BLOB = record
dwVersion: DWORD;
dwProviderType: DWORD;
fSupportsWildCard: DWORD;
cDomains: DWORD;
OffsetFirstDomain: DWORD;
end;const NAPI_PROVIDER_INSTALLATION_BLOB = extern struct {
dwVersion: u32,
dwProviderType: u32,
fSupportsWildCard: u32,
cDomains: u32,
OffsetFirstDomain: u32,
};type
NAPI_PROVIDER_INSTALLATION_BLOB {.bycopy.} = object
dwVersion: uint32
dwProviderType: uint32
fSupportsWildCard: uint32
cDomains: uint32
OffsetFirstDomain: uint32struct NAPI_PROVIDER_INSTALLATION_BLOB
{
uint dwVersion;
uint dwProviderType;
uint fSupportsWildCard;
uint cDomains;
uint OffsetFirstDomain;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; NAPI_PROVIDER_INSTALLATION_BLOB サイズ: 20 バイト(x64)
dim st, 5 ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; dwVersion : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwProviderType : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; fSupportsWildCard : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; cDomains : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; OffsetFirstDomain : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global NAPI_PROVIDER_INSTALLATION_BLOB
#field int dwVersion
#field int dwProviderType
#field int fSupportsWildCard
#field int cDomains
#field int OffsetFirstDomain
#endstruct
stdim st, NAPI_PROVIDER_INSTALLATION_BLOB ; NSTRUCT 変数を確保
st->dwVersion = 100
mes "dwVersion=" + st->dwVersion