private static SafeFileHandle GetSafeFileHandle(string path, string streamName) { string streamPath = path + ":" + streamName; SafeFileHandle handle = CreateFile(streamPath, GENERIC_READ, FILE_SHARE_READ, IntPtr.Zero, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, IntPtr.Zero); return handle; }