Пример #1
0
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR szCmdLine, int iCmdShow)
{
    DBG_UNREFERENCED_PARAMETER(szCmdLine);
    DBG_UNREFERENCED_PARAMETER(hPrevInstance);

    g_hMainInstance = hInstance;

    // Initialize common controls
    InitCommonControls();

    if (!CreateConsoleWindow())
    {
        MessageBox(NULL, L"Cannot create console window.", L"Warning", MB_OK | MB_ICONWARNING);
    }

    INT_PTR iptr = DialogBox(hInstance, MAKEINTRESOURCE(IDD_DLG_FDIFF), NULL, FolderDiffDP);
    if (iptr == -1)
    {
        DWORD dw = GetLastError();
        MessageBox(NULL, L"Cannot create dialog box.", L"Error", MB_OK | MB_ICONERROR);
        DebugBreak();
    }

    return 0;
}
Пример #2
0
int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPSTR lpCmdLine, _In_ int nCmdShow) {
	DBG_UNREFERENCED_PARAMETER(hPrevInstance);
	DBG_UNREFERENCED_PARAMETER(lpCmdLine);
	DBG_UNREFERENCED_PARAMETER(nCmdShow);

	#ifdef _DEBUG
	ID3D11Debug *debugInterface = nullptr;
	#endif
	
	// Force scope so we can guarantee the destructor is called before we try to use ReportLiveDeviceObjects
	{
		PBRDemo::PBRDemo app(hInstance);

		app.Initialize(L"Physically Based Rendering Demo", 1280, 720, false);

		#ifdef _DEBUG
		app.CreateDebugInterface(&debugInterface);
		#endif

		app.Run();

		app.Shutdown();
	}

	#ifdef _DEBUG
	debugInterface->ReportLiveDeviceObjects(D3D11_RLDO_DETAIL);

	ReleaseCOM(debugInterface);
	#endif

	return 0;
}
Пример #3
0
NTSTATUS
SamGetDisplayEnumerationIndex (
      IN    SAM_HANDLE        DomainHandle,
      IN    DOMAIN_DISPLAY_INFORMATION DisplayInformation,
      IN    PUNICODE_STRING   Prefix,
      OUT   PULONG            Index
      )

