ホーム › Networking.Clustering › ClusterPrepareSharedVolumeForBackup
ClusterPrepareSharedVolumeForBackup
関数クラスタ共有ボリュームをバックアップ用に準備する。
シグネチャ
// RESUTILS.dll
#include <windows.h>
DWORD ClusterPrepareSharedVolumeForBackup(
LPCWSTR lpszFileName,
LPWSTR lpszVolumePathName,
DWORD* lpcchVolumePathName,
LPWSTR lpszVolumeName,
DWORD* lpcchVolumeName
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| lpszFileName | LPCWSTR | in | バックアップ準備を行うCSV上のファイルパス。 |
| lpszVolumePathName | LPWSTR | out | 対象ボリュームのパスを受け取るバッファー。NULLでサイズ問い合わせ。 |
| lpcchVolumePathName | DWORD* | inout | lpszVolumePathNameの文字数を入出力する変数へのポインター。 |
| lpszVolumeName | LPWSTR | out | 対象ボリュームの一意名を受け取るバッファー。NULL可。 |
| lpcchVolumeName | DWORD* | inout | lpszVolumeNameの文字数を入出力する変数へのポインター。 |
戻り値の型: DWORD
各言語での呼び出し定義
// RESUTILS.dll
#include <windows.h>
DWORD ClusterPrepareSharedVolumeForBackup(
LPCWSTR lpszFileName,
LPWSTR lpszVolumePathName,
DWORD* lpcchVolumePathName,
LPWSTR lpszVolumeName,
DWORD* lpcchVolumeName
);[DllImport("RESUTILS.dll", ExactSpelling = true)]
static extern uint ClusterPrepareSharedVolumeForBackup(
[MarshalAs(UnmanagedType.LPWStr)] string lpszFileName, // LPCWSTR
[MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder lpszVolumePathName, // LPWSTR out
ref uint lpcchVolumePathName, // DWORD* in/out
[MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder lpszVolumeName, // LPWSTR out
ref uint lpcchVolumeName // DWORD* in/out
);<DllImport("RESUTILS.dll", ExactSpelling:=True)>
Public Shared Function ClusterPrepareSharedVolumeForBackup(
<MarshalAs(UnmanagedType.LPWStr)> lpszFileName As String, ' LPCWSTR
<MarshalAs(UnmanagedType.LPWStr)> lpszVolumePathName As System.Text.StringBuilder, ' LPWSTR out
ByRef lpcchVolumePathName As UInteger, ' DWORD* in/out
<MarshalAs(UnmanagedType.LPWStr)> lpszVolumeName As System.Text.StringBuilder, ' LPWSTR out
ByRef lpcchVolumeName As UInteger ' DWORD* in/out
) As UInteger
End Function' lpszFileName : LPCWSTR
' lpszVolumePathName : LPWSTR out
' lpcchVolumePathName : DWORD* in/out
' lpszVolumeName : LPWSTR out
' lpcchVolumeName : DWORD* in/out
Declare PtrSafe Function ClusterPrepareSharedVolumeForBackup Lib "resutils" ( _
ByVal lpszFileName As LongPtr, _
ByVal lpszVolumePathName As LongPtr, _
ByRef lpcchVolumePathName As Long, _
ByVal lpszVolumeName As LongPtr, _
ByRef lpcchVolumeName As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
ClusterPrepareSharedVolumeForBackup = ctypes.windll.resutils.ClusterPrepareSharedVolumeForBackup
ClusterPrepareSharedVolumeForBackup.restype = wintypes.DWORD
ClusterPrepareSharedVolumeForBackup.argtypes = [
wintypes.LPCWSTR, # lpszFileName : LPCWSTR
wintypes.LPWSTR, # lpszVolumePathName : LPWSTR out
ctypes.POINTER(wintypes.DWORD), # lpcchVolumePathName : DWORD* in/out
wintypes.LPWSTR, # lpszVolumeName : LPWSTR out
ctypes.POINTER(wintypes.DWORD), # lpcchVolumeName : DWORD* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('RESUTILS.dll')
ClusterPrepareSharedVolumeForBackup = Fiddle::Function.new(
lib['ClusterPrepareSharedVolumeForBackup'],
[
Fiddle::TYPE_VOIDP, # lpszFileName : LPCWSTR
Fiddle::TYPE_VOIDP, # lpszVolumePathName : LPWSTR out
Fiddle::TYPE_VOIDP, # lpcchVolumePathName : DWORD* in/out
Fiddle::TYPE_VOIDP, # lpszVolumeName : LPWSTR out
Fiddle::TYPE_VOIDP, # lpcchVolumeName : DWORD* in/out
],
-Fiddle::TYPE_INT)#[link(name = "resutils")]
extern "system" {
fn ClusterPrepareSharedVolumeForBackup(
lpszFileName: *const u16, // LPCWSTR
lpszVolumePathName: *mut u16, // LPWSTR out
lpcchVolumePathName: *mut u32, // DWORD* in/out
lpszVolumeName: *mut u16, // LPWSTR out
lpcchVolumeName: *mut u32 // DWORD* in/out
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("RESUTILS.dll")]
public static extern uint ClusterPrepareSharedVolumeForBackup([MarshalAs(UnmanagedType.LPWStr)] string lpszFileName, [MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder lpszVolumePathName, ref uint lpcchVolumePathName, [MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder lpszVolumeName, ref uint lpcchVolumeName);
"@
$api = Add-Type -MemberDefinition $sig -Name 'RESUTILS_ClusterPrepareSharedVolumeForBackup' -Namespace Win32 -PassThru
# $api::ClusterPrepareSharedVolumeForBackup(lpszFileName, lpszVolumePathName, lpcchVolumePathName, lpszVolumeName, lpcchVolumeName)#uselib "RESUTILS.dll"
#func global ClusterPrepareSharedVolumeForBackup "ClusterPrepareSharedVolumeForBackup" sptr, sptr, sptr, sptr, sptr
; ClusterPrepareSharedVolumeForBackup lpszFileName, varptr(lpszVolumePathName), varptr(lpcchVolumePathName), varptr(lpszVolumeName), varptr(lpcchVolumeName) ; 戻り値は stat
; lpszFileName : LPCWSTR -> "sptr"
; lpszVolumePathName : LPWSTR out -> "sptr"
; lpcchVolumePathName : DWORD* in/out -> "sptr"
; lpszVolumeName : LPWSTR out -> "sptr"
; lpcchVolumeName : DWORD* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "RESUTILS.dll" #cfunc global ClusterPrepareSharedVolumeForBackup "ClusterPrepareSharedVolumeForBackup" wstr, var, var, var, var ; res = ClusterPrepareSharedVolumeForBackup(lpszFileName, lpszVolumePathName, lpcchVolumePathName, lpszVolumeName, lpcchVolumeName) ; lpszFileName : LPCWSTR -> "wstr" ; lpszVolumePathName : LPWSTR out -> "var" ; lpcchVolumePathName : DWORD* in/out -> "var" ; lpszVolumeName : LPWSTR out -> "var" ; lpcchVolumeName : DWORD* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "RESUTILS.dll" #cfunc global ClusterPrepareSharedVolumeForBackup "ClusterPrepareSharedVolumeForBackup" wstr, sptr, sptr, sptr, sptr ; res = ClusterPrepareSharedVolumeForBackup(lpszFileName, varptr(lpszVolumePathName), varptr(lpcchVolumePathName), varptr(lpszVolumeName), varptr(lpcchVolumeName)) ; lpszFileName : LPCWSTR -> "wstr" ; lpszVolumePathName : LPWSTR out -> "sptr" ; lpcchVolumePathName : DWORD* in/out -> "sptr" ; lpszVolumeName : LPWSTR out -> "sptr" ; lpcchVolumeName : DWORD* in/out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; DWORD ClusterPrepareSharedVolumeForBackup(LPCWSTR lpszFileName, LPWSTR lpszVolumePathName, DWORD* lpcchVolumePathName, LPWSTR lpszVolumeName, DWORD* lpcchVolumeName) #uselib "RESUTILS.dll" #cfunc global ClusterPrepareSharedVolumeForBackup "ClusterPrepareSharedVolumeForBackup" wstr, var, var, var, var ; res = ClusterPrepareSharedVolumeForBackup(lpszFileName, lpszVolumePathName, lpcchVolumePathName, lpszVolumeName, lpcchVolumeName) ; lpszFileName : LPCWSTR -> "wstr" ; lpszVolumePathName : LPWSTR out -> "var" ; lpcchVolumePathName : DWORD* in/out -> "var" ; lpszVolumeName : LPWSTR out -> "var" ; lpcchVolumeName : DWORD* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; DWORD ClusterPrepareSharedVolumeForBackup(LPCWSTR lpszFileName, LPWSTR lpszVolumePathName, DWORD* lpcchVolumePathName, LPWSTR lpszVolumeName, DWORD* lpcchVolumeName) #uselib "RESUTILS.dll" #cfunc global ClusterPrepareSharedVolumeForBackup "ClusterPrepareSharedVolumeForBackup" wstr, intptr, intptr, intptr, intptr ; res = ClusterPrepareSharedVolumeForBackup(lpszFileName, varptr(lpszVolumePathName), varptr(lpcchVolumePathName), varptr(lpszVolumeName), varptr(lpcchVolumeName)) ; lpszFileName : LPCWSTR -> "wstr" ; lpszVolumePathName : LPWSTR out -> "intptr" ; lpcchVolumePathName : DWORD* in/out -> "intptr" ; lpszVolumeName : LPWSTR out -> "intptr" ; lpcchVolumeName : DWORD* in/out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
resutils = windows.NewLazySystemDLL("RESUTILS.dll")
procClusterPrepareSharedVolumeForBackup = resutils.NewProc("ClusterPrepareSharedVolumeForBackup")
)
// lpszFileName (LPCWSTR), lpszVolumePathName (LPWSTR out), lpcchVolumePathName (DWORD* in/out), lpszVolumeName (LPWSTR out), lpcchVolumeName (DWORD* in/out)
r1, _, err := procClusterPrepareSharedVolumeForBackup.Call(
uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(lpszFileName))),
uintptr(lpszVolumePathName),
uintptr(lpcchVolumePathName),
uintptr(lpszVolumeName),
uintptr(lpcchVolumeName),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction ClusterPrepareSharedVolumeForBackup(
lpszFileName: PWideChar; // LPCWSTR
lpszVolumePathName: PWideChar; // LPWSTR out
lpcchVolumePathName: Pointer; // DWORD* in/out
lpszVolumeName: PWideChar; // LPWSTR out
lpcchVolumeName: Pointer // DWORD* in/out
): DWORD; stdcall;
external 'RESUTILS.dll' name 'ClusterPrepareSharedVolumeForBackup';result := DllCall("RESUTILS\ClusterPrepareSharedVolumeForBackup"
, "WStr", lpszFileName ; LPCWSTR
, "Ptr", lpszVolumePathName ; LPWSTR out
, "Ptr", lpcchVolumePathName ; DWORD* in/out
, "Ptr", lpszVolumeName ; LPWSTR out
, "Ptr", lpcchVolumeName ; DWORD* in/out
, "UInt") ; return: DWORD●ClusterPrepareSharedVolumeForBackup(lpszFileName, lpszVolumePathName, lpcchVolumePathName, lpszVolumeName, lpcchVolumeName) = DLL("RESUTILS.dll", "dword ClusterPrepareSharedVolumeForBackup(char*, char*, void*, char*, void*)")
# 呼び出し: ClusterPrepareSharedVolumeForBackup(lpszFileName, lpszVolumePathName, lpcchVolumePathName, lpszVolumeName, lpcchVolumeName)
# lpszFileName : LPCWSTR -> "char*"
# lpszVolumePathName : LPWSTR out -> "char*"
# lpcchVolumePathName : DWORD* in/out -> "void*"
# lpszVolumeName : LPWSTR out -> "char*"
# lpcchVolumeName : DWORD* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。const std = @import("std");
extern "resutils" fn ClusterPrepareSharedVolumeForBackup(
lpszFileName: [*c]const u16, // LPCWSTR
lpszVolumePathName: [*c]u16, // LPWSTR out
lpcchVolumePathName: [*c]u32, // DWORD* in/out
lpszVolumeName: [*c]u16, // LPWSTR out
lpcchVolumeName: [*c]u32 // DWORD* in/out
) callconv(std.os.windows.WINAPI) u32;proc ClusterPrepareSharedVolumeForBackup(
lpszFileName: WideCString, # LPCWSTR
lpszVolumePathName: ptr uint16, # LPWSTR out
lpcchVolumePathName: ptr uint32, # DWORD* in/out
lpszVolumeName: ptr uint16, # LPWSTR out
lpcchVolumeName: ptr uint32 # DWORD* in/out
): uint32 {.importc: "ClusterPrepareSharedVolumeForBackup", stdcall, dynlib: "RESUTILS.dll".}pragma(lib, "resutils");
extern(Windows)
uint ClusterPrepareSharedVolumeForBackup(
const(wchar)* lpszFileName, // LPCWSTR
wchar* lpszVolumePathName, // LPWSTR out
uint* lpcchVolumePathName, // DWORD* in/out
wchar* lpszVolumeName, // LPWSTR out
uint* lpcchVolumeName // DWORD* in/out
);ccall((:ClusterPrepareSharedVolumeForBackup, "RESUTILS.dll"), stdcall, UInt32,
(Cwstring, Ptr{UInt16}, Ptr{UInt32}, Ptr{UInt16}, Ptr{UInt32}),
lpszFileName, lpszVolumePathName, lpcchVolumePathName, lpszVolumeName, lpcchVolumeName)
# lpszFileName : LPCWSTR -> Cwstring
# lpszVolumePathName : LPWSTR out -> Ptr{UInt16}
# lpcchVolumePathName : DWORD* in/out -> Ptr{UInt32}
# lpszVolumeName : LPWSTR out -> Ptr{UInt16}
# lpcchVolumeName : DWORD* in/out -> Ptr{UInt32}
# stdcall は 32bit のみ意味を持つ(x64 では無視)。local ffi = require("ffi")
ffi.cdef[[
uint32_t ClusterPrepareSharedVolumeForBackup(
const uint16_t* lpszFileName,
uint16_t* lpszVolumePathName,
uint32_t* lpcchVolumePathName,
uint16_t* lpszVolumeName,
uint32_t* lpcchVolumeName);
]]
local resutils = ffi.load("resutils")
-- resutils.ClusterPrepareSharedVolumeForBackup(lpszFileName, lpszVolumePathName, lpcchVolumePathName, lpszVolumeName, lpcchVolumeName)
-- lpszFileName : LPCWSTR
-- lpszVolumePathName : LPWSTR out
-- lpcchVolumePathName : DWORD* in/out
-- lpszVolumeName : LPWSTR out
-- lpcchVolumeName : DWORD* in/out
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。const koffi = require('koffi');
const lib = koffi.load('RESUTILS.dll');
const ClusterPrepareSharedVolumeForBackup = lib.func('__stdcall', 'ClusterPrepareSharedVolumeForBackup', 'uint32_t', ['str16', 'uint16_t *', 'uint32_t *', 'uint16_t *', 'uint32_t *']);
// ClusterPrepareSharedVolumeForBackup(lpszFileName, lpszVolumePathName, lpcchVolumePathName, lpszVolumeName, lpcchVolumeName)
// lpszFileName : LPCWSTR -> 'str16'
// lpszVolumePathName : LPWSTR out -> 'uint16_t *'
// lpcchVolumePathName : DWORD* in/out -> 'uint32_t *'
// lpszVolumeName : LPWSTR out -> 'uint16_t *'
// lpcchVolumeName : DWORD* in/out -> 'uint32_t *'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。const lib = Deno.dlopen("RESUTILS.dll", {
ClusterPrepareSharedVolumeForBackup: { parameters: ["buffer", "buffer", "pointer", "buffer", "pointer"], result: "u32" },
});
// lib.symbols.ClusterPrepareSharedVolumeForBackup(lpszFileName, lpszVolumePathName, lpcchVolumePathName, lpszVolumeName, lpcchVolumeName)
// lpszFileName : LPCWSTR -> "buffer"
// lpszVolumePathName : LPWSTR out -> "buffer"
// lpcchVolumePathName : DWORD* in/out -> "pointer"
// lpszVolumeName : LPWSTR out -> "buffer"
// lpcchVolumeName : DWORD* in/out -> "pointer"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。<?php
$ffi = FFI::cdef(<<<C
uint32_t ClusterPrepareSharedVolumeForBackup(
const uint16_t* lpszFileName,
uint16_t* lpszVolumePathName,
uint32_t* lpcchVolumePathName,
uint16_t* lpszVolumeName,
uint32_t* lpcchVolumeName);
C, "RESUTILS.dll");
// $ffi->ClusterPrepareSharedVolumeForBackup(lpszFileName, lpszVolumePathName, lpcchVolumePathName, lpszVolumeName, lpcchVolumeName);
// lpszFileName : LPCWSTR
// lpszVolumePathName : LPWSTR out
// lpcchVolumePathName : DWORD* in/out
// lpszVolumeName : LPWSTR out
// lpcchVolumeName : DWORD* in/out
// 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
// WINAPI(stdcall): x64 では呼出規約が統一されるため問題なし。x86 では __stdcall 対応のラッパが必要な場合あり。import com.sun.jna.*;
import com.sun.jna.ptr.*;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;
public interface Resutils extends StdCallLibrary {
Resutils INSTANCE = Native.load("resutils", Resutils.class);
int ClusterPrepareSharedVolumeForBackup(
WString lpszFileName, // LPCWSTR
char[] lpszVolumePathName, // LPWSTR out
IntByReference lpcchVolumePathName, // DWORD* in/out
char[] lpszVolumeName, // LPWSTR out
IntByReference lpcchVolumeName // DWORD* in/out
);
}@[Link("resutils")]
lib LibRESUTILS
fun ClusterPrepareSharedVolumeForBackup = ClusterPrepareSharedVolumeForBackup(
lpszFileName : UInt16*, # LPCWSTR
lpszVolumePathName : UInt16*, # LPWSTR out
lpcchVolumePathName : UInt32*, # DWORD* in/out
lpszVolumeName : UInt16*, # LPWSTR out
lpcchVolumeName : UInt32* # DWORD* in/out
) : UInt32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。import 'dart:ffi';
import 'package:ffi/ffi.dart';
typedef ClusterPrepareSharedVolumeForBackupNative = Uint32 Function(Pointer<Utf16>, Pointer<Utf16>, Pointer<Uint32>, Pointer<Utf16>, Pointer<Uint32>);
typedef ClusterPrepareSharedVolumeForBackupDart = int Function(Pointer<Utf16>, Pointer<Utf16>, Pointer<Uint32>, Pointer<Utf16>, Pointer<Uint32>);
final ClusterPrepareSharedVolumeForBackup = DynamicLibrary.open('RESUTILS.dll')
.lookupFunction<ClusterPrepareSharedVolumeForBackupNative, ClusterPrepareSharedVolumeForBackupDart>('ClusterPrepareSharedVolumeForBackup');
// lpszFileName : LPCWSTR -> Pointer<Utf16>
// lpszVolumePathName : LPWSTR out -> Pointer<Utf16>
// lpcchVolumePathName : DWORD* in/out -> Pointer<Uint32>
// lpszVolumeName : LPWSTR out -> Pointer<Utf16>
// lpcchVolumeName : DWORD* in/out -> Pointer<Uint32>
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。{$mode objfpc}{$H+}
function ClusterPrepareSharedVolumeForBackup(
lpszFileName: PWideChar; // LPCWSTR
lpszVolumePathName: PWideChar; // LPWSTR out
lpcchVolumePathName: Pointer; // DWORD* in/out
lpszVolumeName: PWideChar; // LPWSTR out
lpcchVolumeName: Pointer // DWORD* in/out
): DWORD; stdcall;
external 'RESUTILS.dll' name 'ClusterPrepareSharedVolumeForBackup';import Foreign
import Foreign.C.Types
import Foreign.C.String
foreign import stdcall safe "ClusterPrepareSharedVolumeForBackup"
c_ClusterPrepareSharedVolumeForBackup :: CWString -> CWString -> Ptr Word32 -> CWString -> Ptr Word32 -> IO Word32
-- lpszFileName : LPCWSTR -> CWString
-- lpszVolumePathName : LPWSTR out -> CWString
-- lpcchVolumePathName : DWORD* in/out -> Ptr Word32
-- lpszVolumeName : LPWSTR out -> CWString
-- lpcchVolumeName : DWORD* in/out -> Ptr Word32
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。open Ctypes
open Foreign
let clusterpreparesharedvolumeforbackup =
foreign "ClusterPrepareSharedVolumeForBackup"
((ptr uint16_t) @-> (ptr uint16_t) @-> (ptr uint32_t) @-> (ptr uint16_t) @-> (ptr uint32_t) @-> returning uint32_t)
(* lpszFileName : LPCWSTR -> (ptr uint16_t) *)
(* lpszVolumePathName : LPWSTR out -> (ptr uint16_t) *)
(* lpcchVolumePathName : DWORD* in/out -> (ptr uint32_t) *)
(* lpszVolumeName : LPWSTR out -> (ptr uint16_t) *)
(* lpcchVolumeName : DWORD* in/out -> (ptr uint32_t) *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)(cffi:define-foreign-library resutils (t "RESUTILS.dll"))
(cffi:use-foreign-library resutils)
(cffi:defcfun ("ClusterPrepareSharedVolumeForBackup" cluster-prepare-shared-volume-for-backup :convention :stdcall) :uint32
(lpsz-file-name (:string :encoding :utf-16le)) ; LPCWSTR
(lpsz-volume-path-name :pointer) ; LPWSTR out
(lpcch-volume-path-name :pointer) ; DWORD* in/out
(lpsz-volume-name :pointer) ; LPWSTR out
(lpcch-volume-name :pointer)) ; DWORD* in/out
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。use Win32::API;
my $ClusterPrepareSharedVolumeForBackup = Win32::API::More->new('RESUTILS',
'DWORD ClusterPrepareSharedVolumeForBackup(LPCWSTR lpszFileName, LPWSTR lpszVolumePathName, LPVOID lpcchVolumePathName, LPWSTR lpszVolumeName, LPVOID lpcchVolumeName)');
# my $ret = $ClusterPrepareSharedVolumeForBackup->Call($lpszFileName, $lpszVolumePathName, $lpcchVolumePathName, $lpszVolumeName, $lpcchVolumeName);
# lpszFileName : LPCWSTR -> LPCWSTR
# lpszVolumePathName : LPWSTR out -> LPWSTR
# lpcchVolumePathName : DWORD* in/out -> LPVOID
# lpszVolumeName : LPWSTR out -> LPWSTR
# lpcchVolumeName : DWORD* in/out -> LPVOID
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。