Re[2]: Attaching a minifilter instance to a volume within a VC++ code

INF file has nothing to do with linking your application.

This is how I use FLTLIB functions in FileSpy:

typedef HRESULT (WINAPI * FILTERCONNECTCOMMUNICATIONPORT)(
IN LPCWSTR lpPortName,
IN DWORD dwOptions,
IN LPVOID lpContext OPTIONAL,
IN DWORD dwSizeOfContext,
IN LPSECURITY_ATTRIBUTES lpSecurityAttributes OPTIONAL,
OUT HANDLE *hPort
);

FILTERCONNECTCOMMUNICATIONPORT pfnFilterConnectCommunicationPort = NULL;

HMODULE hFltlib = LoadLibrary(_T(“Fltlib.dll”));

if(hFltlib != NULL)
{
pfnFilterConnectCommunicationPort =
(FILTERCONNECTCOMMUNICATIONPORT)GetProcAddress(hFltlib,
“FilterConnectCommunicationPort”);
}

pfnFilterConnectCommunicationPort(PortName, dwOptions, NULL, 0, NULL,
&hPort);

L.