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

ODBCGetTryWaitValue

関数
接続プールの再試行待機時間の値を取得する。
DLLODBC32.dll呼出規約winapi

シグネチャ

// ODBC32.dll
#include <windows.h>

DWORD ODBCGetTryWaitValue(void);

パラメーターなし。戻り値: DWORD

各言語での呼び出し定義

// ODBC32.dll
#include <windows.h>

DWORD ODBCGetTryWaitValue(void);
[DllImport("ODBC32.dll", ExactSpelling = true)]
static extern uint ODBCGetTryWaitValue();
<DllImport("ODBC32.dll", ExactSpelling:=True)>
Public Shared Function ODBCGetTryWaitValue() As UInteger
End Function
Declare PtrSafe Function ODBCGetTryWaitValue Lib "odbc32" () As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

ODBCGetTryWaitValue = ctypes.windll.odbc32.ODBCGetTryWaitValue
ODBCGetTryWaitValue.restype = wintypes.DWORD
ODBCGetTryWaitValue.argtypes = []
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('ODBC32.dll')
ODBCGetTryWaitValue = Fiddle::Function.new(
  lib['ODBCGetTryWaitValue'],
  [],
  -Fiddle::TYPE_INT)
#[link(name = "odbc32")]
extern "system" {
    fn ODBCGetTryWaitValue() -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("ODBC32.dll")]
public static extern uint ODBCGetTryWaitValue();
"@
$api = Add-Type -MemberDefinition $sig -Name 'ODBC32_ODBCGetTryWaitValue' -Namespace Win32 -PassThru
# $api::ODBCGetTryWaitValue()
#uselib "ODBC32.dll"
#func global ODBCGetTryWaitValue "ODBCGetTryWaitValue"
; ODBCGetTryWaitValue   ; 戻り値は stat
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "ODBC32.dll"
#cfunc global ODBCGetTryWaitValue "ODBCGetTryWaitValue"
; res = ODBCGetTryWaitValue()
; DWORD ODBCGetTryWaitValue()
#uselib "ODBC32.dll"
#cfunc global ODBCGetTryWaitValue "ODBCGetTryWaitValue"
; res = ODBCGetTryWaitValue()
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	odbc32 = windows.NewLazySystemDLL("ODBC32.dll")
	procODBCGetTryWaitValue = odbc32.NewProc("ODBCGetTryWaitValue")
)

r1, _, err := procODBCGetTryWaitValue.Call()
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // DWORD
function ODBCGetTryWaitValue: DWORD; stdcall;
  external 'ODBC32.dll' name 'ODBCGetTryWaitValue';
result := DllCall("ODBC32\ODBCGetTryWaitValue", "UInt")
●ODBCGetTryWaitValue() = DLL("ODBC32.dll", "dword ODBCGetTryWaitValue()")
# 呼び出し: ODBCGetTryWaitValue()
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。