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

RemoveDeveloperLicense

関数
取得済みの開発者ライセンスを削除する。
DLLWSClient.dll呼出規約winapi

シグネチャ

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

HRESULT RemoveDeveloperLicense(
    HWND hwndParent   // optional
);

パラメーター

名前方向
hwndParentHWNDinoptional

戻り値の型: HRESULT

各言語での呼び出し定義

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

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

RemoveDeveloperLicense = ctypes.windll.wsclient.RemoveDeveloperLicense
RemoveDeveloperLicense.restype = ctypes.c_int
RemoveDeveloperLicense.argtypes = [
    wintypes.HANDLE,  # hwndParent : HWND optional
]
require 'fiddle'
require 'fiddle/import'

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

var (
	wsclient = windows.NewLazySystemDLL("WSClient.dll")
	procRemoveDeveloperLicense = wsclient.NewProc("RemoveDeveloperLicense")
)

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