Win32 API 日本語リファレンス
ホームSystem.Com.Urlmon › RevokeBindStatusCallback

RevokeBindStatusCallback

関数
バインドコンテキストから登録済みのバインド状態コールバックを解除する。
DLLurlmon.dll呼出規約winapi

シグネチャ

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

HRESULT RevokeBindStatusCallback(
    IBindCtx* pBC,
    IBindStatusCallback* pBSCb
);

パラメーター

名前方向
pBCIBindCtx*in
pBSCbIBindStatusCallback*in

戻り値の型: HRESULT

各言語での呼び出し定義

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

HRESULT RevokeBindStatusCallback(
    IBindCtx* pBC,
    IBindStatusCallback* pBSCb
);
[DllImport("urlmon.dll", ExactSpelling = true)]
static extern int RevokeBindStatusCallback(
    IntPtr pBC,   // IBindCtx*
    IntPtr pBSCb   // IBindStatusCallback*
);
<DllImport("urlmon.dll", ExactSpelling:=True)>
Public Shared Function RevokeBindStatusCallback(
    pBC As IntPtr,   ' IBindCtx*
    pBSCb As IntPtr   ' IBindStatusCallback*
) As Integer
End Function
' pBC : IBindCtx*
' pBSCb : IBindStatusCallback*
Declare PtrSafe Function RevokeBindStatusCallback Lib "urlmon" ( _
    ByVal pBC As LongPtr, _
    ByVal pBSCb As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

RevokeBindStatusCallback = ctypes.windll.urlmon.RevokeBindStatusCallback
RevokeBindStatusCallback.restype = ctypes.c_int
RevokeBindStatusCallback.argtypes = [
    ctypes.c_void_p,  # pBC : IBindCtx*
    ctypes.c_void_p,  # pBSCb : IBindStatusCallback*
]
require 'fiddle'
require 'fiddle/import'

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

var (
	urlmon = windows.NewLazySystemDLL("urlmon.dll")
	procRevokeBindStatusCallback = urlmon.NewProc("RevokeBindStatusCallback")
)

// pBC (IBindCtx*), pBSCb (IBindStatusCallback*)
r1, _, err := procRevokeBindStatusCallback.Call(
	uintptr(pBC),
	uintptr(pBSCb),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // HRESULT
function RevokeBindStatusCallback(
  pBC: Pointer;   // IBindCtx*
  pBSCb: Pointer   // IBindStatusCallback*
): Integer; stdcall;
  external 'urlmon.dll' name 'RevokeBindStatusCallback';
result := DllCall("urlmon\RevokeBindStatusCallback"
    , "Ptr", pBC   ; IBindCtx*
    , "Ptr", pBSCb   ; IBindStatusCallback*
    , "Int")   ; return: HRESULT
●RevokeBindStatusCallback(pBC, pBSCb) = DLL("urlmon.dll", "int RevokeBindStatusCallback(void*, void*)")
# 呼び出し: RevokeBindStatusCallback(pBC, pBSCb)
# pBC : IBindCtx* -> "void*"
# pBSCb : IBindStatusCallback* -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。