Beispiel #1
0
void VBoxSeamlessInstallHook()
{
    if (gCtx.pfnVBoxHookInstallWindowTracker)
    {
        /* Check current visible region state */
        VBoxSeamlessCheckWindows();

        gCtx.pfnVBoxHookInstallWindowTracker(gCtx.hModule);
    }
}
Beispiel #2
0
void VBoxSeamlessRemoveHook()
{
    if (gCtx.pfnVBoxHookRemoveWindowTracker)
        gCtx.pfnVBoxHookRemoveWindowTracker();

    if (gCtx.lpEscapeData)
    {
        free(gCtx.lpEscapeData);
        gCtx.lpEscapeData = NULL;
    }
}
Beispiel #3
0
static void VBoxSeamlessInstallHook()
{
    if (gCtx.pfnVBoxHookInstallWindowTracker)
    {
        /* Check current visible region state */
        VBoxSeamlessCheckWindows(true);

        HMODULE hMod = (HMODULE)RTLdrGetNativeHandle(gCtx.hModHook);
        Assert(hMod != (HMODULE)~(uintptr_t)0);
        gCtx.pfnVBoxHookInstallWindowTracker(hMod);
    }
}
Beispiel #4
0
void VBoxSeamlessDestroy(const VBOXSERVICEENV *pEnv, void *pInstance)
{
    Log(("VBoxTray: VBoxSeamlessDestroy\n"));

    VBoxSeamlessSetSupported(FALSE);

    /* Inform the host that we no longer support the seamless window mode. */
    if (gCtx.pfnVBoxHookRemoveWindowTracker)
        gCtx.pfnVBoxHookRemoveWindowTracker();
    if (gCtx.hModule)
        FreeLibrary(gCtx.hModule);
    gCtx.hModule = 0;
    return;
}
Beispiel #5
0
void VBoxSeamlessDestroy(const VBOXSERVICEENV *pEnv, void *pInstance)
{
    Log(("VBoxTray: VBoxSeamlessDestroy\n"));

    VBoxSeamlessSetSupported(FALSE);

    /* Inform the host that we no longer support the seamless window mode. */
    if (gCtx.pfnVBoxHookRemoveWindowTracker)
        gCtx.pfnVBoxHookRemoveWindowTracker();
    if (gCtx.hModHook != NIL_RTLDRMOD)
    {
        RTLdrClose(gCtx.hModHook);
        gCtx.hModHook = NIL_RTLDRMOD;
    }
    return;
}