ホーム › Graphics.Direct3D.Fxc › D3DCreateFunctionLinkingGraph
D3DCreateFunctionLinkingGraph
関数関数リンキンググラフを生成する。
シグネチャ
// D3DCOMPILER_47.dll
#include <windows.h>
HRESULT D3DCreateFunctionLinkingGraph(
DWORD uFlags,
ID3D11FunctionLinkingGraph** ppFunctionLinkingGraph
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| uFlags | DWORD | in |
| ppFunctionLinkingGraph | ID3D11FunctionLinkingGraph** | out |
戻り値の型: HRESULT
各言語での呼び出し定義
// D3DCOMPILER_47.dll
#include <windows.h>
HRESULT D3DCreateFunctionLinkingGraph(
DWORD uFlags,
ID3D11FunctionLinkingGraph** ppFunctionLinkingGraph
);[DllImport("D3DCOMPILER_47.dll", ExactSpelling = true)]
static extern int D3DCreateFunctionLinkingGraph(
uint uFlags, // DWORD
IntPtr ppFunctionLinkingGraph // ID3D11FunctionLinkingGraph** out
);<DllImport("D3DCOMPILER_47.dll", ExactSpelling:=True)>
Public Shared Function D3DCreateFunctionLinkingGraph(
uFlags As UInteger, ' DWORD
ppFunctionLinkingGraph As IntPtr ' ID3D11FunctionLinkingGraph** out
) As Integer
End Function' uFlags : DWORD
' ppFunctionLinkingGraph : ID3D11FunctionLinkingGraph** out
Declare PtrSafe Function D3DCreateFunctionLinkingGraph Lib "d3dcompiler_47" ( _
ByVal uFlags As Long, _
ByVal ppFunctionLinkingGraph As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
D3DCreateFunctionLinkingGraph = ctypes.windll.d3dcompiler_47.D3DCreateFunctionLinkingGraph
D3DCreateFunctionLinkingGraph.restype = ctypes.c_int
D3DCreateFunctionLinkingGraph.argtypes = [
wintypes.DWORD, # uFlags : DWORD
ctypes.c_void_p, # ppFunctionLinkingGraph : ID3D11FunctionLinkingGraph** out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('D3DCOMPILER_47.dll')
D3DCreateFunctionLinkingGraph = Fiddle::Function.new(
lib['D3DCreateFunctionLinkingGraph'],
[
-Fiddle::TYPE_INT, # uFlags : DWORD
Fiddle::TYPE_VOIDP, # ppFunctionLinkingGraph : ID3D11FunctionLinkingGraph** out
],
Fiddle::TYPE_INT)#[link(name = "d3dcompiler_47")]
extern "system" {
fn D3DCreateFunctionLinkingGraph(
uFlags: u32, // DWORD
ppFunctionLinkingGraph: *mut *mut core::ffi::c_void // ID3D11FunctionLinkingGraph** out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("D3DCOMPILER_47.dll")]
public static extern int D3DCreateFunctionLinkingGraph(uint uFlags, IntPtr ppFunctionLinkingGraph);
"@
$api = Add-Type -MemberDefinition $sig -Name 'D3DCOMPILER_47_D3DCreateFunctionLinkingGraph' -Namespace Win32 -PassThru
# $api::D3DCreateFunctionLinkingGraph(uFlags, ppFunctionLinkingGraph)#uselib "D3DCOMPILER_47.dll"
#func global D3DCreateFunctionLinkingGraph "D3DCreateFunctionLinkingGraph" sptr, sptr
; D3DCreateFunctionLinkingGraph uFlags, ppFunctionLinkingGraph ; 戻り値は stat
; uFlags : DWORD -> "sptr"
; ppFunctionLinkingGraph : ID3D11FunctionLinkingGraph** out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "D3DCOMPILER_47.dll"
#cfunc global D3DCreateFunctionLinkingGraph "D3DCreateFunctionLinkingGraph" int, sptr
; res = D3DCreateFunctionLinkingGraph(uFlags, ppFunctionLinkingGraph)
; uFlags : DWORD -> "int"
; ppFunctionLinkingGraph : ID3D11FunctionLinkingGraph** out -> "sptr"; HRESULT D3DCreateFunctionLinkingGraph(DWORD uFlags, ID3D11FunctionLinkingGraph** ppFunctionLinkingGraph)
#uselib "D3DCOMPILER_47.dll"
#cfunc global D3DCreateFunctionLinkingGraph "D3DCreateFunctionLinkingGraph" int, intptr
; res = D3DCreateFunctionLinkingGraph(uFlags, ppFunctionLinkingGraph)
; uFlags : DWORD -> "int"
; ppFunctionLinkingGraph : ID3D11FunctionLinkingGraph** out -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
d3dcompiler_47 = windows.NewLazySystemDLL("D3DCOMPILER_47.dll")
procD3DCreateFunctionLinkingGraph = d3dcompiler_47.NewProc("D3DCreateFunctionLinkingGraph")
)
// uFlags (DWORD), ppFunctionLinkingGraph (ID3D11FunctionLinkingGraph** out)
r1, _, err := procD3DCreateFunctionLinkingGraph.Call(
uintptr(uFlags),
uintptr(ppFunctionLinkingGraph),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction D3DCreateFunctionLinkingGraph(
uFlags: DWORD; // DWORD
ppFunctionLinkingGraph: Pointer // ID3D11FunctionLinkingGraph** out
): Integer; stdcall;
external 'D3DCOMPILER_47.dll' name 'D3DCreateFunctionLinkingGraph';result := DllCall("D3DCOMPILER_47\D3DCreateFunctionLinkingGraph"
, "UInt", uFlags ; DWORD
, "Ptr", ppFunctionLinkingGraph ; ID3D11FunctionLinkingGraph** out
, "Int") ; return: HRESULT●D3DCreateFunctionLinkingGraph(uFlags, ppFunctionLinkingGraph) = DLL("D3DCOMPILER_47.dll", "int D3DCreateFunctionLinkingGraph(dword, void*)")
# 呼び出し: D3DCreateFunctionLinkingGraph(uFlags, ppFunctionLinkingGraph)
# uFlags : DWORD -> "dword"
# ppFunctionLinkingGraph : ID3D11FunctionLinkingGraph** out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。