这篇教程C++ EngFreeMem函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中EngFreeMem函数的典型用法代码示例。如果您正苦于以下问题:C++ EngFreeMem函数的具体用法?C++ EngFreeMem怎么用?C++ EngFreeMem使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了EngFreeMem函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: DrvDisablePDEVVOID DrvDisablePDEV(DHPDEV dhpdev){ PPDEV ppdev; ppdev = (PPDEV) dhpdev; DISPDBG((2, "disabling PDEV/n")); EngDeletePalette(devinfoVGA.hpalDefault);// Free the preallocated saved screen bits buffer, if there is one. if (ppdev->pjPreallocSSBBuffer != NULL) { EngFreeMem(ppdev->pjPreallocSSBBuffer); }// Free the conversion table buffer if (ppdev->pucDIB4ToVGAConvBuffer != NULL) { EngFreeMem(ppdev->pucDIB4ToVGAConvBuffer); }// Delete the PDEV EngFreeMem(dhpdev); DISPDBG((2, "disabled PDEV/n"));}
开发者ID:Gaikokujin,项目名称:WinNT4,代码行数:31,
示例2: FtfdUnloadFontFileBOOLAPIENTRYFtfdUnloadFontFile( IN ULONG_PTR iFile){ PFTFD_FILE pfile = (PFTFD_FILE)iFile; ULONG i; DbgPrint("FtfdUnloadFontFile()/n"); // HACK!!! EngFreeMem(pfile->pvView); /* Cleanup faces */ for (i = 0; i < pfile->cNumFaces; i++) { FT_Done_Face(pfile->aftface[i]); } /* Unmap the font file */ EngUnmapFontFileFD(pfile->iFile); /* Free the memory that was allocated for the font */ EngFreeMem(pfile); return TRUE;}
开发者ID:mutoso-mirrors,项目名称:reactos,代码行数:27,
示例3: DrvGetModesULONG APIENTRYDrvGetModes( IN HANDLE hDriver, IN ULONG cjSize, OUT DEVMODEW *pdm){ ULONG ModeCount; ULONG ModeInfoSize; PVIDEO_MODE_INFORMATION ModeInfo, ModeInfoPtr; ULONG OutputSize; ModeCount = GetAvailableModes(hDriver, &ModeInfo, &ModeInfoSize); if (ModeCount == 0) { return 0; } if (pdm == NULL) { EngFreeMem(ModeInfo); return ModeCount * sizeof(DEVMODEW); } /* * Copy the information about supported modes into the output buffer. */ OutputSize = 0; ModeInfoPtr = ModeInfo; while (ModeCount-- > 0) { if (ModeInfoPtr->Length == 0) { ModeInfoPtr = (PVIDEO_MODE_INFORMATION)(((ULONG_PTR)ModeInfoPtr) + ModeInfoSize); continue; } memset(pdm, 0, sizeof(DEVMODEW)); memcpy(pdm->dmDeviceName, DEVICE_NAME, sizeof(DEVICE_NAME)); pdm->dmSpecVersion = pdm->dmDriverVersion = DM_SPECVERSION; pdm->dmSize = sizeof(DEVMODEW); pdm->dmDriverExtra = 0; pdm->dmBitsPerPel = ModeInfoPtr->NumberOfPlanes * ModeInfoPtr->BitsPerPlane; pdm->dmPelsWidth = ModeInfoPtr->VisScreenWidth; pdm->dmPelsHeight = ModeInfoPtr->VisScreenHeight; pdm->dmDisplayFrequency = ModeInfoPtr->Frequency; pdm->dmDisplayFlags = 0; pdm->dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFREQUENCY | DM_DISPLAYFLAGS; ModeInfoPtr = (PVIDEO_MODE_INFORMATION)(((ULONG_PTR)ModeInfoPtr) + ModeInfoSize); pdm = (LPDEVMODEW)(((ULONG_PTR)pdm) + sizeof(DEVMODEW)); OutputSize += sizeof(DEVMODEW); } EngFreeMem(ModeInfo); return OutputSize;}
开发者ID:GYGit,项目名称:reactos,代码行数:60,
示例4: EngFreeSectionMemBOOLAPIENTRYEngFreeSectionMem( IN PVOID pvSection OPTIONAL, IN PVOID pvMappedBase OPTIONAL){ NTSTATUS Status; PENGSECTION pSection = pvSection; BOOL bResult = TRUE; /* Did the caller give us a mapping base? */ if (pvMappedBase) { Status = MmUnmapViewInSessionSpace(pvMappedBase); if (!NT_SUCCESS(Status)) { DPRINT1("MmUnmapViewInSessionSpace failed: 0x%lx/n", Status); bResult = FALSE; } } /* Check if we should free the section as well */ if (pSection) { /* Dereference the kernel section */ ObDereferenceObject(pSection->pvSectionObject); /* Finally free the section memory itself */ EngFreeMem(pSection); } return bResult;}
开发者ID:hoangduit,项目名称:reactos,代码行数:33,
示例5: GdiPoolDestroyVOIDNTAPIGdiPoolDestroy(PGDI_POOL pPool){ PGDI_POOL_SECTION pSection; PLIST_ENTRY ple; /* Loop all empty sections, removing them */ while (!IsListEmpty(&pPool->leEmptyList)) { /* Delete the section */ ple = RemoveHeadList(&pPool->leEmptyList); pSection = CONTAINING_RECORD(ple, GDI_POOL_SECTION, leInUseLink); GdiPoolDeleteSection(pPool, pSection); } /* Loop all ready sections, removing them */ while (!IsListEmpty(&pPool->leInUseList)) { /* Delete the section */ ple = RemoveHeadList(&pPool->leInUseList); pSection = CONTAINING_RECORD(ple, GDI_POOL_SECTION, leInUseLink); GdiPoolDeleteSection(pPool, pSection); } DBG_CLEANUP_EVENT_LIST(&pPool->slhLog); EngFreeMem(pPool);}
开发者ID:RPG-7,项目名称:reactos,代码行数:29,
示例6: DrvDisableDriverVOIDDrvDisableDriver( VOID ){ EngFreeMem(gpgset);}
开发者ID:Gaikokujin,项目名称:WinNT4,代码行数:7,
示例7: GdiPoolDeleteSectionstaticVOIDGdiPoolDeleteSection(PGDI_POOL pPool, PGDI_POOL_SECTION pSection){ NTSTATUS status; SIZE_T cjSize = 0; /* Should not have any allocations */ if (pSection->cAllocCount != 0) { DPRINT1("There are %lu allocations left, section=%p, pool=%p/n", pSection->cAllocCount, pSection, pPool); DBG_DUMP_EVENT_LIST(&pPool->slhLog); ASSERT(FALSE); } /* Release the virtual memory */ status = ZwFreeVirtualMemory(NtCurrentProcess(), &pSection->pvBaseAddress, &cjSize, MEM_RELEASE); ASSERT(NT_SUCCESS(status)); /* Free the section object */ EngFreeMem(pSection);}
开发者ID:RPG-7,项目名称:reactos,代码行数:26,
示例8: DrvDeleteDeviceBitmapVOID DrvDeleteDeviceBitmap(DHSURF dhsurf){ DSURF* pdsurf; PDEV* ppdev; SURFOBJ* psoDib; HSURF hsurfDib; pdsurf = (DSURF*) dhsurf; ppdev = pdsurf->ppdev; if (pdsurf->dt == DT_SCREEN) { pohFree(ppdev, pdsurf->poh); } else { ASSERTDD(pdsurf->dt == DT_DIB, "Expected DIB type"); psoDib = pdsurf->pso; // Get the hsurf from the SURFOBJ before we unlock it (it's not // legal to dereference psoDib when it's unlocked): hsurfDib = psoDib->hsurf; EngUnlockSurface(psoDib); EngDeleteSurface(hsurfDib); } EngFreeMem(pdsurf);}
开发者ID:Gaikokujin,项目名称:WinNT4,代码行数:31,
示例9: EngDeleteClip/* * @implemented */VOIDAPIENTRYEngDeleteClip( _In_ _Post_ptr_invalid_ CLIPOBJ *pco){ EngFreeMem(ObjToGDI(pco, CLIP));}
开发者ID:mutoso-mirrors,项目名称:reactos,代码行数:10,
示例10: EBRUSHOBJ_vCleanupVOIDNTAPIEBRUSHOBJ_vCleanup(EBRUSHOBJ *pebo){ /* Check if there's a GDI realisation */ if (pebo->pengbrush) { /* Unlock the bitmap again */ SURFACE_ShareUnlockSurface(pebo->pengbrush); pebo->pengbrush = NULL; } /* Check if there's a driver's realisation */ if (pebo->BrushObject.pvRbrush) { /* Free allocated driver memory */ EngFreeMem(pebo->BrushObject.pvRbrush); pebo->BrushObject.pvRbrush = NULL; } if (pebo->psoMask != NULL) { SURFACE_ShareUnlockSurface(pebo->psoMask); pebo->psoMask = NULL; } /* Dereference the palettes */ PALETTE_ShareUnlockPalette(pebo->ppalSurf); PALETTE_ShareUnlockPalette(pebo->ppalDC); if (pebo->ppalDIB) PALETTE_ShareUnlockPalette(pebo->ppalDIB);}
开发者ID:GYGit,项目名称:reactos,代码行数:31,
示例11: IntEngUpdateClipRegionVOIDFASTCALLIntEngUpdateClipRegion( XCLIPOBJ* Clip, ULONG count, const RECTL* pRect, const RECTL* rcBounds){ if(count > 1) { RECTL* NewRects = EngAllocMem(0, FIELD_OFFSET(ENUMRECTS, arcl[count]), GDITAG_CLIPOBJ); if(NewRects != NULL) { Clip->RectCount = count; Clip->EnumOrder = CD_ANY; RtlCopyMemory(NewRects, pRect, count * sizeof(RECTL)); Clip->ClipObj.iDComplexity = DC_COMPLEX; Clip->ClipObj.iFComplexity = ((Clip->RectCount <= 4) ? FC_RECT4 : FC_COMPLEX); Clip->ClipObj.iMode = TC_RECTANGLES; Clip->ClipObj.rclBounds = *rcBounds; if (Clip->Rects != &Clip->ClipObj.rclBounds) EngFreeMem(Clip->Rects); Clip->Rects = NewRects; } } else { Clip->EnumOrder = CD_ANY; Clip->ClipObj.iDComplexity = (((rcBounds->top == rcBounds->bottom) && (rcBounds->left == rcBounds->right)) ? DC_TRIVIAL : DC_RECT); Clip->ClipObj.iFComplexity = FC_RECT; Clip->ClipObj.iMode = TC_RECTANGLES; Clip->ClipObj.rclBounds = *rcBounds; Clip->RectCount = 1; if (Clip->Rects != &Clip->ClipObj.rclBounds) EngFreeMem(Clip->Rects); Clip->Rects = &Clip->ClipObj.rclBounds; }}
开发者ID:RPG-7,项目名称:reactos,代码行数:45,
示例12: BmfdDestroyFontVOIDAPIENTRYBmfdDestroyFont( IN FONTOBJ *pfo){ /* Free the font realization info */ EngFreeMem(pfo->pvProducer); pfo->pvProducer = NULL;}
开发者ID:HBelusca,项目名称:NasuTek-Odyssey,代码行数:9,
示例13: POLYGONFILL_MakeEdgeListFASTCALLPOLYGONFILL_MakeEdgeList(PPOINT Points, int Count){ int CurPt = 0; FILL_EDGE_LIST* list = 0; FILL_EDGE* e = 0; if ( 0 == Points || 2 > Count ) return 0; list = (FILL_EDGE_LIST*)EngAllocMem(FL_ZERO_MEMORY, sizeof(FILL_EDGE_LIST), FILL_EDGE_ALLOC_TAG); if ( 0 == list ) goto fail; list->Count = 0; list->Edges = (FILL_EDGE**)EngAllocMem(FL_ZERO_MEMORY, Count*sizeof(FILL_EDGE*), FILL_EDGE_ALLOC_TAG); if ( !list->Edges ) goto fail; memset ( list->Edges, 0, Count * sizeof(FILL_EDGE*) ); for ( CurPt = 1; CurPt < Count; ++CurPt ) { e = POLYGONFILL_MakeEdge ( Points[CurPt-1], Points[CurPt] ); if ( !e ) goto fail; // if a straight horizontal line - who cares? if ( !e->absdy ) EngFreeMem ( e ); else list->Edges[list->Count++] = e; } e = POLYGONFILL_MakeEdge ( Points[CurPt-1], Points[0] ); if ( !e ) goto fail; if ( !e->absdy ) EngFreeMem ( e ); else list->Edges[list->Count++] = e; return list;fail: DPRINT1("Out Of MEMORY!!/n"); POLYGONFILL_DestroyEdgeList ( list ); return 0;}
开发者ID:hoangduit,项目名称:reactos,代码行数:44,
示例14: TestFdUnloadFontFileTEBOOLTestFdUnloadFontFileTE ( HFF hff ){ if (hff) EngFreeMem((PVOID)hff); return TRUE;}
开发者ID:Gaikokujin,项目名称:WinNT4,代码行数:10,
示例15: VBoxDispDrvDisablePDEV/* Called to free resources allocated for device in VBoxDispDrvEnablePDEV */VOID APIENTRY VBoxDispDrvDisablePDEV(DHPDEV dhpdev){ LOGF_ENTER(); VBoxDispDestroyPalette((PVBOXDISPDEV) dhpdev); EngFreeMem(dhpdev); LOGF_LEAVE();}
开发者ID:LastRitter,项目名称:vbox-haiku,代码行数:11,
示例16: EngDeleteClip/* * @implemented */VOIDAPIENTRYEngDeleteClip( _In_ _Post_ptr_invalid_ CLIPOBJ *pco){ XCLIPOBJ* Clip = CONTAINING_RECORD(pco, XCLIPOBJ, ClipObj); TRACE("Deleting %p./n"); IntEngFreeClipResources(Clip); EngFreeMem(Clip);}
开发者ID:RPG-7,项目名称:reactos,代码行数:13,
示例17: vUninitializePaletteVOID vUninitializePalette(PDEV* ppdev){ // Delete the default palette if we created one: if (ppdev->hpalDefault != 0) EngDeletePalette(ppdev->hpalDefault); if (ppdev->pPal != (PALETTEENTRY*) NULL) EngFreeMem(ppdev->pPal);}
开发者ID:Gaikokujin,项目名称:WinNT4,代码行数:10,
示例18: VBoxDispDrvGetModes |