/* * TYPELIB * * Copyright 1997 Marcus Meissner * 1999 Rein Klazes * 2000 Francois Jacques * 2001 Huw D M Davies for CodeWeavers * 2004 Alastair Bridgewater * 2005 Robert Shearman, for CodeWeavers * 2013 Andrew Eikum for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * * -------------------------------------------------------------------------------------- * Known problems (2000, Francois Jacques) * * - Tested using OLEVIEW (Platform SDK tool) only. * * - dual interface dispinterfaces. vtable-interface ITypeInfo instances are * creating by doing a straight copy of the dispinterface instance and just changing * its typekind. Pointed structures aren't copied - only the address of the pointers. * * - locale stuff is partially implemented but hasn't been tested. * * - typelib file is still read in its entirety, but it is released now. * * -------------------------------------------------------------------------------------- * Known problems left from previous implementation (1999, Rein Klazes) : * * -. Data structures are straightforward, but slow for look-ups. * -. (related) nothing is hashed * -. Most error return values are just guessed not checked with windows * behaviour. * -. lousy fatal error handling * */ //#include "precomp.h" //#include <winternl.h> //#include <lzexpand.h> //#include "typelib.h" //WINE_DEFAULT_DEBUG_CHANNEL(ole); //WINE_DECLARE_DEBUG_CHANNEL(typelib); #if __REACTOS__ /* FIXME: Vista+ */ //#define STATUS_SUCCESS ((NTSTATUS)0x00000000) static BOOL WINAPI GetFileInformationByHandleEx( HANDLE handle, FILE_INFO_BY_HANDLE_CLASS class,
public static extern int SetFileInformationByHandle([NativeTypeName("HANDLE")] IntPtr hFile, FILE_INFO_BY_HANDLE_CLASS FileInformationClass, [NativeTypeName("LPVOID")] void *lpFileInformation, [NativeTypeName("DWORD")] uint dwBufferSize);
internal static extern bool SetFileInformationByHandle(SafeFileHandle hFile, FILE_INFO_BY_HANDLE_CLASS FileInformationClass, ref FILE_BASIC_INFO lpFileInformation, uint dwBufferSize);
public static extern bool GetFileInformationByHandleEx( SafeFileHandle hFile, FILE_INFO_BY_HANDLE_CLASS infoClass, out FILE_ID_BOTH_DIR_INFO dirInfo, uint dwBufferSize);
private static extern bool GetFileInformationByHandleEx(IntPtr handle, FILE_INFO_BY_HANDLE_CLASS FileInformationClass, IntPtr lpFileInformation, int dwBufferSize);
private static extern bool GetFileInformationByHandleEx( IntPtr hFile, FILE_INFO_BY_HANDLE_CLASS fileInformationClass, out FILE_ID_INFO lpFileInformation, uint dwBufferSize);
unsafe public static extern bool GetFileInformationByHandleEx( SafeFileHandle hFile, FILE_INFO_BY_HANDLE_CLASS FileInformationClass, void *lpFileInformation, uint dwBufferSize);
public static extern bool SetFileInformationByHandle(IntPtr hFile, FILE_INFO_BY_HANDLE_CLASS FileInformationClass, ref FILE_DISPOSITION_INFO lpFileInformation, uint dwBufferSize);
static extern bool GetFileInformationByHandleEx(IntPtr handle, FILE_INFO_BY_HANDLE_CLASS infoClass, IntPtr info, int size);
public static unsafe extern bool GetFileInformationByHandleEx( IntPtr hFile , FILE_INFO_BY_HANDLE_CLASS infoClass , byte *buffer , UInt32 dwBufferSize);
public unsafe static extern bool GetFileInformationByHandleEx( IntPtr hFile, FILE_INFO_BY_HANDLE_CLASS FileInformationClass, byte[] lpFileInformation, uint dwBufferSize);
private static extern bool GetFileInformationByHandleEx(HANDLE hFile, FILE_INFO_BY_HANDLE_CLASS infoClass, out FILE_ID_BOTH_DIR_INFO dirInfo, uint dwBufferSize);
internal static extern bool GetFileInformationByHandleEx([In] SafeFileHandle hFile, FILE_INFO_BY_HANDLE_CLASS infoClass, out FILE_STORAGE_INFO fileStorageInfo, uint dwBufferSize);
internal static extern bool GetFileInformationByHandleEx(IntPtr hFile, FILE_INFO_BY_HANDLE_CLASS infoClass, out FILE_STANDARD_INFO info, uint dwBufferSize);
private static extern bool SetFileInformationByHandle( IntPtr hFile, FILE_INFO_BY_HANDLE_CLASS FileInformationClass, [MarshalAs(UnmanagedType.Struct)] ref FILE_IO_PRIORITY_HINT_INFO lpFileInformation, int dwBufferSize);
internal static extern bool GetFileInformationByHandleEx(SafeFileHandle hFile, FILE_INFO_BY_HANDLE_CLASS FileInformationClass, out FILE_STANDARD_INFO lpFileInformation, uint dwBufferSize);
private static extern bool GetFileInformationByHandleEx(SafeFileHandle hFile, FILE_INFO_BY_HANDLE_CLASS FileInformationClass, out FILE_BASIC_INFO lpFileInformation, int dwBufferSize);
public static extern bool GetFileInformationByHandleEx(SafeFileHandle hFile, FILE_INFO_BY_HANDLE_CLASS FileInformationClass, IntPtr lpFileInformation, uint dwBufferSize);
private static extern string GetFileInformationByHandleEx(IntPtr hFile, FILE_INFO_BY_HANDLE_CLASS infoClass, out FILE_ID_BOTH_DIR_INFO dirInfo, uint dwBufferSize);
public static extern bool SetFileInformationByHandle( SafeFileHandle hFile, FILE_INFO_BY_HANDLE_CLASS fileInformationClass, ref FileInformation fileInformation, Int32 dwBufferSize );