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

ClusterClearBackupStateForSharedVolume

関数
共有ボリュームのバックアップ状態を解除する。
DLLRESUTILS.dll呼出規約winapi対応OSwindowsserver2008

シグネチャ

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

DWORD ClusterClearBackupStateForSharedVolume(
    LPCWSTR lpszVolumePathName
);

パラメーター

名前方向
lpszVolumePathNameLPCWSTRin

戻り値の型: DWORD

各言語での呼び出し定義

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

DWORD ClusterClearBackupStateForSharedVolume(
    LPCWSTR lpszVolumePathName
);
[DllImport("RESUTILS.dll", ExactSpelling = true)]
static extern uint ClusterClearBackupStateForSharedVolume(
    [MarshalAs(UnmanagedType.LPWStr)] string lpszVolumePathName   // LPCWSTR
);
<DllImport("RESUTILS.dll", ExactSpelling:=True)>
Public Shared Function ClusterClearBackupStateForSharedVolume(
    <MarshalAs(UnmanagedType.LPWStr)> lpszVolumePathName As String   ' LPCWSTR
) As UInteger
End Function
' lpszVolumePathName : LPCWSTR
Declare PtrSafe Function ClusterClearBackupStateForSharedVolume Lib "resutils" ( _
    ByVal lpszVolumePathName As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

ClusterClearBackupStateForSharedVolume = ctypes.windll.resutils.ClusterClearBackupStateForSharedVolume
ClusterClearBackupStateForSharedVolume.restype = wintypes.DWORD
ClusterClearBackupStateForSharedVolume.argtypes = [
    wintypes.LPCWSTR,  # lpszVolumePathName : LPCWSTR
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('RESUTILS.dll')
ClusterClearBackupStateForSharedVolume = Fiddle::Function.new(
  lib['ClusterClearBackupStateForSharedVolume'],
  [
    Fiddle::TYPE_VOIDP,  # lpszVolumePathName : LPCWSTR
  ],
  -Fiddle::TYPE_INT)
#[link(name = "resutils")]
extern "system" {
    fn ClusterClearBackupStateForSharedVolume(
        lpszVolumePathName: *const u16  // LPCWSTR
    ) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("RESUTILS.dll")]
public static extern uint ClusterClearBackupStateForSharedVolume([MarshalAs(UnmanagedType.LPWStr)] string lpszVolumePathName);
"@
$api = Add-Type -MemberDefinition $sig -Name 'RESUTILS_ClusterClearBackupStateForSharedVolume' -Namespace Win32 -PassThru
# $api::ClusterClearBackupStateForSharedVolume(lpszVolumePathName)
#uselib "RESUTILS.dll"
#func global ClusterClearBackupStateForSharedVolume "ClusterClearBackupStateForSharedVolume" sptr
; ClusterClearBackupStateForSharedVolume lpszVolumePathName   ; 戻り値は stat
; lpszVolumePathName : LPCWSTR -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "RESUTILS.dll"
#cfunc global ClusterClearBackupStateForSharedVolume "ClusterClearBackupStateForSharedVolume" wstr
; res = ClusterClearBackupStateForSharedVolume(lpszVolumePathName)
; lpszVolumePathName : LPCWSTR -> "wstr"
; DWORD ClusterClearBackupStateForSharedVolume(LPCWSTR lpszVolumePathName)
#uselib "RESUTILS.dll"
#cfunc global ClusterClearBackupStateForSharedVolume "ClusterClearBackupStateForSharedVolume" wstr
; res = ClusterClearBackupStateForSharedVolume(lpszVolumePathName)
; lpszVolumePathName : LPCWSTR -> "wstr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	resutils = windows.NewLazySystemDLL("RESUTILS.dll")
	procClusterClearBackupStateForSharedVolume = resutils.NewProc("ClusterClearBackupStateForSharedVolume")
)

// lpszVolumePathName (LPCWSTR)
r1, _, err := procClusterClearBackupStateForSharedVolume.Call(
	uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(lpszVolumePathName))),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // DWORD
function ClusterClearBackupStateForSharedVolume(
  lpszVolumePathName: PWideChar   // LPCWSTR
): DWORD; stdcall;
  external 'RESUTILS.dll' name 'ClusterClearBackupStateForSharedVolume';
result := DllCall("RESUTILS\ClusterClearBackupStateForSharedVolume"
    , "WStr", lpszVolumePathName   ; LPCWSTR
    , "UInt")   ; return: DWORD
●ClusterClearBackupStateForSharedVolume(lpszVolumePathName) = DLL("RESUTILS.dll", "dword ClusterClearBackupStateForSharedVolume(char*)")
# 呼び出し: ClusterClearBackupStateForSharedVolume(lpszVolumePathName)
# lpszVolumePathName : LPCWSTR -> "char*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。