ホーム › NetworkManagement.P2P › PeerCollabEnumApplicationRegistrationInfo
PeerCollabEnumApplicationRegistrationInfo
関数登録済みアプリケーションの情報を列挙する。
シグネチャ
// P2P.dll
#include <windows.h>
HRESULT PeerCollabEnumApplicationRegistrationInfo(
PEER_APPLICATION_REGISTRATION_TYPE registrationType,
void** phPeerEnum
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| registrationType | PEER_APPLICATION_REGISTRATION_TYPE | in |
| phPeerEnum | void** | out |
戻り値の型: HRESULT
各言語での呼び出し定義
// P2P.dll
#include <windows.h>
HRESULT PeerCollabEnumApplicationRegistrationInfo(
PEER_APPLICATION_REGISTRATION_TYPE registrationType,
void** phPeerEnum
);[DllImport("P2P.dll", ExactSpelling = true)]
static extern int PeerCollabEnumApplicationRegistrationInfo(
int registrationType, // PEER_APPLICATION_REGISTRATION_TYPE
IntPtr phPeerEnum // void** out
);<DllImport("P2P.dll", ExactSpelling:=True)>
Public Shared Function PeerCollabEnumApplicationRegistrationInfo(
registrationType As Integer, ' PEER_APPLICATION_REGISTRATION_TYPE
phPeerEnum As IntPtr ' void** out
) As Integer
End Function' registrationType : PEER_APPLICATION_REGISTRATION_TYPE
' phPeerEnum : void** out
Declare PtrSafe Function PeerCollabEnumApplicationRegistrationInfo Lib "p2p" ( _
ByVal registrationType As Long, _
ByVal phPeerEnum As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
PeerCollabEnumApplicationRegistrationInfo = ctypes.windll.p2p.PeerCollabEnumApplicationRegistrationInfo
PeerCollabEnumApplicationRegistrationInfo.restype = ctypes.c_int
PeerCollabEnumApplicationRegistrationInfo.argtypes = [
ctypes.c_int, # registrationType : PEER_APPLICATION_REGISTRATION_TYPE
ctypes.c_void_p, # phPeerEnum : void** out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('P2P.dll')
PeerCollabEnumApplicationRegistrationInfo = Fiddle::Function.new(
lib['PeerCollabEnumApplicationRegistrationInfo'],
[
Fiddle::TYPE_INT, # registrationType : PEER_APPLICATION_REGISTRATION_TYPE
Fiddle::TYPE_VOIDP, # phPeerEnum : void** out
],
Fiddle::TYPE_INT)#[link(name = "p2p")]
extern "system" {
fn PeerCollabEnumApplicationRegistrationInfo(
registrationType: i32, // PEER_APPLICATION_REGISTRATION_TYPE
phPeerEnum: *mut *mut () // void** out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("P2P.dll")]
public static extern int PeerCollabEnumApplicationRegistrationInfo(int registrationType, IntPtr phPeerEnum);
"@
$api = Add-Type -MemberDefinition $sig -Name 'P2P_PeerCollabEnumApplicationRegistrationInfo' -Namespace Win32 -PassThru
# $api::PeerCollabEnumApplicationRegistrationInfo(registrationType, phPeerEnum)#uselib "P2P.dll"
#func global PeerCollabEnumApplicationRegistrationInfo "PeerCollabEnumApplicationRegistrationInfo" sptr, sptr
; PeerCollabEnumApplicationRegistrationInfo registrationType, phPeerEnum ; 戻り値は stat
; registrationType : PEER_APPLICATION_REGISTRATION_TYPE -> "sptr"
; phPeerEnum : void** out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "P2P.dll"
#cfunc global PeerCollabEnumApplicationRegistrationInfo "PeerCollabEnumApplicationRegistrationInfo" int, sptr
; res = PeerCollabEnumApplicationRegistrationInfo(registrationType, phPeerEnum)
; registrationType : PEER_APPLICATION_REGISTRATION_TYPE -> "int"
; phPeerEnum : void** out -> "sptr"; HRESULT PeerCollabEnumApplicationRegistrationInfo(PEER_APPLICATION_REGISTRATION_TYPE registrationType, void** phPeerEnum)
#uselib "P2P.dll"
#cfunc global PeerCollabEnumApplicationRegistrationInfo "PeerCollabEnumApplicationRegistrationInfo" int, intptr
; res = PeerCollabEnumApplicationRegistrationInfo(registrationType, phPeerEnum)
; registrationType : PEER_APPLICATION_REGISTRATION_TYPE -> "int"
; phPeerEnum : void** out -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
p2p = windows.NewLazySystemDLL("P2P.dll")
procPeerCollabEnumApplicationRegistrationInfo = p2p.NewProc("PeerCollabEnumApplicationRegistrationInfo")
)
// registrationType (PEER_APPLICATION_REGISTRATION_TYPE), phPeerEnum (void** out)
r1, _, err := procPeerCollabEnumApplicationRegistrationInfo.Call(
uintptr(registrationType),
uintptr(phPeerEnum),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction PeerCollabEnumApplicationRegistrationInfo(
registrationType: Integer; // PEER_APPLICATION_REGISTRATION_TYPE
phPeerEnum: Pointer // void** out
): Integer; stdcall;
external 'P2P.dll' name 'PeerCollabEnumApplicationRegistrationInfo';result := DllCall("P2P\PeerCollabEnumApplicationRegistrationInfo"
, "Int", registrationType ; PEER_APPLICATION_REGISTRATION_TYPE
, "Ptr", phPeerEnum ; void** out
, "Int") ; return: HRESULT●PeerCollabEnumApplicationRegistrationInfo(registrationType, phPeerEnum) = DLL("P2P.dll", "int PeerCollabEnumApplicationRegistrationInfo(int, void*)")
# 呼び出し: PeerCollabEnumApplicationRegistrationInfo(registrationType, phPeerEnum)
# registrationType : PEER_APPLICATION_REGISTRATION_TYPE -> "int"
# phPeerEnum : void** out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。