ホーム › Devices.WebServicesOnDevices › WSDAttachLinkedMemory
WSDAttachLinkedMemory
関数連結メモリの子ブロックを指定した親に付け替える。
シグネチャ
// wsdapi.dll
#include <windows.h>
void WSDAttachLinkedMemory(
void* pParent,
void* pChild
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| pParent | void* | inout |
| pChild | void* | inout |
戻り値の型: void
各言語での呼び出し定義
// wsdapi.dll
#include <windows.h>
void WSDAttachLinkedMemory(
void* pParent,
void* pChild
);[DllImport("wsdapi.dll", ExactSpelling = true)]
static extern void WSDAttachLinkedMemory(
IntPtr pParent, // void* in/out
IntPtr pChild // void* in/out
);<DllImport("wsdapi.dll", ExactSpelling:=True)>
Public Shared Sub WSDAttachLinkedMemory(
pParent As IntPtr, ' void* in/out
pChild As IntPtr ' void* in/out
)
End Sub' pParent : void* in/out
' pChild : void* in/out
Declare PtrSafe Sub WSDAttachLinkedMemory Lib "wsdapi" ( _
ByVal pParent As LongPtr, _
ByVal pChild As LongPtr)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
WSDAttachLinkedMemory = ctypes.windll.wsdapi.WSDAttachLinkedMemory
WSDAttachLinkedMemory.restype = None
WSDAttachLinkedMemory.argtypes = [
ctypes.POINTER(None), # pParent : void* in/out
ctypes.POINTER(None), # pChild : void* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('wsdapi.dll')
WSDAttachLinkedMemory = Fiddle::Function.new(
lib['WSDAttachLinkedMemory'],
[
Fiddle::TYPE_VOIDP, # pParent : void* in/out
Fiddle::TYPE_VOIDP, # pChild : void* in/out
],
Fiddle::TYPE_VOID)#[link(name = "wsdapi")]
extern "system" {
fn WSDAttachLinkedMemory(
pParent: *mut (), // void* in/out
pChild: *mut () // void* in/out
);
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("wsdapi.dll")]
public static extern void WSDAttachLinkedMemory(IntPtr pParent, IntPtr pChild);
"@
$api = Add-Type -MemberDefinition $sig -Name 'wsdapi_WSDAttachLinkedMemory' -Namespace Win32 -PassThru
# $api::WSDAttachLinkedMemory(pParent, pChild)#uselib "wsdapi.dll"
#func global WSDAttachLinkedMemory "WSDAttachLinkedMemory" sptr, sptr
; WSDAttachLinkedMemory pParent, pChild
; pParent : void* in/out -> "sptr"
; pChild : void* in/out -> "sptr"#uselib "wsdapi.dll"
#func global WSDAttachLinkedMemory "WSDAttachLinkedMemory" sptr, sptr
; WSDAttachLinkedMemory pParent, pChild
; pParent : void* in/out -> "sptr"
; pChild : void* in/out -> "sptr"; void WSDAttachLinkedMemory(void* pParent, void* pChild)
#uselib "wsdapi.dll"
#func global WSDAttachLinkedMemory "WSDAttachLinkedMemory" intptr, intptr
; WSDAttachLinkedMemory pParent, pChild
; pParent : void* in/out -> "intptr"
; pChild : void* in/out -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
wsdapi = windows.NewLazySystemDLL("wsdapi.dll")
procWSDAttachLinkedMemory = wsdapi.NewProc("WSDAttachLinkedMemory")
)
// pParent (void* in/out), pChild (void* in/out)
r1, _, err := procWSDAttachLinkedMemory.Call(
uintptr(pParent),
uintptr(pChild),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure WSDAttachLinkedMemory(
pParent: Pointer; // void* in/out
pChild: Pointer // void* in/out
); stdcall;
external 'wsdapi.dll' name 'WSDAttachLinkedMemory';result := DllCall("wsdapi\WSDAttachLinkedMemory"
, "Ptr", pParent ; void* in/out
, "Ptr", pChild ; void* in/out
, "Int") ; return: void●WSDAttachLinkedMemory(pParent, pChild) = DLL("wsdapi.dll", "int WSDAttachLinkedMemory(void*, void*)")
# 呼び出し: WSDAttachLinkedMemory(pParent, pChild)
# pParent : void* in/out -> "void*"
# pChild : void* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。