Win32 API 日本語リファレンス
ホームSystem.Com.Urlmon › IEInstallScope

IEInstallScope

関数
Internet Explorerのコンポーネントインストール範囲を取得する。
DLLurlmon.dll呼出規約winapi

シグネチャ

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

HRESULT IEInstallScope(
    DWORD* pdwScope
);

パラメーター

名前方向
pdwScopeDWORD*out

戻り値の型: HRESULT

各言語での呼び出し定義

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

HRESULT IEInstallScope(
    DWORD* pdwScope
);
[DllImport("urlmon.dll", ExactSpelling = true)]
static extern int IEInstallScope(
    out uint pdwScope   // DWORD* out
);
<DllImport("urlmon.dll", ExactSpelling:=True)>
Public Shared Function IEInstallScope(
    <Out> ByRef pdwScope As UInteger   ' DWORD* out
) As Integer
End Function
' pdwScope : DWORD* out
Declare PtrSafe Function IEInstallScope Lib "urlmon" ( _
    ByRef pdwScope As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

IEInstallScope = ctypes.windll.urlmon.IEInstallScope
IEInstallScope.restype = ctypes.c_int
IEInstallScope.argtypes = [
    ctypes.POINTER(wintypes.DWORD),  # pdwScope : DWORD* out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('urlmon.dll')
IEInstallScope = Fiddle::Function.new(
  lib['IEInstallScope'],
  [
    Fiddle::TYPE_VOIDP,  # pdwScope : DWORD* out
  ],
  Fiddle::TYPE_INT)
#[link(name = "urlmon")]
extern "system" {
    fn IEInstallScope(
        pdwScope: *mut u32  // DWORD* out
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("urlmon.dll")]
public static extern int IEInstallScope(out uint pdwScope);
"@
$api = Add-Type -MemberDefinition $sig -Name 'urlmon_IEInstallScope' -Namespace Win32 -PassThru
# $api::IEInstallScope(pdwScope)
#uselib "urlmon.dll"
#func global IEInstallScope "IEInstallScope" sptr
; IEInstallScope varptr(pdwScope)   ; 戻り値は stat
; pdwScope : DWORD* out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "urlmon.dll"
#cfunc global IEInstallScope "IEInstallScope" var
; res = IEInstallScope(pdwScope)
; pdwScope : DWORD* out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; HRESULT IEInstallScope(DWORD* pdwScope)
#uselib "urlmon.dll"
#cfunc global IEInstallScope "IEInstallScope" var
; res = IEInstallScope(pdwScope)
; pdwScope : DWORD* out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	urlmon = windows.NewLazySystemDLL("urlmon.dll")
	procIEInstallScope = urlmon.NewProc("IEInstallScope")
)

// pdwScope (DWORD* out)
r1, _, err := procIEInstallScope.Call(
	uintptr(pdwScope),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // HRESULT
function IEInstallScope(
  pdwScope: Pointer   // DWORD* out
): Integer; stdcall;
  external 'urlmon.dll' name 'IEInstallScope';
result := DllCall("urlmon\IEInstallScope"
    , "Ptr", pdwScope   ; DWORD* out
    , "Int")   ; return: HRESULT
●IEInstallScope(pdwScope) = DLL("urlmon.dll", "int IEInstallScope(void*)")
# 呼び出し: IEInstallScope(pdwScope)
# pdwScope : DWORD* out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。