diff --git a/Com/IEnumSTATSTG.cs b/Com/IEnumSTATSTG.cs index 46b3533..493e112 100644 --- a/Com/IEnumSTATSTG.cs +++ b/Com/IEnumSTATSTG.cs @@ -1,5 +1,6 @@ using System; using System.Runtime.InteropServices; +using ComTypes = System.Runtime.InteropServices.ComTypes; namespace SweetPotato { [ComImport] @@ -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); diff --git a/Com/ILockBytes.cs b/Com/ILockBytes.cs index 0c8c7e5..df69366 100644 --- a/Com/ILockBytes.cs +++ b/Com/ILockBytes.cs @@ -1,5 +1,6 @@ using System; using System.Runtime.InteropServices; +using ComTypes = System.Runtime.InteropServices.ComTypes; namespace SweetPotato { [ComVisible(false)] @@ -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); } diff --git a/Com/IStorage.cs b/Com/IStorage.cs index 682f46f..c48dc9f 100644 --- a/Com/IStorage.cs +++ b/Com/IStorage.cs @@ -1,5 +1,6 @@ using System; using System.Runtime.InteropServices; +using ComTypes = System.Runtime.InteropServices.ComTypes; namespace SweetPotato { @@ -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); } } diff --git a/Com/IStream.cs b/Com/IStream.cs index 8bbbf1e..890ee37 100644 --- a/Com/IStream.cs +++ b/Com/IStream.cs @@ -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)] @@ -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); } } diff --git a/StorageTrigger.cs b/StorageTrigger.cs index 18966cf..bf4b126 100644 --- a/StorageTrigger.cs +++ b/StorageTrigger.cs @@ -1,5 +1,6 @@ using System; using System.Runtime.InteropServices; +using ComTypes = System.Runtime.InteropServices.ComTypes; namespace SweetPotato { @@ -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"; }