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