Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

init.c File Reference

#include "precomp.h"

Go to the source code of this file.

Defines

#define OEMRESOURCE   1
#define GRAY_STRLEN   40
#define MAX_TIME_OUT   (10*60*4)
#define CCLASSES   8

Functions

BOOL Win32kNtUserCleanup ()
NTSTATUS DriverEntry (IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
NTSTATUS Win32UserInitialize (VOID)
void FreeSMS (PSMS psms)
VOID FreeImeHotKeys (VOID)
BOOL Win32kNtUserCleanup (VOID)
VOID DestroyRegion (HRGN *prgn)
VOID DestroyBrush (HBRUSH *pbr)
VOID DestroyBitmap (HBITMAP *pbm)
VOID DestroyDC (HDC *phdc)
VOID DestroyFont (HFONT *pfnt)
VOID CleanupGDI (VOID)
VOID DestroyHandleTableObjects (VOID)
VOID Win32KDriverUnload (IN PDRIVER_OBJECT DriverObject)
int xxxAddFontResourceW (LPWSTR lpFile, FLONG flags, DESIGNVECTOR *pdv)
VOID LW_DriversInit (VOID)
BOOL LoadCPUserPreferences (PUNICODE_STRING pProfileUserName)
VOID LW_LoadProfileInitData (PUNICODE_STRING pProfileUserName)
VOID LW_LoadResources (PUNICODE_STRING pProfileUserName)
BOOL xxxInitWindowStation (PWINDOWSTATION pwinsta)
BOOL CreateTerminalInput (PTERMINAL pTerm)
VOID LW_LoadSomeStrings (VOID)
DWORD CI_GetClrVal (LPWSTR p)
VOID xxxODI_ColorInit (PUNICODE_STRING pProfileUserName)
VOID _LoadCursorsAndIcons (VOID)
VOID UnloadCursorsAndIcons (VOID)
VOID xxxUpdateSystemCursorsFromRegistry (PUNICODE_STRING pProfileUserName)
VOID xxxUpdateSystemIconsFromRegistry (PUNICODE_STRING pProfileUserName)
BOOL LW_BrushInit (VOID)
BOOL LW_RegisterWindows (BOOL fSystem)
VOID vCheckMMInstance (LPWSTR pchSrch, DESIGNVECTOR *pdv)
BOOL bEnumerateRegistryFonts (BOOL bPermanent)
VOID CloseFNTCache (VOID)
VOID xxxLW_LoadFonts (BOOL bRemote)
BOOL FinalUserInit (VOID)
NTSTATUS InitializeClientPfnArrays (CONST PFNCLIENT *ppfnClientA, CONST PFNCLIENT *ppfnClientW, CONST PFNCLIENTWORKER *ppfnClientWorker, HANDLE hModUser)
BOOL GetKbdLangSwitch (PUNICODE_STRING pProfileUserName)
BOOL xxxUpdatePerUserSystemParameters (HANDLE hToken, BOOL bUserLoggedOn)
void InitAnsiOem (PCHAR pOemToAnsi, PCHAR pAnsiToOem)
VOID RegisterLPK (DWORD dwLpkEntryPoints)
void EnforceColorDependentSettings (void)

Variables

PVOID * apObjects
PKWAIT_BLOCK gWaitBlockArray
PVOID UserAtomTableHandle
PKTIMER gptmrWD
UNICODE_STRING * gpastrSetupExe
WCHAR * glpSetupPrograms
PHANDLEPAGE gpHandlePages
PBWL pbwlCache
BOOL bPermanentFontsLoaded = FALSE
int LastFontLoaded = -1
ULONG W32ProcessSize = sizeof(PROCESSINFO)
ULONG W32ProcessTag = TAG_PROCESSINFO
ULONG W32ThreadSize = sizeof(THREADINFO)
ULONG W32ThreadTag = TAG_THREADINFO
PFAST_MUTEX gpW32FastMutex
PPAGED_LOOKASIDE_LIST SMSLookaside
PPAGED_LOOKASIDE_LIST QEntryLookaside


Define Documentation

#define CCLASSES   8
 

Referenced by LW_RegisterWindows().

#define GRAY_STRLEN   40
 

Definition at line 51 of file w32/ntuser/kernel/init.c.

Referenced by FinalUserInit().

#define MAX_TIME_OUT   (10*60*4)
 

Definition at line 95 of file w32/ntuser/kernel/init.c.

Referenced by xxxLW_LoadFonts().

#define OEMRESOURCE   1
 

Definition at line 14 of file w32/ntuser/kernel/init.c.


Function Documentation

VOID _LoadCursorsAndIcons VOID   ) 
 

Definition at line 1568 of file w32/ntuser/kernel/init.c.

References CURSORF_LRSHARED, FALSE, gasyscur, gasysico, gpcurFirst, gpepCSRSS, gpsi, HH_LOADCURSORS, HYDRA_HINT, tagSYSCFGICO::Id, IS_PTR, Lock, NULL, PsGetCurrentProcess, PtoH, PTR_TO_ID, SYSICO, SYSMET, and VOID().

01569 { 01570 PCURSOR pcur; 01571 int i; 01572 01573 pcur = gpcurFirst; 01574 01575 /* 01576 * Only CSR can call this (and only once). 01577 */ 01578 if (PsGetCurrentProcess() != gpepCSRSS) { 01579 return; 01580 } 01581 01582 HYDRA_HINT(HH_LOADCURSORS); 01583 01584 while (pcur) { 01585 01586 UserAssert(!IS_PTR(pcur->strName.Buffer)); 01587 01588 switch (pcur->rt) { 01589 case RT_ICON: 01590 UserAssert((LONG_PTR)pcur->strName.Buffer >= OIC_FIRST_DEFAULT); 01591 01592 UserAssert((LONG_PTR)pcur->strName.Buffer < 01593 OIC_FIRST_DEFAULT + COIC_CONFIGURABLE); 01594 01595 i = PTR_TO_ID(pcur->strName.Buffer) - OIC_FIRST_DEFAULT; 01596 pcur->strName.Buffer = (LPWSTR)gasysico[i].Id; 01597 01598 if (pcur->CURSORF_flags & CURSORF_LRSHARED) { 01599 UserAssert(gasysico[i].spcur == NULL); 01600 Lock(&gasysico[i].spcur, pcur); 01601 } else { 01602 UserAssert(gpsi->hIconSmWindows == NULL); 01603 UserAssert((int)pcur->cx == SYSMET(CXSMICON)); 01604 /* 01605 * The special small winlogo icon is not shared. 01606 */ 01607 gpsi->hIconSmWindows = PtoH(pcur); 01608 } 01609 break; 01610 01611 case RT_CURSOR: 01612 UserAssert((LONG_PTR)pcur->strName.Buffer >= OCR_FIRST_DEFAULT); 01613 01614 UserAssert((LONG_PTR)pcur->strName.Buffer < 01615 OCR_FIRST_DEFAULT + COCR_CONFIGURABLE); 01616 01617 i = PTR_TO_ID(pcur->strName.Buffer) - OCR_FIRST_DEFAULT; 01618 pcur->strName.Buffer = (LPWSTR)gasyscur[i].Id; 01619 Lock(&gasyscur[i].spcur ,pcur); 01620 break; 01621 01622 default: 01623 UserAssert(FALSE); // should be nothing in the cache but these! 01624 } 01625 01626 pcur = pcur->pcurNext; 01627 } 01628 01629 /* 01630 * copy special icon handles to global spots for later use. 01631 */ 01632 gpsi->hIcoWindows = PtoH(SYSICO(WINLOGO)); 01633 }

BOOL bEnumerateRegistryFonts BOOL  bPermanent  ) 
 

Definition at line 2036 of file w32/ntuser/kernel/init.c.

References BOOL, bPermanentFontsLoaded, FALSE, FastGetProfileKeysW(), FastGetProfileStringW(), LastFontLoaded, MAX_PATH, NULL, PMAP_FONTS, PMAP_WINLOGON, PtiCurrent, PUDF_FONTSARELOADED, SET_PUDF, ThreadLockPool, ThreadUnlockAndFreePool, TRUE, vCheckMMInstance(), and xxxAddFontResourceW().

Referenced by xxxLW_LoadFonts().

02038 { 02039 LPWSTR pchKeys; 02040 LPWSTR pchSrch; 02041 LPWSTR lpchT; 02042 int cchReal; 02043 int cFont; 02044 WCHAR szFontFile[MAX_PATH]; 02045 FLONG flAFRW; 02046 TL tlPool; 02047 DESIGNVECTOR dv; 02048 02049 WCHAR szPreloadFontFile[MAX_PATH]; 02050 02051 /* 02052 * if we are not just checking whether this is a registry font 02053 */ 02054 flAFRW = (bPermanent ? AFRW_ADD_LOCAL_FONT : AFRW_ADD_REMOTE_FONT); 02055 02056 cchReal = (int)FastGetProfileKeysW(NULL, 02057 PMAP_FONTS, 02058 TEXT("vgasys.fnt"), 02059 &pchKeys 02060 ); 02061 02062 #if DBG 02063 if (cchReal == 0) { 02064 RIPMSG0(RIP_WARNING, "bEnumerateRegistryFonts: cchReal is 0"); 02065 } 02066 #endif 02067 02068 if (!pchKeys) 02069 return FALSE; 02070 02071 ThreadLockPool(PtiCurrent(), pchKeys, &tlPool); 02072 02073 /* 02074 * If we got here first, we load the fonts until this preload font. 02075 * Preload fonts will be used by Winlogon UI, then we need to make sure 02076 * the font is available when Winlogon UI comes up. 02077 */ 02078 if (LastFontLoaded == -1) { 02079 FastGetProfileStringW(NULL, PMAP_WINLOGON, 02080 TEXT("PreloadFontFile"), 02081 TEXT("Micross.ttf"), 02082 szPreloadFontFile, 02083 MAX_PATH 02084 ); 02085 RIPMSG1(RIP_VERBOSE, "Winlogon preload font = %ws\n",szPreloadFontFile); 02086 } 02087 02088 /* 02089 * Now we have all the key names in pchKeys. 02090 */ 02091 if (cchReal != 0) { 02092 02093 cFont = 0; 02094 pchSrch = pchKeys; 02095 02096 do { 02097 // check to see whether this is MM(OpenType) instance 02098 vCheckMMInstance(pchSrch, &dv); 02099 02100 if (FastGetProfileStringW(NULL, 02101 PMAP_FONTS, 02102 pchSrch, 02103 TEXT("vgasys.fon"), 02104 szFontFile, 02105 (MAX_PATH - 5) 02106 )) { 02107 02108 /* 02109 * If no extension, append ".FON" 02110 */ 02111 for (lpchT = szFontFile; *lpchT != TEXT('.'); lpchT++) { 02112 02113 if (*lpchT == 0) { 02114 wcscat(szFontFile, TEXT(".FON")); 02115 break; 02116 } 02117 } 02118 02119 if ((cFont > LastFontLoaded) && bPermanent) { 02120 02121 /* 02122 * skip if we've already loaded this local font. 02123 */ 02124 xxxAddFontResourceW(szFontFile, flAFRW, dv.dvNumAxes ? &dv : NULL); 02125 } 02126 02127 if (!bPermanent) 02128 xxxAddFontResourceW(szFontFile, flAFRW, dv.dvNumAxes ? &dv : NULL); 02129 02130 if ((LastFontLoaded == -1) && 02131 /* 02132 * Compare with the font file name from Registry. 02133 */ 02134 (!_wcsnicmp(szFontFile, szPreloadFontFile, wcslen(szPreloadFontFile))) && 02135 (bPermanent)) { 02136 02137 /* 02138 * On the first time through only load up until 02139 * ms sans serif for winlogon to use. Later we 02140 * will spawn off a thread which loads the remaining 02141 * fonts in the background. 02142 */ 02143 LastFontLoaded = cFont; 02144 02145 ThreadUnlockAndFreePool(PtiCurrent(), &tlPool); 02146 return TRUE; 02147 } 02148 } 02149 02150 /* 02151 * Skip to the next key. 02152 */ 02153 while (*pchSrch++); 02154 02155 cFont += 1; 02156 02157 } while (pchSrch < ((LPWSTR)pchKeys + cchReal)); 02158 } 02159 02160 /* 02161 * signal that all the permanent fonts have been loaded 02162 */ 02163 bPermanentFontsLoaded = TRUE; 02164 02165 ThreadUnlockAndFreePool(PtiCurrent(), &tlPool); 02166 02167 if (!bPermanent) 02168 SET_PUDF(PUDF_FONTSARELOADED); 02169 02170 return TRUE; 02171 02172 }

DWORD CI_GetClrVal LPWSTR  p  ) 
 

Definition at line 1456 of file w32/ntuser/kernel/init.c.

References BYTE, and DWORD.

Referenced by xxxODI_ColorInit().

01458 { 01459 LPBYTE pl; 01460 BYTE val; 01461 int i; 01462 DWORD clrval; 01463 01464 /* 01465 * Initialize the pointer to the LONG return value. Set to MSB. 01466 */ 01467 pl = (LPBYTE)&clrval; 01468 01469 /* 01470 * Get three goups of numbers seprated by non-numeric characters. 01471 */ 01472 for (i = 0; i < 3; i++) { 01473 01474 /* 01475 * Skip over any non-numeric characters. 01476 */ 01477 while (!(*p >= TEXT('0') && *p <= TEXT('9'))) 01478 p++; 01479 01480 /* 01481 * Get the next series of digits. 01482 */ 01483 val = 0; 01484 while (*p >= TEXT('0') && *p <= TEXT('9')) 01485 val = (BYTE)((int)val*10 + (int)*p++ - '0'); 01486 01487 /* 01488 * HACK! Store the group in the LONG return value. 01489 */ 01490 *pl++ = val; 01491 } 01492 01493 /* 01494 * Force the MSB to zero for GDI. 01495 */ 01496 *pl = 0; 01497 01498 return clrval; 01499 }

VOID CleanupGDI VOID   ) 
 

Definition at line 565 of file w32/ntuser/kernel/init.c.

References DelayedDestroyCacheDC(), DestroyBitmap(), DestroyBrush(), DestroyCacheDCEntries(), DestroyDC(), DestroyFont(), DestroyMonitor(), DestroyRegion(), gfade, ghbmBits, ghbmCaption, ghbmWallpaper, ghbrBlack, ghbrHungApp, ghbrWhite, ghdcMem, ghdcMem2, ghFontSys, ghIconFont, ghMenuFont, ghMenuFontDef, ghpalWallpaper, ghrgnGDC, ghrgnInv0, ghrgnInv1, ghrgnInv2, ghrgnInvalid, ghrgnInvalidSum, ghrgnSCR, ghrgnScrl1, ghrgnScrl2, ghrgnScrlDst, ghrgnScrlSrc, ghrgnScrlValid, ghrgnScrlVis, ghrgnSPB1, ghrgnSPB2, ghrgnSW, ghrgnSWP1, ghrgnValid, ghrgnValidSum, ghrgnVisNew, ghSmCaptionFont, ghStatusFont, gpDispInfo, gpMonitorCached, gpsi, tagDISPLAYINFO::hbmGray, tagFADE::hdc, tagDISPLAYINFO::hdcBits, tagDISPLAYINFO::hdcGray, tagDISPLAYINFO::hdcScreen, tagDISPLAYINFO::hDev, tagDISPLAYINFO::hrgnScreen, NULL, tagDISPLAYINFO::pdceFirst, tagDISPLAYINFO::pmdev, tagDISPLAYINFO::pMonitorFirst, tagMONITOR::pMonitorNext, PtiCurrent, SYSHBRUSH, and VOID().

Referenced by CleanupResources().

00567 { 00568 int i; 00569 00570 /* 00571 * Free gpDispInfo stuff 00572 */ 00573 DestroyDC(&gpDispInfo->hdcScreen); 00574 DestroyDC(&gpDispInfo->hdcBits); 00575 DestroyDC(&gpDispInfo->hdcGray); 00576 DestroyDC(&ghdcMem); 00577 DestroyDC(&ghdcMem2); 00578 DestroyDC(&gfade.hdc); 00579 00580 /* 00581 * Free the cache DC stuff before the GRE cleanup. 00582 * Also notice that we call DelayedDestroyCacheDC which 00583 * we usualy call from DestroyProcessInfo. We do it 00584 * here because this is the last WIN32 thread. 00585 */ 00586 DestroyCacheDCEntries(PtiCurrent()); 00587 DestroyCacheDCEntries(NULL); 00588 DelayedDestroyCacheDC(); 00589 00590 UserAssert(gpDispInfo->pdceFirst == NULL); 00591 00592 /* 00593 * Free bitmaps 00594 */ 00595 DestroyBitmap(&gpDispInfo->hbmGray); 00596 DestroyBitmap(&ghbmBits); 00597 DestroyBitmap(&ghbmCaption); 00598 00599 /* 00600 * Cleanup brushes 00601 */ 00602 DestroyBrush(&ghbrHungApp); 00603 DestroyBrush(&gpsi->hbrGray); 00604 DestroyBrush(&ghbrWhite); 00605 DestroyBrush(&ghbrBlack); 00606 00607 for (i = 0; i < COLOR_MAX; i++) { 00608 DestroyBrush(&(SYSHBRUSH(i))); 00609 } 00610 00611 /* 00612 * Cleanup regions 00613 */ 00614 DestroyRegion(&gpDispInfo->hrgnScreen); 00615 DestroyRegion(&ghrgnInvalidSum); 00616 DestroyRegion(&ghrgnVisNew); 00617 DestroyRegion(&ghrgnSWP1); 00618 DestroyRegion(&ghrgnValid); 00619 DestroyRegion(&ghrgnValidSum); 00620 DestroyRegion(&ghrgnInvalid); 00621 DestroyRegion(&ghrgnInv0); 00622 DestroyRegion(&ghrgnInv1); 00623 DestroyRegion(&ghrgnInv2); 00624 DestroyRegion(&ghrgnGDC); 00625 DestroyRegion(&ghrgnSCR); 00626 DestroyRegion(&ghrgnSPB1); 00627 DestroyRegion(&ghrgnSPB2); 00628 DestroyRegion(&ghrgnSW); 00629 DestroyRegion(&ghrgnScrl1); 00630 DestroyRegion(&ghrgnScrl2); 00631 DestroyRegion(&ghrgnScrlVis); 00632 DestroyRegion(&ghrgnScrlSrc); 00633 DestroyRegion(&ghrgnScrlDst); 00634 DestroyRegion(&ghrgnScrlValid); 00635 00636 /* 00637 * Cleanup fonts 00638 */ 00639 DestroyFont(&ghSmCaptionFont); 00640 DestroyFont(&ghMenuFont); 00641 DestroyFont(&ghMenuFontDef); 00642 DestroyFont(&ghStatusFont); 00643 DestroyFont(&ghIconFont); 00644 DestroyFont(&ghFontSys); 00645 00646 /* 00647 * wallpaper stuff. 00648 */ 00649 if (ghpalWallpaper != NULL) { 00650 GreSetPaletteOwner(ghpalWallpaper, OBJECT_OWNER_CURRENT); 00651 GreDeleteObject(ghpalWallpaper); 00652 ghpalWallpaper = NULL; 00653 } 00654 DestroyBitmap(&ghbmWallpaper); 00655 00656 /* 00657 * Unload the video driver 00658 */ 00659 if (gpDispInfo->pmdev) { 00660 DrvDestroyMDEV(gpDispInfo->pmdev); 00661 GreFreePool(gpDispInfo->pmdev); 00662 gpDispInfo->pmdev = NULL; 00663 gpDispInfo->hDev = NULL; 00664 } 00665 00666 /* 00667 * Free the monitor stuff 00668 */ 00669 { 00670 PMONITOR pMonitor; 00671 PMONITOR pMonitorNext; 00672 00673 pMonitor = gpDispInfo->pMonitorFirst; 00674 00675 while (pMonitor != NULL) { 00676 pMonitorNext = pMonitor->pMonitorNext; 00677 DestroyMonitor(pMonitor); 00678 pMonitor = pMonitorNext; 00679 } 00680 00681 UserAssert(gpDispInfo->pMonitorFirst == NULL); 00682 00683 if (gpMonitorCached != NULL) { 00684 DestroyMonitor(gpMonitorCached); 00685 } 00686 } 00687 }

VOID CloseFNTCache VOID   ) 
 

