Win32 API 日本語リファレンス
ホームSystem.Ole › OaBuildVersion

OaBuildVersion

関数
OLEオートメーションのビルドバージョン番号を返す。
DLLOLEAUT32.dll呼出規約winapi

シグネチャ

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

DWORD OaBuildVersion(void);

パラメーターなし。戻り値: DWORD

各言語での呼び出し定義

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

DWORD OaBuildVersion(void);
[DllImport("OLEAUT32.dll", ExactSpelling = true)]
static extern uint OaBuildVersion();
<DllImport("OLEAUT32.dll", ExactSpelling:=True)>
Public Shared Function OaBuildVersion() As UInteger
End Function
Declare PtrSafe Function OaBuildVersion Lib "oleaut32" () As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

OaBuildVersion = ctypes.windll.oleaut32.OaBuildVersion
OaBuildVersion.restype = wintypes.DWORD
OaBuildVersion.argtypes = []
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('OLEAUT32.dll')
OaBuildVersion = Fiddle::Function.new(
  lib['OaBuildVersion'],
  [],
  -Fiddle::TYPE_INT)
#[link(name = "oleaut32")]
extern "system" {
    fn OaBuildVersion() -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("OLEAUT32.dll")]
public static extern uint OaBuildVersion();
"@
$api = Add-Type -MemberDefinition $sig -Name 'OLEAUT32_OaBuildVersion' -Namespace Win32 -PassThru
# $api::OaBuildVersion()
#uselib "OLEAUT32.dll"
#func global OaBuildVersion "OaBuildVersion"
; OaBuildVersion   ; 戻り値は stat
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "OLEAUT32.dll"
#cfunc global OaBuildVersion "OaBuildVersion"
; res = OaBuildVersion()
; DWORD OaBuildVersion()
#uselib "OLEAUT32.dll"
#cfunc global OaBuildVersion "OaBuildVersion"
; res = OaBuildVersion()
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	oleaut32 = windows.NewLazySystemDLL("OLEAUT32.dll")
	procOaBuildVersion = oleaut32.NewProc("OaBuildVersion")
)

r1, _, err := procOaBuildVersion.Call()
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // DWORD
function OaBuildVersion: DWORD; stdcall;
  external 'OLEAUT32.dll' name 'OaBuildVersion';
result := DllCall("OLEAUT32\OaBuildVersion", "UInt")
●OaBuildVersion() = DLL("OLEAUT32.dll", "dword OaBuildVersion()")
# 呼び出し: OaBuildVersion()
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。