ホーム › System.Search › bcp_setcolfmt
bcp_setcolfmt
関数一括コピー対象列の個別書式属性を設定する。
シグネチャ
// odbcbcp.dll
#include <windows.h>
SHORT bcp_setcolfmt(
void* param0,
INT param1,
INT param2,
void* param3,
INT param4
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| param0 | void* | inout |
| param1 | INT | in |
| param2 | INT | in |
| param3 | void* | inout |
| param4 | INT | in |
戻り値の型: SHORT
各言語での呼び出し定義
// odbcbcp.dll
#include <windows.h>
SHORT bcp_setcolfmt(
void* param0,
INT param1,
INT param2,
void* param3,
INT param4
);[DllImport("odbcbcp.dll", ExactSpelling = true)]
static extern short bcp_setcolfmt(
IntPtr param0, // void* in/out
int param1, // INT
int param2, // INT
IntPtr param3, // void* in/out
int param4 // INT
);<DllImport("odbcbcp.dll", ExactSpelling:=True)>
Public Shared Function bcp_setcolfmt(
param0 As IntPtr, ' void* in/out
param1 As Integer, ' INT
param2 As Integer, ' INT
param3 As IntPtr, ' void* in/out
param4 As Integer ' INT
) As Short
End Function' param0 : void* in/out
' param1 : INT
' param2 : INT
' param3 : void* in/out
' param4 : INT
Declare PtrSafe Function bcp_setcolfmt Lib "odbcbcp" ( _
ByVal param0 As LongPtr, _
ByVal param1 As Long, _
ByVal param2 As Long, _
ByVal param3 As LongPtr, _
ByVal param4 As Long) As Integer
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
bcp_setcolfmt = ctypes.windll.odbcbcp.bcp_setcolfmt
bcp_setcolfmt.restype = ctypes.c_short
bcp_setcolfmt.argtypes = [
ctypes.POINTER(None), # param0 : void* in/out
ctypes.c_int, # param1 : INT
ctypes.c_int, # param2 : INT
ctypes.POINTER(None), # param3 : void* in/out
ctypes.c_int, # param4 : INT
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('odbcbcp.dll')
bcp_setcolfmt = Fiddle::Function.new(
lib['bcp_setcolfmt'],
[
Fiddle::TYPE_VOIDP, # param0 : void* in/out
Fiddle::TYPE_INT, # param1 : INT
Fiddle::TYPE_INT, # param2 : INT
Fiddle::TYPE_VOIDP, # param3 : void* in/out
Fiddle::TYPE_INT, # param4 : INT
],
Fiddle::TYPE_SHORT)#[link(name = "odbcbcp")]
extern "system" {
fn bcp_setcolfmt(
param0: *mut (), // void* in/out
param1: i32, // INT
param2: i32, // INT
param3: *mut (), // void* in/out
param4: i32 // INT
) -> i16;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("odbcbcp.dll")]
public static extern short bcp_setcolfmt(IntPtr param0, int param1, int param2, IntPtr param3, int param4);
"@
$api = Add-Type -MemberDefinition $sig -Name 'odbcbcp_bcp_setcolfmt' -Namespace Win32 -PassThru
# $api::bcp_setcolfmt(param0, param1, param2, param3, param4)#uselib "odbcbcp.dll"
#func global bcp_setcolfmt "bcp_setcolfmt" sptr, sptr, sptr, sptr, sptr
; bcp_setcolfmt param0, param1, param2, param3, param4 ; 戻り値は stat
; param0 : void* in/out -> "sptr"
; param1 : INT -> "sptr"
; param2 : INT -> "sptr"
; param3 : void* in/out -> "sptr"
; param4 : INT -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "odbcbcp.dll"
#cfunc global bcp_setcolfmt "bcp_setcolfmt" sptr, int, int, sptr, int
; res = bcp_setcolfmt(param0, param1, param2, param3, param4)
; param0 : void* in/out -> "sptr"
; param1 : INT -> "int"
; param2 : INT -> "int"
; param3 : void* in/out -> "sptr"
; param4 : INT -> "int"; SHORT bcp_setcolfmt(void* param0, INT param1, INT param2, void* param3, INT param4)
#uselib "odbcbcp.dll"
#cfunc global bcp_setcolfmt "bcp_setcolfmt" intptr, int, int, intptr, int
; res = bcp_setcolfmt(param0, param1, param2, param3, param4)
; param0 : void* in/out -> "intptr"
; param1 : INT -> "int"
; param2 : INT -> "int"
; param3 : void* in/out -> "intptr"
; param4 : INT -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
odbcbcp = windows.NewLazySystemDLL("odbcbcp.dll")
procbcp_setcolfmt = odbcbcp.NewProc("bcp_setcolfmt")
)
// param0 (void* in/out), param1 (INT), param2 (INT), param3 (void* in/out), param4 (INT)
r1, _, err := procbcp_setcolfmt.Call(
uintptr(param0),
uintptr(param1),
uintptr(param2),
uintptr(param3),
uintptr(param4),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // SHORTfunction bcp_setcolfmt(
param0: Pointer; // void* in/out
param1: Integer; // INT
param2: Integer; // INT
param3: Pointer; // void* in/out
param4: Integer // INT
): Smallint; stdcall;
external 'odbcbcp.dll' name 'bcp_setcolfmt';result := DllCall("odbcbcp\bcp_setcolfmt"
, "Ptr", param0 ; void* in/out
, "Int", param1 ; INT
, "Int", param2 ; INT
, "Ptr", param3 ; void* in/out
, "Int", param4 ; INT
, "Short") ; return: SHORT●bcp_setcolfmt(param0, param1, param2, param3, param4) = DLL("odbcbcp.dll", "int bcp_setcolfmt(void*, int, int, void*, int)")
# 呼び出し: bcp_setcolfmt(param0, param1, param2, param3, param4)
# param0 : void* in/out -> "void*"
# param1 : INT -> "int"
# param2 : INT -> "int"
# param3 : void* in/out -> "void*"
# param4 : INT -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。