Referenced by xxxLW_LoadFonts().

BOOL CreateTerminalInput PTERMINAL  pTerm  ) 
 

Definition at line 1376 of file w32/ntuser/kernel/init.c.

References BOOL, ClientFontSweep(), FALSE, NULL, TRUE, xxxInitInput(), and xxxLW_LoadFonts().

Referenced by xxxInitTerminal().

01378 { 01379 UserAssert(pTerm != NULL); 01380 01381 /* 01382 * call to the client side to clean up the [Fonts] section 01383 * of the registry. This will only take significant chunk of time 01384 * if the [Fonts] key changed during since the last boot and if 01385 * there are lots of fonts loaded 01386 */ 01387 ClientFontSweep(); 01388 01389 /* 01390 * Load the standard fonts before we create any DCs. 01391 * At this time we can only add the fonts that do not 01392 * reside on the net. They may be needed by winlogon. 01393 * Our winlogon needs only ms sans serif, but private 01394 * winlogon's may need some other fonts as well. 01395 * The fonts on the net will be added later, right 01396 * after all the net connections have been restored. 01397 */ 01398 /* 01399 * This call should be made in UserInitialize. 01400 */ 01401 xxxLW_LoadFonts(FALSE); 01402 01403 /* 01404 * Initialize the input system. 01405 */ 01406 if (!xxxInitInput(pTerm)) 01407 return FALSE; 01408 01409 return TRUE; 01410 }

VOID DestroyBitmap HBITMAP *  pbm  ) 
 

Definition at line 528 of file w32/ntuser/kernel/init.c.

References NULL, and VOID().

Referenced by CleanupGDI().

00530 { 00531 if (*pbm != NULL) { 00532 GreSetBitmapOwner(*pbm, OBJECT_OWNER_CURRENT); 00533 GreDeleteObject(*pbm); 00534 *pbm = NULL; 00535 } 00536 }

VOID DestroyBrush HBRUSH *  pbr  ) 
 

Definition at line 518 of file w32/ntuser/kernel/init.c.

References NULL, and VOID().

Referenced by CleanupGDI().

00520 { 00521 if (*pbr != NULL) { 00522 //GreSetBrushOwner(*pbr, OBJECT_OWNER_CURRENT); 00523 GreDeleteObject(*pbr); 00524 *pbr = NULL; 00525 } 00526 }

VOID DestroyDC HDC *  phdc  ) 
 

Definition at line 538 of file w32/ntuser/kernel/init.c.

References NULL, and VOID().

Referenced by CleanupGDI().

00540 { 00541 if (*phdc != NULL) { 00542 GreSetDCOwner(*phdc, OBJECT_OWNER_CURRENT); 00543 GreDeleteDC(*phdc); 00544 *phdc = NULL; 00545 } 00546 }

VOID DestroyFont HFONT *  pfnt  ) 
 

Definition at line 548 of file w32/ntuser/kernel/init.c.

References NULL, and VOID().

Referenced by CleanupGDI().

00550 { 00551 if (*pfnt != NULL) { 00552 GreDeleteObject(*pfnt); 00553 *pfnt = NULL; 00554 } 00555 }

VOID DestroyHandleTableObjects VOID   ) 
 

Definition at line 696 of file w32/ntuser/kernel/init.c.

References tagSHAREDINFO::aheList, _HANDLEENTRY::bFlags, _HANDLEENTRY::bType, _HEAD::cLockObj, DWORD, gahti, giheLast, gSharedInfo, HANDLEF_DESTROY, HMDestroyUnlockedObject(), NULL, OCF_PROCESSOWNED, OCF_THREADOWNED, _HANDLEENTRY::phead, TYPE_FREE, and VOID().

Referenced by Win32KDriverUnload().

00697 { 00698 HANDLEENTRY volatile * (*pphe); 00699 PHE pheT; 00700 DWORD i; 00701 00702 /* 00703 * Make sure the handle table was created ! 00704 */ 00705 if (gSharedInfo.aheList == NULL) { 00706 return; 00707 } 00708 00709 /* 00710 * Loop through the table destroying all remaining objects. 00711 */ 00712 pphe = &gSharedInfo.aheList; 00713 00714 for (i = 0; i <= giheLast; i++) { 00715 00716 pheT = (PHE)((*pphe) + i); 00717 00718 if (pheT->bType == TYPE_FREE) 00719 continue; 00720 00721 UserAssert(!(gahti[pheT->bType].bObjectCreateFlags & OCF_PROCESSOWNED) && 00722 !(gahti[pheT->bType].bObjectCreateFlags & OCF_THREADOWNED)); 00723 00724 UserAssert(!(pheT->bFlags & HANDLEF_DESTROY)); 00725 00726 /* 00727 * Destroy the object. 00728 */ 00729 if (pheT->phead->cLockObj > 0) { 00730 00731 RIPMSG1(RIP_ERROR, "pheT %#p still locked !", pheT); 00732 00733 /* 00734 * We're going to die, why bothered by the lock count? 00735 * We're forcing the lockcount to 0, and call the destroy routine. 00736 */ 00737 pheT->phead->cLockObj = 0; 00738 } 00739 HMDestroyUnlockedObject(pheT); 00740 UserAssert(pheT->bType == TYPE_FREE); 00741 } 00742 }

VOID DestroyRegion HRGN *  prgn  ) 
 

Definition at line 508 of file w32/ntuser/kernel/init.c.

References NULL, and VOID().

Referenced by CleanupGDI().

00510 { 00511 if (*prgn != NULL) { 00512 GreSetRegionOwner(*prgn, OBJECT_OWNER_CURRENT); 00513 GreDeleteObject(*prgn); 00514 *prgn = NULL; 00515 } 00516 }

NTSTATUS DriverEntry IN PDRIVER_OBJECT  DriverObject,
IN PUNICODE_STRING  RegistryPath
 

Definition at line 67 of file fs_rec.c.

References ASSERT, _FSVGA_CONFIGURATION_INFORMATION::BusNumber, CdfsFileSystem, _DEVICE_EXTENSION::Configuration, DEVICE_EXTENSION, _DEVICE_OBJECT::DeviceExtension, _DEVICE_EXTENSION::DeviceObject, _DEVICE_EXTENSION::DeviceRegisters, DriverEntry(), DUMP_COUNT, ExAllocatePool, ExAllocatePoolWithTag, ExFreePool(), FALSE, FatFileSystem, FSREC_POOL_TAG, FsRecCleanupClose(), FsRecCreate(), FsRecCreateAndRegisterDO(), FsRecFsControl(), FsRecLoadSync, FsRecUnload(), FSVGA_ERROR_VALUE_BASE, FSVGA_HARDWARE_PRESENT, FsVgaBuildResourceList(), FsVgaConfiguration(), FsVgaDeviceControl(), FsVgaOpenCloseDispatch(), FsVgaPrint, HalTranslateBusAddress(), _DEVICE_EXTENSION::HardwarePresent, _FSVGA_CONFIGURATION_INFORMATION::InterfaceType, IoAllocateErrorLogEntry(), IoCreateDevice(), IoDeleteDevice(), IoReportResourceUsage(), IoWriteErrorLogEntry(), IRP_MJ_CLEANUP, IRP_MJ_CLOSE, IRP_MJ_CREATE, IRP_MJ_DEVICE_CONTROL, IRP_MJ_FILE_SYSTEM_CONTROL, KeInitializeEvent, L, MmMapIoSpace(), MmPageEntireDriver(), MmUnmapIoSpace(), NAME_MAX, NonPagedPool, NT_SUCCESS, NtfsFileSystem, NTSTATUS(), NULL, PAGED_CODE, PagedPool, _FSVGA_CONFIGURATION_INFORMATION::PortList, _FSVGA_CONFIGURATION_INFORMATION::PortListCount, RtlAppendUnicodeStringToString(), RtlAppendUnicodeToString(), RtlInitUnicodeString(), RtlIntegerToUnicodeString(), RtlWriteRegistryValue(), TRUE, UdfsFileSystem, _DEVICE_EXTENSION::UnmapRegistersRequired, and USHORT.

00074 : 00075 00076 This routine is invoked once when the driver is loaded to allow the driver 00077 to initialize itself. The initialization for the driver consists of simply 00078 creating a device object for each type of file system recognized by this 00079 driver, and then registering each as active file systems. 00080 00081 Arguments: 00082 00083 DriverObject - Pointer to the driver object for this driver. 00084 00085 RegistryPath - Pointer to the registry service node for this driver. 00086 00087 Return Value: 00088 00089 The function value is the final status of the initialization for the driver. 00090 00091 --*/ 00092 00093 { 00094 PDEVICE_OBJECT UdfsMainRecognizerDeviceObject; 00095 NTSTATUS status; 00096 ULONG count = 0; 00097 00098 PAGED_CODE(); 00099 00100 // 00101 // Mark the entire driver as pagable. 00102 // 00103 00104 MmPageEntireDriver ((PVOID)DriverEntry); 00105 00106 // 00107 // Begin by initializing the driver object so that it the driver is 00108 // prepared to provide services. 00109 // 00110 00111 DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] = FsRecFsControl; 00112 DriverObject->MajorFunction[IRP_MJ_CREATE] = FsRecCreate; 00113 DriverObject->MajorFunction[IRP_MJ_CLEANUP] = FsRecCleanupClose; 00114 DriverObject->MajorFunction[IRP_MJ_CLOSE] = FsRecCleanupClose; 00115 DriverObject->DriverUnload = FsRecUnload; 00116 00117 FsRecLoadSync = ExAllocatePoolWithTag( NonPagedPool, sizeof(KEVENT), FSREC_POOL_TAG ); 00118 00119 if (FsRecLoadSync == NULL) { 00120 00121 return STATUS_INSUFFICIENT_RESOURCES; 00122 } 00123 00124 KeInitializeEvent( FsRecLoadSync, SynchronizationEvent, TRUE ); 00125 00126 // 00127 // Create and initialize each of the file system driver type device 00128 // objects. 00129 // 00130 00131 status = FsRecCreateAndRegisterDO( DriverObject, 00132 NULL, 00133 NULL, 00134 L"\\Cdfs", 00135 L"\\FileSystem\\CdfsRecognizer", 00136 CdfsFileSystem, 00137 FILE_DEVICE_CD_ROM_FILE_SYSTEM ); 00138 if (NT_SUCCESS( status )) { 00139 count++; 00140 } 00141 00142 status = FsRecCreateAndRegisterDO( DriverObject, 00143 NULL, 00144 &UdfsMainRecognizerDeviceObject, 00145 L"\\UdfsCdRom", 00146 L"\\FileSystem\\UdfsCdRomRecognizer", 00147 UdfsFileSystem, 00148 FILE_DEVICE_CD_ROM_FILE_SYSTEM ); 00149 if (NT_SUCCESS( status )) { 00150 count++; 00151 } 00152 00153 status = FsRecCreateAndRegisterDO( DriverObject, 00154 UdfsMainRecognizerDeviceObject, 00155 NULL, 00156 L"\\UdfsDisk", 00157 L"\\FileSystem\\UdfsDiskRecognizer", 00158 UdfsFileSystem, 00159 FILE_DEVICE_DISK_FILE_SYSTEM ); 00160 if (NT_SUCCESS( status )) { 00161 count++; 00162 } 00163 00164 status = FsRecCreateAndRegisterDO( DriverObject, 00165 NULL, 00166 NULL, 00167 L"\\Fat", 00168 L"\\FileSystem\\FatRecognizer", 00169 FatFileSystem, 00170 FILE_DEVICE_DISK_FILE_SYSTEM ); 00171 if (NT_SUCCESS( status )) { 00172 count++; 00173 } 00174 00175 status = FsRecCreateAndRegisterDO( DriverObject, 00176 NULL, 00177 NULL, 00178 L"\\Ntfs", 00179 L"\\FileSystem\\NtfsRecognizer", 00180 NtfsFileSystem, 00181 FILE_DEVICE_DISK_FILE_SYSTEM ); 00182 if (NT_SUCCESS( status )) { 00183 count++; 00184 } 00185 00186 if (count) { 00187 return STATUS_SUCCESS; 00188 } else { 00189 return STATUS_IMAGE_ALREADY_LOADED; 00190 } 00191 }

void EnforceColorDependentSettings void   ) 
 

