Пример #1
0
 public static extern int LZOpenFileW([MarshalAs(UnmanagedType.LPWStr)] StringBuilder param0,
                                      ref OFStruct param1, OpenFileMode param2);
Пример #2
0
 public static extern int LZOpenFileW([MarshalAs(UnmanagedType.LPWStr)] StringBuilder param0,
     ref OFStruct param1, OpenFileMode param2);
Пример #3
0
 /// <summary>
 /// Creates, opens, reopens, or deletes the specified file
 /// </summary>
 /// <param name="lpFileName">The name of the file</param>
 /// <param name="lpReOpenBuf">A pointer to the OFSTRUCT structure that is to receive information about the
 /// file when the file is first opened. The structure can be used in subsequent calls to the LZOpenFile
 /// function to see the open file</param>
 /// <param name="wStyle">The action to be taken</param>
 /// <returns>If the function succeeds and the value specified by the wStyle parameter is not OF_READ, the
 /// return value is a handle identifying the file. If the file is compressed and opened with wStyle set to
 /// OF_READ, the return value is a special file handle</returns>
 /// <remarks>If the function fails, the return value is an LZERROR_* code. Use the LZError enum to map the error code.
 /// These codes have values less than zero. There is no extended error information for this function;
 /// DO NOT call GetLastError.</remarks>
 public static int LZOpenFile(StringBuilder lpFileName, ref OFStruct lpReOpenBuf, OpenFileMode wStyle)
 {
     return(Environment.OSVersion.Platform >= PlatformID.Win32NT ? Native.LZOpenFileW(lpFileName, ref lpReOpenBuf, wStyle) : Native.LZOpenFileA(lpFileName, ref lpReOpenBuf, wStyle));
 }
Пример #4
0
 /// <summary>
 /// Creates, opens, reopens, or deletes the specified file
 /// </summary>
 /// <param name="lpFileName">The name of the file</param>
 /// <param name="lpReOpenBuf">A pointer to the OFSTRUCT structure that is to receive information about the
 /// file when the file is first opened. The structure can be used in subsequent calls to the LZOpenFile 
 /// function to see the open file</param>
 /// <param name="wStyle">The action to be taken</param>
 /// <returns>If the function succeeds and the value specified by the wStyle parameter is not OF_READ, the
 /// return value is a handle identifying the file. If the file is compressed and opened with wStyle set to
 /// OF_READ, the return value is a special file handle</returns>
 /// <remarks>If the function fails, the return value is an LZERROR_* code. Use the LZError enum to map the error code.
 /// These codes have values less than zero. There is no extended error information for this function;
 /// DO NOT call GetLastError.</remarks>
 public static int LZOpenFile(StringBuilder lpFileName, ref OFStruct lpReOpenBuf, OpenFileMode wStyle)
 {
     return Environment.OSVersion.Platform >= PlatformID.Win32NT ? Native.LZOpenFileW(lpFileName, ref lpReOpenBuf, wStyle) : Native.LZOpenFileA(lpFileName, ref lpReOpenBuf, wStyle);
 }