private static void SBinaryRelease(ref SBinary b) { if (b.lpb != IntPtr.Zero) { Marshal.FreeHGlobal(b.lpb); b.lpb = IntPtr.Zero; b.cb = 0; } }
private static extern HRESULT IMAPISessionOpenMsgStore(IntPtr pSession, ref SBinary entryId, ref IntPtr pMsgStore);
private static extern HRESULT IMAPISessionCompareEntryIDs(IntPtr pSession, ref SBinary entryID1, ref SBinary entryID2, ref uint lpulResult);
private static extern HRESULT pIMsgStoreOpenEntry(IntPtr msgStore, ref SBinary entryId, ObjectType type, ref IntPtr entry);
private static extern HRESULT pIMAPIContainerOpenEntry(IntPtr container, ref SBinary entryId, ObjectType type, ref IntPtr entry);