Definition at line 2782 of file w32/ntuser/kernel/init.c.

References FALSE, tagDISPLAYINFO::fAnyPalette, gbDisableAlpha, gpDispInfo, tagDISPLAYINFO::hdcScreen, and TRUE.

Referenced by LoadCPUserPreferences(), and UpdateUserScreen().

02783 { 02784 if (gpDispInfo->fAnyPalette) { 02785 gbDisableAlpha = TRUE; 02786 } else if (GreGetDeviceCaps(gpDispInfo->hdcScreen, NUMCOLORS) == -1) { 02787 gbDisableAlpha = FALSE; 02788 } else { 02789 gbDisableAlpha = TRUE; 02790 } 02791 }

BOOL FinalUserInit VOID   ) 
 

Definition at line 2254 of file w32/ntuser/kernel/init.c.

References BOOL, tagDISPLAYINFO::cxGray, tagDISPLAYINFO::cyGray, DestroyClass(), FALSE, ghFontSys, gMenuState, gpDispInfo, gpsi, GRAY_STRLEN, tagDISPLAYINFO::hbmGray, tagDISPLAYINFO::hdcGray, tagDISPLAYINFO::hdcScreen, L, MNSetupAnimationDC(), NULL, PpiCurrent, and TRUE.

02255 { 02256 HBITMAP hbm; 02257 PPCLS ppcls; 02258 02259 gpDispInfo->hdcGray = GreCreateCompatibleDC(gpDispInfo->hdcScreen); 02260 02261 if (gpDispInfo->hdcGray == NULL) { 02262 return FALSE; 02263 } 02264 02265 GreSelectFont(gpDispInfo->hdcGray, ghFontSys); 02266 GreSetDCOwner(gpDispInfo->hdcGray, OBJECT_OWNER_PUBLIC); 02267 02268 gpDispInfo->cxGray = gpsi->cxSysFontChar * GRAY_STRLEN; 02269 gpDispInfo->cyGray = gpsi->cySysFontChar + 2; 02270 gpDispInfo->hbmGray = GreCreateBitmap(gpDispInfo->cxGray, gpDispInfo->cyGray, 1, 1, 0L); 02271 02272 if (gpDispInfo->hbmGray == NULL) { 02273 return FALSE; 02274 } 02275 02276 GreSetBitmapOwner(gpDispInfo->hbmGray, OBJECT_OWNER_PUBLIC); 02277 02278 hbm = GreSelectBitmap(gpDispInfo->hdcGray, gpDispInfo->hbmGray); 02279 GreSetTextColor(gpDispInfo->hdcGray, 0x00000000L); 02280 GreSelectBrush(gpDispInfo->hdcGray, gpsi->hbrGray); 02281 GreSetBkMode(gpDispInfo->hdcGray, OPAQUE); 02282 GreSetBkColor(gpDispInfo->hdcGray, 0x00FFFFFFL); 02283 02284 /* 02285 * Setup menu animation dc for global menu state 02286 */ 02287 if (MNSetupAnimationDC(&gMenuState)) { 02288 GreSetDCOwner(gMenuState.hdcAni, OBJECT_OWNER_PUBLIC); 02289 } else { 02290 RIPMSG0(RIP_WARNING, "FinalUserInit: MNSetupAnimationDC failed"); 02291 } 02292 02293 /* 02294 * Creation of the queue registers some bogus classes. Get rid 02295 * of them and register the real ones. 02296 */ 02297 ppcls = &PpiCurrent()->pclsPublicList; 02298 while ((*ppcls != NULL) && !((*ppcls)->style & CS_GLOBALCLASS)) 02299 DestroyClass(ppcls); 02300 02301 return TRUE; 02302 }

VOID FreeImeHotKeys VOID   ) 
 

Definition at line 252 of file imehotky.c.

References gpImeHotKeyListHeader, NULL, _tagIMEHOTKEYOBJ::pNext, and VOID().

Referenced by Win32kNtUserCleanup().

00253 { 00254 PIMEHOTKEYOBJ phk; 00255 00256 while (gpImeHotKeyListHeader != NULL) { 00257 phk = gpImeHotKeyListHeader->pNext; 00258 UserFreePool(gpImeHotKeyListHeader); 00259 gpImeHotKeyListHeader = phk; 00260 } 00261 }

void FreeSMS PSMS  psms  ) 
 

Definition at line 178 of file kernel/sendmsg.c.

References ExFreeToPagedLookasideList(), and SMSLookaside.

Referenced by Win32kNtUserCleanup(), and xxxInterSendMsgEx().

00180 { 00181 ExFreeToPagedLookasideList(SMSLookaside, psms); 00182 }

BOOL GetKbdLangSwitch PUNICODE_STRING  pProfileUserName  ) 
 

Definition at line 2393 of file w32/ntuser/kernel/init.c.

References BOOL, tagKBDLANGTOGGLE::bScan, tagKBDLANGTOGGLE::bVkey, DWORD, FALSE, FastGetProfileIntW(), gbGraveKeyToggle, gLangToggle, PMAP_UKBDLAYOUTTOGGLE, and TRUE.

Referenced by xxxSystemParametersInfo(), and xxxUpdatePerUserSystemParameters().

02394 { 02395 DWORD dwToggle; 02396 BOOL bStatus = TRUE; 02397 LCID lcid; 02398 02399 dwToggle = FastGetProfileIntW(pProfileUserName, 02400 PMAP_UKBDLAYOUTTOGGLE, 02401 TEXT("Hotkey"), 02402 1); 02403 02404 gbGraveKeyToggle = FALSE; 02405 02406 switch (dwToggle) { 02407 case 4: 02408 /* 02409 * Grave accent keyboard switch for thai locales 02410 */ 02411 ZwQueryDefaultLocale(FALSE, &lcid); 02412 gbGraveKeyToggle = (PRIMARYLANGID(lcid) == LANG_THAI) ? TRUE : FALSE; 02413 /* 02414 * fall through (intentional) and disable the ctrl/alt toggle mechanism 02415 */ 02416 case 3: 02417 gLangToggle[0].bVkey = 0; 02418 gLangToggle[0].bScan = 0; 02419 break; 02420 02421 case 2: 02422 gLangToggle[0].bVkey = VK_CONTROL; 02423 break; 02424 02425 default: 02426 gLangToggle[0].bVkey = VK_MENU; 02427 break; 02428 } 02429 02430 return bStatus; 02431 }

void InitAnsiOem PCHAR  pOemToAnsi,
PCHAR  pAnsiToOem
 

Definition at line 2743 of file w32/ntuser/kernel/init.c.

References tagSERVERINFO::acAnsiToOem, tagSERVERINFO::acOemToAnsi, BYTE, FALSE, gpsi, NCHARS, and ProbeForRead.

02743 { 02744 02745 UserAssert(gpsi); 02746 UserAssert(pOemToAnsi); 02747 UserAssert(pAnsiToOem); 02748 02749 try { 02750 ProbeForRead(pOemToAnsi, NCHARS, sizeof(BYTE)); 02751 ProbeForRead(pAnsiToOem, NCHARS, sizeof(BYTE)); 02752 02753 RtlCopyMemory(gpsi->acOemToAnsi, pOemToAnsi, NCHARS); 02754 RtlCopyMemory(gpsi->acAnsiToOem, pAnsiToOem, NCHARS); 02755 02756 02757 } except (W32ExceptionHandler(FALSE, RIP_WARNING)) { 02758 } 02759 }

NTSTATUS InitializeClientPfnArrays CONST PFNCLIENT ppfnClientA,
CONST PFNCLIENT ppfnClientW,
CONST PFNCLIENTWORKER ppfnClientWorker,
HANDLE  hModUser
 

Definition at line 2313 of file w32/ntuser/kernel/init.c.

References tagSERVERINFO::apfnClientA, tagSERVERINFO::apfnClientW, tagSERVERINFO::apfnClientWorker, BOOL, FALSE, gpfnwp, gpsi, hModClient, ICLS_BUTTON, ICLS_COMBOBOX, ICLS_COMBOLISTBOX, ICLS_DDEML16BIT, ICLS_DDEMLCLIENTA, ICLS_DDEMLCLIENTW, ICLS_DDEMLEVENT, ICLS_DDEMLMOTHER, ICLS_DDEMLSERVERA, ICLS_DDEMLSERVERW, ICLS_DESKTOP, ICLS_DIALOG, ICLS_EDIT, ICLS_ICONTITLE, ICLS_IME, ICLS_LISTBOX, ICLS_MAX, ICLS_MDICLIENT, ICLS_MENU, ICLS_SCROLLBAR, ICLS_STATIC, ICLS_SWITCH, ICLS_TOOLTIP, ISCSRSS, NTSTATUS(), NULL, _PFNCLIENT::pfnButtonWndProc, _PFNCLIENT::pfnComboBoxWndProc, _PFNCLIENT::pfnComboListBoxProc, _PFNCLIENT::pfnDefWindowProc, _PFNCLIENT::pfnDialogWndProc, _PFNCLIENT::pfnListBoxWndProc, _PFNCLIENT::pfnMDIClientWndProc, _PFNCLIENT::pfnStaticWndProc, _PFNCLIENT::pfnTitleWndProc, TRUE, xxxDesktopWndProc(), xxxMenuWindowProc(), xxxSBWndProc(), xxxSwitchWndProc(), and xxxTooltipWndProc().

Referenced by NtUserInitializeClientPfnArrays().

02318 { 02319 static BOOL fHaveClientPfns = FALSE; 02320 /* 02321 * Remember client side addresses in this global structure. These are 02322 * always constant, so this is ok. Note that if either of the 02323 * pointers are invalid, the exception will be handled in 02324 * the thunk and fHaveClientPfns will not be set. 02325 */ 02326 if (!fHaveClientPfns && ppfnClientA != NULL) { 02327 if (!ISCSRSS()) { 02328 RIPMSG0(RIP_WARNING, "InitializeClientPfnArrays failed !csrss"); 02329 return STATUS_UNSUCCESSFUL; 02330 } 02331 gpsi->apfnClientA = *ppfnClientA; 02332 gpsi->apfnClientW = *ppfnClientW; 02333 gpsi->apfnClientWorker = *ppfnClientWorker; 02334 02335 gpfnwp[ICLS_BUTTON] = gpsi->apfnClientW.pfnButtonWndProc; 02336 gpfnwp[ICLS_EDIT] = gpsi->apfnClientW.pfnDefWindowProc; 02337 gpfnwp[ICLS_STATIC] = gpsi->apfnClientW.pfnStaticWndProc; 02338 gpfnwp[ICLS_LISTBOX] = gpsi->apfnClientW.pfnListBoxWndProc; 02339 gpfnwp[ICLS_SCROLLBAR] = (PROC)xxxSBWndProc; 02340 gpfnwp[ICLS_COMBOBOX] = gpsi->apfnClientW.pfnComboBoxWndProc; 02341 gpfnwp[ICLS_DESKTOP] = (PROC)xxxDesktopWndProc; 02342 gpfnwp[ICLS_DIALOG] = gpsi->apfnClientW.pfnDialogWndProc; 02343 gpfnwp[ICLS_MENU] = (PROC)xxxMenuWindowProc; 02344 gpfnwp[ICLS_SWITCH] = (PROC)xxxSwitchWndProc; 02345 gpfnwp[ICLS_ICONTITLE] = gpsi->apfnClientW.pfnTitleWndProc; 02346 gpfnwp[ICLS_MDICLIENT] = gpsi->apfnClientW.pfnMDIClientWndProc; 02347 gpfnwp[ICLS_COMBOLISTBOX] = gpsi->apfnClientW.pfnComboListBoxProc; 02348 gpfnwp[ICLS_DDEMLEVENT] = NULL; 02349 gpfnwp[ICLS_DDEMLMOTHER] = NULL; 02350 gpfnwp[ICLS_DDEML16BIT] = NULL; 02351 gpfnwp[ICLS_DDEMLCLIENTA] = NULL; 02352 gpfnwp[ICLS_DDEMLCLIENTW] = NULL; 02353 gpfnwp[ICLS_DDEMLSERVERA] = NULL; 02354 gpfnwp[ICLS_DDEMLSERVERW] = NULL; 02355 gpfnwp[ICLS_IME] = NULL; 02356 gpfnwp[ICLS_TOOLTIP] = (PROC)xxxTooltipWndProc; 02357 02358 /* 02359 * Change this assert when new classes are added. 02360 */ 02361 UserAssert(ICLS_MAX == ICLS_TOOLTIP+1); 02362 02363 hModClient = hModUser; 02364 fHaveClientPfns = TRUE; 02365 } 02366 #if DBG 02367 /* 02368 * BradG - Verify that user32.dll on the client side has loaded 02369 * at the correct address. If not, do an RIPMSG. 02370 */ 02371 02372 if((ppfnClientA != NULL) && 02373 (gpsi->apfnClientA.pfnButtonWndProc != ppfnClientA->pfnButtonWndProc)) 02374 RIPMSG0(RIP_ERROR, "Client side user32.dll not loaded at same address."); 02375 #endif 02376 02377 return STATUS_SUCCESS; 02378 }

BOOL LoadCPUserPreferences PUNICODE_STRING  pProfileUserName  ) 
 

Definition at line 1173 of file w32/ntuser/kernel/init.c.

References ACCF_KEYBOARDPREF, BOOL, DWORD, EnforceColorDependentSettings(), FastGetProfileValue(), gbRemoteSession, gpdwCPUserPreferencesMask, gpsi, gpviCPUserPreferences, NULL, PPROFILEVALUEINFO, ppvi, PropagetUPBOOLTogpsi, TEST_BOOL_ACCF, TRUE, and UP.

Referenced by xxxUpdatePerUserSystemParameters().

01174 { 01175 DWORD pdwValue [SPI_BOOLMASKDWORDSIZE]; 01176 DWORD dw; 01177 PPROFILEVALUEINFO ppvi = gpviCPUserPreferences; 01178 01179 UserAssert(1 + SPI_DWORDRANGECOUNT == sizeof(gpviCPUserPreferences) / sizeof(*gpviCPUserPreferences)); 01180 01181 /* 01182 * The first value in gpviCPUserPreferences corresponds to the bit mask 01183 */ 01184 dw = FastGetProfileValue(pProfileUserName, 01185 ppvi->uSection, 01186 ppvi->pwszKeyName, 01187 NULL, 01188 (LPBYTE)pdwValue, 01189 sizeof(*pdwValue) 01190 ); 01191 01192 /* 01193 * Copy only the amount of data read and no more than what we expect 01194 */ 01195 if (dw != 0) { 01196 if (dw > sizeof(gpdwCPUserPreferencesMask)) { 01197 dw = sizeof(gpdwCPUserPreferencesMask); 01198 } 01199 RtlCopyMemory(gpdwCPUserPreferencesMask, pdwValue, dw); 01200 } 01201 01202 ppvi++; 01203 01204 /* 01205 * DWORD values 01206 */ 01207 for (dw = 1; dw < 1 + SPI_DWORDRANGECOUNT; dw++, ppvi++) { 01208 if (FastGetProfileValue(pProfileUserName, 01209 ppvi->uSection, 01210 ppvi->pwszKeyName, 01211 NULL, 01212 (LPBYTE)pdwValue, 01213 sizeof(DWORD) 01214 )) { 01215 01216 ppvi->dwValue = *pdwValue; 01217 } 01218 } 01219 01220 if (gbRemoteSession) { 01221 01222 /* 01223 * Default is w/o UIEFFECTS for remote connections 01224 */ 01225 gpdwCPUserPreferencesMask[0] &= ~0x80000000; 01226 } 01227 01228 /* 01229 * Propagate gpsi flags 01230 */ 01231 PropagetUPBOOLTogpsi(COMBOBOXANIMATION); 01232 PropagetUPBOOLTogpsi(LISTBOXSMOOTHSCROLLING); 01233 PropagetUPBOOLTogpsi(KEYBOARDCUES); 01234 gpsi->bKeyboardPref = TEST_BOOL_ACCF(ACCF_KEYBOARDPREF); 01235 01236 gpsi->uCaretWidth = UP(CARETWIDTH); 01237 01238 PropagetUPBOOLTogpsi(UIEFFECTS); 01239 01240 EnforceColorDependentSettings(); 01241 01242 return TRUE; 01243 }

