ホーム › Security.DiagnosticDataQuery › DdqGetTranscriptConfiguration
DdqGetTranscriptConfiguration
関数診断データイベントの現在のトランスクリプト構成を取得する。
シグネチャ
// DiagnosticDataQuery.dll
#include <windows.h>
HRESULT DdqGetTranscriptConfiguration(
HDIAGNOSTIC_DATA_QUERY_SESSION hSession,
DIAGNOSTIC_DATA_EVENT_TRANSCRIPT_CONFIGURATION* currentConfig
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hSession | HDIAGNOSTIC_DATA_QUERY_SESSION | in |
| currentConfig | DIAGNOSTIC_DATA_EVENT_TRANSCRIPT_CONFIGURATION* | out |
戻り値の型: HRESULT
各言語での呼び出し定義
// DiagnosticDataQuery.dll
#include <windows.h>
HRESULT DdqGetTranscriptConfiguration(
HDIAGNOSTIC_DATA_QUERY_SESSION hSession,
DIAGNOSTIC_DATA_EVENT_TRANSCRIPT_CONFIGURATION* currentConfig
);[DllImport("DiagnosticDataQuery.dll", ExactSpelling = true)]
static extern int DdqGetTranscriptConfiguration(
IntPtr hSession, // HDIAGNOSTIC_DATA_QUERY_SESSION
IntPtr currentConfig // DIAGNOSTIC_DATA_EVENT_TRANSCRIPT_CONFIGURATION* out
);<DllImport("DiagnosticDataQuery.dll", ExactSpelling:=True)>
Public Shared Function DdqGetTranscriptConfiguration(
hSession As IntPtr, ' HDIAGNOSTIC_DATA_QUERY_SESSION
currentConfig As IntPtr ' DIAGNOSTIC_DATA_EVENT_TRANSCRIPT_CONFIGURATION* out
) As Integer
End Function' hSession : HDIAGNOSTIC_DATA_QUERY_SESSION
' currentConfig : DIAGNOSTIC_DATA_EVENT_TRANSCRIPT_CONFIGURATION* out
Declare PtrSafe Function DdqGetTranscriptConfiguration Lib "diagnosticdataquery" ( _
ByVal hSession As LongPtr, _
ByVal currentConfig As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
DdqGetTranscriptConfiguration = ctypes.windll.diagnosticdataquery.DdqGetTranscriptConfiguration
DdqGetTranscriptConfiguration.restype = ctypes.c_int
DdqGetTranscriptConfiguration.argtypes = [
wintypes.HANDLE, # hSession : HDIAGNOSTIC_DATA_QUERY_SESSION
ctypes.c_void_p, # currentConfig : DIAGNOSTIC_DATA_EVENT_TRANSCRIPT_CONFIGURATION* out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('DiagnosticDataQuery.dll')
DdqGetTranscriptConfiguration = Fiddle::Function.new(
lib['DdqGetTranscriptConfiguration'],
[
Fiddle::TYPE_VOIDP, # hSession : HDIAGNOSTIC_DATA_QUERY_SESSION
Fiddle::TYPE_VOIDP, # currentConfig : DIAGNOSTIC_DATA_EVENT_TRANSCRIPT_CONFIGURATION* out
],
Fiddle::TYPE_INT)#[link(name = "diagnosticdataquery")]
extern "system" {
fn DdqGetTranscriptConfiguration(
hSession: *mut core::ffi::c_void, // HDIAGNOSTIC_DATA_QUERY_SESSION
currentConfig: *mut DIAGNOSTIC_DATA_EVENT_TRANSCRIPT_CONFIGURATION // DIAGNOSTIC_DATA_EVENT_TRANSCRIPT_CONFIGURATION* out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("DiagnosticDataQuery.dll")]
public static extern int DdqGetTranscriptConfiguration(IntPtr hSession, IntPtr currentConfig);
"@
$api = Add-Type -MemberDefinition $sig -Name 'DiagnosticDataQuery_DdqGetTranscriptConfiguration' -Namespace Win32 -PassThru
# $api::DdqGetTranscriptConfiguration(hSession, currentConfig)#uselib "DiagnosticDataQuery.dll"
#func global DdqGetTranscriptConfiguration "DdqGetTranscriptConfiguration" sptr, sptr
; DdqGetTranscriptConfiguration hSession, varptr(currentConfig) ; 戻り値は stat
; hSession : HDIAGNOSTIC_DATA_QUERY_SESSION -> "sptr"
; currentConfig : DIAGNOSTIC_DATA_EVENT_TRANSCRIPT_CONFIGURATION* out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "DiagnosticDataQuery.dll" #cfunc global DdqGetTranscriptConfiguration "DdqGetTranscriptConfiguration" sptr, var ; res = DdqGetTranscriptConfiguration(hSession, currentConfig) ; hSession : HDIAGNOSTIC_DATA_QUERY_SESSION -> "sptr" ; currentConfig : DIAGNOSTIC_DATA_EVENT_TRANSCRIPT_CONFIGURATION* out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "DiagnosticDataQuery.dll" #cfunc global DdqGetTranscriptConfiguration "DdqGetTranscriptConfiguration" sptr, sptr ; res = DdqGetTranscriptConfiguration(hSession, varptr(currentConfig)) ; hSession : HDIAGNOSTIC_DATA_QUERY_SESSION -> "sptr" ; currentConfig : DIAGNOSTIC_DATA_EVENT_TRANSCRIPT_CONFIGURATION* out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; HRESULT DdqGetTranscriptConfiguration(HDIAGNOSTIC_DATA_QUERY_SESSION hSession, DIAGNOSTIC_DATA_EVENT_TRANSCRIPT_CONFIGURATION* currentConfig) #uselib "DiagnosticDataQuery.dll" #cfunc global DdqGetTranscriptConfiguration "DdqGetTranscriptConfiguration" intptr, var ; res = DdqGetTranscriptConfiguration(hSession, currentConfig) ; hSession : HDIAGNOSTIC_DATA_QUERY_SESSION -> "intptr" ; currentConfig : DIAGNOSTIC_DATA_EVENT_TRANSCRIPT_CONFIGURATION* out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; HRESULT DdqGetTranscriptConfiguration(HDIAGNOSTIC_DATA_QUERY_SESSION hSession, DIAGNOSTIC_DATA_EVENT_TRANSCRIPT_CONFIGURATION* currentConfig) #uselib "DiagnosticDataQuery.dll" #cfunc global DdqGetTranscriptConfiguration "DdqGetTranscriptConfiguration" intptr, intptr ; res = DdqGetTranscriptConfiguration(hSession, varptr(currentConfig)) ; hSession : HDIAGNOSTIC_DATA_QUERY_SESSION -> "intptr" ; currentConfig : DIAGNOSTIC_DATA_EVENT_TRANSCRIPT_CONFIGURATION* out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
diagnosticdataquery = windows.NewLazySystemDLL("DiagnosticDataQuery.dll")
procDdqGetTranscriptConfiguration = diagnosticdataquery.NewProc("DdqGetTranscriptConfiguration")
)
// hSession (HDIAGNOSTIC_DATA_QUERY_SESSION), currentConfig (DIAGNOSTIC_DATA_EVENT_TRANSCRIPT_CONFIGURATION* out)
r1, _, err := procDdqGetTranscriptConfiguration.Call(
uintptr(hSession),
uintptr(currentConfig),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction DdqGetTranscriptConfiguration(
hSession: THandle; // HDIAGNOSTIC_DATA_QUERY_SESSION
currentConfig: Pointer // DIAGNOSTIC_DATA_EVENT_TRANSCRIPT_CONFIGURATION* out
): Integer; stdcall;
external 'DiagnosticDataQuery.dll' name 'DdqGetTranscriptConfiguration';result := DllCall("DiagnosticDataQuery\DdqGetTranscriptConfiguration"
, "Ptr", hSession ; HDIAGNOSTIC_DATA_QUERY_SESSION
, "Ptr", currentConfig ; DIAGNOSTIC_DATA_EVENT_TRANSCRIPT_CONFIGURATION* out
, "Int") ; return: HRESULT●DdqGetTranscriptConfiguration(hSession, currentConfig) = DLL("DiagnosticDataQuery.dll", "int DdqGetTranscriptConfiguration(void*, void*)")
# 呼び出し: DdqGetTranscriptConfiguration(hSession, currentConfig)
# hSession : HDIAGNOSTIC_DATA_QUERY_SESSION -> "void*"
# currentConfig : DIAGNOSTIC_DATA_EVENT_TRANSCRIPT_CONFIGURATION* out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。