I want to open physical device, g:. I try it and the
System.ArgumentException occors. It said "FileStream will not open Win32
devices such as disk partitions and tape drives. Don't use \\.\ in your
path.
So, I use p/invoke.
Theewara
"Patrick Steele [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> In article <(E-Mail Removed)>, g4685034
> @cc.cpe.ku.ac.th says...
>> I use CreateFile (p/invoke) to open my drive, which is a ramdisk. Then I
>> take a handle to FileStream constructor. There is an exception occur at
>> FileStream constructor.
>
> Any reason you don't use the managed System.IO.File.Create()?
>
> --
> Patrick Steele
> Microsoft .NET MVP
> http://weblogs.asp.net/psteele