ホーム › NetworkManagement.WindowsFirewall › NcFreeNetconProperties
NcFreeNetconProperties
関数ネットワーク接続プロパティ構造体のメモリを解放する。
シグネチャ
// Netshell.dll
#include <windows.h>
void NcFreeNetconProperties(
NETCON_PROPERTIES* pProps
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| pProps | NETCON_PROPERTIES* | inout |
戻り値の型: void
各言語での呼び出し定義
// Netshell.dll
#include <windows.h>
void NcFreeNetconProperties(
NETCON_PROPERTIES* pProps
);[DllImport("Netshell.dll", ExactSpelling = true)]
static extern void NcFreeNetconProperties(
IntPtr pProps // NETCON_PROPERTIES* in/out
);<DllImport("Netshell.dll", ExactSpelling:=True)>
Public Shared Sub NcFreeNetconProperties(
pProps As IntPtr ' NETCON_PROPERTIES* in/out
)
End Sub' pProps : NETCON_PROPERTIES* in/out
Declare PtrSafe Sub NcFreeNetconProperties Lib "netshell" ( _
ByVal pProps As LongPtr)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
NcFreeNetconProperties = ctypes.windll.netshell.NcFreeNetconProperties
NcFreeNetconProperties.restype = None
NcFreeNetconProperties.argtypes = [
ctypes.c_void_p, # pProps : NETCON_PROPERTIES* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('Netshell.dll')
NcFreeNetconProperties = Fiddle::Function.new(
lib['NcFreeNetconProperties'],
[
Fiddle::TYPE_VOIDP, # pProps : NETCON_PROPERTIES* in/out
],
Fiddle::TYPE_VOID)#[link(name = "netshell")]
extern "system" {
fn NcFreeNetconProperties(
pProps: *mut NETCON_PROPERTIES // NETCON_PROPERTIES* in/out
);
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("Netshell.dll")]
public static extern void NcFreeNetconProperties(IntPtr pProps);
"@
$api = Add-Type -MemberDefinition $sig -Name 'Netshell_NcFreeNetconProperties' -Namespace Win32 -PassThru
# $api::NcFreeNetconProperties(pProps)#uselib "Netshell.dll"
#func global NcFreeNetconProperties "NcFreeNetconProperties" sptr
; NcFreeNetconProperties varptr(pProps)
; pProps : NETCON_PROPERTIES* in/out -> "sptr"出力引数:
#uselib "Netshell.dll" #func global NcFreeNetconProperties "NcFreeNetconProperties" var ; NcFreeNetconProperties pProps ; pProps : NETCON_PROPERTIES* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "Netshell.dll" #func global NcFreeNetconProperties "NcFreeNetconProperties" sptr ; NcFreeNetconProperties varptr(pProps) ; pProps : NETCON_PROPERTIES* in/out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; void NcFreeNetconProperties(NETCON_PROPERTIES* pProps) #uselib "Netshell.dll" #func global NcFreeNetconProperties "NcFreeNetconProperties" var ; NcFreeNetconProperties pProps ; pProps : NETCON_PROPERTIES* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; void NcFreeNetconProperties(NETCON_PROPERTIES* pProps) #uselib "Netshell.dll" #func global NcFreeNetconProperties "NcFreeNetconProperties" intptr ; NcFreeNetconProperties varptr(pProps) ; pProps : NETCON_PROPERTIES* in/out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
netshell = windows.NewLazySystemDLL("Netshell.dll")
procNcFreeNetconProperties = netshell.NewProc("NcFreeNetconProperties")
)
// pProps (NETCON_PROPERTIES* in/out)
r1, _, err := procNcFreeNetconProperties.Call(
uintptr(pProps),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure NcFreeNetconProperties(
pProps: Pointer // NETCON_PROPERTIES* in/out
); stdcall;
external 'Netshell.dll' name 'NcFreeNetconProperties';result := DllCall("Netshell\NcFreeNetconProperties"
, "Ptr", pProps ; NETCON_PROPERTIES* in/out
, "Int") ; return: void●NcFreeNetconProperties(pProps) = DLL("Netshell.dll", "int NcFreeNetconProperties(void*)")
# 呼び出し: NcFreeNetconProperties(pProps)
# pProps : NETCON_PROPERTIES* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。