/*++

Routine Description:

    This routine returns the index of the entry which alphabetically
    immediatly preceeds a specified prefix.  If no such entry exists,
    then zero is returned as the index.

Parameters:

    DomainHandle - A handle to an open domain for DOMAIN_LIST_ACCOUNTS.

    DisplayInformation - Indicates which sorted information class is
        to be searched.

    Prefix - The prefix to compare.

    Index - Receives the index of the entry of the information class
        with a LogonName (or MachineName) which immediatly preceeds the
        provided prefix string.  If there are no elements which preceed
        the prefix, then zero is returned.


Return Values:

    STATUS_SUCCESS - normal, successful completion.

    STATUS_ACCESS_DENIED - The specified handle was not opened for
        the necessary access.

    STATUS_INVALID_HANDLE - The specified handle is not that of an
        opened Domain object.


--*/
{

    (*Index) = 0;

    return(STATUS_SUCCESS);


    DBG_UNREFERENCED_PARAMETER(DomainHandle);
    DBG_UNREFERENCED_PARAMETER(DisplayInformation);
    DBG_UNREFERENCED_PARAMETER(Prefix);

}
Пример #4
0
INT
APIENTRY
NtGdiAddFontResourceW(
    IN WCHAR *pwcFiles,
    IN ULONG cwc,
    IN ULONG cFiles,
    IN FLONG fl,
    IN DWORD dwPidTid,
    IN OPTIONAL DESIGNVECTOR *pdv)
{
    UNICODE_STRING SafeFileName;
    INT Ret;

    DBG_UNREFERENCED_PARAMETER(cFiles);
    DBG_UNREFERENCED_PARAMETER(dwPidTid);
    DBG_UNREFERENCED_PARAMETER(pdv);

    /* cwc = Length + trailing zero. */
    if (cwc <= 1 || cwc > UNICODE_STRING_MAX_CHARS)
        return 0;

    SafeFileName.MaximumLength = cwc * sizeof(WCHAR);
    SafeFileName.Length = SafeFileName.MaximumLength - sizeof(UNICODE_NULL);
    SafeFileName.Buffer = ExAllocatePoolWithTag(PagedPool,
                                                SafeFileName.MaximumLength,
                                                TAG_STRING);
    if (!SafeFileName.Buffer)
    {
        return 0;
    }

    _SEH2_TRY
    {
        ProbeForRead(pwcFiles, cwc * sizeof(WCHAR), sizeof(WCHAR));
        RtlCopyMemory(SafeFileName.Buffer, pwcFiles, SafeFileName.Length);
    }
    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
    {
        ExFreePoolWithTag(SafeFileName.Buffer, TAG_STRING);
        _SEH2_YIELD(return 0);
    }
    _SEH2_END;

    SafeFileName.Buffer[SafeFileName.Length / sizeof(WCHAR)] = UNICODE_NULL;
    Ret = IntGdiAddFontResource(&SafeFileName, fl);

    ExFreePoolWithTag(SafeFileName.Buffer, TAG_STRING);
    return Ret;
}
Пример #5
0
// FindIAT_InText()
// Find the starting address - virtual address and file pointer - and the 
// size of the IAT within the .text section if present.
BOOL FindIAT_InText(HANDLE hFileBase, IMAGE_NT_HEADERS *pNTHeader, __out NONCODE_LOC *pNonCodeBlocks)
{
    ASSERT(hFileBase != NULL);
    ASSERT(pNTHeader != NULL && pNonCodeBlocks != NULL);
    
    DBG_UNREFERENCED_PARAMETER(hFileBase);
    DBG_UNREFERENCED_PARAMETER(pNTHeader);
    DBG_UNREFERENCED_PARAMETER(pNonCodeBlocks);

    // first find the virtual address and size of the imports section
    // from the DataDirectory
    //IMAGE_THUNK_DATA

    return TRUE;
}// FindIAT_InText()
Пример #6
0
/* This entry point is called on DLL initialisation.
 * We need to know the module handle so we can load resources.
 */
