¡@

Home 

c# Programming Glossary: createfile

Physical disk size not correct (IoCtlDiskGetDriveGeometry)

http://stackoverflow.com/questions/15051660/physical-disk-size-not-correct-ioctldiskgetdrivegeometry

CharSet CharSet.Auto public static extern SafeFileHandle CreateFile string fileName uint fileAccess uint fileShare IntPtr securityAttributes.. static void Main SafeFileHandle diskHandle NativeMethods.CreateFile @ . PhysicalDrive0 NativeMethods.FileAccessGenericRead NativeMethods.FileShareWrite.. 0 IntPtr.Zero if diskHandle.IsInvalid Console.WriteLine CreateFile failed with error 0 Marshal.GetLastWin32Error return int geometrySize..

.NET code to send ZPL to Zebra printers

http://stackoverflow.com/questions/2044676/net-code-to-send-zpl-to-zebra-printers

SetLastError true static extern SafeFileHandle CreateFile string lpFileName FileAccess dwDesiredAccess uint dwShareMode.. buffer System.Text.Encoding.ASCII.GetBytes command Use the CreateFile external func to connect to the LPT1 port SafeFileHandle printer.. func to connect to the LPT1 port SafeFileHandle printer CreateFile LPT1 FileAccess.ReadWrite 0 IntPtr.Zero FileMode.Open 0 IntPtr.Zero..

How can I write fast colored output to Console?

http://stackoverflow.com/questions/2754518/how-can-i-write-fast-colored-output-to-console

you could get the handle to the current console by using CreateFile you will need to P Invoke this and open CONOUT then you can.. that is return to pass to the other APIs. P Invoke for CreateFile http www.pinvoke.net default.aspx kernel32 CreateFile.html And.. for CreateFile http www.pinvoke.net default.aspx kernel32 CreateFile.html And you can use WriteConsoleOutput to move all the characters..

how to create a text file in asp.net MVC3 using c#

http://stackoverflow.com/questions/5099403/how-to-create-a-text-file-in-asp-net-mvc3-using-c-sharp

will be downloaded by your browser public FileStreamResult CreateFile todo add some data from your database into that string var string_with_your_data.. trigger file download @Html.ActionLink Download Text File CreateFile SomeController I hope that helps share improve this answer..

NTFS Alternate Data Streams - .NET

http://stackoverflow.com/questions/604960/ntfs-alternate-data-streams-net

stdio.h void main HANDLE hFile hStream DWORD dwRet hFile CreateFile testfile GENERIC_WRITE FILE_SHARE_WRITE NULL OPEN_ALWAYS.. WriteFile hFile This is testfile 16 dwRet NULL hStream CreateFile testfile stream GENERIC_WRITE FILE_SHARE_WRITE NULL OPEN_ALWAYS..

How to parse a text file in C# and be io bound?

http://stackoverflow.com/questions/7153315/how-to-parse-a-text-file-in-c-sharp-and-be-io-bound

bound you start using direct IO. See the documentation on CreateFile using FILE_FLAG_NO_BUFFERING. Writing gets much slower as you..

C# classes to undelete files? [duplicate]

http://stackoverflow.com/questions/8819188/c-sharp-classes-to-undelete-files

true CharSet CharSet.Auto static extern IntPtr CreateFile string lpFileName uint dwDesiredAccess uint dwShareMode IntPtr.. you opened once work is done IntPtr hDrive NativeMethods.CreateFile string.Format . 0 DriveLetter GenericRead Read Write IntPtr.Zero.. for that Gets a handle to the physical disk IntPtr hDisk CreateFile string.Format . PhysicalDrive 0 diskNumber GenericRead Read..