BOOL LW_BrushInit VOID   ) 
 

Definition at line 1820 of file w32/ntuser/kernel/init.c.

References BOOL, FALSE, ghbrBlack, ghbrHungApp, ghbrWhite, gpsi, NULL, and TRUE.

Referenced by RemoteConnect(), and UserInitialize().

01821 { 01822 HBITMAP hbmGray; 01823 CONST static WORD patGray[8] = {0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa}; 01824 01825 /* 01826 * Create a gray brush to be used with GrayString 01827 */ 01828 hbmGray = GreCreateBitmap(8, 8, 1, 1, (LPBYTE)patGray); 01829 01830 if (hbmGray == NULL) { 01831 return FALSE; 01832 } 01833 01834 gpsi->hbrGray = GreCreatePatternBrush(hbmGray); 01835 ghbrWhite = GreGetStockObject(WHITE_BRUSH); 01836 ghbrBlack = GreGetStockObject(BLACK_BRUSH); 01837 01838 UserAssert(ghbrWhite != NULL && ghbrBlack != NULL); 01839 01840 if (gpsi->hbrGray == NULL) { 01841 return FALSE; 01842 } 01843 01844 GreDeleteObject(hbmGray); 01845 GreSetBrushOwnerPublic(gpsi->hbrGray); 01846 ghbrHungApp = GreCreateSolidBrush(0); 01847 01848 if (ghbrHungApp == NULL) { 01849 return FALSE; 01850 } 01851 01852 GreSetBrushOwnerPublic(ghbrHungApp); 01853 01854 return TRUE; 01855 }

VOID LW_DriversInit VOID   ) 
 

Definition at line 1142 of file w32/ntuser/kernel/init.c.

References gapulCvt_VK, gapulCvt_VK_84, gapulCvt_VK_IBM02, gKeyboardInfo, gnKeyboardSpeed, NlsKbdInitializePerSystem(), SetKeyboardRate(), UINT, and VOID().

Referenced by xxxInitWindowStation().

01143 { 01144 /* 01145 * Initialize the keyboard typematic rate. 01146 */ 01147 SetKeyboardRate((UINT)gnKeyboardSpeed); 01148 01149 /* 01150 * Adjust VK modification table if not default (type 4) kbd. 01151 */ 01152 if (gKeyboardInfo.KeyboardIdentifier.Type == 3) 01153 gapulCvt_VK = gapulCvt_VK_84; 01154 01155 /* 01156 * Adjust VK modification table for IBM 5576 002/003 keyboard. 01157 */ 01158 if (JAPANESE_KEYBOARD(gKeyboardInfo.KeyboardIdentifier) && 01159 (gKeyboardInfo.KeyboardIdentifier.Subtype == 3)) 01160 gapulCvt_VK = gapulCvt_VK_IBM02; 01161 01162 /* 01163 * Initialize NLS keyboard globals. 01164 */ 01165 NlsKbdInitializePerSystem(); 01166 }

VOID LW_LoadProfileInitData PUNICODE_STRING  pProfileUserName  ) 
 

Definition at line 1253 of file w32/ntuser/kernel/init.c.

References FastGetProfileIntFromID(), guDdeSendTimeout, PMAP_WINDOWSM, and VOID().

01254 { 01255 guDdeSendTimeout = FastGetProfileIntFromID(pProfileUserName, 01256 PMAP_WINDOWSM, 01257 STR_DDESENDTIMEOUT, 01258 0); 01259 }

VOID LW_LoadResources PUNICODE_STRING  pProfileUserName  ) 
 

Definition at line 1268 of file w32/ntuser/kernel/init.c.

References FastGetProfileStringFromIDW(), PMAP_BEEP, PMAP_MOUSE, PUDF_BEEP, PUDF_EXTENDEDSOUNDS, SET_OR_CLEAR_PUDF, SYSMET, szN, szy, szY, and VOID().

Referenced by xxxUpdatePerUserSystemParameters().

01269 { 01270 WCHAR rgch[4]; 01271 01272 /* 01273 * See if the Mouse buttons need swapping. 01274 */ 01275 FastGetProfileStringFromIDW(pProfileUserName, 01276 PMAP_MOUSE, 01277 STR_SWAPBUTTONS, 01278 szN, 01279 rgch, 01280 sizeof(rgch) / sizeof(WCHAR)); 01281 SYSMET(SWAPBUTTON) = (*rgch == '1' || *rgch == *szY || *rgch == *szy); 01282 01283 /* 01284 * See if we should beep. 01285 */ 01286 FastGetProfileStringFromIDW(pProfileUserName, 01287 PMAP_BEEP, 01288 STR_BEEP, 01289 szY, 01290 rgch, 01291 sizeof(rgch) / sizeof(WCHAR) 01292 ); 01293 01294 SET_OR_CLEAR_PUDF(PUDF_BEEP, (rgch[0] == *szY) || (rgch[0] == *szy)); 01295 01296 /* 01297 * See if we should have extended sounds. 01298 */ 01299 FastGetProfileStringFromIDW(pProfileUserName, 01300 PMAP_BEEP, 01301 STR_EXTENDEDSOUNDS, 01302 szN, 01303 rgch, 01304 sizeof(rgch) / sizeof(WCHAR) 01305 ); 01306 01307 SET_OR_CLEAR_PUDF(PUDF_EXTENDEDSOUNDS, (rgch[0] == *szY || rgch[0] == *szy)); 01308 01309 }

VOID LW_LoadSomeStrings VOID   ) 
 

Definition at line 1422 of file w32/ntuser/kernel/init.c.

References gpsi, gszMAX, gszMIN, gszRESDOWN, gszRESUP, gszSCLOSE, hModuleWin, MAX_MB_STRINGS, tagSERVERINFO::MBStrings, ServerLoadString, tagMBSTRING::szName, tagMBSTRING::uID, tagMBSTRING::uStr, and VOID().

Referenced by Win32UserInitialize().

01423 { 01424 int i, str, id; 01425 01426 /* 01427 * MessageBox strings 01428 */ 01429 for (i = 0, str = STR_OK, id = IDOK; i<MAX_MB_STRINGS; i++, str++, id++) { 01430 gpsi->MBStrings[i].uStr = str; 01431 gpsi->MBStrings[i].uID = id; 01432 ServerLoadString(hModuleWin, str, gpsi->MBStrings[i].szName, sizeof(gpsi->MBStrings[i].szName) / sizeof(WCHAR)); 01433 } 01434 01435 /* 01436 * Tooltips strings 01437 */ 01438 ServerLoadString(hModuleWin, STR_MIN, gszMIN, sizeof(gszMIN) / sizeof(WCHAR)); 01439 ServerLoadString(hModuleWin, STR_MAX, gszMAX, sizeof(gszMAX) / sizeof(WCHAR)); 01440 ServerLoadString(hModuleWin, STR_RESUP, gszRESUP, sizeof(gszRESUP) / sizeof(WCHAR)); 01441 ServerLoadString(hModuleWin, STR_RESDOWN,gszRESDOWN,sizeof(gszRESDOWN)/ sizeof(WCHAR)); 01442 /* Commented out due to TandyT ... 01443 * ServerLoadString(hModuleWin, STR_SMENU, gszSMENU, sizeof(gszSMENU) / sizeof(WCHAR)); 01444 */ 01445 ServerLoadString(hModuleWin, STR_SCLOSE, gszSCLOSE, sizeof(gszSCLOSE) / sizeof(WCHAR)); 01446 }

BOOL LW_RegisterWindows BOOL  fSystem  ) 
 

Definition at line 1863 of file w32/ntuser/kernel/init.c.

References BOOL, CCLASSES, CSF_SERVERSIDEPROC, CSF_SYSTEMCLASS, CSF_WIN40COMPAT, DESKTOPCLASS, DESKWND, FALSE, FNID_DESKTOP, FNID_ICONTITLE, FNID_MENU, FNID_SCROLLBAR, FNID_SWITCH, FNID_TOOLTIP, hModuleWin, ICONTITLECLASS, InternalRegisterClassEx(), L, MENUCLASS, NULL, PtoH, SBWND, SWITCHWND, SWITCHWNDCLASS, SYSCUR, TOOLTIPCLASS, TOOLTIPWND, TRUE, UINT, xxxDefWindowProc(), xxxDesktopWndProc(), xxxEventWndProc(), xxxMenuWindowProc(), xxxSBWndProc(), xxxSwitchWndProc(), and xxxTooltipWndProc().

Referenced by xxxCreateThreadInfo().

01865 { 01866 #ifdef HUNGAPP_GHOSTING 01867 #define CCLASSES 9 01868 #else // HUNGAPP_GHOSTING 01869 #define CCLASSES 8 01870 #endif // HUNGAPP_GHOSTING 01871 01872 int i; 01873 WNDCLASSEX wndcls; 01874 01875 CONST static struct { 01876 BOOLEAN fSystem; 01877 BOOLEAN fGlobalClass; 01878 WORD fnid; 01879 UINT style; 01880 WNDPROC lpfnWndProc; 01881 int cbWndExtra; 01882 BOOL fNormalCursor : 1; 01883 HBRUSH hbrBackground; 01884 LPCTSTR lpszClassName; 01885 } rc[CCLASSES] = { 01886 { TRUE, TRUE, FNID_DESKTOP, 01887 CS_DBLCLKS, 01888 (WNDPROC)xxxDesktopWndProc, 01889 sizeof(DESKWND) - sizeof(WND), 01890 TRUE, 01891 (HBRUSH)(COLOR_BACKGROUND + 1), 01892 DESKTOPCLASS}, 01893 { TRUE, FALSE, FNID_SWITCH, 01894 CS_VREDRAW | CS_HREDRAW | CS_SAVEBITS, 01895 (WNDPROC)xxxSwitchWndProc, 01896 sizeof(SWITCHWND) - sizeof(WND), 01897 TRUE, 01898 NULL, 01899 SWITCHWNDCLASS}, 01900 { TRUE, FALSE, FNID_MENU, 01901 CS_DBLCLKS | CS_SAVEBITS, 01902 (WNDPROC)xxxMenuWindowProc, 01903 sizeof(PPOPUPMENU), 01904 FALSE, 01905 (HBRUSH)(COLOR_MENU + 1), 01906 MENUCLASS}, 01907 { FALSE, FALSE, FNID_SCROLLBAR, 01908 CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS | CS_PARENTDC, 01909 (WNDPROC)xxxSBWndProc, 01910 sizeof(SBWND) - sizeof(WND), 01911 TRUE, 01912 NULL, 01913 L"ScrollBar"}, 01914 { TRUE, FALSE, FNID_TOOLTIP, 01915 CS_DBLCLKS | CS_SAVEBITS, 01916 (WNDPROC)xxxTooltipWndProc, 01917 sizeof(TOOLTIPWND) - sizeof(WND), 01918 TRUE, 01919 NULL, 01920 TOOLTIPCLASS}, 01921 { TRUE, TRUE, FNID_ICONTITLE, 01922 0, 01923 (WNDPROC)xxxDefWindowProc, 01924 0, 01925 TRUE, 01926 NULL, 01927 ICONTITLECLASS}, 01928 { FALSE, FALSE, 0, 01929 0, 01930 (WNDPROC)xxxEventWndProc, 01931 sizeof(PSVR_INSTANCE_INFO), 01932 FALSE, 01933 NULL, 01934 L"DDEMLEvent"}, 01935 #ifdef HUNGAPP_GHOSTING 01936 { TRUE, TRUE, 0, 01937 0, 01938 (WNDPROC)xxxGhostWndProc, 01939 0, 01940 TRUE, 01941 NULL, 01942 L"Ghost"}, 01943 #endif // HUNGAPP_GHOSTING 01944 { TRUE, TRUE, 0, 01945 0, 01946 (WNDPROC)xxxDefWindowProc, 01947 4, 01948 TRUE, 01949 NULL, 01950 L"Message"} 01951 }; 01952 01953 01954 /* 01955 * All other classes are registered via the table. 01956 */ 01957 wndcls.cbClsExtra = 0; 01958 wndcls.hInstance = hModuleWin; 01959 wndcls.hIcon = NULL; 01960 wndcls.hIconSm = NULL; 01961 wndcls.lpszMenuName = NULL; 01962 01963 for (i = 0; i < CCLASSES; i++) { 01964 if (fSystem && !rc[i].fSystem) { 01965 continue; 01966 } 01967 wndcls.style = rc[i].style; 01968 wndcls.lpfnWndProc = rc[i].lpfnWndProc; 01969 wndcls.cbWndExtra = rc[i].cbWndExtra; 01970 wndcls.hCursor = rc[i].fNormalCursor ? PtoH(SYSCUR(ARROW)) : NULL; 01971 wndcls.hbrBackground= rc[i].hbrBackground; 01972 wndcls.lpszClassName= rc[i].lpszClassName; 01973 01974 if (InternalRegisterClassEx(&wndcls, 01975 rc[i].fnid, 01976 CSF_SERVERSIDEPROC | CSF_WIN40COMPAT) == NULL) { 01977 RIPMSG0(RIP_WARNING, "LW_RegisterWindows: InternalRegisterClassEx failed"); 01978 return FALSE; 01979 } 01980 01981 if (fSystem && rc[i].fGlobalClass) { 01982 if (InternalRegisterClassEx(&wndcls, 01983 rc[i].fnid, 01984 CSF_SERVERSIDEPROC | CSF_SYSTEMCLASS | CSF_WIN40COMPAT) == NULL) { 01985 01986 RIPMSG0(RIP_WARNING, "LW_RegisterWindows: InternalRegisterClassEx failed"); 01987 return FALSE; 01988 } 01989 } 01990 } 01991 return TRUE; 01992 }

VOID RegisterLPK DWORD  dwLpkEntryPoints  ) 
 

Definition at line 2769 of file w32/ntuser/kernel/init.c.

References PpiCurrent, and VOID().

02771 { 02772 PpiCurrent()->dwLpkEntryPoints = dwLpkEntryPoints; 02773 }

VOID UnloadCursorsAndIcons VOID   ) 
 

Definition at line 1642 of file w32/ntuser/kernel/init.c.

References gasyscur, gasysico, NULL, PpiCurrent, tagSYSCFGICO::spcur, TRACE_HYDAPI, Unlock, and VOID().

Referenced by CleanupResources().

01644 { 01645 PCURSOR pcur; 01646 int ind; 01647 01648 TRACE_HYDAPI(("UnloadCursorsAndIcons\n")); 01649 01650 /* 01651 * unlock the icons 01652 */ 01653 for (ind = 0; ind < COIC_CONFIGURABLE; ind++) { 01654 pcur = gasysico[ind].spcur; 01655 01656 if (pcur == NULL) 01657 continue; 01658 01659 pcur->head.ppi = PpiCurrent(); 01660 Unlock(&gasysico[ind].spcur); 01661 } 01662 01663 /* 01664 * unlock the cursors 01665 */ 01666 for (ind = 0; ind < COCR_CONFIGURABLE; ind++) { 01667 pcur = gasyscur[ind].spcur; 01668 01669 if (pcur == NULL) 01670 continue; 01671 01672 pcur->head.ppi = PpiCurrent(); 01673 Unlock(&gasyscur[ind].spcur); 01674 } 01675 }

VOID vCheckMMInstance LPWSTR  pchSrch,
DESIGNVECTOR *  pdv
 

Definition at line 2001 of file w32/ntuser/kernel/init.c.

References L, MAX_PATH, szName, and VOID().

Referenced by bEnumerateRegistryFonts().

