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