[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework

Alternate Function for CreateFile on .NET Framework,...

Kerem G?mr?kc?

5/1/2008 12:16:00 AM

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...
Latest Open-Source Projects: http://entwicklung...
-----------------------
"This reply is provided as is, without warranty express or implied."


6 Answers

Peter Duniho

5/1/2008 1:19:00 AM

0

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

Willy Denoyette [MVP]

5/1/2008 8:16:00 AM

0

"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...
> Latest Open-Source Projects: http://entwicklung...
> -----------------------
> "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.



Alain Boss

5/1/2008 8:26:00 AM

0

Peter,

Kerem is on of the most active and the best supporters in the german
newsgroups. Your point is valid, but, just leave him alone.

alain

Peter Duniho

5/1/2008 3:52:00 PM

0

On Thu, 01 May 2008 01:26:25 -0700, Alain Boss <maccruel@hotmail.com>
wrote:

> Kerem is on of the most active and the best supporters in the german
> newsgroups. Your point is valid, but, just leave him alone.

Alain, thanks so much for your input. However, I don't really care who
Kerem is or how active he is or how great a supporter of any newsgroup he
is. His cross-posting was inappropriately excessive and I said so. Deal
with it.

By the way, it boggles my mind how you can say that my point is valid and
yet command me to leave him alone. As if you have the authority to
command me anyway, but even assuming that you do you're doing so even as
you acknowledge the validity of what I wrote. What kind of person goes
around telling others "don't do the right thing!" Absurd.

Alain Boss

5/1/2008 9:25:00 PM

0

1 2 3 4 - 'nuff said

Peter Duniho

5/1/2008 10:03:00 PM

0

On Thu, 01 May 2008 14:24:44 -0700, Alain Boss <maccruel@hotmail.com>
wrote:

> 1 2 3 4 - 'nuff said

See? Was that so difficult?