02004 { 02005 LPWSTR pKeyName; 02006 WCHAR szName[MAX_PATH], *pszName = szName; 02007 WCHAR szCannonicalName[MAX_PATH]; 02008 ULONG NumAxes; 02009 02010 pdv->dvNumAxes = 0; 02011 pKeyName = pchSrch; 02012 while (*pKeyName && (*pKeyName++ != TEXT('('))) 02013 ; 02014 02015 if (*pKeyName){ 02016 if (!_wcsicmp(pKeyName, L"OpenType)")) 02017 { 02018 pKeyName = pchSrch; 02019 while(*pKeyName != TEXT('(')) 02020 *pszName++ = *pKeyName++; 02021 *pszName = 0; 02022 02023 GreGetCannonicalName(szName, szCannonicalName, &NumAxes, pdv); 02024 } 02025 } 02026 }

VOID Win32KDriverUnload IN PDRIVER_OBJECT  DriverObject  ) 
 

Definition at line 773 of file w32/ntuser/kernel/init.c.

References CleanupPoolAllocations, CleanUpPoolLimitations, CleanUpSections, CsrApiPort, DestroyHandleTableObjects(), ExFreePool(), ghSectionShared, gpDispInfo, gpHandlePages, gpsi, gpvSharedAlloc, gpvSharedBase, gpW32FastMutex, HH_DRIVERUNLOAD, HH_GRECLEANUP, HH_USERKCLEANUP, HYDRA_HINT, NT_SUCCESS, NTSTATUS(), NULL, ObDereferenceObject, tagDISPLAYINFO::pdceFirst, tagDCE::pdceNext, Status, TRACE_HYDAPI, VOID(), and Win32kNtUserCleanup().

00775 { 00776 TRACE_HYDAPI(("Win32KDriverUnload\n")); 00777 00778 #if DBG 00779 /* 00780 * Have a try/except around the driver unload code to catch 00781 * bugs. We need to do this because NtSetSystemInformation which 00782 * smss calls has a try/except when calling the driver entry and 00783 * the driver unload routines which does nothing but returns the 00784 * status code to the caller and doesn't break in the debugger! 00785 * So w/o this try/except here we wouldn't even know we hit 00786 * an AV !!! 00787 */ 00788 try { 00789 #endif // DBG 00790 00791 HYDRA_HINT(HH_DRIVERUNLOAD); 00792 00793 /* 00794 * Cleanup all resources in GRE 00795 */ 00796 MultiUserNtGreCleanup(); 00797 00798 HYDRA_HINT(HH_GRECLEANUP); 00799 00800 /* 00801 * BUG 305965. There might be cases when we end up with DCEs still 00802 * in the list. Go ahead and clean it up here. 00803 */ 00804 if (gpDispInfo != NULL && gpDispInfo->pdceFirst != NULL) { 00805 00806 PDCE pdce; 00807 PDCE pdceNext; 00808 00809 RIPMSG0(RIP_ERROR, "Win32KDriverUnload: the DCE list is not empty !"); 00810 00811 pdce = gpDispInfo->pdceFirst; 00812 00813 while (pdce != NULL) { 00814 pdceNext = pdce->pdceNext; 00815 00816 UserFreePool(pdce); 00817 00818 pdce = pdceNext; 00819 } 00820 gpDispInfo->pdceFirst = NULL; 00821 } 00822 00823 /* 00824 * Cleanup all resources in ntuser 00825 */ 00826 Win32kNtUserCleanup(); 00827 00828 /* 00829 * Cleanup the handle table for any object that is neither process 00830 * owned nor thread owned 00831 */ 00832 DestroyHandleTableObjects(); 00833 00834 00835 HYDRA_HINT(HH_USERKCLEANUP); 00836 00837 #if DBG 00838 HMCleanUpHandleTable(); 00839 #endif 00840 00841 /* 00842 * Free the handle page array 00843 */ 00844 00845 if (gpHandlePages != NULL) { 00846 UserFreePool(gpHandlePages); 00847 gpHandlePages = NULL; 00848 } 00849 00850 if (CsrApiPort != NULL) { 00851 ObDereferenceObject(CsrApiPort); 00852 CsrApiPort = NULL; 00853 } 00854 00855 /* 00856 * destroy the shared memory 00857 */ 00858 if (ghSectionShared != NULL) { 00859 00860 NTSTATUS Status; 00861 00862 /* 00863 * Set gpsi to NULL 00864 */ 00865 gpsi = NULL; 00866 00867 if (gpvSharedBase != NULL) { 00868 Win32HeapDestroy(gpvSharedAlloc); 00869 Status = Win32UnmapViewInSessionSpace(gpvSharedBase); 00870 UserAssert(NT_SUCCESS(Status)); 00871 } 00872 Win32DestroySection(ghSectionShared); 00873 } 00874 00875 CleanupWin32HeapStubs(); 00876 00877 #ifdef TRACE_MAP_VIEWS 00878 #if DBG 00879 UserAssert(gpSections == NULL); 00880 #else 00881 if (gpSections != NULL) { 00882 DbgBreakPoint(); 00883 } 00884 #endif // DBG 00885 #endif // TRACE_MAP_VIEWS 00886 00887 /* 00888 * Cleanup all the user pool allocations by hand 00889 */ 00890 CleanupPoolAllocations(); 00891 00892 CleanUpPoolLimitations(); 00893 CleanUpSections(); 00894 00895 /* 00896 * Cleanup W32 structures. 00897 */ 00898 if (gpW32FastMutex != NULL) { 00899 ExFreePool(gpW32FastMutex); 00900 gpW32FastMutex = NULL; 00901 } 00902 00903 #if DBG 00904 } except (DriverUnloadExceptionHandler(GetExceptionInformation())) { 00905 DbgBreakPoint(); 00906 } 00907 #endif // DBG 00908 00909 return; 00910 UNREFERENCED_PARAMETER(DriverObject); 00911 }

BOOL Win32kNtUserCleanup VOID   ) 
 

Definition at line 97 of file w32/ntuser/kernel/init.c.

References tagSMWP::acvr, aDeviceTemplate, apObjects, BOOL, DbgDumpTrackedDesktops, DeletePowerRequestList(), DestroyKL(), DEVICE_TYPE_MAX, EnterCrit, EnterDeviceInfoListCrit(), ExDeletePagedLookasideList(), ExDeleteResource, ExFreePool(), FreeCachedQueues(), FreeDeviceInfo(), FreeImeHotKeys(), FreeKernelEvent(), FreeQueue(), FreeSMS(), FreeTimer(), GDIAF_PNPWAITING, GDIF_READING, gHardErrorHandler, glpSetupPrograms, gpastrSetupExe, gpbwlList, gpDeviceInfoList, gpEventDiconnectDesktop, gpevtDesktopDestroyed, gpHandleFlagsMutex, gpkeMouseData, gpkfList, gpRemoteBeepDevice, gpresDeviceInfoList, gpresMouseEventQueue, gpresUser, gpScancodeMap, gpsdInitWinSta, gpsmsList, gpszWall, gptiRit, gptmrFirst, gptmrMaster, gptmrWD, gpvwplHungRedraw, gpWinEventHooks, gpwtiFirst, gSMWP, gspklBaseLayout, gThinwireFileObject, gVideoFileObject, gWaitBlockArray, HH_KBDLYOUTGLOBALCLEANUP, HMIsMarkDestroy, HMMarkObjectDestroy(), HYDRA_HINT, KeCancelTimer(), LeaveCrit, LeaveDeviceInfoListCrit(), NULL, ObDereferenceObject, pbwlCache, tagDEVICE_TEMPLATE::pkeHidChange, tagKL::pklNext, tagHARDERRORHANDLER::pqAttach, PSMS, tagWOWTHREADINFO::pwtiNext, QEntryLookaside, tagQ::QF_flags, QF_INDESTROY, RtlDestroyAtomTable(), SMSLookaside, TRACE_HYDAPI, TRUE, Unlock, and UserAtomTableHandle.

00099 { 00100 int i; 00101 00102 TRACE_HYDAPI(("Win32kNtUserCleanup: Cleanup Resources\n")); 00103 00104 EnterCrit(); 00105 00106 DbgDumpTrackedDesktops(TRUE); 00107 00108 /* 00109 * Anything in this list must be cleaned up when threads go away. 00110 */ 00111 UserAssert(gpbwlList == NULL); 00112 00113 UserAssert(gpWinEventHooks == NULL); 00114 00115 UserAssert(gpScancodeMap == NULL); 00116 00117 /* 00118 * Free IME hotkeys 00119 */ 00120 FreeImeHotKeys(); 00121 00122 /* 00123 * Free the wallpaper name string 00124 */ 00125 if (gpszWall != NULL) { 00126 UserFreePool(gpszWall); 00127 gpszWall = NULL; 00128 } 00129 /* 00130 * Free the hung redraw stuff 00131 */ 00132 if (gpvwplHungRedraw != NULL) { 00133 UserFreePool(gpvwplHungRedraw); 00134 gpvwplHungRedraw = NULL; 00135 } 00136 00137 /* 00138 * Free the arrary of setup app names 00139 */ 00140 if (gpastrSetupExe) { 00141 UserFreePool(gpastrSetupExe); 00142 gpastrSetupExe = NULL; 00143 } 00144 00145 if (glpSetupPrograms) { 00146 UserFreePool(glpSetupPrograms); 00147 glpSetupPrograms = NULL; 00148 } 00149 00150 /* 00151 * Free the cached window list 00152 */ 00153 if (pbwlCache != NULL) { 00154 UserFreePool(pbwlCache); 00155 pbwlCache = NULL; 00156 } 00157 00158 /* 00159 * Free outstanding timers 00160 */ 00161 while (gptmrFirst != NULL) { 00162 FreeTimer(gptmrFirst); 00163 } 00164 00165 if (gptmrWD) { 00166 KeCancelTimer(gptmrWD); 00167 UserFreePool(gptmrWD); 00168 gptmrWD = NULL; 00169 } 00170 00171 if (gptmrMaster) { 00172 KeCancelTimer(gptmrMaster); 00173 UserFreePool(gptmrMaster); 00174 gptmrMaster = NULL; 00175 } 00176 00177 /* 00178 * Cleanup mouse & kbd change events 00179 */ 00180 for (i = 0; i <= DEVICE_TYPE_MAX; i++) { 00181 UserAssert(gptiRit == NULL); 00182 if (aDeviceTemplate[i].pkeHidChange) { 00183 FreeKernelEvent(&aDeviceTemplate[i].pkeHidChange); 00184 } 00185 } 00186 00187 EnterDeviceInfoListCrit(); 00188 while (gpDeviceInfoList) { 00189 /* 00190 * Assert that there is no outstanding read or PnP thread waiting 00191 * in RequestDeviceChanges() for this device. 00192 * Clear these flags anyway, to force the free. 00193 */ 00194 UserAssert((gpDeviceInfoList->bFlags & GDIF_READING) == 0); 00195 UserAssert((gpDeviceInfoList->usActions & GDIAF_PNPWAITING) == 0); 00196 gpDeviceInfoList->bFlags &= ~GDIF_READING; 00197 gpDeviceInfoList->usActions &= ~GDIAF_PNPWAITING; 00198 FreeDeviceInfo(gpDeviceInfoList); 00199 } 00200 LeaveDeviceInfoListCrit(); 00201 00202 /* 00203 * Cleanup object references 00204 */ 00205 if (gThinwireFileObject) 00206 ObDereferenceObject(gThinwireFileObject); 00207 00208 if (gVideoFileObject) 00209 ObDereferenceObject(gVideoFileObject); 00210 00211 if (gpRemoteBeepDevice) 00212 ObDereferenceObject(gpRemoteBeepDevice); 00213 00214 /* 00215 * Cleanup our resources. There should be no threads in here 00216 * when we get called. 00217 */ 00218 if (gpresMouseEventQueue) { 00219 ExDeleteResource(gpresMouseEventQueue); 00220 ExFreePool(gpresMouseEventQueue); 00221 gpresMouseEventQueue = NULL; 00222 } 00223 00224 if (gpresDeviceInfoList) { 00225 ExDeleteResource(gpresDeviceInfoList); 00226 ExFreePool(gpresDeviceInfoList); 00227 gpresDeviceInfoList = NULL; 00228 } 00229 00230 if (gpkeMouseData != NULL) { 00231 FreeKernelEvent(&gpkeMouseData); 00232 } 00233 00234 if (apObjects) { 00235 UserFreePool(apObjects); 00236 apObjects = NULL; 00237 } 00238 00239 if (gWaitBlockArray) { 00240 UserFreePool(gWaitBlockArray); 00241 gWaitBlockArray = NULL; 00242 } 00243 00244 if (gpEventDiconnectDesktop != NULL) { 00245 FreeKernelEvent(&gpEventDiconnectDesktop); 00246 } 00247 00248 if (gpevtDesktopDestroyed != NULL) { 00249 FreeKernelEvent(&gpevtDesktopDestroyed); 00250 } 00251 00252 if (UserAtomTableHandle != NULL) { 00253 RtlDestroyAtomTable(UserAtomTableHandle); 00254 UserAtomTableHandle = NULL; 00255 } 00256 00257 /* 00258 * cleanup the SMS lookaside buffer 00259 */ 00260 { 00261 PSMS psmsNext; 00262 00263 while (gpsmsList != NULL) { 00264 psmsNext = gpsmsList->psmsNext; 00265 UserAssert(gpsmsList->spwnd == NULL); 00266 FreeSMS(gpsmsList); 00267 gpsmsList = psmsNext; 00268 } 00269 00270 if (SMSLookaside != NULL) { 00271 ExDeletePagedLookasideList(SMSLookaside); 00272 UserFreePool(SMSLookaside); 00273 SMSLookaside = NULL; 00274 } 00275 } 00276 00277 /* 00278 * Let go of the attached queue for hard error handling. 00279 * Do this before we free the Qlookaside ! 00280 */ 00281 if (gHardErrorHandler.pqAttach != NULL) { 00282 00283 UserAssert(gHardErrorHandler.pqAttach > 0); 00284 UserAssert(gHardErrorHandler.pqAttach->QF_flags & QF_INDESTROY); 00285 00286 FreeQueue(gHardErrorHandler.pqAttach); 00287 gHardErrorHandler.pqAttach = NULL; 00288 } 00289 00290 /* 00291 * Free the cached array of queues 00292 */ 00293 FreeCachedQueues(); 00294 00295 /* 00296 * cleanup the QEntry lookaside buffer 00297 */ 00298 if (QEntryLookaside != NULL) { 00299 ExDeletePagedLookasideList(QEntryLookaside); 00300 UserFreePool(QEntryLookaside); 00301 QEntryLookaside = NULL; 00302 } 00303 00304 /* 00305 * Unlock the keyboard layouts 00306 */ 00307 if (gspklBaseLayout != NULL) { 00308 00309 PKL pkl; 00310 PKL pklNext; 00311 00312 pkl = gspklBaseLayout->pklNext; 00313 00314 while (pkl->pklNext != pkl) { 00315 pklNext = pkl->pklNext; 00316 00317 DestroyKL(pkl); 00318 00319 pkl = pklNext; 00320 } 00321 00322 UserAssert(pkl == gspklBaseLayout); 00323 00324 if (!HMIsMarkDestroy(gspklBaseLayout)) { 00325 HMMarkObjectDestroy(gspklBaseLayout); 00326 } 00327 00328 HYDRA_HINT(HH_KBDLYOUTGLOBALCLEANUP); 00329 00330 if (Unlock(&gspklBaseLayout)) { 00331 DestroyKL(pkl); 00332 } 00333 } 00334 00335 UserAssert(gpkfList == NULL); 00336 00337 { 00338 PWOWTHREADINFO pwti; 00339 00340 /* 00341 * Cleanup gpwtiFirst list. This list is supposed to be empty 00342 * at this point. In one case during stress we hit the case where 00343 * it was not empty. The assert is to catch that case in 00344 * checked builds. 00345 */ 00346 00347 while (gpwtiFirst != NULL) { 00348 pwti = gpwtiFirst; 00349 gpwtiFirst = pwti->pwtiNext; 00350 UserFreePool(pwti); 00351 } 00352 } 00353 00354 /* 00355 * Cleanup cached SMWP array 00356 */ 00357 if (gSMWP.acvr != NULL) { 00358 UserFreePool(gSMWP.acvr); 00359 } 00360 00361 /* 00362 * Free gpsdInitWinSta. This is != NULL only if the session didn't 00363 * make it to UserInitialize. 00364 */ 00365 if (gpsdInitWinSta != NULL) { 00366 UserFreePool(gpsdInitWinSta); 00367 gpsdInitWinSta = NULL; 00368 } 00369 00370 if (gpHandleFlagsMutex != NULL) { 00371 ExFreePool(gpHandleFlagsMutex); 00372 gpHandleFlagsMutex = NULL; 00373 } 00374 00375 /* 00376 * Delete the power request structures. 00377 */ 00378 DeletePowerRequestList(); 00379 00380 LeaveCrit(); 00381 00382 if (gpresUser != NULL) { 00383 ExDeleteResource(gpresUser); 00384 ExFreePool(gpresUser); 00385 gpresUser = NULL; 00386 } 00387 #if DBG 00388 /* 00389 * Cleanup the global thread lock structures 00390 */ 00391 for (i = 0; i < gcThreadLocksArraysAllocated; i++) { 00392 UserFreePool(gpaThreadLocksArrays[i]); 00393 gpaThreadLocksArrays[i] = NULL; 00394 } 00395 #endif // DBG 00396 00397 return TRUE; 00398 }

BOOL Win32kNtUserCleanup  ) 
 

