NativeMethods.cs 766 B

12345678910111213141516171819202122
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Runtime.InteropServices;
  5. namespace Biff8Excel.COM
  6. {
  7. public sealed class NativeMethods
  8. {
  9. private NativeMethods()
  10. {
  11. }
  12. [DllImport("ole32.dll", PreserveSig = false)]
  13. [return: MarshalAs(UnmanagedType.Interface)]
  14. internal static extern IStorage StgCreateDocfile([MarshalAs(UnmanagedType.LPWStr)] string pwcsName, int grfMode, int reserved);
  15. [DllImport("ole32.dll", PreserveSig = false)]
  16. [return: MarshalAs(UnmanagedType.Interface)]
  17. internal static extern IStorage StgOpenStorage([MarshalAs(UnmanagedType.LPWStr)] string pwcsName, IntPtr pstgPriority, int grfMode, IntPtr snbExclude, int reserved);
  18. }
  19. }