BOOL InitializeDll(
    IN PVOID hmod,
    IN DWORD Reason,
    IN PCONTEXT pctx OPTIONAL)
{
    DBG_UNREFERENCED_PARAMETER(pctx);

    switch (Reason) {
    case DLL_PROCESS_ATTACH:

        DisableThreadLibraryCalls((HMODULE)hmod);
        hInst = hmod;

        if (!WPCInit())
            return FALSE;

        break;

    case DLL_PROCESS_DETACH:

        WPCDone();

        break;
    }

    return TRUE;
}
Пример #7
0
void CMinotaurIdle::Exit(CMinotaur* _agent)
{
	DBG_UNREFERENCED_PARAMETER(_agent);
	m_fWaitTimer = 0;
	_agent->GetCurrAnimation().SetScale(1.0f);

}
Пример #8
0
BOOL fRemoveThread(CHL_HTABLE *phtThreads, DWORD dwThreadId, __out LPCREATE_THREAD_DEBUG_INFO lpThreadInfo)
{
    ASSERT(phtThreads);

    DBG_UNREFERENCED_PARAMETER(lpThreadInfo);

    return fChlDsRemoveHT(phtThreads, &dwThreadId, sizeof(DWORD));
}
Пример #9
0
intptr_t __cdecl _cwait (
        int *stat_loc,
        intptr_t process_id,
        int action_code
        )
{
        intptr_t retval;
        int retstatus;
        unsigned long oserror;

        DBG_UNREFERENCED_PARAMETER(action_code);

        /* Explicitly check for process_id being -1 or -2. In Windows NT,
         * -1 is a handle on the current process, -2 is a handle on the
         * current thread, and it is perfectly legal to to wait (forever)
         * on either */
        if ( (process_id == -1) || (process_id == -2) ) {
            errno = ECHILD;
            return -1;
        }

        /* wait for child process, then fetch its exit code */
        if ( (WaitForSingleObject((HANDLE)process_id, (DWORD)(-1L)) == 0) &&
          GetExitCodeProcess((HANDLE)process_id, (LPDWORD)&retstatus) ) {
            retval = process_id;
        }
        else {
            /* one of the API calls failed. map the error and set up to
               return failure. note the invalid handle error is mapped in-
               line to ECHILD */
            if ( (oserror = GetLastError()) == ERROR_INVALID_HANDLE ) {
                errno = ECHILD;
                _doserrno = oserror;
            }
            else
                _dosmaperr(GetLastError());

            retval = -1;
            retstatus = -1;
        }

        CloseHandle((HANDLE)process_id);

        if (stat_loc != NULL)
            *stat_loc = retstatus;

        return retval;
}
Пример #10
0
NTSTATUS
SamQueryDisplayInformation (
      IN    SAM_HANDLE DomainHandle,
      IN    DOMAIN_DISPLAY_INFORMATION DisplayInformation,
      IN    ULONG      Index,
      IN    ULONG      PreferredMaximumLength,
      OUT   PULONG     TotalAvailable,
      OUT   PULONG     TotalReturned,
      OUT   PULONG     ReturnedEntryCount,
      OUT   PVOID      *SortedBuffer
      )

