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

ber_skip_tag

関数
BERストリームの現在のタグをスキップする。
DLLWLDAP32.dll呼出規約cdecl対応OSWindows Vista 以降

シグネチャ

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

DWORD ber_skip_tag(
    BerElement* pBerElement,
    DWORD* pLen
);

パラメーター

名前方向
pBerElementBerElement*inout
pLenDWORD*inout

戻り値の型: DWORD

各言語での呼び出し定義

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

DWORD ber_skip_tag(
    BerElement* pBerElement,
    DWORD* pLen
);
[DllImport("WLDAP32.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern uint ber_skip_tag(
    IntPtr pBerElement,   // BerElement* in/out
    ref uint pLen   // DWORD* in/out
);
<DllImport("WLDAP32.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function ber_skip_tag(
    pBerElement As IntPtr,   ' BerElement* in/out
    ByRef pLen As UInteger   ' DWORD* in/out
) As UInteger
End Function
' pBerElement : BerElement* in/out
' pLen : DWORD* in/out
Declare PtrSafe Function ber_skip_tag Lib "wldap32" ( _
    ByVal pBerElement As LongPtr, _
    ByRef pLen As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

ber_skip_tag = ctypes.cdll.wldap32.ber_skip_tag
ber_skip_tag.restype = wintypes.DWORD
ber_skip_tag.argtypes = [
    ctypes.c_void_p,  # pBerElement : BerElement* in/out
    ctypes.POINTER(wintypes.DWORD),  # pLen : DWORD* in/out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('WLDAP32.dll')
ber_skip_tag = Fiddle::Function.new(
  lib['ber_skip_tag'],
  [
    Fiddle::TYPE_VOIDP,  # pBerElement : BerElement* in/out
    Fiddle::TYPE_VOIDP,  # pLen : DWORD* in/out
  ],
  -Fiddle::TYPE_INT, Fiddle::Function::CDECL)
#[link(name = "wldap32")]
extern "C" {
    fn ber_skip_tag(
        pBerElement: *mut BerElement,  // BerElement* in/out
        pLen: *mut u32  // DWORD* in/out
    ) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("WLDAP32.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern uint ber_skip_tag(IntPtr pBerElement, ref uint pLen);
"@
$api = Add-Type -MemberDefinition $sig -Name 'WLDAP32_ber_skip_tag' -Namespace Win32 -PassThru
# $api::ber_skip_tag(pBerElement, pLen)
#uselib "WLDAP32.dll"
#func global ber_skip_tag "ber_skip_tag" sptr, sptr
; ber_skip_tag varptr(pBerElement), varptr(pLen)   ; 戻り値は stat
; pBerElement : BerElement* in/out -> "sptr"
; pLen : DWORD* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "WLDAP32.dll"
#cfunc global ber_skip_tag "ber_skip_tag" var, var
; res = ber_skip_tag(pBerElement, pLen)
; pBerElement : BerElement* in/out -> "var"
; pLen : DWORD* in/out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; DWORD ber_skip_tag(BerElement* pBerElement, DWORD* pLen)
#uselib "WLDAP32.dll"
#cfunc global ber_skip_tag "ber_skip_tag" var, var
; res = ber_skip_tag(pBerElement, pLen)
; pBerElement : BerElement* in/out -> "var"
; pLen : DWORD* in/out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	wldap32 = windows.NewLazySystemDLL("WLDAP32.dll")
	procber_skip_tag = wldap32.NewProc("ber_skip_tag")
)

// pBerElement (BerElement* in/out), pLen (DWORD* in/out)
r1, _, err := procber_skip_tag.Call(
	uintptr(pBerElement),
	uintptr(pLen),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // DWORD
function ber_skip_tag(
  pBerElement: Pointer;   // BerElement* in/out
  pLen: Pointer   // DWORD* in/out
): DWORD; cdecl;
  external 'WLDAP32.dll' name 'ber_skip_tag';
result := DllCall("WLDAP32\ber_skip_tag"
    , "Ptr", pBerElement   ; BerElement* in/out
    , "Ptr", pLen   ; DWORD* in/out
    , "Cdecl UInt")   ; return: DWORD
●ber_skip_tag(pBerElement, pLen) = DLL("WLDAP32.dll", "dword ber_skip_tag(void*, void*)")
# 呼び出し: ber_skip_tag(pBerElement, pLen)
# pBerElement : BerElement* in/out -> "void*"
# pLen : DWORD* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。