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