ホーム › Web.InternetExplorer › IEAssociateThreadWithTab
IEAssociateThreadWithTab
関数スレッドをIEタブスレッドに関連付ける。
シグネチャ
// Ieframe.dll
#include <windows.h>
HRESULT IEAssociateThreadWithTab(
DWORD dwTabThreadID,
DWORD dwAssociatedThreadID
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| dwTabThreadID | DWORD | in | 対象タブを実行しているスレッドのID。 |
| dwAssociatedThreadID | DWORD | in | タブに関連付けるスレッドのID。 |
戻り値の型: HRESULT
各言語での呼び出し定義
// Ieframe.dll
#include <windows.h>
HRESULT IEAssociateThreadWithTab(
DWORD dwTabThreadID,
DWORD dwAssociatedThreadID
);[DllImport("Ieframe.dll", ExactSpelling = true)]
static extern int IEAssociateThreadWithTab(
uint dwTabThreadID, // DWORD
uint dwAssociatedThreadID // DWORD
);<DllImport("Ieframe.dll", ExactSpelling:=True)>
Public Shared Function IEAssociateThreadWithTab(
dwTabThreadID As UInteger, ' DWORD
dwAssociatedThreadID As UInteger ' DWORD
) As Integer
End Function' dwTabThreadID : DWORD
' dwAssociatedThreadID : DWORD
Declare PtrSafe Function IEAssociateThreadWithTab Lib "ieframe" ( _
ByVal dwTabThreadID As Long, _
ByVal dwAssociatedThreadID As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
IEAssociateThreadWithTab = ctypes.windll.ieframe.IEAssociateThreadWithTab
IEAssociateThreadWithTab.restype = ctypes.c_int
IEAssociateThreadWithTab.argtypes = [
wintypes.DWORD, # dwTabThreadID : DWORD
wintypes.DWORD, # dwAssociatedThreadID : DWORD
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('Ieframe.dll')
IEAssociateThreadWithTab = Fiddle::Function.new(
lib['IEAssociateThreadWithTab'],
[
-Fiddle::TYPE_INT, # dwTabThreadID : DWORD
-Fiddle::TYPE_INT, # dwAssociatedThreadID : DWORD
],
Fiddle::TYPE_INT)#[link(name = "ieframe")]
extern "system" {
fn IEAssociateThreadWithTab(
dwTabThreadID: u32, // DWORD
dwAssociatedThreadID: u32 // DWORD
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("Ieframe.dll")]
public static extern int IEAssociateThreadWithTab(uint dwTabThreadID, uint dwAssociatedThreadID);
"@
$api = Add-Type -MemberDefinition $sig -Name 'Ieframe_IEAssociateThreadWithTab' -Namespace Win32 -PassThru
# $api::IEAssociateThreadWithTab(dwTabThreadID, dwAssociatedThreadID)#uselib "Ieframe.dll"
#func global IEAssociateThreadWithTab "IEAssociateThreadWithTab" sptr, sptr
; IEAssociateThreadWithTab dwTabThreadID, dwAssociatedThreadID ; 戻り値は stat
; dwTabThreadID : DWORD -> "sptr"
; dwAssociatedThreadID : DWORD -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "Ieframe.dll"
#cfunc global IEAssociateThreadWithTab "IEAssociateThreadWithTab" int, int
; res = IEAssociateThreadWithTab(dwTabThreadID, dwAssociatedThreadID)
; dwTabThreadID : DWORD -> "int"
; dwAssociatedThreadID : DWORD -> "int"; HRESULT IEAssociateThreadWithTab(DWORD dwTabThreadID, DWORD dwAssociatedThreadID)
#uselib "Ieframe.dll"
#cfunc global IEAssociateThreadWithTab "IEAssociateThreadWithTab" int, int
; res = IEAssociateThreadWithTab(dwTabThreadID, dwAssociatedThreadID)
; dwTabThreadID : DWORD -> "int"
; dwAssociatedThreadID : DWORD -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
ieframe = windows.NewLazySystemDLL("Ieframe.dll")
procIEAssociateThreadWithTab = ieframe.NewProc("IEAssociateThreadWithTab")
)
// dwTabThreadID (DWORD), dwAssociatedThreadID (DWORD)
r1, _, err := procIEAssociateThreadWithTab.Call(
uintptr(dwTabThreadID),
uintptr(dwAssociatedThreadID),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction IEAssociateThreadWithTab(
dwTabThreadID: DWORD; // DWORD
dwAssociatedThreadID: DWORD // DWORD
): Integer; stdcall;
external 'Ieframe.dll' name 'IEAssociateThreadWithTab';result := DllCall("Ieframe\IEAssociateThreadWithTab"
, "UInt", dwTabThreadID ; DWORD
, "UInt", dwAssociatedThreadID ; DWORD
, "Int") ; return: HRESULT●IEAssociateThreadWithTab(dwTabThreadID, dwAssociatedThreadID) = DLL("Ieframe.dll", "int IEAssociateThreadWithTab(dword, dword)")
# 呼び出し: IEAssociateThreadWithTab(dwTabThreadID, dwAssociatedThreadID)
# dwTabThreadID : DWORD -> "dword"
# dwAssociatedThreadID : DWORD -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。