Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Com/IEnumSTATSTG.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Runtime.InteropServices;
using ComTypes = System.Runtime.InteropServices.ComTypes;

namespace SweetPotato {
[ComImport]
Expand All @@ -9,7 +10,7 @@ public interface IEnumSTATSTG {
// The user needs to allocate an STATSTG array whose size is celt.
[PreserveSig]
uint
Next(uint celt, [MarshalAs(UnmanagedType.LPArray), Out] STATSTG[] rgelt, out uint pceltFetched);
Next(uint celt, [MarshalAs(UnmanagedType.LPArray), Out] ComTypes.STATSTG[] rgelt, out uint pceltFetched);

void Skip(uint celt);

Expand Down
3 changes: 2 additions & 1 deletion Com/ILockBytes.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Runtime.InteropServices;
using ComTypes = System.Runtime.InteropServices.ComTypes;

namespace SweetPotato {
[ComVisible(false)]
Expand All @@ -13,7 +14,7 @@ public interface ILockBytes {
void SetSize(long cb);
void LockRegion(long libOffset, long cb, int dwLockType);
void UnlockRegion(long libOffset, long cb, int dwLockType);
void Stat(out System.Runtime.InteropServices.STATSTG pstatstg, int grfStatFlag);
void Stat(out ComTypes.STATSTG pstatstg, int grfStatFlag);

}

Expand Down
5 changes: 3 additions & 2 deletions Com/IStorage.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Runtime.InteropServices;
using ComTypes = System.Runtime.InteropServices.ComTypes;

namespace SweetPotato {

Expand All @@ -19,10 +20,10 @@ public interface IStorage {
void EnumElements([In] uint reserved1, [In] IntPtr reserved2, [In] uint reserved3, [MarshalAs(28)] out IEnumSTATSTG ppEnum);
void DestroyElement([MarshalAs(21)] [In] string pwcsName);
void RenameElement([MarshalAs(21)] [In] string pwcsOldName, [MarshalAs(21)] [In] string pwcsNewName);
void SetElementTimes([MarshalAs(21)] [In] string pwcsName, [MarshalAs(42)] [In] FILETIME[] pctime, [MarshalAs(42)] [In] FILETIME[] patime, [MarshalAs(42)] [In] FILETIME[] pmtime);
void SetElementTimes([MarshalAs(21)] [In] string pwcsName, [MarshalAs(42)] [In] ComTypes.FILETIME[] pctime, [MarshalAs(42)] [In] ComTypes.FILETIME[] patime, [MarshalAs(42)] [In] ComTypes.FILETIME[] pmtime);
void SetClass([In] ref Guid clsid);
void SetStateBits([In] uint grfStateBits, [In] uint grfMask);
void Stat([MarshalAs(42)] [Out] STATSTG[] pstatstg, [In] uint grfStatFlag);
void Stat([MarshalAs(42)] [Out] ComTypes.STATSTG[] pstatstg, [In] uint grfStatFlag);
}
}

3 changes: 2 additions & 1 deletion Com/IStream.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Runtime.InteropServices;
using ComTypes = System.Runtime.InteropServices.ComTypes;

namespace SweetPotato {
[ComImport, Guid("0000000c-0000-0000-C000-000000000046"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
Expand All @@ -13,7 +14,7 @@ public interface IStream {
void Revert();
void LockRegion(long libOffset, long cb, uint dwLockType);
void UnlockRegion(long libOffset, long cb, uint dwLockType);
void Stat(out STATSTG pstatstg, uint grfStatFlag);
void Stat(out ComTypes.STATSTG pstatstg, uint grfStatFlag);
void Clone(out IStream ppstm);
}
}
5 changes: 3 additions & 2 deletions StorageTrigger.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Runtime.InteropServices;
using ComTypes = System.Runtime.InteropServices.ComTypes;

namespace SweetPotato {

Expand Down Expand Up @@ -93,14 +94,14 @@ public void SetClass(ref Guid clsid) {

}

public void SetElementTimes(string pwcsName, FILETIME[] pctime, FILETIME[] patime, FILETIME[] pmtime) {
public void SetElementTimes(string pwcsName, ComTypes.FILETIME[] pctime, ComTypes.FILETIME[] patime, ComTypes.FILETIME[] pmtime) {

}

public void SetStateBits(uint grfStateBits, uint grfMask) {
}

public void Stat(STATSTG[] pstatstg, uint grfStatFlag) {
public void Stat(ComTypes.STATSTG[] pstatstg, uint grfStatFlag) {
storage.Stat(pstatstg, grfStatFlag);
pstatstg[0].pwcsName = "hello.stg";
}
Expand Down