ホーム › System.Ole › OleIsRunning
OleIsRunning
関数OLEオブジェクトが実行状態にあるか判定する。
シグネチャ
// OLE32.dll
#include <windows.h>
BOOL OleIsRunning(
IOleObject* pObject
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| pObject | IOleObject* | in |
戻り値の型: BOOL
各言語での呼び出し定義
// OLE32.dll
#include <windows.h>
BOOL OleIsRunning(
IOleObject* pObject
);[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("OLE32.dll", ExactSpelling = true)]
static extern bool OleIsRunning(
IntPtr pObject // IOleObject*
);<DllImport("OLE32.dll", ExactSpelling:=True)>
Public Shared Function OleIsRunning(
pObject As IntPtr ' IOleObject*
) As Boolean
End Function' pObject : IOleObject*
Declare PtrSafe Function OleIsRunning Lib "ole32" ( _
ByVal pObject As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
OleIsRunning = ctypes.windll.ole32.OleIsRunning
OleIsRunning.restype = wintypes.BOOL
OleIsRunning.argtypes = [
ctypes.c_void_p, # pObject : IOleObject*
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('OLE32.dll')
OleIsRunning = Fiddle::Function.new(
lib['OleIsRunning'],
[
Fiddle::TYPE_VOIDP, # pObject : IOleObject*
],
Fiddle::TYPE_INT)#[link(name = "ole32")]
extern "system" {
fn OleIsRunning(
pObject: *mut core::ffi::c_void // IOleObject*
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("OLE32.dll")]
public static extern bool OleIsRunning(IntPtr pObject);
"@
$api = Add-Type -MemberDefinition $sig -Name 'OLE32_OleIsRunning' -Namespace Win32 -PassThru
# $api::OleIsRunning(pObject)#uselib "OLE32.dll"
#func global OleIsRunning "OleIsRunning" sptr
; OleIsRunning pObject ; 戻り値は stat
; pObject : IOleObject* -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "OLE32.dll"
#cfunc global OleIsRunning "OleIsRunning" sptr
; res = OleIsRunning(pObject)
; pObject : IOleObject* -> "sptr"; BOOL OleIsRunning(IOleObject* pObject)
#uselib "OLE32.dll"
#cfunc global OleIsRunning "OleIsRunning" intptr
; res = OleIsRunning(pObject)
; pObject : IOleObject* -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
ole32 = windows.NewLazySystemDLL("OLE32.dll")
procOleIsRunning = ole32.NewProc("OleIsRunning")
)
// pObject (IOleObject*)
r1, _, err := procOleIsRunning.Call(
uintptr(pObject),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLfunction OleIsRunning(
pObject: Pointer // IOleObject*
): BOOL; stdcall;
external 'OLE32.dll' name 'OleIsRunning';result := DllCall("OLE32\OleIsRunning"
, "Ptr", pObject ; IOleObject*
, "Int") ; return: BOOL●OleIsRunning(pObject) = DLL("OLE32.dll", "bool OleIsRunning(void*)")
# 呼び出し: OleIsRunning(pObject)
# pObject : IOleObject* -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。