Win32 API 日本語リファレンス
ホームSystem.Search › dbprtypeA

dbprtypeA

関数
トークン型の値を対応する文字列名に変換する(ANSI)。
DLLodbcbcp.dll文字セットANSI (-A)呼出規約winapi

シグネチャ

// odbcbcp.dll  (ANSI / -A)
#include <windows.h>

LPSTR dbprtypeA(
    INT param0
);

パラメーター

名前方向
param0INTin

戻り値の型: LPSTR

各言語での呼び出し定義

// odbcbcp.dll  (ANSI / -A)
#include <windows.h>

LPSTR dbprtypeA(
    INT param0
);
[DllImport("odbcbcp.dll", CharSet = CharSet.Ansi, ExactSpelling = true)]
static extern IntPtr dbprtypeA(
    int param0   // INT
);
<DllImport("odbcbcp.dll", CharSet:=CharSet.Ansi, ExactSpelling:=True)>
Public Shared Function dbprtypeA(
    param0 As Integer   ' INT
) As IntPtr
End Function
' param0 : INT
Declare PtrSafe Function dbprtypeA Lib "odbcbcp" ( _
    ByVal param0 As Long) As LongPtr
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

dbprtypeA = ctypes.windll.odbcbcp.dbprtypeA
dbprtypeA.restype = wintypes.LPSTR
dbprtypeA.argtypes = [
    ctypes.c_int,  # param0 : INT
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('odbcbcp.dll')
dbprtypeA = Fiddle::Function.new(
  lib['dbprtypeA'],
  [
    Fiddle::TYPE_INT,  # param0 : INT
  ],
  Fiddle::TYPE_VOIDP)
#[link(name = "odbcbcp")]
extern "system" {
    fn dbprtypeA(
        param0: i32  // INT
    ) -> *mut u8;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("odbcbcp.dll", CharSet = CharSet.Ansi)]
public static extern IntPtr dbprtypeA(int param0);
"@
$api = Add-Type -MemberDefinition $sig -Name 'odbcbcp_dbprtypeA' -Namespace Win32 -PassThru
# $api::dbprtypeA(param0)
#uselib "odbcbcp.dll"
#func global dbprtypeA "dbprtypeA" sptr
; dbprtypeA param0   ; 戻り値は stat
; param0 : INT -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "odbcbcp.dll"
#cfunc global dbprtypeA "dbprtypeA" int
; res = dbprtypeA(param0)
; param0 : INT -> "int"
; LPSTR dbprtypeA(INT param0)
#uselib "odbcbcp.dll"
#cfunc global dbprtypeA "dbprtypeA" int
; res = dbprtypeA(param0)
; param0 : INT -> "int"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	odbcbcp = windows.NewLazySystemDLL("odbcbcp.dll")
	procdbprtypeA = odbcbcp.NewProc("dbprtypeA")
)

// param0 (INT)
r1, _, err := procdbprtypeA.Call(
	uintptr(param0),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // LPSTR
function dbprtypeA(
  param0: Integer   // INT
): PAnsiChar; stdcall;
  external 'odbcbcp.dll' name 'dbprtypeA';
result := DllCall("odbcbcp\dbprtypeA"
    , "Int", param0   ; INT
    , "Ptr")   ; return: LPSTR
●dbprtypeA(param0) = DLL("odbcbcp.dll", "char* dbprtypeA(int)")
# 呼び出し: dbprtypeA(param0)
# param0 : INT -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。