ホーム › System.Ole › OleUIUpdateLinksW
OleUIUpdateLinksW
関数コンテナ内のすべてのリンクを更新し進捗を表示する。
シグネチャ
// oledlg.dll (Unicode / -W)
#include <windows.h>
BOOL OleUIUpdateLinksW(
IOleUILinkContainerW* lpOleUILinkCntr,
HWND hwndParent,
LPWSTR lpszTitle,
INT cLinks
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| lpOleUILinkCntr | IOleUILinkContainerW* | in |
| hwndParent | HWND | in |
| lpszTitle | LPWSTR | in |
| cLinks | INT | in |
戻り値の型: BOOL
各言語での呼び出し定義
// oledlg.dll (Unicode / -W)
#include <windows.h>
BOOL OleUIUpdateLinksW(
IOleUILinkContainerW* lpOleUILinkCntr,
HWND hwndParent,
LPWSTR lpszTitle,
INT cLinks
);[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("oledlg.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
static extern bool OleUIUpdateLinksW(
IntPtr lpOleUILinkCntr, // IOleUILinkContainerW*
IntPtr hwndParent, // HWND
[MarshalAs(UnmanagedType.LPWStr)] string lpszTitle, // LPWSTR
int cLinks // INT
);<DllImport("oledlg.dll", CharSet:=CharSet.Unicode, ExactSpelling:=True)>
Public Shared Function OleUIUpdateLinksW(
lpOleUILinkCntr As IntPtr, ' IOleUILinkContainerW*
hwndParent As IntPtr, ' HWND
<MarshalAs(UnmanagedType.LPWStr)> lpszTitle As String, ' LPWSTR
cLinks As Integer ' INT
) As Boolean
End Function' lpOleUILinkCntr : IOleUILinkContainerW*
' hwndParent : HWND
' lpszTitle : LPWSTR
' cLinks : INT
Declare PtrSafe Function OleUIUpdateLinksW Lib "oledlg" ( _
ByVal lpOleUILinkCntr As LongPtr, _
ByVal hwndParent As LongPtr, _
ByVal lpszTitle As LongPtr, _
ByVal cLinks As Long) As Long
' Unicode(W): 文字列は ByVal As LongPtr とし StrPtr(unicodeStr) を渡す
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
OleUIUpdateLinksW = ctypes.windll.oledlg.OleUIUpdateLinksW
OleUIUpdateLinksW.restype = wintypes.BOOL
OleUIUpdateLinksW.argtypes = [
ctypes.c_void_p, # lpOleUILinkCntr : IOleUILinkContainerW*
wintypes.HANDLE, # hwndParent : HWND
wintypes.LPCWSTR, # lpszTitle : LPWSTR
ctypes.c_int, # cLinks : INT
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('oledlg.dll')
OleUIUpdateLinksW = Fiddle::Function.new(
lib['OleUIUpdateLinksW'],
[
Fiddle::TYPE_VOIDP, # lpOleUILinkCntr : IOleUILinkContainerW*
Fiddle::TYPE_VOIDP, # hwndParent : HWND
Fiddle::TYPE_VOIDP, # lpszTitle : LPWSTR
Fiddle::TYPE_INT, # cLinks : INT
],
Fiddle::TYPE_INT)
# Wide strings: pass str.encode("UTF-16LE") + "\x00\x00"#[link(name = "oledlg")]
extern "system" {
fn OleUIUpdateLinksW(
lpOleUILinkCntr: *mut core::ffi::c_void, // IOleUILinkContainerW*
hwndParent: *mut core::ffi::c_void, // HWND
lpszTitle: *mut u16, // LPWSTR
cLinks: i32 // INT
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("oledlg.dll", CharSet = CharSet.Unicode)]
public static extern bool OleUIUpdateLinksW(IntPtr lpOleUILinkCntr, IntPtr hwndParent, [MarshalAs(UnmanagedType.LPWStr)] string lpszTitle, int cLinks);
"@
$api = Add-Type -MemberDefinition $sig -Name 'oledlg_OleUIUpdateLinksW' -Namespace Win32 -PassThru
# $api::OleUIUpdateLinksW(lpOleUILinkCntr, hwndParent, lpszTitle, cLinks)#uselib "oledlg.dll"
#func global OleUIUpdateLinksW "OleUIUpdateLinksW" wptr, wptr, wptr, wptr
; OleUIUpdateLinksW lpOleUILinkCntr, hwndParent, lpszTitle, cLinks ; 戻り値は stat
; lpOleUILinkCntr : IOleUILinkContainerW* -> "wptr"
; hwndParent : HWND -> "wptr"
; lpszTitle : LPWSTR -> "wptr"
; cLinks : INT -> "wptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "oledlg.dll"
#cfunc global OleUIUpdateLinksW "OleUIUpdateLinksW" sptr, sptr, wstr, int
; res = OleUIUpdateLinksW(lpOleUILinkCntr, hwndParent, lpszTitle, cLinks)
; lpOleUILinkCntr : IOleUILinkContainerW* -> "sptr"
; hwndParent : HWND -> "sptr"
; lpszTitle : LPWSTR -> "wstr"
; cLinks : INT -> "int"; BOOL OleUIUpdateLinksW(IOleUILinkContainerW* lpOleUILinkCntr, HWND hwndParent, LPWSTR lpszTitle, INT cLinks)
#uselib "oledlg.dll"
#cfunc global OleUIUpdateLinksW "OleUIUpdateLinksW" intptr, intptr, wstr, int
; res = OleUIUpdateLinksW(lpOleUILinkCntr, hwndParent, lpszTitle, cLinks)
; lpOleUILinkCntr : IOleUILinkContainerW* -> "intptr"
; hwndParent : HWND -> "intptr"
; lpszTitle : LPWSTR -> "wstr"
; cLinks : INT -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
oledlg = windows.NewLazySystemDLL("oledlg.dll")
procOleUIUpdateLinksW = oledlg.NewProc("OleUIUpdateLinksW")
)
// lpOleUILinkCntr (IOleUILinkContainerW*), hwndParent (HWND), lpszTitle (LPWSTR), cLinks (INT)
r1, _, err := procOleUIUpdateLinksW.Call(
uintptr(lpOleUILinkCntr),
uintptr(hwndParent),
uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(lpszTitle))),
uintptr(cLinks),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLfunction OleUIUpdateLinksW(
lpOleUILinkCntr: Pointer; // IOleUILinkContainerW*
hwndParent: THandle; // HWND
lpszTitle: PWideChar; // LPWSTR
cLinks: Integer // INT
): BOOL; stdcall;
external 'oledlg.dll' name 'OleUIUpdateLinksW';result := DllCall("oledlg\OleUIUpdateLinksW"
, "Ptr", lpOleUILinkCntr ; IOleUILinkContainerW*
, "Ptr", hwndParent ; HWND
, "WStr", lpszTitle ; LPWSTR
, "Int", cLinks ; INT
, "Int") ; return: BOOL●OleUIUpdateLinksW(lpOleUILinkCntr, hwndParent, lpszTitle, cLinks) = DLL("oledlg.dll", "bool OleUIUpdateLinksW(void*, void*, char*, int)")
# 呼び出し: OleUIUpdateLinksW(lpOleUILinkCntr, hwndParent, lpszTitle, cLinks)
# lpOleUILinkCntr : IOleUILinkContainerW* -> "void*"
# hwndParent : HWND -> "void*"
# lpszTitle : LPWSTR -> "char*"
# cLinks : INT -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※-W(Unicode)関数。なでしこ1はANSIのため -A 版の利用を推奨。