Referenced by Win32KDriverUnload().

NTSTATUS Win32UserInitialize VOID   ) 
 

Definition at line 2249 of file kernel/server.c.

References AllocateCvr(), atomUSER32, _OBJECT_TYPE_INITIALIZER::CloseProcedure, CreateSetupNameArray(), _OBJECT_TYPE_INITIALIZER::DefaultNonPagedPoolCharge, _OBJECT_TYPE_INITIALIZER::DefaultPagedPoolCharge, _OBJECT_TYPE_INITIALIZER::DeleteProcedure, DESKTOP, DesktopMapping, DestroyWindowStation(), tagSERVERINFO::dwDefaultHeapSize, EnterCrit, FastGetProfileDwordW(), FreeDesktop(), FreeWindowStation(), gatomFirstPinned, gbSecureDesktop, gDrawVersionAlways, gdwDesktopSectionSize, _OBJECT_TYPE_INITIALIZER::GenericMapping, gfUnsignedDrivers, gpDispInfo, gpepInit, gpsi, gpvSharedBase, gSharedInfo, gSMWP, gUserPostMessageLimit, gUserProcessHandleQuota, HMInitHandleTable(), InitCreateSharedSection(), InitCreateUserSubsystem(), InitFunctionTables(), INITIAL_USER_HANDLE_QUOTA, InitMessageTables(), InitOLEFormats(), InitQEntryLookaside(), InitSecurity(), InitSMSLookaside(), IS_DBCS_ENABLED, IS_IME_ENABLED, IS_MIDEAST_ENABLED, IsDBCSEnabledSystem(), IsIMMEnabledSystem(), IsMidEastEnabledSystem(), L, LeaveCrit, LW_LoadSomeStrings(), _OBJECT_TYPE_INITIALIZER::MaintainHandleCount, MapDesktop(), MINIMUM_POSTMESSAGE_LIMIT, MINIMUM_USER_HANDLE_QUOTA, NT_SUCCESS, NTSTATUS(), NULL, OkayToCloseDesktop(), _OBJECT_TYPE_INITIALIZER::OkayToCloseProcedure, OkayToCloseWindowStation(), _OBJECT_TYPE_INITIALIZER::OpenProcedure, _OBJECT_TYPE_INITIALIZER::ParseProcedure, ParseWindowStation(), tagSHAREDINFO::pDispInfo, PMAP_WINDOWSM, PsGetCurrentProcess, tagSHAREDINFO::psi, RIPF_DEFAULT, RtlCheckRegistryKey(), SERVERINFO, SET_FLAG, SET_OR_CLEAR_SRVIF, SET_SRVIF, SetupClassAtoms(), SharedAlloc(), SRVIF_CHECKED, SRVIF_DBCS, SRVIF_IME, SRVIF_MIDEAST, Status, szUSER32, TRACE_INIT, TRUE, UnmapDesktop(), UserAddAtom(), UserRtlCreateAtomTable(), USRINIT_ATOMBUCKET_SIZE, _OBJECT_TYPE_INITIALIZER::ValidAccessMask, VerifySyncOnlyMessages(), WINDOWSTATION, WinStaMapping, and tagSERVERINFO::wRIPFlags.

02250 { 02251 NTSTATUS Status; 02252 POBJECT_TYPE_INITIALIZER pTypeInfo; 02253 LONG lTemp; 02254 02255 TRACE_INIT(("Entering Win32UserInitialize\n")); 02256 02257 /* 02258 * Create the shared section. 02259 */ 02260 Status = InitCreateSharedSection(); 02261 if (!NT_SUCCESS(Status)) { 02262 RIPMSG0(RIP_WARNING, "InitCreateSharedSection failed"); 02263 return Status; 02264 } 02265 02266 EnterCrit(); 02267 02268 /* 02269 * Initialize security stuff. 02270 */ 02271 if (!InitSecurity()) { 02272 RIPMSG0(RIP_WARNING, "InitSecurity failed"); 02273 goto ExitWin32UserInitialize; 02274 } 02275 02276 /* 02277 * Fill in windowstation and desktop object types 02278 */ 02279 pTypeInfo = &(*ExWindowStationObjectType)->TypeInfo; 02280 pTypeInfo->DefaultNonPagedPoolCharge = sizeof(WINDOWSTATION) + sizeof(KEVENT); 02281 pTypeInfo->DefaultPagedPoolCharge = 0; 02282 pTypeInfo->MaintainHandleCount = TRUE; 02283 pTypeInfo->CloseProcedure = DestroyWindowStation; 02284 pTypeInfo->DeleteProcedure = FreeWindowStation; 02285 pTypeInfo->ParseProcedure = ParseWindowStation; 02286 pTypeInfo->OkayToCloseProcedure = OkayToCloseWindowStation; 02287 pTypeInfo->ValidAccessMask = WinStaMapping.GenericAll; 02288 pTypeInfo->GenericMapping = WinStaMapping; 02289 02290 pTypeInfo = &(*ExDesktopObjectType)->TypeInfo; 02291 pTypeInfo->DefaultNonPagedPoolCharge = sizeof(DESKTOP); 02292 pTypeInfo->DefaultPagedPoolCharge = 0; 02293 pTypeInfo->MaintainHandleCount = TRUE; 02294 pTypeInfo->CloseProcedure = UnmapDesktop; 02295 pTypeInfo->OpenProcedure = MapDesktop; 02296 pTypeInfo->DeleteProcedure = FreeDesktop; 02297 pTypeInfo->OkayToCloseProcedure = OkayToCloseDesktop; 02298 pTypeInfo->ValidAccessMask = DesktopMapping.GenericAll; 02299 pTypeInfo->GenericMapping = DesktopMapping; 02300 02301 /* 02302 * Get this process so we can use the profiles. 02303 */ 02304 gpepInit = PsGetCurrentProcess(); 02305 02306 Status = InitQEntryLookaside(); 02307 Status |= InitSMSLookaside(); 02308 Status |= UserRtlCreateAtomTable(USRINIT_ATOMBUCKET_SIZE); 02309 02310 if (!NT_SUCCESS(Status)) { 02311 RIPMSG0(RIP_WARNING, "Initialization failure"); 02312 goto ExitWin32UserInitialize; 02313 } 02314 02315 atomUSER32 = UserAddAtom(szUSER32, TRUE); 02316 02317 gatomFirstPinned = atomUSER32; 02318 02319 if (gatomFirstPinned == 0) { 02320 RIPMSG0(RIP_WARNING, "Could not create atomUSER32"); 02321 goto ExitWin32UserInitialize; 02322 } 02323 02324 /* 02325 * Initialize the user subsystem information. 02326 */ 02327 if (!InitCreateUserSubsystem()) { 02328 RIPMSG0(RIP_WARNING, "InitCreateUserSubsystem failed"); 02329 goto ExitWin32UserInitialize; 02330 } 02331 02332 /* 02333 * Don't bail out if CreateSetupNameArray fails 02334 * MCostea #326652 02335 */ 02336 CreateSetupNameArray(); 02337 02338 /* 02339 * Allocated shared SERVERINFO structure. 02340 */ 02341 if ((gpsi = (PSERVERINFO)SharedAlloc(sizeof(SERVERINFO))) == NULL) { 02342 RIPMSG0(RIP_WARNING, "Could not allocate SERVERINFO"); 02343 goto ExitWin32UserInitialize; 02344 } 02345 02346 /* 02347 * Set the default rip-flags to rip on just about 02348 * everything. We'll truly set this in the InitGlobalRIPFlags() 02349 * routine. These are needed so that we can do appropriate ripping 02350 * during the rest of the init-calls. 02351 */ 02352 02353 SET_FLAG(gpsi->wRIPFlags, RIPF_DEFAULT); 02354 02355 /* 02356 * Make sure we will not get a division by zero if the initialization 02357 * will not complete correctly. Set these to their normal values. 02358 */ 02359 gpsi->cxMsgFontChar = 6; 02360 gpsi->cyMsgFontChar = 13; 02361 gpsi->cxSysFontChar = 8; 02362 gpsi->cySysFontChar = 16; 02363 02364 /* 02365 * Initialize the DISPLAYINFO structure. 02366 */ 02367 gpDispInfo = SharedAlloc(sizeof(*gpDispInfo)); 02368 if (!gpDispInfo) { 02369 RIPMSG0(RIP_WARNING, "Could not allocate gpDispInfo"); 02370 goto ExitWin32UserInitialize; 02371 } 02372 02373 InitDbgTags(); 02374 02375 SET_OR_CLEAR_SRVIF(SRVIF_DBCS, IsDBCSEnabledSystem()); 02376 SET_OR_CLEAR_SRVIF(SRVIF_IME, IsIMMEnabledSystem()); 02377 02378 SET_OR_CLEAR_SRVIF(SRVIF_MIDEAST, IsMidEastEnabledSystem()); 02379 02380 #if DBG 02381 SET_SRVIF(SRVIF_CHECKED); 02382 02383 RIPMSG3(RIP_WARNING, "*** win32k: DBCS:[%d] IME:[%d] MiddleEast:[%d]", 02384 IS_DBCS_ENABLED(), 02385 IS_IME_ENABLED(), 02386 IS_MIDEAST_ENABLED()); 02387 #endif 02388 02389 gpsi->dwDefaultHeapSize = gdwDesktopSectionSize * 1024; 02390 02391 /* 02392 * Initialize procedures and message tables. 02393 * Initialize the class structures for Get/SetClassWord/Long. 02394 * Initialize message-box strings. 02395 * Initialize OLE-Formats (performance-hack). 02396 */ 02397 InitFunctionTables(); 02398 InitMessageTables(); 02399 #if DBG 02400 VerifySyncOnlyMessages(); 02401 #endif 02402 if (!InitOLEFormats()) { 02403 RIPMSG0(RIP_WARNING, "InitOLEFormats failed"); 02404 goto ExitWin32UserInitialize; 02405 } 02406 02407 /* 02408 * Set up class atoms 02409 */ 02410 if (!SetupClassAtoms()) { 02411 RIPMSG0(RIP_WARNING, "SetupClassAtoms failed to register atoms"); 02412 goto ExitWin32UserInitialize; 02413 } 02414 02415 LW_LoadSomeStrings(); 02416 02417 /* 02418 * Initialize the handle manager. 02419 */ 02420 if (!HMInitHandleTable(gpvSharedBase)) { 02421 RIPMSG0(RIP_WARNING, "HMInitHandleTable failed"); 02422 goto ExitWin32UserInitialize; 02423 } 02424 02425 /* 02426 * Setup shared info block. 02427 */ 02428 gSharedInfo.psi = gpsi; 02429 gSharedInfo.pDispInfo = gpDispInfo; 02430 02431 /* 02432 * Determine if we have unsigned drivers installed 02433 * Use 2BD63D28D7BCD0E251195AEB519243C13142EBC3 as current key to check. 02434 * Old key: 300B971A74F97E098B67A4FCEBBBF6B9AE2F404C 02435 */ 02436 if (NT_SUCCESS(RtlCheckRegistryKey(RTL_REGISTRY_ABSOLUTE, 02437 L"\\Registry\\Machine\\SOFTWARE\\Microsoft\\SystemCertificates\\Root\\Certificates\\2BD63D28D7BCD0E251195AEB519243C13142EBC3")) 02438 || 02439 NT_SUCCESS(RtlCheckRegistryKey(RTL_REGISTRY_ABSOLUTE, 02440 L"\\Registry\\Machine\\SOFTWARE\\Policies\\Microsoft\\SystemCertificates\\Root\\Certificates\\2BD63D28D7BCD0E251195AEB519243C13142EBC3"))) { 02441 02442 gfUnsignedDrivers = TRUE; 02443 } 02444 02445 /* 02446 * Set up a desktop info structure that is visible in all 02447 * clients. 02448 */ 02449 lTemp = FastGetProfileDwordW(NULL, 02450 PMAP_WINDOWSM, 02451 L"USERProcessHandleQuota", 02452 gUserProcessHandleQuota); 02453 02454 if ((lTemp > MINIMUM_USER_HANDLE_QUOTA) && (lTemp <= INITIAL_USER_HANDLE_QUOTA)) { 02455 gUserProcessHandleQuota = lTemp; 02456 } 02457 02458 /* 02459 * The maximum number of posted message for a thread. 02460 */ 02461 lTemp = FastGetProfileDwordW(NULL, 02462 PMAP_WINDOWSM, 02463 L"USERPostMessageLimit", 02464 gUserPostMessageLimit); 02465 if (lTemp > MINIMUM_POSTMESSAGE_LIMIT) { 02466 gUserPostMessageLimit = lTemp; 02467 } else if (lTemp == 0) { 02468 /* 02469 * 0 means (virtually) No Limit. 02470 */ 02471 gUserPostMessageLimit = ~0; 02472 } else { 02473 RIPMSG1(RIP_WARNING, "Win32UserInitialize: USERPostMessageLimit value (%d) is too low.", lTemp); 02474 } 02475 02476 if (!gDrawVersionAlways) { 02477 gDrawVersionAlways = FastGetProfileDwordW(NULL, 02478 PMAP_WINDOWSM, 02479 L"DisplayVersion", 02480 0); 02481 } 02482 02483 gbSecureDesktop = FastGetProfileDwordW(NULL, 02484 PMAP_WINDOWSM, 02485 L"SecureDesktop", 02486 TRUE); 02487 02488 /* 02489 * Initialize SMWP structure 02490 */ 02491 if (!AllocateCvr(&gSMWP, 4)) { 02492 RIPMSG0(RIP_WARNING, "AllocateCvr failed"); 02493 goto ExitWin32UserInitialize; 02494 } 02495 LeaveCrit(); 02496 02497 UserAssert(NT_SUCCESS(Status)); 02498 return Status; 02499 02500 ExitWin32UserInitialize: 02501 LeaveCrit(); 02502 02503 if (NT_SUCCESS(Status)) { 02504 Status = STATUS_NO_MEMORY; 02505 } 02506 02507 RIPMSG1(RIP_WARNING, "UserInitialize failed with Status = %x", Status); 02508 return Status; 02509 }

int xxxAddFontResourceW LPWSTR  lpFile,
FLONG  flags,
DESIGNVECTOR *  pdv
 

Definition at line 1119 of file w32/ntuser/kernel/init.c.

References RtlInitUnicodeString(), and xxxClientAddFontResourceW().

Referenced by bEnumerateRegistryFonts(), and xxxLW_LoadFonts().

01123 { 01124 UNICODE_STRING strFile; 01125 01126 RtlInitUnicodeString(&strFile, lpFile); 01127 01128 /* 01129 * Callbacks leave the critsec, so make sure that we're in it. 01130 */ 01131 01132 return xxxClientAddFontResourceW(&strFile, flags, pdv); 01133 }

BOOL xxxInitWindowStation PWINDOWSTATION  pwinsta  ) 
 

