-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathIStream.cs
41 lines (37 loc) · 1.4 KB
/
IStream.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using STATSTG = System.Runtime.InteropServices.ComTypes.STATSTG;
using System.Text;
using System.Threading.Tasks;
using FILETIME = System.Runtime.InteropServices.ComTypes.FILETIME;
namespace IDataObjectViewer
{
[Guid("0000000c-0000-0000-C000-000000000046")]
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
[ComImport]
public interface IStream
{
// ISequentialStream portion
void Read([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1), Out] Byte[] pv, int cb, out uint pcbRead);
void Write([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] Byte[] pv, int cb, IntPtr pcbWritten);
// IStream portion
void Seek(Int64 dlibMove, SeekOrigin dwOrigin, out Int64 plibNewPosition);
void SetSize(Int64 libNewSize);
void CopyTo(IStream pstm, Int64 cb, IntPtr pcbRead, IntPtr pcbWritten);
void Commit(int grfCommitFlags);
void Revert();
void LockRegion(Int64 libOffset, Int64 cb, int dwLockType);
void UnlockRegion(Int64 libOffset, Int64 cb, int dwLockType);
void Stat(out STATSTG pstatstg, STATFLAG grfStatFlag);
void Clone(out IStream ppstm);
}
public enum STATFLAG
{
DEFAULT = 0,
NONAME = 1,
NOOPEN = 2, //not implemented
}
}