Esempio n. 1
0
            public HRESULT GetNewStorage(out Ole32.IStorage storage)
            {
                Debug.WriteLineIf(RichTextDebug.TraceVerbose, "IRichTextBoxOleCallback::GetNewStorage");

                WinFormsComWrappers.LockBytesWrapper pLockBytes = Ole32.CreateILockBytesOnHGlobal(IntPtr.Zero, BOOL.TRUE);

                storage = Ole32.StgCreateDocfileOnILockBytes(
                    pLockBytes,
                    Ole32.STGM.SHARE_EXCLUSIVE | Ole32.STGM.CREATE | Ole32.STGM.READWRITE);

                Debug.Assert(storage is not null, "storage is NULL!");

                return(HRESULT.S_OK);
            }
 public static IStorage StgCreateDocfileOnILockBytes(WinFormsComWrappers.LockBytesWrapper iLockBytes, STGM grfMode)
 {
     return(StgCreateDocfileOnILockBytes(iLockBytes.Instance, grfMode, 0));
 }
Esempio n. 3
0
 public static IntPtr GetHGlobalFromILockBytes(WinFormsComWrappers.LockBytesWrapper pLkbyt)
 {
     return(GetHGlobalFromILockBytes(pLkbyt.Instance));
 }
Esempio n. 4
0
 public static IStorage StgOpenStorageOnILockBytes(WinFormsComWrappers.LockBytesWrapper iLockBytes, IStorage?pStgPriority, STGM grfMode, IntPtr snbExclude)
 {
     return(StgOpenStorageOnILockBytes(iLockBytes.Instance, pStgPriority, grfMode, snbExclude, 0));
 }