ホーム › NetworkManagement.Rras › MprInfoRemoveAll
MprInfoRemoveAll
関数情報ヘッダーから全ての情報ブロックを削除する。
シグネチャ
// MPRAPI.dll
#include <windows.h>
DWORD MprInfoRemoveAll(
void* lpHeader,
void** lplpNewHeader
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| lpHeader | void* | in |
| lplpNewHeader | void** | out |
戻り値の型: DWORD
各言語での呼び出し定義
// MPRAPI.dll
#include <windows.h>
DWORD MprInfoRemoveAll(
void* lpHeader,
void** lplpNewHeader
);[DllImport("MPRAPI.dll", ExactSpelling = true)]
static extern uint MprInfoRemoveAll(
IntPtr lpHeader, // void*
IntPtr lplpNewHeader // void** out
);<DllImport("MPRAPI.dll", ExactSpelling:=True)>
Public Shared Function MprInfoRemoveAll(
lpHeader As IntPtr, ' void*
lplpNewHeader As IntPtr ' void** out
) As UInteger
End Function' lpHeader : void*
' lplpNewHeader : void** out
Declare PtrSafe Function MprInfoRemoveAll Lib "mprapi" ( _
ByVal lpHeader As LongPtr, _
ByVal lplpNewHeader As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
MprInfoRemoveAll = ctypes.windll.mprapi.MprInfoRemoveAll
MprInfoRemoveAll.restype = wintypes.DWORD
MprInfoRemoveAll.argtypes = [
ctypes.POINTER(None), # lpHeader : void*
ctypes.c_void_p, # lplpNewHeader : void** out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('MPRAPI.dll')
MprInfoRemoveAll = Fiddle::Function.new(
lib['MprInfoRemoveAll'],
[
Fiddle::TYPE_VOIDP, # lpHeader : void*
Fiddle::TYPE_VOIDP, # lplpNewHeader : void** out
],
-Fiddle::TYPE_INT)#[link(name = "mprapi")]
extern "system" {
fn MprInfoRemoveAll(
lpHeader: *mut (), // void*
lplpNewHeader: *mut *mut () // void** out
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("MPRAPI.dll")]
public static extern uint MprInfoRemoveAll(IntPtr lpHeader, IntPtr lplpNewHeader);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MPRAPI_MprInfoRemoveAll' -Namespace Win32 -PassThru
# $api::MprInfoRemoveAll(lpHeader, lplpNewHeader)#uselib "MPRAPI.dll"
#func global MprInfoRemoveAll "MprInfoRemoveAll" sptr, sptr
; MprInfoRemoveAll lpHeader, lplpNewHeader ; 戻り値は stat
; lpHeader : void* -> "sptr"
; lplpNewHeader : void** out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "MPRAPI.dll"
#cfunc global MprInfoRemoveAll "MprInfoRemoveAll" sptr, sptr
; res = MprInfoRemoveAll(lpHeader, lplpNewHeader)
; lpHeader : void* -> "sptr"
; lplpNewHeader : void** out -> "sptr"; DWORD MprInfoRemoveAll(void* lpHeader, void** lplpNewHeader)
#uselib "MPRAPI.dll"
#cfunc global MprInfoRemoveAll "MprInfoRemoveAll" intptr, intptr
; res = MprInfoRemoveAll(lpHeader, lplpNewHeader)
; lpHeader : void* -> "intptr"
; lplpNewHeader : void** out -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
mprapi = windows.NewLazySystemDLL("MPRAPI.dll")
procMprInfoRemoveAll = mprapi.NewProc("MprInfoRemoveAll")
)
// lpHeader (void*), lplpNewHeader (void** out)
r1, _, err := procMprInfoRemoveAll.Call(
uintptr(lpHeader),
uintptr(lplpNewHeader),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction MprInfoRemoveAll(
lpHeader: Pointer; // void*
lplpNewHeader: Pointer // void** out
): DWORD; stdcall;
external 'MPRAPI.dll' name 'MprInfoRemoveAll';result := DllCall("MPRAPI\MprInfoRemoveAll"
, "Ptr", lpHeader ; void*
, "Ptr", lplpNewHeader ; void** out
, "UInt") ; return: DWORD●MprInfoRemoveAll(lpHeader, lplpNewHeader) = DLL("MPRAPI.dll", "dword MprInfoRemoveAll(void*, void*)")
# 呼び出し: MprInfoRemoveAll(lpHeader, lplpNewHeader)
# lpHeader : void* -> "void*"
# lplpNewHeader : void** out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。