Win32 API 日本語リファレンス
ホームNetworking.WinHttp › WinHttpUnregisterProxyChangeNotification

WinHttpUnregisterProxyChangeNotification

関数
プロキシ設定変更の通知登録を解除する。
DLLWINHTTP.dll呼出規約winapi

シグネチャ

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

DWORD WinHttpUnregisterProxyChangeNotification(
    void* hRegistration
);

パラメーター

名前方向
hRegistrationvoid*in

戻り値の型: DWORD

各言語での呼び出し定義

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

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

WinHttpUnregisterProxyChangeNotification = ctypes.windll.winhttp.WinHttpUnregisterProxyChangeNotification
WinHttpUnregisterProxyChangeNotification.restype = wintypes.DWORD
WinHttpUnregisterProxyChangeNotification.argtypes = [
    ctypes.POINTER(None),  # hRegistration : void*
]
require 'fiddle'
require 'fiddle/import'

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

var (
	winhttp = windows.NewLazySystemDLL("WINHTTP.dll")
	procWinHttpUnregisterProxyChangeNotification = winhttp.NewProc("WinHttpUnregisterProxyChangeNotification")
)

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