/*++

Routine Description:

    This routine provides fast return of information commonly
    needed to be displayed in user interfaces.

    NT User Interface has a requirement for quick enumeration of SAM
    accounts for display in list boxes.  (Replication has similar but
    broader requirements.)

    The netui listboxes all contain similar information.  That is:

      o  AccountControl, the bits that identify the account type,
         eg, HOME, REMOTE, SERVER, WORKSTATION, etc.

      o  Logon name (machine name for computers)

      o  Full name (not used for computers)

      o  Comment (admin comment for users)

    SAM maintains this data locally in two sorted indexed cached
    lists identified by infolevels.

      o DomainDisplayUser:       HOME and REMOTE user accounts only

      o  DomainDisplayMachine:   SERVER and WORKSTATION accounts only

    Note that trust accounts, groups, and aliases are not in either of
    these lists.

Parameters:

    DomainHandle - A handle to an open domain for DOMAIN_LIST_ACCOUNTS.

    DisplayInformation - Indicates which information is to be enumerated.

    Index - The index of the first entry to be retrieved.

    PreferedMaximumLength - A recommended upper limit to the number of
        bytes to be returned.  The returned information is allocated by
        this routine.

    TotalAvailable - Total number of bytes availabe in the specified info
        class.

    TotalReturned - Number of bytes actually returned for this call.  Zero
        indicates there are no entries with an index as large as that
        specified.

    ReturnedEntryCount - Number of entries returned by this call.  Zero
        indicates there are no entries with an index as large as that
        specified.


    SortedBuffer - Receives a pointer to a buffer containing a sorted
        list of the requested information.  This buffer is allocated
        by this routine and contains the following structure:


            DomainDisplayMachine --> An array of ReturnedEntryCount elements
                                     of type DOMAIN_DISPLAY_USER.  This is
                                     followed by the bodies of the various
                                     strings pointed to from within the
                                     DOMAIN_DISPLAY_USER structures.

            DomainDisplayMachine --> An array of ReturnedEntryCount elements
                                     of type DOMAIN_DISPLAY_MACHINE.  This is
                                     followed by the bodies of the various
                                     strings pointed to from within the
                                     DOMAIN_DISPLAY_MACHINE structures.

Return Values:

    STATUS_SUCCESS - normal, successful completion.

    STATUS_ACCESS_DENIED - The specified handle was not opened for
        the necessary access.

    STATUS_INVALID_HANDLE - The specified handle is not that of an
        opened Domain object.

    STATUS_INVALID_INFO_CLASS - The requested class of information
        is not legitimate for this service.





--*/
{



//    if ((DisplayInformation != DomainDisplayUser) &&
//        (DisplayInformation != DomainDisplayMachine) ) {
//        return( STATUS_INVALID_INFO_CLASS );
//
//    }



    SampBuildDummyAccounts( DisplayInformation,
                            Index,
                            TotalAvailable,
                            TotalReturned,
                            ReturnedEntryCount,
                            SortedBuffer);

    return(STATUS_SUCCESS);

    DBG_UNREFERENCED_PARAMETER(DomainHandle);
    DBG_UNREFERENCED_PARAMETER(PreferredMaximumLength);

}
Пример #11
0
VOID
SoundInDeferred(
    IN    PKDPC pDpc,
    IN OUT PDEVICE_OBJECT pDeviceObject,
    IN    PIRP pIrp,
    IN    PVOID Context
)
/*++

Routine Description:

    Dpc routine for wave input device

    Collect the data from the DMA buffer and pass it to the application's
    buffer(s).

Arguments:


Return Value:

    None.

--*/
{
    PLOCAL_DEVICE_INFO pLDI;
    PGLOBAL_DEVICE_INFO pGDI;

    pLDI = (PLOCAL_DEVICE_INFO)pDeviceObject->DeviceExtension;
    pGDI = pLDI->pGlobalInfo;

    //
    // Acquire the spin lock before we mess with the list
    //

    GlobalEnter(pGDI);

    //
    // Fill in any buffers we can
    //

    dprintf4(pGDI->NextHalf == LowerHalf ? "dpc():L" : "dpc():U");


    //
    // Zero bytes taken out of new buffer
    //

    if( pGDI->DMABuffer[pGDI->NextHalf].nBytes == DMA_BUFFER_SIZE / 2)
	pGDI->DMABuffer[pGDI->NextHalf].nBytes = 0;

    //
    // Request input without posting the last buffer
    //

    sndFlush(pGDI, pGDI->NextHalf);
    sndFillInputBuffers(pLDI, pGDI->NextHalf);

    //
    // Restart this buffer's DMA
    //
    sndReStartDMA(pGDI, pGDI->NextHalf);

    //
    // Move on to next half
    //
    pGDI->NextHalf = UpperHalf + LowerHalf - pGDI->NextHalf;

    //
    // Release the spin lock
    //

    GlobalLeave(pGDI);

    return;

    DBG_UNREFERENCED_PARAMETER(pDpc);
    DBG_UNREFERENCED_PARAMETER(Context);
    DBG_UNREFERENCED_PARAMETER(pIrp);
}
Пример #12
0
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
{
    HWND g_hMainWnd;
    MSG MainWndMsg;
	WNDCLASS MainWndClass;

    HACCEL hAccel;

	WCHAR szAppName[SLEN_COMMON64];

    int iScreenX, iScreenY, iWndX, iWndY, iWidth, iHeight;
	RECT rcMainWnd;

    DBG_UNREFERENCED_PARAMETER(szCmdLine);
    DBG_UNREFERENCED_PARAMETER(hPrevInstance);

    // First, initialize logger
    if(!fInitializeLogger(L"OSD_Log.txt", &StLogger))
    {
        MessageBox(NULL, L"Cannot initialize logger", L"Error", MB_ICONEXCLAMATION);
        return CE_WMAIN_ERROR;
    }

	g_hMainInstance = hInstance;

    LoadString(GetModuleHandle(NULL), IDS_PGMNAME, szAppName, _countof(szAppName));

	// UI Window Class
	MainWndClass.style		 = CS_HREDRAW | CS_VREDRAW;
	MainWndClass.lpfnWndProc = WndProc;
	MainWndClass.cbClsExtra	 = 0;
	MainWndClass.cbWndExtra  = 0;
	MainWndClass.hInstance	 = g_hMainInstance;
	MainWndClass.hIcon		 = NULL;
	MainWndClass.hCursor	 = LoadCursor(NULL, IDC_ARROW);
	MainWndClass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
	MainWndClass.lpszMenuName  = MAKEINTRESOURCE(IDR_MAINMENU);
	MainWndClass.lpszClassName = szAppName;

	if(!RegisterClass(&MainWndClass))
	{
		MessageBox(NULL, TEXT("This program requires Windows NT!"), szAppName, MB_ICONERROR);
		return CE_WMAIN_ERROR;
	}

    // Initialize common controls
	InitCommonControls();

	// Create the main window
	g_hMainWnd = CreateWindow(szAppName,		// class name
						szAppName,				// caption
						WS_CAPTION | 
						WS_MINIMIZEBOX |
						WS_SYSMENU,				// window style
						CW_USEDEFAULT,			// initial X position
						CW_USEDEFAULT,			// initial Y position
						WNDSIZE_WIDTH,					// initial X size
						WNDSIZE_HEIGHT,					// initial Y size
						NULL,					// parent window handle
						NULL,					// window menu handle
						g_hMainInstance,		// program instance handle
						NULL);

	// exit if window was not created
	if( !g_hMainWnd )
	{
		MessageBox(0, L"Main Window creation error. Cannot continue.", 0, 0);
		return CE_WMAIN_ERROR;
	}

    // Init accelerators
    hAccel = LoadAccelerators(g_hMainInstance, MAKEINTRESOURCE(IDR_ACCELERATOR1));
    if(!hAccel)
    {
        MessageBox(g_hMainWnd, L"Initialization failed. See log file.", L"Error", MB_OK | MB_ICONSTOP);
        logerror(pstLogger, L"LoadAccelerators() failed %u", GetLastError());
        return CE_WMAIN_ERROR;
    }

	// centre the main window in the screen

	// get the screen co-ordinates
	iScreenX = GetSystemMetrics(SM_CXSCREEN);
	iScreenY = GetSystemMetrics(SM_CYSCREEN);

	// get window rect and calculate the main window dimensions
	GetWindowRect(g_hMainWnd, &rcMainWnd);
	iWidth = rcMainWnd.right - rcMainWnd.left;
	iHeight = rcMainWnd.bottom - rcMainWnd.top;

	// calculate the new co-ordinates for the main window
	iWndX = iScreenX / 2 - iWidth / 2;
	iWndY = iScreenY / 2 - iHeight / 2;
	
	MoveWindow(g_hMainWnd, iWndX, iWndY, iWidth, iHeight, FALSE);

    ShowWindow(g_hMainWnd, iCmdShow);
	UpdateWindow(g_hMainWnd);

	while( GetMessage(&MainWndMsg, NULL, 0, 0) )
	{
        if(!TranslateAccelerator(g_hMainWnd, hAccel, &MainWndMsg))
        {
		    TranslateMessage(&MainWndMsg);
		    DispatchMessage(&MainWndMsg);
        }
	}
	
	return MainWndMsg.wParam;
}
Пример #13
0
/*
 * --------------------------------------------------------------------------
 * Utility function to issue the specified OID to the NDIS stack. The OID is
 * directed towards the miniport edge of the extensible switch.
 * An OID that gets issued may not complete immediately, and in such cases, the
 * function waits for the OID to complete. Thus, this function must not be
 * called at the PASSIVE_LEVEL.
 * --------------------------------------------------------------------------
 */
