ホーム › System.Com › CoBuildVersion
CoBuildVersion
関数COMライブラリのビルドバージョン番号を取得する。
シグネチャ
// ole32.dll
#include <windows.h>
DWORD CoBuildVersion(void);パラメーターなし。戻り値: DWORD
各言語での呼び出し定義
// ole32.dll
#include <windows.h>
DWORD CoBuildVersion(void);[DllImport("ole32.dll", ExactSpelling = true)]
static extern uint CoBuildVersion();<DllImport("ole32.dll", ExactSpelling:=True)>
Public Shared Function CoBuildVersion() As UInteger
End FunctionDeclare PtrSafe Function CoBuildVersion Lib "ole32" () As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
CoBuildVersion = ctypes.windll.ole32.CoBuildVersion
CoBuildVersion.restype = wintypes.DWORD
CoBuildVersion.argtypes = []require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('ole32.dll')
CoBuildVersion = Fiddle::Function.new(
lib['CoBuildVersion'],
[],
-Fiddle::TYPE_INT)#[link(name = "ole32")]
extern "system" {
fn CoBuildVersion() -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("ole32.dll")]
public static extern uint CoBuildVersion();
"@
$api = Add-Type -MemberDefinition $sig -Name 'ole32_CoBuildVersion' -Namespace Win32 -PassThru
# $api::CoBuildVersion()#uselib "ole32.dll"
#func global CoBuildVersion "CoBuildVersion"
; CoBuildVersion ; 戻り値は stat
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "ole32.dll"
#cfunc global CoBuildVersion "CoBuildVersion"
; res = CoBuildVersion(); DWORD CoBuildVersion()
#uselib "ole32.dll"
#cfunc global CoBuildVersion "CoBuildVersion"
; res = CoBuildVersion()import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
ole32 = windows.NewLazySystemDLL("ole32.dll")
procCoBuildVersion = ole32.NewProc("CoBuildVersion")
)
r1, _, err := procCoBuildVersion.Call()
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction CoBuildVersion: DWORD; stdcall;
external 'ole32.dll' name 'CoBuildVersion';result := DllCall("ole32\CoBuildVersion", "UInt")●CoBuildVersion() = DLL("ole32.dll", "dword CoBuildVersion()")
# 呼び出し: CoBuildVersion()
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。