Definition at line 1319 of file w32/ntuser/kernel/init.c.

References BOOL, CreateProfileUserName(), FinalUserInit(), FreeProfileUserName(), gpsi, LW_DriversInit(), LW_LoadProfileInitData(), NULL, SetIconMetrics(), SetMinMetrics(), TRUE, and xxxSetWindowNCMetrics().

Referenced by xxxCreateWindowStation().

01321 { 01322 TL tlName; 01323 PUNICODE_STRING pProfileUserName = CreateProfileUserName(&tlName); 01324 BOOL fRet; 01325 01326 /* 01327 * Load all profile data first 01328 */ 01329 LW_LoadProfileInitData(pProfileUserName); 01330 01331 /* 01332 * Initialize User in a specific order. 01333 */ 01334 LW_DriversInit(); 01335 01336 /* 01337 * This is the initialization from Chicago 01338 */ 01339 if (!(fRet = xxxSetWindowNCMetrics(pProfileUserName, NULL, TRUE, -1))) { 01340 RIPMSG0(RIP_WARNING, "xxxInitWindowStation failed in xxxSetWindowNCMetrics"); 01341 goto Exit; 01342 } 01343 01344 SetMinMetrics(pProfileUserName, NULL); 01345 01346 if (!(fRet = SetIconMetrics(pProfileUserName, NULL))) { 01347 RIPMSG0(RIP_WARNING, "xxxInitWindowStation failed in SetIconMetrics"); 01348 goto Exit; 01349 } 01350 01351 if (!(fRet = FinalUserInit())) { 01352 RIPMSG0(RIP_WARNING, "xxxInitWindowStation failed in FinalUserInit"); 01353 goto Exit; 01354 } 01355 01356 /* 01357 * Initialize the key cache index. 01358 */ 01359 gpsi->dwKeyCache = 1; 01360 01361 Exit: 01362 FreeProfileUserName(pProfileUserName, &tlName); 01363 01364 return fRet; 01365 UNREFERENCED_PARAMETER(pwinsta); 01366 }

VOID xxxLW_LoadFonts BOOL  bRemote  ) 
 

Definition at line 2184 of file w32/ntuser/kernel/init.c.

References bEnumerateRegistryFonts(), BOOL, bPermanentFontsLoaded, ClientLoadLocalT1Fonts(), ClientLoadRemoteT1Fonts(), CloseFNTCache(), CMSSLEEP, EnterCrit, FALSE, gbRemoteSession, KeDelayExecutionThread(), KernelMode, L, LeaveCrit, MAX_TIME_OUT, NULL, TRUE, VOID(), and xxxAddFontResourceW().

Referenced by CreateTerminalInput().