static NDIS_STATUS
OvsIssueOidRequest(POVS_SWITCH_CONTEXT switchContext,
                   NDIS_REQUEST_TYPE oidType,
                   UINT32 oidRequestEnum,
                   PVOID oidInputBuffer,
                   UINT32 inputSize,
                   PVOID oidOutputBuffer,
                   UINT32 outputSize,
                   UINT32 *outputSizeNeeded)
{
    NDIS_STATUS status;
    PNDIS_OID_REQUEST oidRequest;
    POVS_OID_CONTEXT oidContext;
    ULONG OvsExtOidRequestId =          'ISVO';

    DBG_UNREFERENCED_PARAMETER(inputSize);
    DBG_UNREFERENCED_PARAMETER(oidInputBuffer);

    OVS_LOG_TRACE("Enter: switchContext: %p, oidType: %d",
                  switchContext, oidType);

    ASSERT(oidInputBuffer == NULL || inputSize != 0);
    ASSERT(oidOutputBuffer == NULL || outputSize != 0);
    ASSERT(KeGetCurrentIrql() == PASSIVE_LEVEL);

    oidRequest = OvsAllocateMemoryWithTag(sizeof *oidRequest,
                                          OVS_OID_POOL_TAG);
    if (!oidRequest) {
        status = NDIS_STATUS_RESOURCES;
        goto done;
    }

    oidContext = OvsAllocateMemoryWithTag(sizeof *oidContext,
                                          OVS_OID_POOL_TAG);
    if (!oidContext) {
        OvsFreeMemoryWithTag(oidRequest, OVS_OID_POOL_TAG);
        status = NDIS_STATUS_RESOURCES;
        goto done;
    }

    RtlZeroMemory(oidRequest, sizeof *oidRequest);
    RtlZeroMemory(oidContext, sizeof *oidContext);

    oidRequest->Header.Type = NDIS_OBJECT_TYPE_OID_REQUEST;
    oidRequest->Header.Revision = NDIS_OID_REQUEST_REVISION_1;
    oidRequest->Header.Size = NDIS_SIZEOF_OID_REQUEST_REVISION_1;

    oidRequest->RequestType = oidType;
    oidRequest->PortNumber = 0;
    oidRequest->Timeout = 0;
    oidRequest->RequestId = (PVOID)OvsExtOidRequestId;

    switch(oidType) {
    case NdisRequestQueryInformation:
        oidRequest->DATA.QUERY_INFORMATION.Oid = oidRequestEnum;
        oidRequest->DATA.QUERY_INFORMATION.InformationBuffer = oidOutputBuffer;
        oidRequest->DATA.QUERY_INFORMATION.InformationBufferLength = outputSize;
        break;
    default:
        ASSERT(FALSE);
        status = NDIS_STATUS_INVALID_PARAMETER;
        break;
    }

    /*
     * We make use of the SourceReserved field in the OID request to store
     * pointers to the original OID (if any), and also context for completion
     * (if any).
     */
    oidContext->status = NDIS_STATUS_SUCCESS;
    NdisInitializeEvent(&oidContext->oidComplete);

    OvsOidSetOrigRequest(oidRequest, NULL);
    OvsOidSetContext(oidRequest, oidContext);

    NdisInterlockedIncrement(&(switchContext->pendingOidCount));
    status = NdisFOidRequest(switchContext->NdisFilterHandle, oidRequest);
    if (status == NDIS_STATUS_PENDING) {
        NdisWaitEvent(&oidContext->oidComplete, 0);
    } else {
        NdisInterlockedDecrement(&(switchContext->pendingOidCount));
    }

    if (status == NDIS_STATUS_INVALID_LENGTH ||
        oidContext->status == NDIS_STATUS_INVALID_LENGTH) {
        switch(oidType) {
        case NdisRequestQueryInformation:
            *outputSizeNeeded = oidRequest->DATA.QUERY_INFORMATION.BytesNeeded;
        }
    }

    status = oidContext->status;
    ASSERT(status != NDIS_STATUS_PENDING);

    OvsFreeMemoryWithTag(oidRequest, OVS_OID_POOL_TAG);
    OvsFreeMemoryWithTag(oidContext, OVS_OID_POOL_TAG);

done:
    OVS_LOG_TRACE("Exit: status %8x.", status);
    return status;
}
Пример #14
0
int COrcFollow::UpdateState(COrc* _agent)
{
	DBG_UNREFERENCED_PARAMETER(_agent);

	return 0;
}
Пример #15
0
DBGSTATIC VOID
ReplClientInitPool(
    IN DWORD PoolNumber,
    IN DWORD EntryCount,
    IN DWORD EntrySize
    )
