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