1*c2c66affSColin Finck /* 2*c2c66affSColin Finck * fltuser.h 3*c2c66affSColin Finck * 4*c2c66affSColin Finck * This file is part of the ReactOS DDK package. 5*c2c66affSColin Finck * 6*c2c66affSColin Finck * Contributors: 7*c2c66affSColin Finck * Amine Khaldi (amine.khaldi@reactos.org) 8*c2c66affSColin Finck * 9*c2c66affSColin Finck * THIS SOFTWARE IS NOT COPYRIGHTED 10*c2c66affSColin Finck * 11*c2c66affSColin Finck * This source code is offered for use in the public domain. You may 12*c2c66affSColin Finck * use, modify or distribute it freely. 13*c2c66affSColin Finck * 14*c2c66affSColin Finck * This code is distributed in the hope that it will be useful but 15*c2c66affSColin Finck * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY 16*c2c66affSColin Finck * DISCLAIMED. This includes but is not limited to warranties of 17*c2c66affSColin Finck * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18*c2c66affSColin Finck * 19*c2c66affSColin Finck */ 20*c2c66affSColin Finck #pragma once 21*c2c66affSColin Finck 22*c2c66affSColin Finck #ifndef __FLTUSER_H__ 23*c2c66affSColin Finck #define __FLTUSER_H__ 24*c2c66affSColin Finck 25*c2c66affSColin Finck #define FLT_MGR_BASELINE (((OSVER(NTDDI_VERSION) == NTDDI_WIN2K) && (SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WIN2KSP4))) || \ 26*c2c66affSColin Finck ((OSVER(NTDDI_VERSION) == NTDDI_WINXP) && (SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WINXPSP2))) || \ 27*c2c66affSColin Finck ((OSVER(NTDDI_VERSION) == NTDDI_WS03) && (SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WS03SP1))) || \ 28*c2c66affSColin Finck (NTDDI_VERSION >= NTDDI_VISTA)) 29*c2c66affSColin Finck 30*c2c66affSColin Finck #define FLT_MGR_AFTER_XPSP2 (((OSVER(NTDDI_VERSION) == NTDDI_WIN2K) && (SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WIN2KSP4))) || \ 31*c2c66affSColin Finck ((OSVER(NTDDI_VERSION) == NTDDI_WINXP) && (SPVER(NTDDI_VERSION) > SPVER(NTDDI_WINXPSP2))) || \ 32*c2c66affSColin Finck ((OSVER(NTDDI_VERSION) == NTDDI_WS03) && (SPVER(NTDDI_VERSION) >= SPVER(NTDDI_WS03SP1))) || \ 33*c2c66affSColin Finck (NTDDI_VERSION >= NTDDI_VISTA)) 34*c2c66affSColin Finck 35*c2c66affSColin Finck #define FLT_MGR_LONGHORN (NTDDI_VERSION >= NTDDI_VISTA) 36*c2c66affSColin Finck #define FLT_MGR_WIN7 (NTDDI_VERSION >= NTDDI_WIN7) 37*c2c66affSColin Finck 38*c2c66affSColin Finck #include <fltuserstructures.h> 39*c2c66affSColin Finck 40*c2c66affSColin Finck #ifdef __cplusplus 41*c2c66affSColin Finck extern "C" { 42*c2c66affSColin Finck #endif 43*c2c66affSColin Finck 44*c2c66affSColin Finck #if FLT_MGR_BASELINE 45*c2c66affSColin Finck 46*c2c66affSColin Finck #if FLT_MGR_LONGHORN 47*c2c66affSColin Finck #define FLT_ASSERT(_e) NT_ASSERT(_e) 48*c2c66affSColin Finck #define FLT_ASSERTMSG(_m, _e) NT_ASSERTMSG(_m, _e) 49*c2c66affSColin Finck #else 50*c2c66affSColin Finck #define FLT_ASSERT(_e) ASSERT(_e) 51*c2c66affSColin Finck #define FLT_ASSERTMSG(_m, _e) ASSERTMSG(_m, _e) 52*c2c66affSColin Finck #endif /* FLT_MGR_LONGHORN */ 53*c2c66affSColin Finck 54*c2c66affSColin Finck _Must_inspect_result_ 55*c2c66affSColin Finck HRESULT 56*c2c66affSColin Finck WINAPI 57*c2c66affSColin Finck FilterLoad( 58*c2c66affSColin Finck _In_ LPCWSTR lpFilterName); 59*c2c66affSColin Finck 60*c2c66affSColin Finck _Must_inspect_result_ 61*c2c66affSColin Finck HRESULT 62*c2c66affSColin Finck WINAPI 63*c2c66affSColin Finck FilterUnload( 64*c2c66affSColin Finck _In_ LPCWSTR lpFilterName); 65*c2c66affSColin Finck 66*c2c66affSColin Finck _Must_inspect_result_ 67*c2c66affSColin Finck HRESULT 68*c2c66affSColin Finck WINAPI 69*c2c66affSColin Finck FilterCreate( 70*c2c66affSColin Finck _In_ LPCWSTR lpFilterName, 71*c2c66affSColin Finck _Outptr_ HFILTER *hFilter); 72*c2c66affSColin Finck 73*c2c66affSColin Finck HRESULT 74*c2c66affSColin Finck WINAPI 75*c2c66affSColin Finck FilterClose( 76*c2c66affSColin Finck _In_ HFILTER hFilter); 77*c2c66affSColin Finck 78*c2c66affSColin Finck _Must_inspect_result_ 79*c2c66affSColin Finck HRESULT 80*c2c66affSColin Finck WINAPI 81*c2c66affSColin Finck FilterInstanceCreate( 82*c2c66affSColin Finck _In_ LPCWSTR lpFilterName, 83*c2c66affSColin Finck _In_ LPCWSTR lpVolumeName, 84*c2c66affSColin Finck _In_opt_ LPCWSTR lpInstanceName, 85*c2c66affSColin Finck _Outptr_ HFILTER_INSTANCE *hInstance); 86*c2c66affSColin Finck 87*c2c66affSColin Finck HRESULT 88*c2c66affSColin Finck WINAPI 89*c2c66affSColin Finck FilterInstanceClose( 90*c2c66affSColin Finck _In_ HFILTER_INSTANCE hInstance); 91*c2c66affSColin Finck 92*c2c66affSColin Finck _Must_inspect_result_ 93*c2c66affSColin Finck HRESULT 94*c2c66affSColin Finck WINAPI 95*c2c66affSColin Finck FilterAttach( 96*c2c66affSColin Finck _In_ LPCWSTR lpFilterName, 97*c2c66affSColin Finck _In_ LPCWSTR lpVolumeName, 98*c2c66affSColin Finck _In_opt_ LPCWSTR lpInstanceName , 99*c2c66affSColin Finck _In_opt_ DWORD dwCreatedInstanceNameLength , 100*c2c66affSColin Finck _Out_writes_bytes_opt_(dwCreatedInstanceNameLength) LPWSTR lpCreatedInstanceName); 101*c2c66affSColin Finck 102*c2c66affSColin Finck _Must_inspect_result_ 103*c2c66affSColin Finck HRESULT 104*c2c66affSColin Finck WINAPI 105*c2c66affSColin Finck FilterAttachAtAltitude( 106*c2c66affSColin Finck _In_ LPCWSTR lpFilterName, 107*c2c66affSColin Finck _In_ LPCWSTR lpVolumeName, 108*c2c66affSColin Finck _In_ LPCWSTR lpAltitude, 109*c2c66affSColin Finck _In_opt_ LPCWSTR lpInstanceName , 110*c2c66affSColin Finck _In_opt_ DWORD dwCreatedInstanceNameLength , 111*c2c66affSColin Finck _Out_writes_bytes_opt_(dwCreatedInstanceNameLength) LPWSTR lpCreatedInstanceName); 112*c2c66affSColin Finck 113*c2c66affSColin Finck _Must_inspect_result_ 114*c2c66affSColin Finck HRESULT 115*c2c66affSColin Finck WINAPI 116*c2c66affSColin Finck FilterDetach( 117*c2c66affSColin Finck _In_ LPCWSTR lpFilterName, 118*c2c66affSColin Finck _In_ LPCWSTR lpVolumeName, 119*c2c66affSColin Finck _In_opt_ LPCWSTR lpInstanceName); 120*c2c66affSColin Finck 121*c2c66affSColin Finck _Must_inspect_result_ 122*c2c66affSColin Finck HRESULT 123*c2c66affSColin Finck WINAPI 124*c2c66affSColin Finck FilterFindFirst( 125*c2c66affSColin Finck _In_ FILTER_INFORMATION_CLASS dwInformationClass, 126*c2c66affSColin Finck _Out_writes_bytes_to_(dwBufferSize,*lpBytesReturned) LPVOID lpBuffer, 127*c2c66affSColin Finck _In_ DWORD dwBufferSize, 128*c2c66affSColin Finck _Out_ LPDWORD lpBytesReturned, 129*c2c66affSColin Finck _Out_ LPHANDLE lpFilterFind); 130*c2c66affSColin Finck 131*c2c66affSColin Finck _Must_inspect_result_ 132*c2c66affSColin Finck HRESULT 133*c2c66affSColin Finck WINAPI 134*c2c66affSColin Finck FilterFindNext( 135*c2c66affSColin Finck _In_ HANDLE hFilterFind, 136*c2c66affSColin Finck _In_ FILTER_INFORMATION_CLASS dwInformationClass, 137*c2c66affSColin Finck _Out_writes_bytes_to_(dwBufferSize,*lpBytesReturned) LPVOID lpBuffer, 138*c2c66affSColin Finck _In_ DWORD dwBufferSize, 139*c2c66affSColin Finck _Out_ LPDWORD lpBytesReturned); 140*c2c66affSColin Finck 141*c2c66affSColin Finck _Must_inspect_result_ 142*c2c66affSColin Finck HRESULT 143*c2c66affSColin Finck WINAPI 144*c2c66affSColin Finck FilterFindClose( 145*c2c66affSColin Finck _In_ HANDLE hFilterFind); 146*c2c66affSColin Finck 147*c2c66affSColin Finck _Must_inspect_result_ 148*c2c66affSColin Finck HRESULT 149*c2c66affSColin Finck WINAPI 150*c2c66affSColin Finck FilterVolumeFindFirst( 151*c2c66affSColin Finck _In_ FILTER_VOLUME_INFORMATION_CLASS dwInformationClass, 152*c2c66affSColin Finck _Out_writes_bytes_to_(dwBufferSize,*lpBytesReturned) LPVOID lpBuffer, 153*c2c66affSColin Finck _In_ DWORD dwBufferSize, 154*c2c66affSColin Finck _Out_ LPDWORD lpBytesReturned, 155*c2c66affSColin Finck _Out_ PHANDLE lpVolumeFind); 156*c2c66affSColin Finck 157*c2c66affSColin Finck _Must_inspect_result_ 158*c2c66affSColin Finck HRESULT 159*c2c66affSColin Finck WINAPI 160*c2c66affSColin Finck FilterVolumeFindNext( 161*c2c66affSColin Finck _In_ HANDLE hVolumeFind, 162*c2c66affSColin Finck _In_ FILTER_VOLUME_INFORMATION_CLASS dwInformationClass, 163*c2c66affSColin Finck _Out_writes_bytes_to_(dwBufferSize,*lpBytesReturned) LPVOID lpBuffer, 164*c2c66affSColin Finck _In_ DWORD dwBufferSize, 165*c2c66affSColin Finck _Out_ LPDWORD lpBytesReturned); 166*c2c66affSColin Finck 167*c2c66affSColin Finck HRESULT 168*c2c66affSColin Finck WINAPI 169*c2c66affSColin Finck FilterVolumeFindClose( 170*c2c66affSColin Finck _In_ HANDLE hVolumeFind); 171*c2c66affSColin Finck 172*c2c66affSColin Finck _Must_inspect_result_ 173*c2c66affSColin Finck HRESULT 174*c2c66affSColin Finck WINAPI 175*c2c66affSColin Finck FilterInstanceFindFirst( 176*c2c66affSColin Finck _In_ LPCWSTR lpFilterName, 177*c2c66affSColin Finck _In_ INSTANCE_INFORMATION_CLASS dwInformationClass, 178*c2c66affSColin Finck _Out_writes_bytes_to_(dwBufferSize,*lpBytesReturned) LPVOID lpBuffer, 179*c2c66affSColin Finck _In_ DWORD dwBufferSize, 180*c2c66affSColin Finck _Out_ LPDWORD lpBytesReturned, 181*c2c66affSColin Finck _Out_ LPHANDLE lpFilterInstanceFind); 182*c2c66affSColin Finck 183*c2c66affSColin Finck _Must_inspect_result_ 184*c2c66affSColin Finck HRESULT 185*c2c66affSColin Finck WINAPI 186*c2c66affSColin Finck FilterInstanceFindNext( 187*c2c66affSColin Finck _In_ HANDLE hFilterInstanceFind, 188*c2c66affSColin Finck _In_ INSTANCE_INFORMATION_CLASS dwInformationClass, 189*c2c66affSColin Finck _Out_writes_bytes_to_(dwBufferSize,*lpBytesReturned) LPVOID lpBuffer, 190*c2c66affSColin Finck _In_ DWORD dwBufferSize, 191*c2c66affSColin Finck _Out_ LPDWORD lpBytesReturned); 192*c2c66affSColin Finck 193*c2c66affSColin Finck _Must_inspect_result_ 194*c2c66affSColin Finck HRESULT 195*c2c66affSColin Finck WINAPI 196*c2c66affSColin Finck FilterInstanceFindClose( 197*c2c66affSColin Finck _In_ HANDLE hFilterInstanceFind); 198*c2c66affSColin Finck 199*c2c66affSColin Finck _Must_inspect_result_ 200*c2c66affSColin Finck HRESULT 201*c2c66affSColin Finck WINAPI 202*c2c66affSColin Finck FilterVolumeInstanceFindFirst( 203*c2c66affSColin Finck _In_ LPCWSTR lpVolumeName, 204*c2c66affSColin Finck _In_ INSTANCE_INFORMATION_CLASS dwInformationClass, 205*c2c66affSColin Finck _Out_writes_bytes_to_(dwBufferSize,*lpBytesReturned) LPVOID lpBuffer, 206*c2c66affSColin Finck _In_ DWORD dwBufferSize, 207*c2c66affSColin Finck _Out_ LPDWORD lpBytesReturned, 208*c2c66affSColin Finck _Out_ LPHANDLE lpVolumeInstanceFind); 209*c2c66affSColin Finck 210*c2c66affSColin Finck _Must_inspect_result_ 211*c2c66affSColin Finck HRESULT 212*c2c66affSColin Finck WINAPI 213*c2c66affSColin Finck FilterVolumeInstanceFindNext( 214*c2c66affSColin Finck _In_ HANDLE hVolumeInstanceFind, 215*c2c66affSColin Finck _In_ INSTANCE_INFORMATION_CLASS dwInformationClass, 216*c2c66affSColin Finck _Out_writes_bytes_to_(dwBufferSize,*lpBytesReturned) LPVOID lpBuffer, 217*c2c66affSColin Finck _In_ DWORD dwBufferSize, 218*c2c66affSColin Finck _Out_ LPDWORD lpBytesReturned); 219*c2c66affSColin Finck 220*c2c66affSColin Finck HRESULT 221*c2c66affSColin Finck WINAPI 222*c2c66affSColin Finck FilterVolumeInstanceFindClose( 223*c2c66affSColin Finck _In_ HANDLE hVolumeInstanceFind); 224*c2c66affSColin Finck 225*c2c66affSColin Finck _Must_inspect_result_ 226*c2c66affSColin Finck HRESULT 227*c2c66affSColin Finck WINAPI 228*c2c66affSColin Finck FilterGetInformation( 229*c2c66affSColin Finck _In_ HFILTER hFilter, 230*c2c66affSColin Finck _In_ FILTER_INFORMATION_CLASS dwInformationClass, 231*c2c66affSColin Finck _Out_writes_bytes_to_(dwBufferSize,*lpBytesReturned) LPVOID lpBuffer, 232*c2c66affSColin Finck _In_ DWORD dwBufferSize, 233*c2c66affSColin Finck _Out_ LPDWORD lpBytesReturned); 234*c2c66affSColin Finck 235*c2c66affSColin Finck _Must_inspect_result_ 236*c2c66affSColin Finck HRESULT 237*c2c66affSColin Finck WINAPI 238*c2c66affSColin Finck FilterInstanceGetInformation( 239*c2c66affSColin Finck _In_ HFILTER_INSTANCE hInstance, 240*c2c66affSColin Finck _In_ INSTANCE_INFORMATION_CLASS dwInformationClass, 241*c2c66affSColin Finck _Out_writes_bytes_to_(dwBufferSize,*lpBytesReturned) LPVOID lpBuffer, 242*c2c66affSColin Finck _In_ DWORD dwBufferSize, 243*c2c66affSColin Finck _Out_ LPDWORD lpBytesReturned); 244*c2c66affSColin Finck 245*c2c66affSColin Finck _Must_inspect_result_ 246*c2c66affSColin Finck HRESULT 247*c2c66affSColin Finck WINAPI 248*c2c66affSColin Finck FilterConnectCommunicationPort( 249*c2c66affSColin Finck _In_ LPCWSTR lpPortName, 250*c2c66affSColin Finck _In_ DWORD dwOptions, 251*c2c66affSColin Finck _In_reads_bytes_opt_(wSizeOfContext) LPCVOID lpContext, 252*c2c66affSColin Finck _In_ WORD wSizeOfContext, 253*c2c66affSColin Finck _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes , 254*c2c66affSColin Finck _Outptr_ HANDLE *hPort); 255*c2c66affSColin Finck 256*c2c66affSColin Finck _Must_inspect_result_ 257*c2c66affSColin Finck HRESULT 258*c2c66affSColin Finck WINAPI 259*c2c66affSColin Finck FilterSendMessage( 260*c2c66affSColin Finck _In_ HANDLE hPort, 261*c2c66affSColin Finck _In_reads_bytes_opt_(dwInBufferSize) LPVOID lpInBuffer, 262*c2c66affSColin Finck _In_ DWORD dwInBufferSize, 263*c2c66affSColin Finck _Out_writes_bytes_to_opt_(dwOutBufferSize,*lpBytesReturned) LPVOID lpOutBuffer, 264*c2c66affSColin Finck _In_ DWORD dwOutBufferSize, 265*c2c66affSColin Finck _Out_ LPDWORD lpBytesReturned); 266*c2c66affSColin Finck 267*c2c66affSColin Finck _Must_inspect_result_ 268*c2c66affSColin Finck HRESULT 269*c2c66affSColin Finck WINAPI 270*c2c66affSColin Finck FilterGetMessage( 271*c2c66affSColin Finck _In_ HANDLE hPort, 272*c2c66affSColin Finck _Out_writes_bytes_(dwMessageBufferSize) PFILTER_MESSAGE_HEADER lpMessageBuffer, 273*c2c66affSColin Finck _In_ DWORD dwMessageBufferSize, 274*c2c66affSColin Finck _Inout_ LPOVERLAPPED lpOverlapped); 275*c2c66affSColin Finck 276*c2c66affSColin Finck _Must_inspect_result_ 277*c2c66affSColin Finck HRESULT 278*c2c66affSColin Finck WINAPI 279*c2c66affSColin Finck FilterReplyMessage( 280*c2c66affSColin Finck _In_ HANDLE hPort, 281*c2c66affSColin Finck _In_reads_bytes_(dwReplyBufferSize) PFILTER_REPLY_HEADER lpReplyBuffer, 282*c2c66affSColin Finck _In_ DWORD dwReplyBufferSize); 283*c2c66affSColin Finck 284*c2c66affSColin Finck _Must_inspect_result_ 285*c2c66affSColin Finck HRESULT 286*c2c66affSColin Finck WINAPI 287*c2c66affSColin Finck FilterGetDosName( 288*c2c66affSColin Finck _In_ LPCWSTR lpVolumeName, 289*c2c66affSColin Finck _Out_writes_(dwDosNameBufferSize) LPWSTR lpDosName, 290*c2c66affSColin Finck _In_ DWORD dwDosNameBufferSize); 291*c2c66affSColin Finck 292*c2c66affSColin Finck #endif /* FLT_MGR_BASELINE */ 293*c2c66affSColin Finck 294*c2c66affSColin Finck #ifdef __cplusplus 295*c2c66affSColin Finck } /* extern "C" */ 296*c2c66affSColin Finck #endif 297*c2c66affSColin Finck 298*c2c66affSColin Finck #endif /* __FLTUSER_H__ */ 299