⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xpsfilew.h

📁 wdk自带xpsdrv filter之 cont
💻 H
字号:
/*++

Copyright (c) 2005 Microsoft Corporation

All rights reserved.

THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.

File Name:

   xpsfilew.h

Abstract:

   Definition of an XPS file writer. This implements ISequentialStream::Write
   and essentially wraps a buffer that recieves and stores the part information
   so that in can be later compressed and written out.

--*/

#pragma once

#include "workbuff.h"
#include "cunknown.h"
#include "xdstring.h"

class CXPSWriteFile : public CUnknown<ISequentialStream>
{
public:
    CXPSWriteFile();

    CXPSWriteFile(
        PCSTR szFileName
        );

    virtual ~CXPSWriteFile();

    //
    // ISequentialStream members
    //
    HRESULT STDMETHODCALLTYPE
    Read(
        void*,
        ULONG,
        ULONG*
        );

    HRESULT STDMETHODCALLTYPE
    Write(
        __in_bcount(cbData) CONST void* pData,
        __in                ULONG       cbData,
        __out               ULONG*      pcbWritten
        );

    HRESULT
    GetBuffer(
        __deref_out_bcount(*pcb) PVOID* ppv,
        __out                    ULONG* pcb
        );

    HRESULT
    GetFileName(
        __deref_out PSTR* pszFileName
        );

private:
    CWorkingBuffer m_workFile;

    ULONG          m_cbWritten;

    CStringXDA       m_cstrFileName;
};


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -