ホーム › NetworkManagement.Rras › RasSetAutodialEnableW
RasSetAutodialEnableW
関数指定TAPI場所の自動ダイヤルの有効/無効を設定する(Unicode版)。
シグネチャ
// RASAPI32.dll (Unicode / -W)
#include <windows.h>
DWORD RasSetAutodialEnableW(
DWORD param0,
BOOL param1
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| param0 | DWORD | in |
| param1 | BOOL | in |
戻り値の型: DWORD
各言語での呼び出し定義
// RASAPI32.dll (Unicode / -W)
#include <windows.h>
DWORD RasSetAutodialEnableW(
DWORD param0,
BOOL param1
);[DllImport("RASAPI32.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
static extern uint RasSetAutodialEnableW(
uint param0, // DWORD
bool param1 // BOOL
);<DllImport("RASAPI32.dll", CharSet:=CharSet.Unicode, ExactSpelling:=True)>
Public Shared Function RasSetAutodialEnableW(
param0 As UInteger, ' DWORD
param1 As Boolean ' BOOL
) As UInteger
End Function' param0 : DWORD
' param1 : BOOL
Declare PtrSafe Function RasSetAutodialEnableW Lib "rasapi32" ( _
ByVal param0 As Long, _
ByVal param1 As Long) As Long
' 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
RasSetAutodialEnableW = ctypes.windll.rasapi32.RasSetAutodialEnableW
RasSetAutodialEnableW.restype = wintypes.DWORD
RasSetAutodialEnableW.argtypes = [
wintypes.DWORD, # param0 : DWORD
wintypes.BOOL, # param1 : BOOL
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('RASAPI32.dll')
RasSetAutodialEnableW = Fiddle::Function.new(
lib['RasSetAutodialEnableW'],
[
-Fiddle::TYPE_INT, # param0 : DWORD
Fiddle::TYPE_INT, # param1 : BOOL
],
-Fiddle::TYPE_INT)
# Wide strings: pass str.encode("UTF-16LE") + "\x00\x00"#[link(name = "rasapi32")]
extern "system" {
fn RasSetAutodialEnableW(
param0: u32, // DWORD
param1: i32 // BOOL
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("RASAPI32.dll", CharSet = CharSet.Unicode)]
public static extern uint RasSetAutodialEnableW(uint param0, bool param1);
"@
$api = Add-Type -MemberDefinition $sig -Name 'RASAPI32_RasSetAutodialEnableW' -Namespace Win32 -PassThru
# $api::RasSetAutodialEnableW(param0, param1)#uselib "RASAPI32.dll"
#func global RasSetAutodialEnableW "RasSetAutodialEnableW" wptr, wptr
; RasSetAutodialEnableW param0, param1 ; 戻り値は stat
; param0 : DWORD -> "wptr"
; param1 : BOOL -> "wptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "RASAPI32.dll"
#cfunc global RasSetAutodialEnableW "RasSetAutodialEnableW" int, int
; res = RasSetAutodialEnableW(param0, param1)
; param0 : DWORD -> "int"
; param1 : BOOL -> "int"; DWORD RasSetAutodialEnableW(DWORD param0, BOOL param1)
#uselib "RASAPI32.dll"
#cfunc global RasSetAutodialEnableW "RasSetAutodialEnableW" int, int
; res = RasSetAutodialEnableW(param0, param1)
; param0 : DWORD -> "int"
; param1 : BOOL -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
rasapi32 = windows.NewLazySystemDLL("RASAPI32.dll")
procRasSetAutodialEnableW = rasapi32.NewProc("RasSetAutodialEnableW")
)
// param0 (DWORD), param1 (BOOL)
r1, _, err := procRasSetAutodialEnableW.Call(
uintptr(param0),
uintptr(param1),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction RasSetAutodialEnableW(
param0: DWORD; // DWORD
param1: BOOL // BOOL
): DWORD; stdcall;
external 'RASAPI32.dll' name 'RasSetAutodialEnableW';result := DllCall("RASAPI32\RasSetAutodialEnableW"
, "UInt", param0 ; DWORD
, "Int", param1 ; BOOL
, "UInt") ; return: DWORD●RasSetAutodialEnableW(param0, param1) = DLL("RASAPI32.dll", "dword RasSetAutodialEnableW(dword, bool)")
# 呼び出し: RasSetAutodialEnableW(param0, param1)
# param0 : DWORD -> "dword"
# param1 : BOOL -> "bool"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※-W(Unicode)関数。なでしこ1はANSIのため -A 版の利用を推奨。