示例#1
0
		break;
	}
	 
	return;
}


extern "C"
HRESULT
CALLBACK
KnownStructOutput(
_In_ ULONG Flag,
_In_ ULONG64 Address,
_In_ PSTR StructName,
_Out_writes_opt_(*BufferSize) PSTR Buffer,
_Inout_opt_ _When_(Flag == DEBUG_KNOWN_STRUCT_GET_NAMES, _Notnull_) _When_(Flag == DEBUG_KNOWN_STRUCT_GET_SINGLE_LINE_OUTPUT, _Notnull_) PULONG BufferSize
)
{
	HRESULT Hr = S_OK;

	switch (Flag )
	{
		case DEBUG_KNOWN_STRUCT_GET_NAMES :   // 当调试引擎最初加载调试扩展时传递给函数,调试扩展应该返回一组它所支持定制输出的结构名字
		break;
		case DEBUG_KNOWN_STRUCT_SUPPRESS_TYPE_NAME :  //传递给函数以查询它是否希望自动输出类型的名字
		break;
		case DEBUG_KNOWN_STRUCT_GET_SINGLE_LINE_OUTPUT : //当调试扩展执行求值时传递给函数
		break;
	default:
		break;
	}
示例#2
0
#pragma alloc_text(PAGE, CtxFindOrCreateStreamContext)
#pragma alloc_text(PAGE, CtxCreateStreamContext)
#pragma alloc_text(PAGE, CtxUpdateNameInStreamContext)
#pragma alloc_text(PAGE, CtxCreateOrReplaceStreamHandleContext)
#pragma alloc_text(PAGE, CtxCreateStreamHandleContext)
#pragma alloc_text(PAGE, CtxUpdateNameInStreamHandleContext)
#endif




NTSTATUS
CtxFindOrCreateFileContext (
    _In_ PFLT_CALLBACK_DATA Cbd,
    _In_ BOOLEAN CreateIfNotFound,
   _When_( CreateIfNotFound != FALSE, _In_ ) _When_( CreateIfNotFound == FALSE, _In_opt_ ) PUNICODE_STRING FileName,
    _Outptr_ PCTX_FILE_CONTEXT *FileContext,
    _Out_opt_ PBOOLEAN ContextCreated
    )
/*++

Routine Description:

    This routine finds the file context for the target file.
    Optionally, if the context does not exist this routing creates
    a new one and attaches the context to the file.

Arguments:

    Cbd                   - Supplies a pointer to the callbackData which
                            declares the requested operation.
示例#3
0
#include "micarraytopo.h"
#include "micarray1toptable.h"
#include "micarray2toptable.h"
#include "micarray3toptable.h"

#pragma code_seg("PAGE")

//=============================================================================
NTSTATUS
CreateMicArrayMiniportTopology
( 
    _Out_           PUNKNOWN                              * Unknown,
    _In_            REFCLSID,
    _In_opt_        PUNKNOWN                                UnknownOuter,
    _When_((PoolType & NonPagedPoolMustSucceed) != 0,
       __drv_reportError("Must succeed pool allocations are forbidden. "
			 "Allocation failures cause a system crash"))
    _In_            POOL_TYPE                               PoolType, 
    _In_            PUNKNOWN                                UnknownAdapter,
    _In_opt_        PVOID                                   DeviceContext,
    _In_            PENDPOINT_MINIPAIR                      MiniportPair
)
/*++

Routine Description:

    Creates a new topology miniport.

Arguments:

  Unknown - 
示例#4
0
    }

    //
    // Complete the request. Information value has already been set by request
    // handlers.
    //
    if (completeRequest) {
        WdfRequestComplete(Request, status);
    }
}

NTSTATUS
RequestCopyFromBuffer(
    _In_  WDFREQUEST        Request,
    _In_  PVOID             SourceBuffer,
    _When_(NumBytesToCopyFrom == 0, __drv_reportError(NumBytesToCopyFrom cannot be zero))
    _In_  size_t            NumBytesToCopyFrom
    )
/*++

Routine Description:

    A helper function to copy specified bytes to the request's output memory

Arguments:

    Request - A handle to a framework request object.

    SourceBuffer - The buffer to copy data from.

    NumBytesToCopyFrom - The length, in bytes, of data to be copied.
示例#5
0
文件: drvdbg.c 项目: GYGit/reactos
    IN MIX mix)
{
    PPDEVOBJ ppdev = (PPDEVOBJ)pso->hdev;
    return 0;
}

BOOL
APIENTRY
DbgDrvBitBlt(
    _Inout_ SURFOBJ *psoTrg,
    _In_opt_ SURFOBJ *psoSrc,
    _In_opt_ SURFOBJ *psoMask,
    _In_opt_ CLIPOBJ *pco,
    _In_opt_ XLATEOBJ *pxlo,
    _In_ RECTL *prclTrg,
    _When_(psoSrc, _In_) POINTL *pptlSrc,
    _When_(psoMask, _In_) POINTL *pptlMask,
    _In_opt_ BRUSHOBJ *pbo,
    _When_(pbo, _In_) POINTL *pptlBrush,
    _In_ ROP4 rop4)
{
    PSURFACE psurfTrg = CONTAINING_RECORD(psoTrg, SURFACE, SurfObj);
    PSURFACE psurfSrc = CONTAINING_RECORD(psoSrc, SURFACE, SurfObj);
    PPDEVOBJ ppdev;

    /* Get the right BitBlt function */
    if (psurfTrg->flags & HOOK_BITBLT)
    {
        ppdev = (PPDEVOBJ)psoTrg->hdev;
    }
    else
示例#6
0
    pcbDataSize - Pointer to variable that recieves the count of bytes in the buffer
    ppData      - Pointer to a BYTE pointer that recieves the buffer

Return Value:

    HRESULT
    S_OK - On success
    E_*  - On error

--*/
HRESULT
CColorChannelData::GetChannelData(
    _Out_                   DWORD* pcbDataSize,
    _Out_
    _When_(*pcbDataSize > 0, _At_(*ppData, _Post_ _Readable_bytes_(*pcbDataSize)))
    _When_(*pcbDataSize == 0, _At_(*ppData, _Post_ _Maybenull_))
                            PVOID* ppData
    )
{
    HRESULT hr = S_OK;

    DWORD cbDataTypeSize = 0;
    if (SUCCEEDED(hr = CHECK_POINTER(pcbDataSize, E_POINTER)) &&
        SUCCEEDED(hr = CHECK_POINTER(ppData, E_POINTER)) &&
        SUCCEEDED(hr = GetChannelSizeFromType(m_channelType, &cbDataTypeSize)))
    {
        *ppData = NULL;
        *pcbDataSize = 0;

        if (m_cbChannelData >= m_cChannels * cbDataTypeSize)
示例#7
0
    Arguments:

        pphProfiles - Pointer to pointer that recieves the address of an array of profile handles
                      Note: the buffer is only valid for the lifetime of the CProfileList object.
        pcProfiles  - Pointer to storage that recieves the count of profiles in the array

    Return Value:

        HRESULT
        S_OK - On success
        E_*  - On error

    --*/
    HRESULT
    GetProfileData(
        _When_(*pcProfiles >  0, _Outptr_result_buffer_(*pcProfiles)) 
        _When_(*pcProfiles == 0, _Outptr_result_maybenull_)
                                                                HPROFILE** pphProfiles,
        _Out_                                                   DWORD*     pcProfiles
        )
    {
        HRESULT hr = S_OK;

        if (SUCCEEDED(hr = CHECK_POINTER(pphProfiles, E_POINTER)) &&
            SUCCEEDED(hr = CHECK_POINTER(pcProfiles, E_POINTER)) &&
            SUCCEEDED(hr = CHECK_POINTER(m_phProfiles, E_PENDING)))
        {
            *pphProfiles = 0;
            *pcProfiles = 0;

            if (m_cProfiles > 0)
示例#8
0
#define DBG_PLOTFILENAME    DbgUpgrade

extern HMODULE  hPlotUIModule;


#define DBG_UPGRADE         0x00000001

DEFINE_DBGVAR(0);


BOOL
WINAPI
DrvUpgradePrinter(
    _In_range_(1, 2)  DWORD   Level,
    _When_(Level == 1, _In_reads_bytes_opt_(sizeof(DRIVER_UPGRADE_INFO_1)))
    _When_(Level == 2, _In_reads_bytes_opt_(sizeof(DRIVER_UPGRADE_INFO_2)))
                   LPBYTE  pDriverUpgradeInfo
    )

/*++

Routine Description:




Arguments:


示例#9
0
文件: plotdm.c 项目: 340211173/Driver
    return(dmErrFields);

}




DWORD
ValidateSetPLOTDM(
                HANDLE          hPrinter,
    _In_        PPLOTGPC        pPlotGPC,
    _In_opt_    LPCWSTR         pwDeviceName,
    _In_        PPLOTDEVMODE    pPlotDMIn,
    _Inout_     PPLOTDEVMODE    pPlotDMOut,
    _When_(pwDeviceName != NULL, _Out_opt_)
    _When_(pwDeviceName == NULL, _Inout_opt_)
                PFORMSIZE       pCurForm
    )

/*++

Routine Description:

    This function set and validate the pPlotDMOut from pPlotDMIn
    (if not null and valid)

Arguments:

    hPrinter        - Handle to the printer to be checked
示例#10
0
文件: wingl.c 项目: RPG-7/reactos
                                                NULL);
    }

    if (Ret) pdc->ipfdDevMax = Ret;

    return Ret;
}

_Success_(return != 0)
INT
APIENTRY
NtGdiDescribePixelFormat(
    _In_ HDC hdc,
    _In_ INT ipfd,
    _In_ UINT cjpfd,
    _When_(cjpfd != 0, _Out_) PPIXELFORMATDESCRIPTOR ppfd)
{
    PDC pdc;
    PPDEVOBJ ppdev;
    INT Ret = 0;
    PIXELFORMATDESCRIPTOR pfdSafe;

    if ((ppfd == NULL) && (cjpfd != 0)) return 0;

    pdc = DC_LockDc(hdc);
    if (!pdc)
    {
        EngSetLastError(ERROR_INVALID_HANDLE);
        return 0;
    }