Win32 API 日本語リファレンス
ホームNetworkManagement.Rras › RasFreeEapUserIdentityW

RasFreeEapUserIdentityW

関数
取得したEAPユーザーID構造体のメモリを解放する(Unicode版)。
DLLRASAPI32.dll文字セットUnicode (-W)呼出規約winapi対応OSWindows 2000 以降

シグネチャ

// RASAPI32.dll  (Unicode / -W)
#include <windows.h>

void RasFreeEapUserIdentityW(
    RASEAPUSERIDENTITYW* pRasEapUserIdentity
);

パラメーター

名前方向
pRasEapUserIdentityRASEAPUSERIDENTITYW*in

戻り値の型: void

各言語での呼び出し定義

// RASAPI32.dll  (Unicode / -W)
#include <windows.h>

void RasFreeEapUserIdentityW(
    RASEAPUSERIDENTITYW* pRasEapUserIdentity
);
[DllImport("RASAPI32.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
static extern void RasFreeEapUserIdentityW(
    IntPtr pRasEapUserIdentity   // RASEAPUSERIDENTITYW*
);
<DllImport("RASAPI32.dll", CharSet:=CharSet.Unicode, ExactSpelling:=True)>
Public Shared Sub RasFreeEapUserIdentityW(
    pRasEapUserIdentity As IntPtr   ' RASEAPUSERIDENTITYW*
)
End Sub
' pRasEapUserIdentity : RASEAPUSERIDENTITYW*
Declare PtrSafe Sub RasFreeEapUserIdentityW Lib "rasapi32" ( _
    ByVal pRasEapUserIdentity As LongPtr)
' Unicode(W): 文字列は ByVal As LongPtr とし StrPtr(unicodeStr) を渡す
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

RasFreeEapUserIdentityW = ctypes.windll.rasapi32.RasFreeEapUserIdentityW
RasFreeEapUserIdentityW.restype = None
RasFreeEapUserIdentityW.argtypes = [
    ctypes.c_void_p,  # pRasEapUserIdentity : RASEAPUSERIDENTITYW*
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('RASAPI32.dll')
RasFreeEapUserIdentityW = Fiddle::Function.new(
  lib['RasFreeEapUserIdentityW'],
  [
    Fiddle::TYPE_VOIDP,  # pRasEapUserIdentity : RASEAPUSERIDENTITYW*
  ],
  Fiddle::TYPE_VOID)
# Wide strings: pass str.encode("UTF-16LE") + "\x00\x00"
#[link(name = "rasapi32")]
extern "system" {
    fn RasFreeEapUserIdentityW(
        pRasEapUserIdentity: *mut RASEAPUSERIDENTITYW  // RASEAPUSERIDENTITYW*
    );
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("RASAPI32.dll", CharSet = CharSet.Unicode)]
public static extern void RasFreeEapUserIdentityW(IntPtr pRasEapUserIdentity);
"@
$api = Add-Type -MemberDefinition $sig -Name 'RASAPI32_RasFreeEapUserIdentityW' -Namespace Win32 -PassThru
# $api::RasFreeEapUserIdentityW(pRasEapUserIdentity)
#uselib "RASAPI32.dll"
#func global RasFreeEapUserIdentityW "RasFreeEapUserIdentityW" wptr
; RasFreeEapUserIdentityW varptr(pRasEapUserIdentity)
; pRasEapUserIdentity : RASEAPUSERIDENTITYW* -> "wptr"
出力引数:
#uselib "RASAPI32.dll"
#func global RasFreeEapUserIdentityW "RasFreeEapUserIdentityW" var
; RasFreeEapUserIdentityW pRasEapUserIdentity
; pRasEapUserIdentity : RASEAPUSERIDENTITYW* -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; void RasFreeEapUserIdentityW(RASEAPUSERIDENTITYW* pRasEapUserIdentity)
#uselib "RASAPI32.dll"
#func global RasFreeEapUserIdentityW "RasFreeEapUserIdentityW" var
; RasFreeEapUserIdentityW pRasEapUserIdentity
; pRasEapUserIdentity : RASEAPUSERIDENTITYW* -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	rasapi32 = windows.NewLazySystemDLL("RASAPI32.dll")
	procRasFreeEapUserIdentityW = rasapi32.NewProc("RasFreeEapUserIdentityW")
)

// pRasEapUserIdentity (RASEAPUSERIDENTITYW*)
r1, _, err := procRasFreeEapUserIdentityW.Call(
	uintptr(pRasEapUserIdentity),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // void
procedure RasFreeEapUserIdentityW(
  pRasEapUserIdentity: Pointer   // RASEAPUSERIDENTITYW*
); stdcall;
  external 'RASAPI32.dll' name 'RasFreeEapUserIdentityW';
result := DllCall("RASAPI32\RasFreeEapUserIdentityW"
    , "Ptr", pRasEapUserIdentity   ; RASEAPUSERIDENTITYW*
    , "Int")   ; return: void
●RasFreeEapUserIdentityW(pRasEapUserIdentity) = DLL("RASAPI32.dll", "int RasFreeEapUserIdentityW(void*)")
# 呼び出し: RasFreeEapUserIdentityW(pRasEapUserIdentity)
# pRasEapUserIdentity : RASEAPUSERIDENTITYW* -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※-W(Unicode)関数。なでしこ1はANSIのため -A 版の利用を推奨。