선언:

C#

public struct OFSTRUCT {
    public Byte cBytes;
    public Byte fFixedDisk;
    public UInt16 nErrCode;
    public UInt16 Reserved1;
    public UInt16 Reserved2;
    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)]
    public String szPathName;
}


VB.NET

Public Structure OFSTRUCT
    Public cBytes As [Byte]
    Public fFixedDisk As [Byte]
    Public nErrCode As UInt16
    Public Reserved1 As UInt16
    Public Reserved2 As UInt16
    <MarshalAs(UnmanagedType.ByValTStr, SizeConst := 128)> _
    Public szPathName As [String]
End Structure




필드 설명:

cBytes - 구조체의 크기를 입력합니다.

fFixedDisk - 이 값이 0이 아닐 경우 (고정된) 하드 디스크이고 0일 경우엔 아닙니다.

nErrCode - OpenFile API가 실패한 경우의 DOS 오류 코드입니다.

Reserved1, Reserved2 - 예약되었으므로 사용하지 않습니다.

szPathName - 파일의 전체 경로입니다.




구조체 설명:

OpenFile API에 사용되는 구조체입니다.




참고:

OFSTRUCT (MSDN)




비고:




'API Reference' 카테고리의 다른 글

46. GetFileSize  (0) 2014.11.09
45. OpenFile  (0) 2014.11.09
43. GetFileAttributes  (0) 2014.11.06
42. FileAttributes  (0) 2014.11.05
41. GetTempPath  (0) 2014.10.31

+ Recent posts