02186 { 02187 BOOL bTimeOut = FALSE; 02188 02189 if(bRemote) { 02190 02191 LARGE_INTEGER li; 02192 ULONG ulWaitCount = 0; 02193 02194 /* 02195 * Before we can proceed we must make sure that all the permanent 02196 * fonts have been loaded. 02197 */ 02198 02199 while (!bPermanentFontsLoaded) { 02200 02201 if (!gbRemoteSession || (ulWaitCount < MAX_TIME_OUT)) 02202 { 02203 LeaveCrit(); 02204 li.QuadPart = (LONGLONG)-10000 * CMSSLEEP; 02205 KeDelayExecutionThread(KernelMode, FALSE, &li); 02206 EnterCrit(); 02207 } 02208 else 02209 { 02210 bTimeOut = TRUE; 02211 break; 02212 } 02213 02214 ulWaitCount++; 02215 } 02216 02217 if (!bTimeOut) 02218 { 02219 if (!bEnumerateRegistryFonts(FALSE)) 02220 return; // nothing you can do 02221 02222 // add remote type 1 fonts. 02223 02224 ClientLoadRemoteT1Fonts(); 02225 } 02226 02227 } else { 02228 02229 xxxAddFontResourceW(L"marlett.ttf", AFRW_ADD_LOCAL_FONT,NULL); 02230 if (!bEnumerateRegistryFonts(TRUE)) 02231 return; // nothing you can do 02232 02233 // add local type 1 fonts. 02234 02235 // only want to be called once, the second time after ms sans serif was installed 02236 02237 if (bPermanentFontsLoaded) 02238 { 02239 ClientLoadLocalT1Fonts(); 02240 02241 // All the fonts loaded, we can close the FNTCache 02242 02243 CloseFNTCache(); 02244 } 02245 02246 } 02247 }

VOID xxxODI_ColorInit PUNICODE_STRING  pProfileUserName  ) 
 

Definition at line 1508 of file w32/ntuser/kernel/init.c.

References CI_GetClrVal(), FastGetProfileStringFromIDW(), gargbInitial, gpsi, INT, PMAP_COLORS, SSCF_FORCESOLIDCOLOR, SSCF_SETMAGICCOLORS, STR_COLOREND, STR_COLORSTART, szNull, VOID(), and xxxSetSysColors().

Referenced by InitUserScreen(), and xxxUpdatePerUserSystemParameters().

01509 { 01510 int i; 01511 COLORREF colorVals[STR_COLOREND - STR_COLORSTART + 1]; 01512 INT colorIndex[STR_COLOREND - STR_COLORSTART + 1]; 01513 WCHAR rgchValue[25]; 01514 01515 #if COLOR_MAX - (STR_COLOREND - STR_COLORSTART + 1) 01516 #error "COLOR_MAX value conflicts with STR_COLOREND - STR_COLORSTART" 01517 #endif 01518 01519 /* 01520 * Now set up default color values. 01521 * These are not in display drivers anymore since we just want default. 01522 * The real values are stored in the profile. 01523 */ 01524 RtlCopyMemory(gpsi->argbSystem, gargbInitial, sizeof(COLORREF) * COLOR_MAX); 01525 01526 for (i = 0; i < COLOR_MAX; i++) { 01527 01528 /* 01529 * Try to find a WIN.INI entry for this object. 01530 */ 01531 *rgchValue = 0; 01532 FastGetProfileStringFromIDW(pProfileUserName, 01533 PMAP_COLORS, 01534 STR_COLORSTART + i, 01535 szNull, 01536 rgchValue, 01537 sizeof(rgchValue) / sizeof(WCHAR) 01538 ); 01539 01540 /* 01541 * Convert the string into an RGB value and store. Use the 01542 * default RGB value if the profile value is missing. 01543 */ 01544 colorVals[i] = *rgchValue ? CI_GetClrVal(rgchValue) : gpsi->argbSystem[i]; 01545 colorIndex[i] = i; 01546 } 01547 01548 xxxSetSysColors(pProfileUserName, 01549 i, 01550 colorIndex, 01551 colorVals, 01552 SSCF_FORCESOLIDCOLOR | SSCF_SETMAGICCOLORS); 01553 }

BOOL xxxUpdatePerUserSystemParameters HANDLE  hToken,
BOOL  bUserLoggedOn
 

Definition at line 2445 of file w32/ntuser/kernel/init.c.

References _DestroyMenu(), _SetCaretBlinkTime(), ARRAY_SIZE, BOOL, CalculateMouseSensitivity(), CheckDesktopPolicyChange(), CreateProfileUserName(), DWORD, tagWINDOWSTATION::dwWSF_Flags, FALSE, FastGetProfileDwordW(), FastGetProfileIntFromID(), FastGetProfileIntsW(), FastGetProfileIntW(), FastGetProfileValue(), FastWriteProfileStringW(), FreeProfileUserName(), gcxMouseHover, gcyMouseHover, gdtMNDropDown, gdtMouseHover, gdwCanPaintDesktop, gdwKeyboardAttributes, GetCurrentProcessId, GetKbdLangSwitch(), gfEnableHexNumpad, gfIMEShowStatus, gfUnsignedDrivers, gMouseSensitivity, gMouseSensitivityFactor, gMouseSpeed, gMouseThresh1, gMouseThresh2, gnFastAltTabColumns, gnFastAltTabRows, gnllHooksTimeout, gpDispInfo, gpidLogon, gpsi, grpWinStaList, tagDISPLAYINFO::hdcScreen, hModuleWin, IMESHOWSTATUS_NOTINITIALIZED, IsWinEventNotifyDeferredOK, L, LoadCPUserPreferences(), LW_LoadResources(), MOUSE_SENSITIVITY_DEFAULT, MOUSE_SENSITIVITY_MAX, NULL, OpenCacheKeyEx(), PMAP_DESKTOP, PMAP_INPUTMETHOD, PMAP_KEYBOARD, PMAP_METRICS, PMAP_MOUSE, PMAP_NETWORK, PMAP_TRUETYPE, PMAP_UKBDLAYOUT, PMAP_WINDOWSU, PUDF_ANIMATE, PUDF_DRAGFULLWINDOWS, tagWINDOWSTATION::rpdeskList, tagDESKTOP::rpdeskNext, ServerLoadString, SET_OR_CLEAR_PUDF, SetIconMetrics(), SetMinMetrics(), tagDESKTOP::spmenuDialogSys, tagDESKTOP::spmenuSys, SYSMET, TEST_BOOL_PUDF, TRUE, UINT, UnlockDesktopSysMenu(), UpdatePerUserKeyboardIndicators(), WSF_NOIO, xxxODI_ColorInit(), xxxSetWindowNCMetrics(), xxxSystemParametersInfo(), xxxUpdatePerUserAccessPackSettings(), and xxxUpdateSystemCursorsFromRegistry().

Referenced by NtUserUpdatePerUserSystemParameters().

02448 { 02449 int i; 02450 HANDLE hKey; 02451 DWORD dwFontSmoothing; 02452 BOOL fDragFullWindows; 02453 TL tlName; 02454 PUNICODE_STRING pProfileUserName = NULL; 02455 02456 02457 static struct { 02458 UINT idSection; 02459 UINT id; 02460 UINT idRes; 02461 UINT def; 02462 } spi[] = { 02463 { PMAP_DESKTOP, SPI_SETSCREENSAVETIMEOUT, STR_SCREENSAVETIMEOUT, 0 }, 02464 { PMAP_DESKTOP, SPI_SETSCREENSAVEACTIVE, STR_SCREENSAVEACTIVE, 0 }, 02465 { PMAP_DESKTOP, SPI_SETDRAGHEIGHT, STR_DRAGHEIGHT, 4 }, 02466 { PMAP_DESKTOP, SPI_SETDRAGWIDTH, STR_DRAGWIDTH, 4 }, 02467 { PMAP_DESKTOP, SPI_SETWHEELSCROLLLINES, STR_WHEELSCROLLLINES, 3 }, 02468 { PMAP_KEYBOARD, SPI_SETKEYBOARDDELAY, STR_KEYDELAY, 0 }, 02469 { PMAP_KEYBOARD, SPI_SETKEYBOARDSPEED, STR_KEYSPEED, 15 }, 02470 { PMAP_MOUSE, SPI_SETDOUBLECLICKTIME, STR_DBLCLKSPEED, 500 }, 02471 { PMAP_MOUSE, SPI_SETDOUBLECLKWIDTH, STR_DOUBLECLICKWIDTH, 4 }, 02472 { PMAP_MOUSE, SPI_SETDOUBLECLKHEIGHT, STR_DOUBLECLICKHEIGHT, 4 }, 02473 { PMAP_MOUSE, SPI_SETSNAPTODEFBUTTON, STR_SNAPTO, 0 }, 02474 { PMAP_WINDOWSU, SPI_SETMENUDROPALIGNMENT, STR_MENUDROPALIGNMENT, 0 }, 02475 { PMAP_INPUTMETHOD, SPI_SETSHOWIMEUI, STR_SHOWIMESTATUS, 1 }, 02476 }; 02477 02478 PROFINTINFO apii[] = { 02479 { PMAP_MOUSE, (LPWSTR)STR_MOUSETHRESH1, 6, &gMouseThresh1 }, 02480 { PMAP_MOUSE, (LPWSTR)STR_MOUSETHRESH2, 10, &gMouseThresh2 }, 02481 { PMAP_MOUSE, (LPWSTR)STR_MOUSESPEED, 1, &gMouseSpeed }, 02482 { PMAP_DESKTOP, (LPWSTR)STR_MENUSHOWDELAY, 400, &gdtMNDropDown }, 02483 { PMAP_DESKTOP, (LPWSTR)STR_DRAGFULLWINDOWS, 2, &fDragFullWindows }, 02484 { PMAP_DESKTOP, (LPWSTR)STR_FASTALTTABROWS, 3, &gnFastAltTabRows }, 02485 { PMAP_DESKTOP, (LPWSTR)STR_FASTALTTABCOLUMNS, 7, &gnFastAltTabColumns }, 02486 { PMAP_DESKTOP, (LPWSTR)STR_MAXLEFTOVERLAPCHARS, 3, &(gpsi->wMaxLeftOverlapChars) }, 02487 { PMAP_DESKTOP, (LPWSTR)STR_MAXRIGHTOVERLAPCHARS, 3, &(gpsi->wMaxRightOverlapChars) }, 02488 { PMAP_DESKTOP, (LPWSTR)STR_FONTSMOOTHING, 0, &dwFontSmoothing }, 02489 { PMAP_INPUTMETHOD, (LPWSTR)STR_HEXNUMPAD, 0, &gfEnableHexNumpad }, 02490 { 0, NULL, 0, NULL } 02491 }; 02492 02493 UserAssert(IsWinEventNotifyDeferredOK()); 02494 02495 UNREFERENCED_PARAMETER(hToken); 02496 02497 /* 02498 * Make sure the caller is the logon process 02499 */ 02500 if (GetCurrentProcessId() != gpidLogon) { 02501 RIPMSG0(RIP_WARNING, "Access denied in xxxUpdatePerUserSystemParameters"); 02502 return FALSE; 02503 } 02504 02505 pProfileUserName = CreateProfileUserName(&tlName); 02506 02507 /* 02508 * Check for new policy. 02509 */ 02510 CheckDesktopPolicyChange(pProfileUserName); 02511 02512 /* 02513 * Get the timeout for low level hooks from the registry 02514 */ 02515 FastGetProfileValue(pProfileUserName, 02516 PMAP_DESKTOP, 02517 (LPWSTR)STR_LLHOOKSTIMEOUT, 02518 NULL, 02519 (LPBYTE)&gnllHooksTimeout, 02520 sizeof(int) 02521 ); 02522 02523 /* 02524 * Control Panel User Preferences 02525 */ 02526 LoadCPUserPreferences(pProfileUserName); 02527 02528 /* 02529 * Set syscolors from registry. 02530 */ 02531 02532 xxxODI_ColorInit(pProfileUserName); 02533 02534 LW_LoadResources(pProfileUserName); 02535 02536 /* 02537 * This is the initialization from Chicago 02538 */ 02539 xxxSetWindowNCMetrics(pProfileUserName, NULL, TRUE, -1); // Colors must be set first 02540 SetMinMetrics(pProfileUserName, NULL); 02541 SetIconMetrics(pProfileUserName, NULL); 02542 02543 /* 02544 * Read the keyboard layout switching hot key 02545 */ 02546 GetKbdLangSwitch(pProfileUserName); 02547 02548 /* 02549 * Set the default thread locale for the system based on the value 02550 * in the current user's registry profile. 02551 */ 02552 ZwSetDefaultLocale( TRUE, 0 ); 02553 02554 /* 02555 * Set the default UI language based on the value in the current 02556 * user's registry profile. 02557 */ 02558 ZwSetDefaultUILanguage(0); 02559 02560 /* 02561 * And then Get it. 02562 */ 02563 ZwQueryDefaultUILanguage(&(gpsi->UILangID)); 02564 02565 02566 /* 02567 * Destroy the desktop system menus, so that they're recreated with 02568 * the correct UI language if the current user's UI language is different 02569 * from the previous one. This is done by finding the interactive 02570 * window station and destroying all its desktops's system menus. 02571 */ 02572 if (grpWinStaList != NULL) { 02573 PDESKTOP pdesk; 02574 PMENU pmenu; 02575 02576 UserAssert(!(grpWinStaList->dwWSF_Flags & WSF_NOIO)); 02577 for (pdesk = grpWinStaList->rpdeskList; pdesk != NULL; pdesk = pdesk->rpdeskNext) { 02578 if (pdesk->spmenuSys != NULL) { 02579 pmenu = pdesk->spmenuSys; 02580 if (UnlockDesktopSysMenu(&pdesk->spmenuSys)) 02581 _DestroyMenu(pmenu); 02582 } 02583 if (pdesk->spmenuDialogSys != NULL) { 02584 pmenu = pdesk->spmenuDialogSys; 02585 if (UnlockDesktopSysMenu(&pdesk->spmenuDialogSys)) 02586 _DestroyMenu(pmenu); 02587 } 02588 } 02589 } 02590 02591 xxxUpdateSystemCursorsFromRegistry(pProfileUserName); 02592 02593 /* 02594 * desktop Pattern now. Note no parameters. It just goes off 02595 * and reads win.ini and sets the desktop pattern. 02596 */ 02597 xxxSystemParametersInfo(SPI_SETDESKPATTERN, (UINT)-1, 0L, 0); // 265 version 02598 02599 /* 02600 * Initialize IME show status 02601 */ 02602 if (bUserLoggedOn) { 02603 gfIMEShowStatus = IMESHOWSTATUS_NOTINITIALIZED; 02604 } 02605 02606 /* 02607 * now go set a bunch of random values from the win.ini file. 02608 */ 02609 for (i = 0; i < ARRAY_SIZE(spi); i++) { 02610 02611 xxxSystemParametersInfo( 02612 spi[i].id, 02613 FastGetProfileIntFromID(pProfileUserName, 02614 spi[i].idSection, 02615 spi[i].idRes, 02616 spi[i].def 02617 ), 02618 0L, 02619 0 02620 ); 02621 } 02622 02623 /* 02624 * read profile integers and do any fixups 02625 */ 02626 FastGetProfileIntsW(pProfileUserName, apii); 02627 02628 if (gnFastAltTabColumns < 2) 02629 gnFastAltTabColumns = 7; 02630 02631 if (gnFastAltTabRows < 1) 02632 gnFastAltTabRows = 3; 02633 02634 /* 02635 * If this is the first time the user logs on, set the DragFullWindows 02636 * to the default. If we have an accelerated device, enable full drag. 02637 */ 02638 if (fDragFullWindows == 2) { 02639 02640 LPWSTR pwszd = L"%d"; 02641 WCHAR szTemp[40]; 02642 WCHAR szDragFullWindows[40]; 02643 02644 SET_OR_CLEAR_PUDF( 02645 PUDF_DRAGFULLWINDOWS, 02646 GreGetDeviceCaps(gpDispInfo->hdcScreen, BLTALIGNMENT) == 0); 02647 02648 if (bUserLoggedOn) { 02649 swprintf(szTemp, pwszd, TEST_BOOL_PUDF(PUDF_DRAGFULLWINDOWS)); 02650 02651 ServerLoadString(hModuleWin, 02652 STR_DRAGFULLWINDOWS, 02653 szDragFullWindows, 02654 sizeof(szDragFullWindows) / sizeof(WCHAR)); 02655 02656 FastWriteProfileStringW(pProfileUserName, 02657 PMAP_DESKTOP, 02658 szDragFullWindows, 02659 szTemp); 02660 } 02661 } else { 02662 SET_OR_CLEAR_PUDF(PUDF_DRAGFULLWINDOWS, fDragFullWindows); 02663 } 02664 02665 /* 02666 * !!!LATER!!! (adams) See if the following profile retrievals can't 02667 * be done in the "spi" array above (e.g. SPI_SETSNAPTO). 02668 */ 02669 02670 /* 02671 * Set mouse settings 02672 */ 02673 gMouseSensitivity = FastGetProfileIntFromID(pProfileUserName,PMAP_MOUSE, STR_MOUSESENSITIVITY, MOUSE_SENSITIVITY_DEFAULT); 02674 if ((gMouseSensitivity < MOUSE_SENSITIVITY_MIN) || (gMouseSensitivity > MOUSE_SENSITIVITY_MAX)) { 02675 gMouseSensitivity = MOUSE_SENSITIVITY_DEFAULT ; 02676 } 02677 gMouseSensitivityFactor = CalculateMouseSensitivity(gMouseSensitivity) ; 02678 02679 _SetCaretBlinkTime(FastGetProfileIntFromID(pProfileUserName,PMAP_DESKTOP, STR_BLINK, 500)); 02680 02681 /* 02682 * Font Information 02683 */ 02684 GreSetFontEnumeration( FastGetProfileIntW(pProfileUserName,PMAP_TRUETYPE, TEXT("TTOnly"), FALSE)); 02685 02686 /* 02687 * Mouse tracking variables 02688 */ 02689 gcxMouseHover = FastGetProfileIntFromID(pProfileUserName,PMAP_MOUSE, STR_MOUSEHOVERWIDTH, SYSMET(CXDOUBLECLK)); 02690 gcyMouseHover = FastGetProfileIntFromID(pProfileUserName,PMAP_MOUSE, STR_MOUSEHOVERHEIGHT, SYSMET(CYDOUBLECLK)); 02691 gdtMouseHover = FastGetProfileIntFromID(pProfileUserName,PMAP_MOUSE, STR_MOUSEHOVERTIME, gdtMNDropDown); 02692 02693 /* 02694 * Window animation 02695 */ 02696 SET_OR_CLEAR_PUDF(PUDF_ANIMATE, 02697 FastGetProfileIntFromID(pProfileUserName,PMAP_METRICS, STR_MINANIMATE, TRUE)); 02698 02699 /* 02700 * Initial Keyboard state: ScrollLock, NumLock and CapsLock state; 02701 * global (per-user) kbd layout attributes (such as ShiftLock/CapsLock) 02702 */ 02703 UpdatePerUserKeyboardIndicators(pProfileUserName); 02704 02705 gdwKeyboardAttributes = KLL_GLOBAL_ATTR_FROM_KLF(FastGetProfileDwordW(pProfileUserName,PMAP_UKBDLAYOUT, L"Attributes", 0)); 02706 02707 xxxUpdatePerUserAccessPackSettings(pProfileUserName); 02708 02709 /* 02710 * If we successfully opened this, we assume we have a network. 02711 */ 02712 if (hKey = OpenCacheKeyEx(NULL, PMAP_NETWORK, KEY_READ, NULL)) { 02713 RIPMSG0(RIP_WARNING | RIP_NONAME, ""); 02714 SYSMET(NETWORK) = RNC_NETWORKS; 02715 02716 ZwClose(hKey); 02717 } 02718 02719 SYSMET(NETWORK) |= RNC_LOGON; 02720 02721 /* 02722 * Font smoothing 02723 */ 02724 UserAssert ((dwFontSmoothing == 0) || (dwFontSmoothing == FE_AA_ON)); 02725 GreSetFontEnumeration( dwFontSmoothing | FE_SET_AA ); 02726 02727 /* 02728 * Desktop Build Number Painting 02729 */ 02730 if (USER_SHARED_DATA->SystemExpirationDate.QuadPart || gfUnsignedDrivers) { 02731 gdwCanPaintDesktop = 1; 02732 } else { 02733 gdwCanPaintDesktop = FastGetProfileDwordW(pProfileUserName, PMAP_DESKTOP, L"PaintDesktopVersion", 0); 02734 } 02735 02736 FreeProfileUserName(pProfileUserName, &tlName); 02737 return TRUE; 02738 }

VOID xxxUpdateSystemCursorsFromRegistry PUNICODE_STRING  pProfileUserName  ) 
 

Definition at line 1685 of file w32/ntuser/kernel/init.c.

References FALSE, FastGetProfileStringFromIDW(), gasyscur, MAX_PATH, PMAP_CURSORS, RtlInitUnicodeString(), RtlInitUnicodeStringOrId(), UINT, VOID(), xxxClientLoadImage(), and zzzSetSystemImage().

Referenced by xxxSystemParametersInfo(), and xxxUpdatePerUserSystemParameters().

01686 { 01687 int i; 01688 UNICODE_STRING strName; 01689 TCHAR szFilename[MAX_PATH]; 01690 PCURSOR pCursor; 01691 UINT LR_flags; 01692 01693 for (i = 0; i < COCR_CONFIGURABLE; i++) { 01694 01695 FastGetProfileStringFromIDW(pProfileUserName, 01696 PMAP_CURSORS, 01697 gasyscur[i].StrId, 01698 TEXT(""), 01699 szFilename, 01700 sizeof(szFilename) / sizeof(TCHAR)); 01701 01702 if (*szFilename) { 01703 RtlInitUnicodeString(&strName, szFilename); 01704 LR_flags = LR_LOADFROMFILE | LR_ENVSUBST; 01705 } else { 01706 RtlInitUnicodeStringOrId(&strName, 01707 MAKEINTRESOURCE(i + OCR_FIRST_DEFAULT)); 01708 LR_flags = LR_ENVSUBST; 01709 } 01710 01711 pCursor = xxxClientLoadImage(&strName, 01712 0, 01713 IMAGE_CURSOR, 01714 0, 01715 0, 01716 LR_flags, 01717 FALSE); 01718 01719 if (pCursor) { 01720 zzzSetSystemImage(pCursor, gasyscur[i].spcur); 01721 } else { 01722 RIPMSG1(RIP_WARNING, "Unable to update cursor. id=%x.", i + OCR_FIRST_DEFAULT); 01723 01724 } 01725 } 01726 }

VOID xxxUpdateSystemIconsFromRegistry PUNICODE_STRING  pProfileUserName  ) 
 

Definition at line 1735 of file w32/ntuser/kernel/init.c.

References FALSE, FastGetProfileStringFromIDW(), gasysico, gpsi, HtoP, IS_PTR, MAX_PATH, NULL, PMAP_ICONS, PtoH, RtlInitUnicodeString(), RtlInitUnicodeStringOrId(), SYSMET, UINT, VOID(), xxxClientLoadImage(), and zzzSetSystemImage().

Referenced by xxxSystemParametersInfo().

01736 { 01737 int i; 01738 UNICODE_STRING strName; 01739 TCHAR szFilename[MAX_PATH]; 01740 PCURSOR pCursor; 01741 UINT LR_flags; 01742 01743 for (i = 0; i < COIC_CONFIGURABLE; i++) { 01744 01745 FastGetProfileStringFromIDW(pProfileUserName, 01746 PMAP_ICONS, 01747 gasysico[i].StrId, 01748 TEXT(""), 01749 szFilename, 01750 sizeof(szFilename) / sizeof(TCHAR)); 01751 01752 if (*szFilename) { 01753 RtlInitUnicodeString(&strName, szFilename); 01754 LR_flags = LR_LOADFROMFILE | LR_ENVSUBST; 01755 } else { 01756 RtlInitUnicodeStringOrId(&strName, 01757 MAKEINTRESOURCE(i + OIC_FIRST_DEFAULT)); 01758 LR_flags = LR_ENVSUBST; 01759 } 01760 01761 pCursor = xxxClientLoadImage(&strName, 01762 0, 01763 IMAGE_ICON, 01764 0, 01765 0, 01766 LR_flags, 01767 FALSE); 01768 01769 RIPMSG3(RIP_VERBOSE, 01770 (!IS_PTR(strName.Buffer)) ? 01771 "%#.8lx = Loaded id %ld" : 01772 "%#.8lx = Loaded file %ws for id %ld", 01773 PtoH(pCursor), 01774 strName.Buffer, 01775 i + OIC_FIRST_DEFAULT); 01776 01777 if (pCursor) { 01778 zzzSetSystemImage(pCursor, gasysico[i].spcur); 01779 } else { 01780 RIPMSG1(RIP_WARNING, "Unable to update icon. id=%ld", i + OIC_FIRST_DEFAULT); 01781 } 01782 01783 /* 01784 * update the small winlogo icon which is referenced by gpsi. 01785 * Seems like we should load the small version for all configurable 01786 * icons anyway. What is needed is for CopyImage to support 01787 * copying of images loaded from files with LR_COPYFROMRESOURCE 01788 * allowing a reaload of the bits. (SAS) 01789 */ 01790 if (i == OIC_WINLOGO_DEFAULT - OIC_FIRST_DEFAULT) { 01791 01792 PCURSOR pCurSys = HtoP(gpsi->hIconSmWindows); 01793 01794 if (pCurSys != NULL) { 01795 pCursor = xxxClientLoadImage(&strName, 01796 0, 01797 IMAGE_ICON, 01798 SYSMET(CXSMICON), 01799 SYSMET(CYSMICON), 01800 LR_flags, 01801 FALSE); 01802 01803 if (pCursor) { 01804 zzzSetSystemImage(pCursor, pCurSys); 01805 } else { 01806 RIPMSG0(RIP_WARNING, "Unable to update small winlogo icon."); 01807 } 01808 } 01809 } 01810 } 01811 }


Variable Documentation

PVOID* apObjects
 

Definition at line 26 of file w32/ntuser/kernel/init.c.

Referenced by RawInputThread(), Win32kNtUserCleanup(), and xxxMsgWaitForMultipleObjects().

BOOL bPermanentFontsLoaded = FALSE
 

Definition at line 56 of file w32/ntuser/kernel/init.c.

Referenced by bEnumerateRegistryFonts(), and xxxLW_LoadFonts().

WCHAR* glpSetupPrograms
 

Definition at line 32 of file w32/ntuser/kernel/init.c.

Referenced by CreateSetupNameArray(), and Win32kNtUserCleanup().

UNICODE_STRING* gpastrSetupExe
 

Definition at line 31 of file w32/ntuser/kernel/init.c.

Referenced by CreateSetupNameArray(), SetAppImeCompatFlags(), and Win32kNtUserCleanup().

PHANDLEPAGE gpHandlePages
 

Definition at line 34 of file w32/ntuser/kernel/init.c.

Referenced by HMAllocObject(), HMFreeObject(), HMGrowHandleTable(), HMInitHandleTable(), and Win32KDriverUnload().

PKTIMER gptmrWD
 

Definition at line 29 of file w32/ntuser/kernel/init.c.

Referenced by RawInputThread(), and Win32kNtUserCleanup().

PFAST_MUTEX gpW32FastMutex
 

Definition at line 66 of file w32/ntuser/kernel/init.c.

Referenced by Win32KDriverUnload().

PKWAIT_BLOCK gWaitBlockArray
 

Definition at line 27 of file w32/ntuser/kernel/init.c.

Referenced by RawInputThread(), and Win32kNtUserCleanup().

int LastFontLoaded = -1
 

Definition at line 57 of file w32/ntuser/kernel/init.c.

Referenced by bEnumerateRegistryFonts().

PBWL pbwlCache
 

Definition at line 36 of file w32/ntuser/kernel/init.c.

Referenced by BuildHwndList(), FreeHwndList(), and Win32kNtUserCleanup().

PPAGED_LOOKASIDE_LIST QEntryLookaside
 

Definition at line 92 of file w32/ntuser/kernel/init.c.

Referenced by AllocQEntry(), DelQEntry(), FreeQEntry(), InitQEntryLookaside(), and Win32kNtUserCleanup().

PPAGED_LOOKASIDE_LIST SMSLookaside
 

Definition at line 91 of file w32/ntuser/kernel/init.c.

Referenced by AllocSMS(), FreeSMS(), InitSMSLookaside(), and Win32kNtUserCleanup().

PVOID UserAtomTableHandle
 

Definition at line 28 of file w32/ntuser/kernel/init.c.

Referenced by UserAddAtom(), UserDeleteAtom(), UserFindAtom(), UserGetAtomName(), UserRtlCreateAtomTable(), and Win32kNtUserCleanup().

ULONG W32ProcessSize = sizeof(PROCESSINFO)
 

Definition at line 62 of file w32/ntuser/kernel/init.c.

ULONG W32ProcessTag = TAG_PROCESSINFO
 

Definition at line 63 of file w32/ntuser/kernel/init.c.

ULONG W32ThreadSize = sizeof(THREADINFO)
 

Definition at line 64 of file w32/ntuser/kernel/init.c.

ULONG W32ThreadTag = TAG_THREADINFO
 

Definition at line 65 of file w32/ntuser/kernel/init.c.


Generated on Sat May 15 19:44:11 2004 for test by doxygen 1.3.7