Win32 API 日本語リファレンス
ホームGraphics.Direct3D10 › D3D10StateBlockMaskDisableCapture

D3D10StateBlockMaskDisableCapture

関数
ステートブロックマスクの指定範囲のキャプチャを無効にする。
DLLd3d10.dll呼出規約winapi

シグネチャ

// d3d10.dll
#include <windows.h>

HRESULT D3D10StateBlockMaskDisableCapture(
    D3D10_STATE_BLOCK_MASK* pMask,
    D3D10_DEVICE_STATE_TYPES StateType,
    DWORD RangeStart,
    DWORD RangeLength
);

パラメーター

名前方向
pMaskD3D10_STATE_BLOCK_MASK*inout
StateTypeD3D10_DEVICE_STATE_TYPESin
RangeStartDWORDin
RangeLengthDWORDin

戻り値の型: HRESULT

各言語での呼び出し定義

// d3d10.dll
#include <windows.h>

HRESULT D3D10StateBlockMaskDisableCapture(
    D3D10_STATE_BLOCK_MASK* pMask,
    D3D10_DEVICE_STATE_TYPES StateType,
    DWORD RangeStart,
    DWORD RangeLength
);
[DllImport("d3d10.dll", ExactSpelling = true)]
static extern int D3D10StateBlockMaskDisableCapture(
    IntPtr pMask,   // D3D10_STATE_BLOCK_MASK* in/out
    int StateType,   // D3D10_DEVICE_STATE_TYPES
    uint RangeStart,   // DWORD
    uint RangeLength   // DWORD
);
<DllImport("d3d10.dll", ExactSpelling:=True)>
Public Shared Function D3D10StateBlockMaskDisableCapture(
    pMask As IntPtr,   ' D3D10_STATE_BLOCK_MASK* in/out
    StateType As Integer,   ' D3D10_DEVICE_STATE_TYPES
    RangeStart As UInteger,   ' DWORD
    RangeLength As UInteger   ' DWORD
) As Integer
End Function
' pMask : D3D10_STATE_BLOCK_MASK* in/out
' StateType : D3D10_DEVICE_STATE_TYPES
' RangeStart : DWORD
' RangeLength : DWORD
Declare PtrSafe Function D3D10StateBlockMaskDisableCapture Lib "d3d10" ( _
    ByVal pMask As LongPtr, _
    ByVal StateType As Long, _
    ByVal RangeStart As Long, _
    ByVal RangeLength As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

D3D10StateBlockMaskDisableCapture = ctypes.windll.d3d10.D3D10StateBlockMaskDisableCapture
D3D10StateBlockMaskDisableCapture.restype = ctypes.c_int
D3D10StateBlockMaskDisableCapture.argtypes = [
    ctypes.c_void_p,  # pMask : D3D10_STATE_BLOCK_MASK* in/out
    ctypes.c_int,  # StateType : D3D10_DEVICE_STATE_TYPES
    wintypes.DWORD,  # RangeStart : DWORD
    wintypes.DWORD,  # RangeLength : DWORD
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('d3d10.dll')
D3D10StateBlockMaskDisableCapture = Fiddle::Function.new(
  lib['D3D10StateBlockMaskDisableCapture'],
  [
    Fiddle::TYPE_VOIDP,  # pMask : D3D10_STATE_BLOCK_MASK* in/out
    Fiddle::TYPE_INT,  # StateType : D3D10_DEVICE_STATE_TYPES
    -Fiddle::TYPE_INT,  # RangeStart : DWORD
    -Fiddle::TYPE_INT,  # RangeLength : DWORD
  ],
  Fiddle::TYPE_INT)
#[link(name = "d3d10")]
extern "system" {
    fn D3D10StateBlockMaskDisableCapture(
        pMask: *mut D3D10_STATE_BLOCK_MASK,  // D3D10_STATE_BLOCK_MASK* in/out
        StateType: i32,  // D3D10_DEVICE_STATE_TYPES
        RangeStart: u32,  // DWORD
        RangeLength: u32  // DWORD
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("d3d10.dll")]
public static extern int D3D10StateBlockMaskDisableCapture(IntPtr pMask, int StateType, uint RangeStart, uint RangeLength);
"@
$api = Add-Type -MemberDefinition $sig -Name 'd3d10_D3D10StateBlockMaskDisableCapture' -Namespace Win32 -PassThru
# $api::D3D10StateBlockMaskDisableCapture(pMask, StateType, RangeStart, RangeLength)
#uselib "d3d10.dll"
#func global D3D10StateBlockMaskDisableCapture "D3D10StateBlockMaskDisableCapture" sptr, sptr, sptr, sptr
; D3D10StateBlockMaskDisableCapture varptr(pMask), StateType, RangeStart, RangeLength   ; 戻り値は stat
; pMask : D3D10_STATE_BLOCK_MASK* in/out -> "sptr"
; StateType : D3D10_DEVICE_STATE_TYPES -> "sptr"
; RangeStart : DWORD -> "sptr"
; RangeLength : DWORD -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "d3d10.dll"
#cfunc global D3D10StateBlockMaskDisableCapture "D3D10StateBlockMaskDisableCapture" var, int, int, int
; res = D3D10StateBlockMaskDisableCapture(pMask, StateType, RangeStart, RangeLength)
; pMask : D3D10_STATE_BLOCK_MASK* in/out -> "var"
; StateType : D3D10_DEVICE_STATE_TYPES -> "int"
; RangeStart : DWORD -> "int"
; RangeLength : DWORD -> "int"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; HRESULT D3D10StateBlockMaskDisableCapture(D3D10_STATE_BLOCK_MASK* pMask, D3D10_DEVICE_STATE_TYPES StateType, DWORD RangeStart, DWORD RangeLength)
#uselib "d3d10.dll"
#cfunc global D3D10StateBlockMaskDisableCapture "D3D10StateBlockMaskDisableCapture" var, int, int, int
; res = D3D10StateBlockMaskDisableCapture(pMask, StateType, RangeStart, RangeLength)
; pMask : D3D10_STATE_BLOCK_MASK* in/out -> "var"
; StateType : D3D10_DEVICE_STATE_TYPES -> "int"
; RangeStart : DWORD -> "int"
; RangeLength : DWORD -> "int"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	d3d10 = windows.NewLazySystemDLL("d3d10.dll")
	procD3D10StateBlockMaskDisableCapture = d3d10.NewProc("D3D10StateBlockMaskDisableCapture")
)

// pMask (D3D10_STATE_BLOCK_MASK* in/out), StateType (D3D10_DEVICE_STATE_TYPES), RangeStart (DWORD), RangeLength (DWORD)
r1, _, err := procD3D10StateBlockMaskDisableCapture.Call(
	uintptr(pMask),
	uintptr(StateType),
	uintptr(RangeStart),
	uintptr(RangeLength),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // HRESULT
function D3D10StateBlockMaskDisableCapture(
  pMask: Pointer;   // D3D10_STATE_BLOCK_MASK* in/out
  StateType: Integer;   // D3D10_DEVICE_STATE_TYPES
  RangeStart: DWORD;   // DWORD
  RangeLength: DWORD   // DWORD
): Integer; stdcall;
  external 'd3d10.dll' name 'D3D10StateBlockMaskDisableCapture';
result := DllCall("d3d10\D3D10StateBlockMaskDisableCapture"
    , "Ptr", pMask   ; D3D10_STATE_BLOCK_MASK* in/out
    , "Int", StateType   ; D3D10_DEVICE_STATE_TYPES
    , "UInt", RangeStart   ; DWORD
    , "UInt", RangeLength   ; DWORD
    , "Int")   ; return: HRESULT
●D3D10StateBlockMaskDisableCapture(pMask, StateType, RangeStart, RangeLength) = DLL("d3d10.dll", "int D3D10StateBlockMaskDisableCapture(void*, int, dword, dword)")
# 呼び出し: D3D10StateBlockMaskDisableCapture(pMask, StateType, RangeStart, RangeLength)
# pMask : D3D10_STATE_BLOCK_MASK* in/out -> "void*"
# StateType : D3D10_DEVICE_STATE_TYPES -> "int"
# RangeStart : DWORD -> "dword"
# RangeLength : DWORD -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。