VirtualBox

Ignore:
Timestamp:
Jun 17, 2013 2:32:51 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
86471
Message:

updates

Location:
trunk/src/VBox/Additions/WINNT/VBoxMMR
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxMMR/dllmain.cpp

    r44864 r46593  
    4545            if (isWMP)
    4646            {
    47                 RTR3InitDll(0);
     47                RTR3InitDll(RTR3INIT_FLAGS_UNOBTRUSIVE);
    4848                VbglR3Init();
    4949                VBoxMMRHookLog("VBoxMMR: Hooking wmplayer process\n");
  • trunk/src/VBox/Additions/WINNT/VBoxMMR/tsmfhook.cpp

    r44864 r46593  
    13431343}
    13441344
    1345 void InstallHooksForModule(const char *pszName, HookEntry hooks[])
    1346 {
    1347     HMODULE hMod = LoadLibraryA(pszName);
    1348     if (hMod != NULL)
    1349     {
    1350         VBoxMMRHookLog("VBoxMMR: Hooking %s -> %x \n", pszName, hMod);
    1351         const IMAGE_IMPORT_DESCRIPTOR *pDescriptor = GetImportDescriptor(hMod);
    1352         InstallHooks(pDescriptor, (PBYTE) hMod, hooks);
     1345void InstallHooksForSystemModule(const char *pszName, HookEntry hooks[])
     1346{
     1347    /* Construct the full path to the given module and load it. */
     1348    char   szPath[MAX_PATH];
     1349    UINT   cchPath = GetSystemDirectoryA(szPath, MAX_PATH);
     1350    size_t cbName  = strlen(pszName) + 1;
     1351    if (cchPath + 1 + cbName <= sizeof(szPath))
     1352    {
     1353        szPath[cchPath] = '\\';
     1354        memcpy(&szPath[cchPath + 1], pszName, cbName);
     1355
     1356        HMODULE hMod = LoadLibraryA(szPath);
     1357        if (hMod != NULL)
     1358        {
     1359            VBoxMMRHookLog("VBoxMMR: Hooking %s -> %x \n", pszName, hMod);
     1360            const IMAGE_IMPORT_DESCRIPTOR *pDescriptor = GetImportDescriptor(hMod);
     1361            InstallHooks(pDescriptor, (PBYTE) hMod, hooks);
     1362        }
     1363        else
     1364            VBoxMMRHookLog("VBoxMMR: Error hooking %s -> not found (last error %u)\n", pszName, GetLastError());
    13531365    }
    13541366    else
    1355     {
    13561367        VBoxMMRHookLog("VBoxMMR: Error hooking %s -> not found\n", pszName);
    1357     }
    13581368}
    13591369
     
    13821392        }
    13831393
    1384         InstallHooksForModule("winmm.dll", g_WinMMHooks);
    1385         InstallHooksForModule("tsmf.dll", g_TSMFHooks);
    1386         InstallHooksForModule("DSHOWRDPFILTER.dll", g_TSMFHooks);
    1387         InstallHooksForModule("MSMPEG2VDEC.dll", g_DShowHooks);
    1388         InstallHooksForModule("MFDS.dll", g_DShowHooks);
    1389         InstallHooksForModule("mf.dll", g_MFHooks);
     1394        InstallHooksForSystemModule("winmm.dll", g_WinMMHooks);
     1395        InstallHooksForSystemModule("tsmf.dll", g_TSMFHooks);
     1396        InstallHooksForSystemModule("DSHOWRDPFILTER.dll", g_TSMFHooks);
     1397        InstallHooksForSystemModule("MSMPEG2VDEC.dll", g_DShowHooks);
     1398        InstallHooksForSystemModule("MFDS.dll", g_DShowHooks);
     1399        InstallHooksForSystemModule("mf.dll", g_MFHooks);
    13901400
    13911401        ULONG ret = RegisterTraceGuids(
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette