Pro:
Yes, it can be done, albeit painfully. Here’s an excerpt of a couple
declarations:
using System.Runtime.InteropServices;
…
[DllImport(“fltlib”, CharSet=CharSet.Auto)]
static extern unsafe int FilterConnectCommunicationPort(
string lpPortName,
uint dwOptions,
uint lpContext,
uint dwSizeOfContext,
uint lpSecurityAttributes,
out IntPtr hPort
);
[DllImport(“fltlib”)]
static extern unsafe int FilterSendMessage(
IntPtr hPort,
void *lpInBuffer,
int dwInBufferSize,
void *lpOutBuffer,
int dwOutBufferSize,
out int lpBytesReturned
);
Of course, then you’re stuck with the pain-in-the-*ss issues of using
unmanaged routines in C#, but that’s another story…
HTH,
Ken
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Prokash Sinha
Sent: Tuesday, April 26, 2005 1:53 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] C# interface with fltmgr ?
This might be an absard question !.
I’m trying to get the usr-kernel communication directly from C# (.net
environment ). I can have a very thin c/c++ dll to interface with the fltmgr
libs, but I would much rather be interested in having [Dllimports “filtmgr library>”] and directly access those function(s) in those libs. So
when I was trying to use the protypes WINAPI (FAR PASCAL) comes my way.
Well, may be I can craft those typedef(s), but try not to do those …
Has anyone tried this?. Or do I need to capture entrypoint address
dynamically ( similar to LoadLibray(), GetProcAddress() ).
PRIMARY REASON IS TO TAKE THE ADVANTAGE OF (a) C# langauge, (b) .NET’s
managed module security.
SInce I’m at the very early stage of exploring this, and intellegent answer
to “Why bother …” would be difficult for me.
-pro
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com