/usr/share/mingw-w64/include/filehc.h is in mingw-w64-common 3.2.0-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | /**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#ifndef _FILEHC_H_
#define _FILEHC_H_
#ifdef __cplusplus
extern "C" {
#endif
typedef VOID (*PFN_IO_COMPLETION)(struct FIO_CONTEXT *pContext,struct FH_OVERLAPPED *lpo,DWORD cb,DWORD dwCompletionStatus);
struct FH_OVERLAPPED {
UINT_PTR Internal;
UINT_PTR InternalHigh;
DWORD Offset;
DWORD OffsetHigh;
HANDLE hEvent;
PFN_IO_COMPLETION pfnCompletion;
UINT_PTR Reserved1;
UINT_PTR Reserved2;
UINT_PTR Reserved3;
UINT_PTR Reserved4;
};
typedef struct FH_OVERLAPPED *PFH_OVERLAPPED;
typedef struct FIO_CONTEXT {
DWORD m_dwTempHack;
DWORD m_dwSignature;
HANDLE m_hFile;
DWORD m_dwLinesOffset;
DWORD m_dwHeaderLength;
} FIO_CONTEXT;
typedef FIO_CONTEXT *PFIO_CONTEXT;
#ifndef WINAPI
#define WINAPI __stdcall
#endif
#define FILEHC_EXPORT __declspec(dllimport)
FILEHC_EXPORT WINBOOL WINAPI FIOInitialize(DWORD dwFlags);
FILEHC_EXPORT WINBOOL WINAPI FIOTerminate(VOID);
FILEHC_EXPORT WINBOOL WINAPI FIOReadFile(PFIO_CONTEXT pContext,LPVOID lpBuffer,DWORD BytesToRead,FH_OVERLAPPED *lpo);
FILEHC_EXPORT WINBOOL WINAPI FIOReadFileEx(PFIO_CONTEXT pContext,LPVOID lpBuffer,DWORD BytesToRead,DWORD BytesAvailable,FH_OVERLAPPED *lpo,WINBOOL fFinalWrite,WINBOOL fIncludeTerminator);
FILEHC_EXPORT WINBOOL WINAPI FIOWriteFile(PFIO_CONTEXT pContext,LPCVOID lpBuffer,DWORD BytesToWrite,FH_OVERLAPPED *lpo);
FILEHC_EXPORT WINBOOL WINAPI FIOWriteFileEx(PFIO_CONTEXT pContext,LPVOID lpBuffer,DWORD BytesToWrite,DWORD BytesAvailable,FH_OVERLAPPED *lpo,WINBOOL fFinalWrite,WINBOOL fIncludeTerminator);
typedef HANDLE (WINAPI *FCACHE_CREATE_CALLBACK)(LPSTR lpstrName,LPVOID lpvData,DWORD *cbFileSize,DWORD *cbFileSizeHigh);
typedef HANDLE (WINAPI *FCACHE_RICHCREATE_CALLBACK) (LPSTR lpstrName,LPVOID lpvData,DWORD *cbFileSize,DWORD *cbFileSizeHigh,WINBOOL *pfDidWeScanIt,WINBOOL *pfIsStuffed,WINBOOL *pfStoredWithDots,WINBOOL *pfStoredWithTerminatingDot);
FILEHC_EXPORT WINBOOL WINAPI InitializeCache();
FILEHC_EXPORT WINBOOL WINAPI TerminateCache();
FILEHC_EXPORT PFIO_CONTEXT WINAPI AssociateFile(HANDLE hFile);
FILEHC_EXPORT PFIO_CONTEXT WINAPI AssociateFileEx(HANDLE hFile,WINBOOL fStoreWithDots,WINBOOL fStoredWithTerminatingDot);
FILEHC_EXPORT void WINAPI AddRefContext(PFIO_CONTEXT);
FILEHC_EXPORT void WINAPI ReleaseContext(PFIO_CONTEXT);
FILEHC_EXPORT WINBOOL WINAPI CloseNonCachedFile(PFIO_CONTEXT);
FILEHC_EXPORT FIO_CONTEXT *WINAPI CacheCreateFile(LPSTR lpstrName,FCACHE_CREATE_CALLBACK pfnCallBack,LPVOID lpv,WINBOOL fAsyncContext);
FILEHC_EXPORT FIO_CONTEXT *WINAPI CacheRichCreateFile(LPSTR lpstrName,FCACHE_RICHCREATE_CALLBACK pfnCallBack,LPVOID lpv,WINBOOL fAsyncContext);
FILEHC_EXPORT void WINAPI CacheRemoveFiles(LPSTR lpstrName,WINBOOL fAllPrefixes);
FILEHC_EXPORT WINBOOL WINAPI InsertFile(LPSTR lpstrName,FIO_CONTEXT *pContext,WINBOOL fKeepReference);
FILEHC_EXPORT DWORD WINAPI GetFileSizeFromContext(FIO_CONTEXT *pContext,DWORD *pcbFileSizeHigh);
typedef int (WINAPI *CACHE_KEY_COMPARE)(DWORD cbKey1,LPBYTE lpbKey1,DWORD cbKey2,LPBYTE lpbKey2);
typedef DWORD (WINAPI *CACHE_KEY_HASH)(LPBYTE lpbKey,DWORD cbKey);
typedef WINBOOL (WINAPI *CACHE_READ_CALLBACK)(DWORD cb,LPBYTE lpb,LPVOID lpvContext);
typedef void (WINAPI *CACHE_DESTROY_CALLBACK)(DWORD cb,LPBYTE lpb);
typedef WINBOOL (WINAPI *CACHE_ACCESS_CHECK)(PSECURITY_DESCRIPTOR pSecurityDescriptor,HANDLE hClientToken,DWORD dwDesiredAccess,PGENERIC_MAPPING GenericMapping,PRIVILEGE_SET *PrivilegeSet,LPDWORD PrivilegeSetLength,LPDWORD GrantedAccess,LPBOOL AccessStatus);
struct NAME_CACHE_CONTEXT {
DWORD m_dwSignature;
};
typedef struct NAME_CACHE_CONTEXT *PNAME_CACHE_CONTEXT;
FILEHC_EXPORT PNAME_CACHE_CONTEXT WINAPI FindOrCreateNameCache(LPSTR lpstrName,CACHE_KEY_COMPARE pfnKeyCompare,CACHE_KEY_HASH pfnKeyHash,CACHE_DESTROY_CALLBACK pfnKeyDestroy,CACHE_DESTROY_CALLBACK pfnDataDestroy);
FILEHC_EXPORT __LONG32 WINAPI ReleaseNameCache(PNAME_CACHE_CONTEXT pNameCache);
FILEHC_EXPORT WINBOOL WINAPI SetNameCacheSecurityFunction(PNAME_CACHE_CONTEXT pNameCache,CACHE_ACCESS_CHECK pfnAccessCheck);
FILEHC_EXPORT WINBOOL WINAPI FindContextFromName(PNAME_CACHE_CONTEXT pNameCache,LPBYTE lpbName,DWORD cbName,CACHE_READ_CALLBACK pfnCallback,LPVOID lpvClientContext,HANDLE hToken,ACCESS_MASK accessMask,FIO_CONTEXT **ppContext);
FILEHC_EXPORT WINBOOL WINAPI FindSyncContextFromName(PNAME_CACHE_CONTEXT pNameCache,LPBYTE lpbName,DWORD cbName,CACHE_READ_CALLBACK pfnCallback,LPVOID lpvClientContext,HANDLE hToken,ACCESS_MASK accessMask,FIO_CONTEXT **ppContext);
FILEHC_EXPORT WINBOOL WINAPI AssociateContextWithName(PNAME_CACHE_CONTEXT pNameCache,LPBYTE lpbName,DWORD cbName,LPBYTE lpbData,DWORD cbData,PGENERIC_MAPPING pGenericMapping,PSECURITY_DESCRIPTOR pSecurityDescriptor,FIO_CONTEXT *pContext,WINBOOL fKeepReference);
FILEHC_EXPORT WINBOOL WINAPI InvalidateName(PNAME_CACHE_CONTEXT pNameCache,LPBYTE lpbName,DWORD cbName);
FILEHC_EXPORT FIO_CONTEXT *WINAPI ProduceDotStuffedContext(FIO_CONTEXT *pContext,LPSTR lpstrName,WINBOOL fWantItDotStuffed);
FILEHC_EXPORT WINBOOL WINAPI ProduceDotStuffedContextInContext(FIO_CONTEXT *pContextSource,FIO_CONTEXT *pContextDestination,WINBOOL fWantItDotStuffed,WINBOOL *pfModified);
FILEHC_EXPORT WINBOOL WINAPI GetIsFileDotTerminated(FIO_CONTEXT *pContext);
FILEHC_EXPORT void WINAPI SetIsFileDotTerminated(FIO_CONTEXT *pContext,WINBOOL fIsDotTerminated);
FILEHC_EXPORT WINBOOL WINAPI SetDotStuffingOnWrites(FIO_CONTEXT *pContext,WINBOOL fEnable,WINBOOL fStripDots);
FILEHC_EXPORT WINBOOL WINAPI SetDotScanningOnWrites(FIO_CONTEXT *pContext,WINBOOL fEnable);
FILEHC_EXPORT void WINAPI CompleteDotStuffingOnWrites(FIO_CONTEXT *pContext,WINBOOL fStripDots);
FILEHC_EXPORT WINBOOL WINAPI SetDotScanningOnReads(FIO_CONTEXT *pContext,WINBOOL fEnable);
FILEHC_EXPORT WINBOOL WINAPI GetDotStuffState(FIO_CONTEXT *pContext,WINBOOL fReads,WINBOOL *pfStuffed,WINBOOL *pfStoredWithDots);
FILEHC_EXPORT void WINAPI SetDotStuffState(FIO_CONTEXT *pContext,WINBOOL fKnown,WINBOOL fRequiresStuffing);
#ifdef __cplusplus
}
#endif
#endif
|