ホーム › NetworkManagement.WNet › NPGetCaps
NPGetCaps
関数ネットワークプロバイダーがサポートする機能を問い合わせる。
シグネチャ
// davclnt.dll
#include <windows.h>
DWORD NPGetCaps(
DWORD ndex
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| ndex | DWORD | in |
戻り値の型: DWORD
各言語での呼び出し定義
// davclnt.dll
#include <windows.h>
DWORD NPGetCaps(
DWORD ndex
);[DllImport("davclnt.dll", ExactSpelling = true)]
static extern uint NPGetCaps(
uint ndex // DWORD
);<DllImport("davclnt.dll", ExactSpelling:=True)>
Public Shared Function NPGetCaps(
ndex As UInteger ' DWORD
) As UInteger
End Function' ndex : DWORD
Declare PtrSafe Function NPGetCaps Lib "davclnt" ( _
ByVal ndex As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
NPGetCaps = ctypes.windll.davclnt.NPGetCaps
NPGetCaps.restype = wintypes.DWORD
NPGetCaps.argtypes = [
wintypes.DWORD, # ndex : DWORD
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('davclnt.dll')
NPGetCaps = Fiddle::Function.new(
lib['NPGetCaps'],
[
-Fiddle::TYPE_INT, # ndex : DWORD
],
-Fiddle::TYPE_INT)#[link(name = "davclnt")]
extern "system" {
fn NPGetCaps(
ndex: u32 // DWORD
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("davclnt.dll")]
public static extern uint NPGetCaps(uint ndex);
"@
$api = Add-Type -MemberDefinition $sig -Name 'davclnt_NPGetCaps' -Namespace Win32 -PassThru
# $api::NPGetCaps(ndex)#uselib "davclnt.dll"
#func global NPGetCaps "NPGetCaps" sptr
; NPGetCaps ndex ; 戻り値は stat
; ndex : DWORD -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "davclnt.dll"
#cfunc global NPGetCaps "NPGetCaps" int
; res = NPGetCaps(ndex)
; ndex : DWORD -> "int"; DWORD NPGetCaps(DWORD ndex)
#uselib "davclnt.dll"
#cfunc global NPGetCaps "NPGetCaps" int
; res = NPGetCaps(ndex)
; ndex : DWORD -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
davclnt = windows.NewLazySystemDLL("davclnt.dll")
procNPGetCaps = davclnt.NewProc("NPGetCaps")
)
// ndex (DWORD)
r1, _, err := procNPGetCaps.Call(
uintptr(ndex),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction NPGetCaps(
ndex: DWORD // DWORD
): DWORD; stdcall;
external 'davclnt.dll' name 'NPGetCaps';result := DllCall("davclnt\NPGetCaps"
, "UInt", ndex ; DWORD
, "UInt") ; return: DWORD●NPGetCaps(ndex) = DLL("davclnt.dll", "dword NPGetCaps(dword)")
# 呼び出し: NPGetCaps(ndex)
# ndex : DWORD -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。