Win32 API 日本語リファレンス
ホームNetworkManagement.P2P › PeerGroupResumePasswordAuthentication

PeerGroupResumePasswordAuthentication

関数
中断したパスワード認証処理を再開する。
DLLP2P.dll呼出規約winapi

シグネチャ

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

HRESULT PeerGroupResumePasswordAuthentication(
    void* hGroup,
    void* hPeerEventHandle
);

パラメーター

名前方向
hGroupvoid*in
hPeerEventHandlevoid*in

戻り値の型: HRESULT

各言語での呼び出し定義

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

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

PeerGroupResumePasswordAuthentication = ctypes.windll.p2p.PeerGroupResumePasswordAuthentication
PeerGroupResumePasswordAuthentication.restype = ctypes.c_int
PeerGroupResumePasswordAuthentication.argtypes = [
    ctypes.POINTER(None),  # hGroup : void*
    ctypes.POINTER(None),  # hPeerEventHandle : void*
]
require 'fiddle'
require 'fiddle/import'

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

var (
	p2p = windows.NewLazySystemDLL("P2P.dll")
	procPeerGroupResumePasswordAuthentication = p2p.NewProc("PeerGroupResumePasswordAuthentication")
)

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