/// <summary>Open the wav file</summary> /// <param name="file">file name</param> /// <param name="access">access level</param> /// <param name="share">share method</param> /// <param name="method">open method</param> /// <returns>handle of file</returns> private IntPtr FileOpen(string file, FILE_ACCESS access, FILE_SHARE share, FILE_METHOD method) { return(CreateFile(file, (uint)access, (uint)share, IntPtr.Zero, (uint)method, 0, IntPtr.Zero)); }
public static uint CTL_CODE(DEVICE_TYPE deviceType, ushort function, METHOD method, FILE_ACCESS access) { return (uint) ((((((uint) deviceType) << 0x10) | (((byte) access) << 14)) | (function << 2)) | ((long) method)); }