ホーム › Graphics.Dwm › DwmAttachMilContent
DwmAttachMilContent
関数ウィンドウにMILコンテンツを関連付ける。
シグネチャ
// dwmapi.dll
#include <windows.h>
HRESULT DwmAttachMilContent(
HWND hwnd
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hwnd | HWND | in |
戻り値の型: HRESULT
各言語での呼び出し定義
// dwmapi.dll
#include <windows.h>
HRESULT DwmAttachMilContent(
HWND hwnd
);[DllImport("dwmapi.dll", ExactSpelling = true)]
static extern int DwmAttachMilContent(
IntPtr hwnd // HWND
);<DllImport("dwmapi.dll", ExactSpelling:=True)>
Public Shared Function DwmAttachMilContent(
hwnd As IntPtr ' HWND
) As Integer
End Function' hwnd : HWND
Declare PtrSafe Function DwmAttachMilContent Lib "dwmapi" ( _
ByVal hwnd As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
DwmAttachMilContent = ctypes.windll.dwmapi.DwmAttachMilContent
DwmAttachMilContent.restype = ctypes.c_int
DwmAttachMilContent.argtypes = [
wintypes.HANDLE, # hwnd : HWND
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('dwmapi.dll')
DwmAttachMilContent = Fiddle::Function.new(
lib['DwmAttachMilContent'],
[
Fiddle::TYPE_VOIDP, # hwnd : HWND
],
Fiddle::TYPE_INT)#[link(name = "dwmapi")]
extern "system" {
fn DwmAttachMilContent(
hwnd: *mut core::ffi::c_void // HWND
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("dwmapi.dll")]
public static extern int DwmAttachMilContent(IntPtr hwnd);
"@
$api = Add-Type -MemberDefinition $sig -Name 'dwmapi_DwmAttachMilContent' -Namespace Win32 -PassThru
# $api::DwmAttachMilContent(hwnd)#uselib "dwmapi.dll"
#func global DwmAttachMilContent "DwmAttachMilContent" sptr
; DwmAttachMilContent hwnd ; 戻り値は stat
; hwnd : HWND -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "dwmapi.dll"
#cfunc global DwmAttachMilContent "DwmAttachMilContent" sptr
; res = DwmAttachMilContent(hwnd)
; hwnd : HWND -> "sptr"; HRESULT DwmAttachMilContent(HWND hwnd)
#uselib "dwmapi.dll"
#cfunc global DwmAttachMilContent "DwmAttachMilContent" intptr
; res = DwmAttachMilContent(hwnd)
; hwnd : HWND -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
dwmapi = windows.NewLazySystemDLL("dwmapi.dll")
procDwmAttachMilContent = dwmapi.NewProc("DwmAttachMilContent")
)
// hwnd (HWND)
r1, _, err := procDwmAttachMilContent.Call(
uintptr(hwnd),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction DwmAttachMilContent(
hwnd: THandle // HWND
): Integer; stdcall;
external 'dwmapi.dll' name 'DwmAttachMilContent';result := DllCall("dwmapi\DwmAttachMilContent"
, "Ptr", hwnd ; HWND
, "Int") ; return: HRESULT●DwmAttachMilContent(hwnd) = DLL("dwmapi.dll", "int DwmAttachMilContent(void*)")
# 呼び出し: DwmAttachMilContent(hwnd)
# hwnd : HWND -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。