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

DdeReconnect

関数
切断されたDDEクライアント会話の再接続を試みる。
DLLUSER32.dll呼出規約winapi対応OSWindows 2000 以降

シグネチャ

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

HCONV DdeReconnect(
    HCONV hConv
);

パラメーター

名前方向
hConvHCONVin

戻り値の型: HCONV

各言語での呼び出し定義

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

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

DdeReconnect = ctypes.windll.user32.DdeReconnect
DdeReconnect.restype = ctypes.c_void_p
DdeReconnect.argtypes = [
    wintypes.HANDLE,  # hConv : HCONV
]
require 'fiddle'
require 'fiddle/import'

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

var (
	user32 = windows.NewLazySystemDLL("USER32.dll")
	procDdeReconnect = user32.NewProc("DdeReconnect")
)

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