Win32 API 日本語リファレンス
ホームStorage.Packaging.Appx › GetPackageGraphRevisionId

GetPackageGraphRevisionId

関数
現在のパッケージグラフのリビジョンIDを取得する。
DLLapi-ms-win-appmodel-runtime-l1-1-6.dll呼出規約winapi

シグネチャ

// api-ms-win-appmodel-runtime-l1-1-6.dll
#include <windows.h>

DWORD GetPackageGraphRevisionId(void);

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

各言語での呼び出し定義

// api-ms-win-appmodel-runtime-l1-1-6.dll
#include <windows.h>

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

GetPackageGraphRevisionId = ctypes.windll.LoadLibrary("api-ms-win-appmodel-runtime-l1-1-6.dll").GetPackageGraphRevisionId
GetPackageGraphRevisionId.restype = wintypes.DWORD
GetPackageGraphRevisionId.argtypes = []
require 'fiddle'
require 'fiddle/import'

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

var (
	api_ms_win_appmodel_runtime_l1_1_6 = windows.NewLazySystemDLL("api-ms-win-appmodel-runtime-l1-1-6.dll")
	procGetPackageGraphRevisionId = api_ms_win_appmodel_runtime_l1_1_6.NewProc("GetPackageGraphRevisionId")
)

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