ホーム › Storage.Imapi › CloseIMsgSession
CloseIMsgSession
関数IMessageのメッセージセッションを閉じる。
シグネチャ
// MAPI32.dll
#include <windows.h>
void CloseIMsgSession(
LPMSGSESS lpMsgSess
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| lpMsgSess | LPMSGSESS | in | 閉じる対象のメッセージセッションハンドル。OpenIMsgSessionで取得したもの。 |
戻り値の型: void
各言語での呼び出し定義
// MAPI32.dll
#include <windows.h>
void CloseIMsgSession(
LPMSGSESS lpMsgSess
);[DllImport("MAPI32.dll", ExactSpelling = true)]
static extern void CloseIMsgSession(
IntPtr lpMsgSess // LPMSGSESS
);<DllImport("MAPI32.dll", ExactSpelling:=True)>
Public Shared Sub CloseIMsgSession(
lpMsgSess As IntPtr ' LPMSGSESS
)
End Sub' lpMsgSess : LPMSGSESS
Declare PtrSafe Sub CloseIMsgSession Lib "mapi32" ( _
ByVal lpMsgSess As LongPtr)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
CloseIMsgSession = ctypes.windll.mapi32.CloseIMsgSession
CloseIMsgSession.restype = None
CloseIMsgSession.argtypes = [
ctypes.c_ssize_t, # lpMsgSess : LPMSGSESS
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('MAPI32.dll')
CloseIMsgSession = Fiddle::Function.new(
lib['CloseIMsgSession'],
[
Fiddle::TYPE_INTPTR_T, # lpMsgSess : LPMSGSESS
],
Fiddle::TYPE_VOID)#[link(name = "mapi32")]
extern "system" {
fn CloseIMsgSession(
lpMsgSess: isize // LPMSGSESS
);
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("MAPI32.dll")]
public static extern void CloseIMsgSession(IntPtr lpMsgSess);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MAPI32_CloseIMsgSession' -Namespace Win32 -PassThru
# $api::CloseIMsgSession(lpMsgSess)#uselib "MAPI32.dll"
#func global CloseIMsgSession "CloseIMsgSession" sptr
; CloseIMsgSession lpMsgSess
; lpMsgSess : LPMSGSESS -> "sptr"#uselib "MAPI32.dll"
#func global CloseIMsgSession "CloseIMsgSession" sptr
; CloseIMsgSession lpMsgSess
; lpMsgSess : LPMSGSESS -> "sptr"; void CloseIMsgSession(LPMSGSESS lpMsgSess)
#uselib "MAPI32.dll"
#func global CloseIMsgSession "CloseIMsgSession" intptr
; CloseIMsgSession lpMsgSess
; lpMsgSess : LPMSGSESS -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
mapi32 = windows.NewLazySystemDLL("MAPI32.dll")
procCloseIMsgSession = mapi32.NewProc("CloseIMsgSession")
)
// lpMsgSess (LPMSGSESS)
r1, _, err := procCloseIMsgSession.Call(
uintptr(lpMsgSess),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure CloseIMsgSession(
lpMsgSess: NativeInt // LPMSGSESS
); stdcall;
external 'MAPI32.dll' name 'CloseIMsgSession';result := DllCall("MAPI32\CloseIMsgSession"
, "Ptr", lpMsgSess ; LPMSGSESS
, "Int") ; return: void●CloseIMsgSession(lpMsgSess) = DLL("MAPI32.dll", "int CloseIMsgSession(int)")
# 呼び出し: CloseIMsgSession(lpMsgSess)
# lpMsgSess : LPMSGSESS -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。