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