Hi all,

sorry for Crossposting, but i dont know whether someone
can help me here. If i remember right, there was a Class
or a Member function in the .NET Framework that could
do mostly the same as CreateFile can do for me, but i
cant remember its Name. By saying the "same" i mean
i was able to use it to open Handles to Devices and anything
that could be opened with CreateFile and had a Symbolic
Name that has been exported from Kernel to User-Space.
But i cant remember the class/member name. I am sure there
was something inside the .NET FW and natively supported
by the .NET. AFAIK it was also something MS used internally
in its base classes, but it was exposed to any programmer and
was public/static or whatever available from the CLR/.NET.
I really cant remember its name, but i used something in the past
years ago for opening something, if i remember right to a drive.
I think i used it the first time with .NET 2.0...

Anybody can help me here, or am i remembering something wrong?


Regards

Kerem

-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Microsoft Live Space: http://kerem-g.spaces.live.com/
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."

Re: Alternate Function for CreateFile on .NET Framework,... by Peter

Peter
Wed Apr 30 20:19:24 CDT 2008

On Wed, 30 Apr 2008 17:15:57 -0700, Kerem Gümrükcü <kareem114@hotmail.com>
wrote:

> sorry for Crossposting, but i dont know whether someone
> can help me here.

No doubt someone else with more patience will see and actually answer your
specific question.

So I'll just take this opportunity to chide you for knowingly excessively
cross-posting. Strictly speaking, m.p.d.framework is the only on-topic
newsgroup. Based on customary usage, m.p.d.languages.csharp is also
reasonable. None of the others are.

If you actually want to call CreateFile(), the m.p.d.framework.interop
newsgroup would be great. But that's not what you're asking. And this
definitely isn't a question about the CLR, as whatever it is you're
looking for would be exposed in the Framework, not the CLR.

I suppose I should be thankful you cross-posted rather than multi-posted.
And really, I am. But please, don't cross-post like that again. It's
excessive.

And by the way, since some people will refuse to answer questions not
posted in a more polite way, ironically you are potentially limiting your
audience rather than expanding it by cross-posting like that (it all
depends on whether the number of additional people seeing the question is
greater than the number of people who ignore it because it was excessively
cross-posted).

Pete

Re: Alternate Function for CreateFile on .NET Framework,... by Willy

Willy
Thu May 01 03:16:07 CDT 2008

"Kerem Gümrükcü" <kareem114@hotmail.com> wrote in message
news:%23MTM3CyqIHA.4280@TK2MSFTNGP02.phx.gbl...
> Hi all,
>
> sorry for Crossposting, but i dont know whether someone
> can help me here. If i remember right, there was a Class
> or a Member function in the .NET Framework that could
> do mostly the same as CreateFile can do for me, but i
> cant remember its Name. By saying the "same" i mean
> i was able to use it to open Handles to Devices and anything
> that could be opened with CreateFile and had a Symbolic
> Name that has been exported from Kernel to User-Space.
> But i cant remember the class/member name. I am sure there
> was something inside the .NET FW and natively supported
> by the .NET. AFAIK it was also something MS used internally
> in its base classes, but it was exposed to any programmer and
> was public/static or whatever available from the CLR/.NET.
> I really cant remember its name, but i used something in the past
> years ago for opening something, if i remember right to a drive.
> I think i used it the first time with .NET 2.0...
>
> Anybody can help me here, or am i remembering something wrong?
>
>
> Regards
>
> Kerem
>
> -----------------------
> Beste Grüsse / Best regards / Votre bien devoue
> Kerem Gümrükcü
> Microsoft Live Space: http://kerem-g.spaces.live.com/
> Latest Open-Source Projects: http://entwicklung.junetz.de
> -----------------------
> "This reply is provided as is, without warranty express or implied."
>
>



No, you are mistaken, the FW does not expose the Win32 CreateFile API,
you'll have to PInvoke and use the handle returned in .NET IO API's that
take an handle.
Please consult the archive subject: "Driver device IO control by C#" for
more details on the CreateFile PInvoke declaration.

Willy.