ホーム › System.WindowsProgramming › ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA
ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| lpInformation | void* | 8/4 | +0 | +0 | アセンブリメタデータ情報へのポインタ。 |
| lpSectionBase | void* | 8/4 | +8 | +4 | セクションのベースアドレスへのポインタ。 |
| ulSectionLength | DWORD | 4 | +16 | +8 | セクションの長さ(バイト)。 |
| lpSectionGlobalDataBase | void* | 8/4 | +24 | +12 | セクショングローバルデータのベースアドレスへのポインタ。 |
| ulSectionGlobalDataLength | DWORD | 4 | +32 | +16 | グローバルデータの長さ(バイト)。 |
各言語での定義
#include <windows.h>
// ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA (x64 40 / x86 20 バイト)
typedef struct ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA {
void* lpInformation;
void* lpSectionBase;
DWORD ulSectionLength;
void* lpSectionGlobalDataBase;
DWORD ulSectionGlobalDataLength;
} ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA
{
public IntPtr lpInformation;
public IntPtr lpSectionBase;
public uint ulSectionLength;
public IntPtr lpSectionGlobalDataBase;
public uint ulSectionGlobalDataLength;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA
Public lpInformation As IntPtr
Public lpSectionBase As IntPtr
Public ulSectionLength As UInteger
Public lpSectionGlobalDataBase As IntPtr
Public ulSectionGlobalDataLength As UInteger
End Structureimport ctypes
from ctypes import wintypes
class ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA(ctypes.Structure):
_fields_ = [
("lpInformation", ctypes.c_void_p),
("lpSectionBase", ctypes.c_void_p),
("ulSectionLength", wintypes.DWORD),
("lpSectionGlobalDataBase", ctypes.c_void_p),
("ulSectionGlobalDataLength", wintypes.DWORD),
]#[repr(C)]
pub struct ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA {
pub lpInformation: *mut core::ffi::c_void,
pub lpSectionBase: *mut core::ffi::c_void,
pub ulSectionLength: u32,
pub lpSectionGlobalDataBase: *mut core::ffi::c_void,
pub ulSectionGlobalDataLength: u32,
}import "golang.org/x/sys/windows"
type ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA struct {
lpInformation uintptr
lpSectionBase uintptr
ulSectionLength uint32
lpSectionGlobalDataBase uintptr
ulSectionGlobalDataLength uint32
}type
ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA = record
lpInformation: Pointer;
lpSectionBase: Pointer;
ulSectionLength: DWORD;
lpSectionGlobalDataBase: Pointer;
ulSectionGlobalDataLength: DWORD;
end;const ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA = extern struct {
lpInformation: ?*anyopaque,
lpSectionBase: ?*anyopaque,
ulSectionLength: u32,
lpSectionGlobalDataBase: ?*anyopaque,
ulSectionGlobalDataLength: u32,
};type
ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA {.bycopy.} = object
lpInformation: pointer
lpSectionBase: pointer
ulSectionLength: uint32
lpSectionGlobalDataBase: pointer
ulSectionGlobalDataLength: uint32struct ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA
{
void* lpInformation;
void* lpSectionBase;
uint ulSectionLength;
void* lpSectionGlobalDataBase;
uint ulSectionGlobalDataLength;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA サイズ: 20 バイト(x86)
dim st, 5 ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; lpInformation : void* (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; lpSectionBase : void* (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; ulSectionLength : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; lpSectionGlobalDataBase : void* (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ulSectionGlobalDataLength : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA サイズ: 40 バイト(x64)
dim st, 10 ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; lpInformation : void* (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; lpSectionBase : void* (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; ulSectionLength : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; lpSectionGlobalDataBase : void* (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; ulSectionGlobalDataLength : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA
#field intptr lpInformation
#field intptr lpSectionBase
#field int ulSectionLength
#field intptr lpSectionGlobalDataBase
#field int ulSectionGlobalDataLength
#endstruct
stdim st, ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA ; NSTRUCT 変数を確保
st->ulSectionLength = 100
mes "ulSectionLength=" + st->ulSectionLength