ホーム › Networking.Clustering › ResUtilCreateDirectoryTree
ResUtilCreateDirectoryTree
関数指定パスのディレクトリ階層を作成する。
シグネチャ
// RESUTILS.dll
#include <windows.h>
DWORD ResUtilCreateDirectoryTree(
LPCWSTR pszPath
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| pszPath | LPCWSTR | in |
戻り値の型: DWORD
各言語での呼び出し定義
// RESUTILS.dll
#include <windows.h>
DWORD ResUtilCreateDirectoryTree(
LPCWSTR pszPath
);[DllImport("RESUTILS.dll", ExactSpelling = true)]
static extern uint ResUtilCreateDirectoryTree(
[MarshalAs(UnmanagedType.LPWStr)] string pszPath // LPCWSTR
);<DllImport("RESUTILS.dll", ExactSpelling:=True)>
Public Shared Function ResUtilCreateDirectoryTree(
<MarshalAs(UnmanagedType.LPWStr)> pszPath As String ' LPCWSTR
) As UInteger
End Function' pszPath : LPCWSTR
Declare PtrSafe Function ResUtilCreateDirectoryTree Lib "resutils" ( _
ByVal pszPath As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
ResUtilCreateDirectoryTree = ctypes.windll.resutils.ResUtilCreateDirectoryTree
ResUtilCreateDirectoryTree.restype = wintypes.DWORD
ResUtilCreateDirectoryTree.argtypes = [
wintypes.LPCWSTR, # pszPath : LPCWSTR
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('RESUTILS.dll')
ResUtilCreateDirectoryTree = Fiddle::Function.new(
lib['ResUtilCreateDirectoryTree'],
[
Fiddle::TYPE_VOIDP, # pszPath : LPCWSTR
],
-Fiddle::TYPE_INT)#[link(name = "resutils")]
extern "system" {
fn ResUtilCreateDirectoryTree(
pszPath: *const u16 // LPCWSTR
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("RESUTILS.dll")]
public static extern uint ResUtilCreateDirectoryTree([MarshalAs(UnmanagedType.LPWStr)] string pszPath);
"@
$api = Add-Type -MemberDefinition $sig -Name 'RESUTILS_ResUtilCreateDirectoryTree' -Namespace Win32 -PassThru
# $api::ResUtilCreateDirectoryTree(pszPath)#uselib "RESUTILS.dll"
#func global ResUtilCreateDirectoryTree "ResUtilCreateDirectoryTree" sptr
; ResUtilCreateDirectoryTree pszPath ; 戻り値は stat
; pszPath : LPCWSTR -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "RESUTILS.dll"
#cfunc global ResUtilCreateDirectoryTree "ResUtilCreateDirectoryTree" wstr
; res = ResUtilCreateDirectoryTree(pszPath)
; pszPath : LPCWSTR -> "wstr"; DWORD ResUtilCreateDirectoryTree(LPCWSTR pszPath)
#uselib "RESUTILS.dll"
#cfunc global ResUtilCreateDirectoryTree "ResUtilCreateDirectoryTree" wstr
; res = ResUtilCreateDirectoryTree(pszPath)
; pszPath : LPCWSTR -> "wstr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
resutils = windows.NewLazySystemDLL("RESUTILS.dll")
procResUtilCreateDirectoryTree = resutils.NewProc("ResUtilCreateDirectoryTree")
)
// pszPath (LPCWSTR)
r1, _, err := procResUtilCreateDirectoryTree.Call(
uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(pszPath))),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction ResUtilCreateDirectoryTree(
pszPath: PWideChar // LPCWSTR
): DWORD; stdcall;
external 'RESUTILS.dll' name 'ResUtilCreateDirectoryTree';result := DllCall("RESUTILS\ResUtilCreateDirectoryTree"
, "WStr", pszPath ; LPCWSTR
, "UInt") ; return: DWORD●ResUtilCreateDirectoryTree(pszPath) = DLL("RESUTILS.dll", "dword ResUtilCreateDirectoryTree(char*)")
# 呼び出し: ResUtilCreateDirectoryTree(pszPath)
# pszPath : LPCWSTR -> "char*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。