Exemplo n.º 1
0
        int SaveGraphFile(IGraphBuilder pGraph, String wszPath)
        {
            String wszStreamName = "ActiveMovieGraph";
            int    hr;

            IStorage *pStorage = NULL;

            hr = StgCreateDocfile(
                wszPath,
                STGM_CREATE | STGM_TRANSACTED | STGM_READWRITE | STGM_SHARE_EXCLUSIVE,
                0, &pStorage);
            if (FAILED(hr))
            {
                return(hr);
            }

            IStream *pStream;

            hr = pStorage->CreateStream(
                wszStreamName,
                STGM_WRITE | STGM_CREATE | STGM_SHARE_EXCLUSIVE,
                0, 0, &pStream);
            if (FAILED(hr))
            {
                pStorage->Release();
                return(hr);
            }

            IPersistStream *pPersist = NULL;

            pGraph->QueryInterface(IID_IPersistStream, (void **)&pPersist);
            hr = pPersist->Save(pStream, TRUE);
            pStream->Release();
            pPersist->Release();
            if (SUCCEEDED(hr))
            {
                hr = pStorage->Commit(STGC_DEFAULT);
            }
            pStorage->Release();
            return(hr);
        }
Exemplo n.º 2
0
 public int ExtractThumbnail([NativeTypeName("IStorage *")] IStorage *pStg, [NativeTypeName("ULONG")] uint ulLength, [NativeTypeName("ULONG")] uint ulHeight, [NativeTypeName("ULONG *")] uint *pulOutputLength, [NativeTypeName("ULONG *")] uint *pulOutputHeight, [NativeTypeName("HBITMAP *")] IntPtr *phOutputBitmap)
 {
     return(((delegate * unmanaged <IThumbnailExtractor *, IStorage *, uint, uint, uint *, uint *, IntPtr *, int>)(lpVtbl[3]))((IThumbnailExtractor *)Unsafe.AsPointer(ref this), pStg, ulLength, ulHeight, pulOutputLength, pulOutputHeight, phOutputBitmap));
 }
 public int InitNew(IStorage *pStg)
 {
     return(((delegate * unmanaged <IPersistStorage *, IStorage *, int>)(lpVtbl[5]))((IPersistStorage *)Unsafe.AsPointer(ref this), pStg));
 }
Exemplo n.º 4
0
 public static extern HRESULT CoGetInstanceFromIStorage(COSERVERINFO *pServerInfo, [NativeTypeName("CLSID *")] Guid *pClsid, IUnknown *punkOuter, [NativeTypeName("DWORD")] uint dwClsCtx, [NativeTypeName("struct IStorage *")] IStorage *pstg, [NativeTypeName("DWORD")] uint dwCount, MULTI_QI *pResults);
Exemplo n.º 5
0
 public int Save([NativeTypeName("IStorage *")] IStorage *pStgSave, [NativeTypeName("BOOL")] int fSameAsLoad)
 {
     return(((delegate * unmanaged <IPersistStorage *, IStorage *, int, int>)(lpVtbl[7]))((IPersistStorage *)Unsafe.AsPointer(ref this), pStgSave, fSameAsLoad));
 }
Exemplo n.º 6
0
 public HRESULT CopyTo([NativeTypeName("DWORD")] uint ciidExclude, [NativeTypeName("const IID *")] Guid *rgiidExclude, [NativeTypeName("SNB")] ushort **snbExclude, IStorage *pstgDest)
 {
     return(((delegate * unmanaged <IStorage *, uint, Guid *, ushort **, IStorage *, int>)(lpVtbl[7]))((IStorage *)Unsafe.AsPointer(ref this), ciidExclude, rgiidExclude, snbExclude, pstgDest));
 }
 public int InitNew([NativeTypeName("IStorage *")] IStorage *pStg)
 {
     return(((delegate * stdcall <IPersistStorage *, IStorage *, int>)(lpVtbl[5]))((IPersistStorage *)Unsafe.AsPointer(ref this), pStg));
 }
Exemplo n.º 8
0
 public static extern HRESULT StgCreatePropSetStg(IStorage *pStorage, [NativeTypeName("DWORD")] uint dwReserved, IPropertySetStorage **ppPropSetStg);
Exemplo n.º 9
0
 public static extern HRESULT ReadClassStg([NativeTypeName("LPSTORAGE")] IStorage *pStg, [NativeTypeName("CLSID *")] Guid *pclsid);
Exemplo n.º 10
0
 public static extern HRESULT StgOpenStorage([NativeTypeName("const WCHAR *")] ushort *pwcsName, IStorage *pstgPriority, [NativeTypeName("DWORD")] uint grfMode, [NativeTypeName("SNB")] ushort **snbExclude, [NativeTypeName("DWORD")] uint reserved, IStorage **ppstgOpen);
