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