ホーム › UI.Accessibility › GetOleaccVersionInfo
GetOleaccVersionInfo
関数OLEACC(MSAA)ライブラリのバージョン情報を取得する。
シグネチャ
// OLEACC.dll
#include <windows.h>
void GetOleaccVersionInfo(
DWORD* pVer,
DWORD* pBuild
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| pVer | DWORD* | out |
| pBuild | DWORD* | out |
戻り値の型: void
各言語での呼び出し定義
// OLEACC.dll
#include <windows.h>
void GetOleaccVersionInfo(
DWORD* pVer,
DWORD* pBuild
);[DllImport("OLEACC.dll", ExactSpelling = true)]
static extern void GetOleaccVersionInfo(
out uint pVer, // DWORD* out
out uint pBuild // DWORD* out
);<DllImport("OLEACC.dll", ExactSpelling:=True)>
Public Shared Sub GetOleaccVersionInfo(
<Out> ByRef pVer As UInteger, ' DWORD* out
<Out> ByRef pBuild As UInteger ' DWORD* out
)
End Sub' pVer : DWORD* out
' pBuild : DWORD* out
Declare PtrSafe Sub GetOleaccVersionInfo Lib "oleacc" ( _
ByRef pVer As Long, _
ByRef pBuild As Long)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
GetOleaccVersionInfo = ctypes.windll.oleacc.GetOleaccVersionInfo
GetOleaccVersionInfo.restype = None
GetOleaccVersionInfo.argtypes = [
ctypes.POINTER(wintypes.DWORD), # pVer : DWORD* out
ctypes.POINTER(wintypes.DWORD), # pBuild : DWORD* out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('OLEACC.dll')
GetOleaccVersionInfo = Fiddle::Function.new(
lib['GetOleaccVersionInfo'],
[
Fiddle::TYPE_VOIDP, # pVer : DWORD* out
Fiddle::TYPE_VOIDP, # pBuild : DWORD* out
],
Fiddle::TYPE_VOID)#[link(name = "oleacc")]
extern "system" {
fn GetOleaccVersionInfo(
pVer: *mut u32, // DWORD* out
pBuild: *mut u32 // DWORD* out
);
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("OLEACC.dll")]
public static extern void GetOleaccVersionInfo(out uint pVer, out uint pBuild);
"@
$api = Add-Type -MemberDefinition $sig -Name 'OLEACC_GetOleaccVersionInfo' -Namespace Win32 -PassThru
# $api::GetOleaccVersionInfo(pVer, pBuild)#uselib "OLEACC.dll"
#func global GetOleaccVersionInfo "GetOleaccVersionInfo" sptr, sptr
; GetOleaccVersionInfo varptr(pVer), varptr(pBuild)
; pVer : DWORD* out -> "sptr"
; pBuild : DWORD* out -> "sptr"出力引数:
#uselib "OLEACC.dll" #func global GetOleaccVersionInfo "GetOleaccVersionInfo" var, var ; GetOleaccVersionInfo pVer, pBuild ; pVer : DWORD* out -> "var" ; pBuild : DWORD* out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "OLEACC.dll" #func global GetOleaccVersionInfo "GetOleaccVersionInfo" sptr, sptr ; GetOleaccVersionInfo varptr(pVer), varptr(pBuild) ; pVer : DWORD* out -> "sptr" ; pBuild : DWORD* out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; void GetOleaccVersionInfo(DWORD* pVer, DWORD* pBuild) #uselib "OLEACC.dll" #func global GetOleaccVersionInfo "GetOleaccVersionInfo" var, var ; GetOleaccVersionInfo pVer, pBuild ; pVer : DWORD* out -> "var" ; pBuild : DWORD* out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; void GetOleaccVersionInfo(DWORD* pVer, DWORD* pBuild) #uselib "OLEACC.dll" #func global GetOleaccVersionInfo "GetOleaccVersionInfo" intptr, intptr ; GetOleaccVersionInfo varptr(pVer), varptr(pBuild) ; pVer : DWORD* out -> "intptr" ; pBuild : DWORD* out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
oleacc = windows.NewLazySystemDLL("OLEACC.dll")
procGetOleaccVersionInfo = oleacc.NewProc("GetOleaccVersionInfo")
)
// pVer (DWORD* out), pBuild (DWORD* out)
r1, _, err := procGetOleaccVersionInfo.Call(
uintptr(pVer),
uintptr(pBuild),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure GetOleaccVersionInfo(
pVer: Pointer; // DWORD* out
pBuild: Pointer // DWORD* out
); stdcall;
external 'OLEACC.dll' name 'GetOleaccVersionInfo';result := DllCall("OLEACC\GetOleaccVersionInfo"
, "Ptr", pVer ; DWORD* out
, "Ptr", pBuild ; DWORD* out
, "Int") ; return: void●GetOleaccVersionInfo(pVer, pBuild) = DLL("OLEACC.dll", "int GetOleaccVersionInfo(void*, void*)")
# 呼び出し: GetOleaccVersionInfo(pVer, pBuild)
# pVer : DWORD* out -> "void*"
# pBuild : DWORD* out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。