/*++

Routine Description:

    Allocates initial (guessed) memory for the Big Buffer pool.
    If needed, other entries will be allocated dynamically.

    Guess is = MAX(count, POOL_MIN_ENTRY_COUNT )

    From here the linked list memory is managed as follows:

    If an entry is deleted (FREE)
     add record to free_list.

    If a new entry is required (ALLOC)
     if NOTEMPTY(free_list)
         grab a record from free_list
     else
         Allocate new entry from the heap.

Arguments:

    PoolNumber - Which pool to initialize

    EntryCount - Initial guess of number of entries to allocate.

    EntrySize - Size in byte of each entry in the pool.

Return Value:

    None.

--*/
{
#ifdef notdef
    DWORD i;
    NET_API_STATUS    NetStatus;
#endif // notdef

    //
    // Ensure the EntrySize is a multiple of pointer size to ensure
    // each entry allocated here is pointer size aligned.
    //

    EntrySize = ROUND_UP_COUNT( EntrySize, ALIGN_LPBYTE );

    RCGlobalPoolEntrySize[PoolNumber] = EntrySize;
    RCGlobalPoolHeader[PoolNumber] = NULL;


#ifdef notdef

    //
    // Always allocate a minimum number of entries.
    //

    if (EntryCount < POOL_MIN_ENTRY_COUNT ) {
        EntryCount = POOL_MIN_ENTRY_COUNT ;
    }

    //
    // Allocate all the appropiate entries.
    //
    // It is better to detect a lack of resources at service initialization
    // rather than later.  That is why the pool is primed, otherwise we
    // could just let the pools prime themselves.
    //

    for (i = 0; i < (EntryCount - 1); i++) {
        PUCHAR rec;

        rec = NetpMemoryAllocate( RCGlobalPoolEntrySize[PoolNumber] );

        if ( rec == NULL ) {
            NetStatus = ERROR_NOT_ENOUGH_MEMORY;
            AlertLogExit( ALERT_ReplSysErr,
                          NELOG_ReplSysErr,
                          NetStatus,
                          NULL,
                          NULL,
                          NO_EXIT);
            BUGBUG;  // Hey, this will cause ReplClientFreePoolEntry to
                     // fault on a NULL pointer!  --JR
        }

        ReplClientFreePoolEntry( PoolNumber, rec );

    }
#endif // notdef

    DBG_UNREFERENCED_PARAMETER (EntryCount);
}
Пример #16
0
void CMinotaurIdle::Execute(CMinotaur* _agent)
{
	DBG_UNREFERENCED_PARAMETER(_agent);
	m_fWaitTimer -= DELTA_TIME();

}
Пример #17
0
/*****************************************************************
* CollisionResponse():	Called after a collision is made between this object and another
*
* Ins:					N/A
*
* Outs:					N/A
*
* Returns:				N/A
*
* Mod. Date:			8/15/2015
* Mod. Initials:		NH
*****************************************************************/
void IObject::CollisionResponse(IObject * _cCollidedObject)
{
	DBG_UNREFERENCED_PARAMETER(_cCollidedObject);
	//handles collision response for this object
}
Пример #18
0
void COrcFollow::Execute(COrc* _agent)
{
	DBG_UNREFERENCED_PARAMETER(_agent);

}