Changeset 21595 for trunk/src


Ignore:
Timestamp:
Mar 23, 2011, 3:29:36 PM (14 years ago)
Author:
dmik
Message:

user32: Added internal helper RunOnAuxThread() API to perform function calls on a dedicated helper thread.

Location:
trunk/src/user32
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/Makefile

    r21348 r21595  
    118118$(OBJDIR)\dbgwrap.obj \
    119119!endif
    120 $(OBJDIR)\stats.obj
     120$(OBJDIR)\stats.obj \
     121$(OBJDIR)\auxthread.obj
    121122
    122123
  • trunk/src/user32/USER32.DEF

    r21553 r21595  
    760760    GetWindowInfo = _GetWindowInfo@8                             @2046
    761761    _HPSToHDC                                                    @2047
     762
     763    _RunOnAuxThread@20                                           @2048 NONAME
     764    _RunOnAuxThreadAndWait@24                                    @2049 NONAME
  • trunk/src/user32/inituser32.cpp

    r21303 r21595  
    5050#include "syscolor.h"
    5151#include "initterm.h"
     52#include "auxthread.h"
    5253#include <exitlist.h>
    5354#include <initdll.h>
     
    7778#define REGPATH "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts"
    7879//******************************************************************************
    79 void MigrateWindowsFonts()
     80static void MigrateWindowsFonts()
    8081{
    8182  HKEY  hkFonts,hkOS2Fonts;
     
    127128  }
    128129}
     130
     131static BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
     132{
     133    switch (fdwReason)
     134    {
     135        case DLL_PROCESS_ATTACH:
     136        case DLL_THREAD_ATTACH:
     137        case DLL_THREAD_DETACH:
     138            return TRUE;
     139        case DLL_PROCESS_DETACH:
     140        {
     141            StopAuxThread();
     142            return TRUE;
     143        }
     144        default:
     145            break;
     146    }
     147    return FALSE;
     148}
     149
    129150/****************************************************************************/
    130151/* _DLL_InitTerm is the function that gets called by the operating system   */
     
    150171      case 0 :
    151172         STATS_InitializeUSER32 ();
    152          
     173
    153174         ParseLogStatusUSER32();
    154175
     
    156177         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    157178
    158          hInstanceUser32 = RegisterLxDll(hModule, 0, (PVOID)&user32_PEResTab,
     179         hInstanceUser32 = RegisterLxDll(hModule, DllMain, (PVOID)&user32_PEResTab,
    159180                                         USER32_MAJORIMAGE_VERSION, USER32_MINORIMAGE_VERSION,
    160181                                         IMAGE_SUBSYSTEM_WINDOWS_GUI);
  • trunk/src/user32/user32dbg.def

    r21553 r21595  
    756756    GetWindowInfo = _GetWindowInfo@8                             @2046
    757757    _HPSToHDC                                                    @2047
     758
     759    _RunOnAuxThread@20                                           @2048 NONAME
     760    _RunOnAuxThreadAndWait@24                                    @2049 NONAME
Note: See TracChangeset for help on using the changeset viewer.