ホーム › Graphics.Direct3D9 › D3DAUTHENTICATEDCHANNEL_CONFIGURESHAREDRESOURCE
D3DAUTHENTICATEDCHANNEL_CONFIGURESHAREDRESOURCE
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Parameters | D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT | 48/40 | +0 | +0 | 構成共通の入力ヘッダ(D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT)。 |
| ProcessIdentiferType | D3DAUTHENTICATEDCHANNEL_PROCESSIDENTIFIERTYPE | 4 | +48 | +40 | プロセス識別子の種別を示すD3DAUTHENTICATEDCHANNEL_PROCESSIDENTIFIERTYPE。 |
| ProcessHandle | HANDLE | 8/4 | +56 | +44 | 対象プロセスのハンドル。 |
| AllowAccess | BOOL | 4 | +64 | +48 | そのプロセスにアクセスを許可するかを示すBOOL。 |
各言語での定義
#include <windows.h>
// D3D_OMAC (x64 16 / x86 16 バイト)
typedef struct D3D_OMAC {
BYTE Omac[16];
} D3D_OMAC;
// D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT (x64 48 / x86 40 バイト)
typedef struct D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT {
D3D_OMAC omac;
GUID ConfigureType;
HANDLE hChannel;
DWORD SequenceNumber;
} D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT;
// D3DAUTHENTICATEDCHANNEL_CONFIGURESHAREDRESOURCE (x64 72 / x86 52 バイト)
typedef struct D3DAUTHENTICATEDCHANNEL_CONFIGURESHAREDRESOURCE {
D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT Parameters;
D3DAUTHENTICATEDCHANNEL_PROCESSIDENTIFIERTYPE ProcessIdentiferType;
HANDLE ProcessHandle;
BOOL AllowAccess;
} D3DAUTHENTICATEDCHANNEL_CONFIGURESHAREDRESOURCE;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D_OMAC
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public byte[] Omac;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT
{
public D3D_OMAC omac;
public Guid ConfigureType;
public IntPtr hChannel;
public uint SequenceNumber;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3DAUTHENTICATEDCHANNEL_CONFIGURESHAREDRESOURCE
{
public D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT Parameters;
public int ProcessIdentiferType;
public IntPtr ProcessHandle;
[MarshalAs(UnmanagedType.Bool)] public bool AllowAccess;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D_OMAC
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=16)> Public Omac() As Byte
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT
Public omac As D3D_OMAC
Public ConfigureType As Guid
Public hChannel As IntPtr
Public SequenceNumber As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3DAUTHENTICATEDCHANNEL_CONFIGURESHAREDRESOURCE
Public Parameters As D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT
Public ProcessIdentiferType As Integer
Public ProcessHandle As IntPtr
<MarshalAs(UnmanagedType.Bool)> Public AllowAccess As Boolean
End Structureimport ctypes
from ctypes import wintypes
class D3D_OMAC(ctypes.Structure):
_fields_ = [
("Omac", ctypes.c_ubyte * 16),
]
class D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT(ctypes.Structure):
_fields_ = [
("omac", D3D_OMAC),
("ConfigureType", GUID),
("hChannel", ctypes.c_void_p),
("SequenceNumber", wintypes.DWORD),
]
class D3DAUTHENTICATEDCHANNEL_CONFIGURESHAREDRESOURCE(ctypes.Structure):
_fields_ = [
("Parameters", D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT),
("ProcessIdentiferType", ctypes.c_int),
("ProcessHandle", ctypes.c_void_p),
("AllowAccess", wintypes.BOOL),
]#[repr(C)]
pub struct D3D_OMAC {
pub Omac: [u8; 16],
}
#[repr(C)]
pub struct D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT {
pub omac: D3D_OMAC,
pub ConfigureType: GUID,
pub hChannel: *mut core::ffi::c_void,
pub SequenceNumber: u32,
}
#[repr(C)]
pub struct D3DAUTHENTICATEDCHANNEL_CONFIGURESHAREDRESOURCE {
pub Parameters: D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT,
pub ProcessIdentiferType: i32,
pub ProcessHandle: *mut core::ffi::c_void,
pub AllowAccess: i32,
}import "golang.org/x/sys/windows"
type D3D_OMAC struct {
Omac [16]byte
}
type D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT struct {
omac D3D_OMAC
ConfigureType windows.GUID
hChannel uintptr
SequenceNumber uint32
}
type D3DAUTHENTICATEDCHANNEL_CONFIGURESHAREDRESOURCE struct {
Parameters D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT
ProcessIdentiferType int32
ProcessHandle uintptr
AllowAccess int32
}type
D3D_OMAC = record
Omac: array[0..15] of Byte;
end;
D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT = record
omac: D3D_OMAC;
ConfigureType: TGUID;
hChannel: Pointer;
SequenceNumber: DWORD;
end;
D3DAUTHENTICATEDCHANNEL_CONFIGURESHAREDRESOURCE = record
Parameters: D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT;
ProcessIdentiferType: Integer;
ProcessHandle: Pointer;
AllowAccess: BOOL;
end;const D3D_OMAC = extern struct {
Omac: [16]u8,
};
const D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT = extern struct {
omac: D3D_OMAC,
ConfigureType: GUID,
hChannel: ?*anyopaque,
SequenceNumber: u32,
};
const D3DAUTHENTICATEDCHANNEL_CONFIGURESHAREDRESOURCE = extern struct {
Parameters: D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT,
ProcessIdentiferType: i32,
ProcessHandle: ?*anyopaque,
AllowAccess: i32,
};type
D3D_OMAC {.bycopy.} = object
Omac: array[16, uint8]
D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT {.bycopy.} = object
omac: D3D_OMAC
ConfigureType: GUID
hChannel: pointer
SequenceNumber: uint32
D3DAUTHENTICATEDCHANNEL_CONFIGURESHAREDRESOURCE {.bycopy.} = object
Parameters: D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT
ProcessIdentiferType: int32
ProcessHandle: pointer
AllowAccess: int32struct D3D_OMAC
{
ubyte[16] Omac;
}
struct D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT
{
D3D_OMAC omac;
GUID ConfigureType;
void* hChannel;
uint SequenceNumber;
}
struct D3DAUTHENTICATEDCHANNEL_CONFIGURESHAREDRESOURCE
{
D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT Parameters;
int ProcessIdentiferType;
void* ProcessHandle;
int AllowAccess;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; D3DAUTHENTICATEDCHANNEL_CONFIGURESHAREDRESOURCE サイズ: 52 バイト(x86)
dim st, 13 ; 4byte整数×13(構造体サイズ 52 / 4 切り上げ)
; Parameters : D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT (+0, 40byte) varptr(st)+0 を基点に操作(40byte:入れ子/配列)
; ProcessIdentiferType : D3DAUTHENTICATEDCHANNEL_PROCESSIDENTIFIERTYPE (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; ProcessHandle : HANDLE (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; AllowAccess : BOOL (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3DAUTHENTICATEDCHANNEL_CONFIGURESHAREDRESOURCE サイズ: 72 バイト(x64)
dim st, 18 ; 4byte整数×18(構造体サイズ 72 / 4 切り上げ)
; Parameters : D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT (+0, 48byte) varptr(st)+0 を基点に操作(48byte:入れ子/配列)
; ProcessIdentiferType : D3DAUTHENTICATEDCHANNEL_PROCESSIDENTIFIERTYPE (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; ProcessHandle : HANDLE (+56, 8byte) qpoke st,56,値 / qpeek(st,56) ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; AllowAccess : BOOL (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global D3D_OMAC
#field byte Omac 16
#endstruct
#defstruct global GUID, pack=1
#field int Data1
#field short Data2
#field short Data3
#field byte Data4 8
#endstruct
#defstruct global D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT
#field D3D_OMAC omac
#field GUID ConfigureType
#field intptr hChannel
#field int SequenceNumber
#endstruct
#defstruct global D3DAUTHENTICATEDCHANNEL_CONFIGURESHAREDRESOURCE
#field D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT Parameters
#field int ProcessIdentiferType
#field intptr ProcessHandle
#field bool AllowAccess
#endstruct
stdim st, D3DAUTHENTICATEDCHANNEL_CONFIGURESHAREDRESOURCE ; NSTRUCT 変数を確保
st->ProcessIdentiferType = 100
mes "ProcessIdentiferType=" + st->ProcessIdentiferType