473,387 Members | 1,455 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

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."
Jun 27 '08 #1
2 1248
On Wed, 30 Apr 2008 17:15:57 -0700, Kerem Gümrükcü <ka*******@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
Jun 27 '08 #2
"Kerem Gümrükcü" <ka*******@hotmail.comwrote in message
news:%2****************@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.

Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: dpomt | last post by:
When the ASP.NET menu is rendered on downlevel browers, the text "^ up one level" is displayed. Any ideas how I can change that text? I did not find a property for the menu control where I can...
3
by: Scott Bell | last post by:
Hello all, What is the equivalent in the .NET Framework for accessing a device at the block/sector level such as one would when using CreateFile on a device like "\\.\D:"? Attempting to create...
2
by: Jim Flanagan | last post by:
Hi... I am using VB.net Express to experiment with the Win32 API functions that are available. The current project is an application that will read the raw sectors of a logical drive so that a...
2
by: Bob Gray | last post by:
Hi, Can anyone explain how P/Invoke is able to cast the 32-bit HANDLE value returned from CreateFile (for example) to a SafeFileHandle object? Have a look at this code snippet from the .NET...
5
by: Michael R | last post by:
Searching the net I've found a simple technique to add row numbers and alternate colors (for the even and the uneven row) to a continuous form. 1st step: Create a textbox, send it to background...
4
by: =?Utf-8?B?UmljaGFyZEBub3NwYW0ubm9zcGFt?= | last post by:
I'm trying to declare CreateFile as an extern from the dll like so: .... using System.Runtime.InteropServices; internal static extern IntPtr CreateFile( String filename, UInt32...
4
by: barcaroller | last post by:
I am trying to adopt a model for calling functions and checking their return values. I'm following Scott Meyer's recommendation of not over-using exceptions because of their potential overhead. ...
2
by: Kerem Gümrükcü | last post by:
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...
15
by: Ketchup | last post by:
Hello everyone, I have been stuck with this problem for quite some time now. I am working in VB.NET, using framework 1.0. I have to keep the compatibility down to the original .NET framework...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.