Exemplo n.º 11
0
 public static extern HRESULT StgOpenStorageOnILockBytes(ILockBytes *plkbyt, IStorage *pstgPriority, [NativeTypeName("DWORD")] uint grfMode, [NativeTypeName("SNB")] ushort **snbExclude, [NativeTypeName("DWORD")] uint reserved, IStorage **ppstgOpen);
 public HRESULT SaveCompleted(IStorage *pStgNew)
 {
     return(((delegate * unmanaged <IPersistStorage *, IStorage *, int>)(lpVtbl[8]))((IPersistStorage *)Unsafe.AsPointer(ref this), pStgNew));
 }
 public HRESULT Save(IStorage *pStgSave, BOOL fSameAsLoad)
 {
     return(((delegate * unmanaged <IPersistStorage *, IStorage *, BOOL, int>)(lpVtbl[7]))((IPersistStorage *)Unsafe.AsPointer(ref this), pStgSave, fSameAsLoad));
 }
 public HRESULT Load(IStorage *pStg)
 {
     return(((delegate * unmanaged <IPersistStorage *, IStorage *, int>)(lpVtbl[6]))((IPersistStorage *)Unsafe.AsPointer(ref this), pStg));
 }
Exemplo n.º 15
0
 public int OnFileUpdated([NativeTypeName("IStorage *")] IStorage *pStg)
 {
     return(((delegate * unmanaged <IThumbnailExtractor *, IStorage *, int>)(lpVtbl[4]))((IThumbnailExtractor *)Unsafe.AsPointer(ref this), pStg));
 }
Exemplo n.º 16
0
 public static extern HRESULT WriteClassStg([NativeTypeName("LPSTORAGE")] IStorage *pStg, [NativeTypeName("const IID &")] Guid *rclsid);
Exemplo n.º 17
0
 public HRESULT OpenStorage([NativeTypeName("const OLECHAR *")] ushort *pwcsName, IStorage *pstgPriority, [NativeTypeName("DWORD")] uint grfMode, [NativeTypeName("SNB")] ushort **snbExclude, [NativeTypeName("DWORD")] uint reserved, IStorage **ppstg)
 {
     return(((delegate * unmanaged <IStorage *, ushort *, IStorage *, uint, ushort **, uint, IStorage **, int>)(lpVtbl[6]))((IStorage *)Unsafe.AsPointer(ref this), pwcsName, pstgPriority, grfMode, snbExclude, reserved, ppstg));
 }
Exemplo n.º 18
0
 public static extern HRESULT GetConvertStg([NativeTypeName("LPSTORAGE")] IStorage *pStg);
Exemplo n.º 19
0
 public HRESULT MoveElementTo([NativeTypeName("const OLECHAR *")] ushort *pwcsName, IStorage *pstgDest, [NativeTypeName("const OLECHAR *")] ushort *pwcsNewName, [NativeTypeName("DWORD")] uint grfFlags)
 {
     return(((delegate * unmanaged <IStorage *, ushort *, IStorage *, ushort *, uint, int>)(lpVtbl[8]))((IStorage *)Unsafe.AsPointer(ref this), pwcsName, pstgDest, pwcsNewName, grfFlags));
 }
 public HRESULT RecompressImage(IShellItem *psi, int cx, int cy, int iQuality, IStorage *pstg, IStream **ppstrmOut)
 {
     return(((delegate * unmanaged <IImageRecompress *, IShellItem *, int, int, int, IStorage *, IStream **, int>)(lpVtbl[3]))((IImageRecompress *)Unsafe.AsPointer(ref this), psi, cx, cy, iQuality, pstg, ppstrmOut));
 }
Exemplo n.º 21
0
 public int Load([NativeTypeName("IStorage *")] IStorage *pStg)
 {
     return(((delegate * unmanaged <IPersistStorage *, IStorage *, int>)(lpVtbl[6]))((IPersistStorage *)Unsafe.AsPointer(ref this), pStg));
 }
Exemplo n.º 22
0
 public int AddData(IStorage *pStorage, [NativeTypeName("long")] int lFileOverwrite)
 {
     return(((delegate * unmanaged <IJolietDiscMaster *, IStorage *, int, int>)(lpVtbl[6]))((IJolietDiscMaster *)Unsafe.AsPointer(ref this), pStorage, lFileOverwrite));
 }
Exemplo n.º 23
0
 public int SaveCompleted([NativeTypeName("IStorage *")] IStorage *pStgNew)
 {
     return(((delegate * unmanaged <IPersistStorage *, IStorage *, int>)(lpVtbl[8]))((IPersistStorage *)Unsafe.AsPointer(ref this), pStgNew));
 }
 public HRESULT OnFileUpdated(IStorage *pStg)
 {
     return(((delegate * unmanaged <IThumbnailExtractor *, IStorage *, int>)(lpVtbl[4]))((IThumbnailExtractor *)Unsafe.AsPointer(ref this), pStg));
 }