ホーム › Devices.Tapi › lineSetCurrentLocation
lineSetCurrentLocation
関数ダイヤル変換に使用する現在の所在地を設定する。
シグネチャ
// TAPI32.dll
#include <windows.h>
INT lineSetCurrentLocation(
DWORD hLineApp,
DWORD dwLocation
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hLineApp | DWORD | in |
| dwLocation | DWORD | in |
戻り値の型: INT
各言語での呼び出し定義
// TAPI32.dll
#include <windows.h>
INT lineSetCurrentLocation(
DWORD hLineApp,
DWORD dwLocation
);[DllImport("TAPI32.dll", ExactSpelling = true)]
static extern int lineSetCurrentLocation(
uint hLineApp, // DWORD
uint dwLocation // DWORD
);<DllImport("TAPI32.dll", ExactSpelling:=True)>
Public Shared Function lineSetCurrentLocation(
hLineApp As UInteger, ' DWORD
dwLocation As UInteger ' DWORD
) As Integer
End Function' hLineApp : DWORD
' dwLocation : DWORD
Declare PtrSafe Function lineSetCurrentLocation Lib "tapi32" ( _
ByVal hLineApp As Long, _
ByVal dwLocation As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
lineSetCurrentLocation = ctypes.windll.tapi32.lineSetCurrentLocation
lineSetCurrentLocation.restype = ctypes.c_int
lineSetCurrentLocation.argtypes = [
wintypes.DWORD, # hLineApp : DWORD
wintypes.DWORD, # dwLocation : DWORD
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('TAPI32.dll')
lineSetCurrentLocation = Fiddle::Function.new(
lib['lineSetCurrentLocation'],
[
-Fiddle::TYPE_INT, # hLineApp : DWORD
-Fiddle::TYPE_INT, # dwLocation : DWORD
],
Fiddle::TYPE_INT)#[link(name = "tapi32")]
extern "system" {
fn lineSetCurrentLocation(
hLineApp: u32, // DWORD
dwLocation: u32 // DWORD
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("TAPI32.dll")]
public static extern int lineSetCurrentLocation(uint hLineApp, uint dwLocation);
"@
$api = Add-Type -MemberDefinition $sig -Name 'TAPI32_lineSetCurrentLocation' -Namespace Win32 -PassThru
# $api::lineSetCurrentLocation(hLineApp, dwLocation)#uselib "TAPI32.dll"
#func global lineSetCurrentLocation "lineSetCurrentLocation" sptr, sptr
; lineSetCurrentLocation hLineApp, dwLocation ; 戻り値は stat
; hLineApp : DWORD -> "sptr"
; dwLocation : DWORD -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "TAPI32.dll"
#cfunc global lineSetCurrentLocation "lineSetCurrentLocation" int, int
; res = lineSetCurrentLocation(hLineApp, dwLocation)
; hLineApp : DWORD -> "int"
; dwLocation : DWORD -> "int"; INT lineSetCurrentLocation(DWORD hLineApp, DWORD dwLocation)
#uselib "TAPI32.dll"
#cfunc global lineSetCurrentLocation "lineSetCurrentLocation" int, int
; res = lineSetCurrentLocation(hLineApp, dwLocation)
; hLineApp : DWORD -> "int"
; dwLocation : DWORD -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
tapi32 = windows.NewLazySystemDLL("TAPI32.dll")
proclineSetCurrentLocation = tapi32.NewProc("lineSetCurrentLocation")
)
// hLineApp (DWORD), dwLocation (DWORD)
r1, _, err := proclineSetCurrentLocation.Call(
uintptr(hLineApp),
uintptr(dwLocation),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // INTfunction lineSetCurrentLocation(
hLineApp: DWORD; // DWORD
dwLocation: DWORD // DWORD
): Integer; stdcall;
external 'TAPI32.dll' name 'lineSetCurrentLocation';result := DllCall("TAPI32\lineSetCurrentLocation"
, "UInt", hLineApp ; DWORD
, "UInt", dwLocation ; DWORD
, "Int") ; return: INT●lineSetCurrentLocation(hLineApp, dwLocation) = DLL("TAPI32.dll", "int lineSetCurrentLocation(dword, dword)")
# 呼び出し: lineSetCurrentLocation(hLineApp, dwLocation)
# hLineApp : DWORD -> "dword"
# dwLocation : DWORD -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。