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