Subversion Repositories filter_foundry

Rev

Rev 192 | Rev 206 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 192 Rev 194
Line 25... Line 25...
25
        f_ActivateActCtx fActivateActCtx;
25
        f_ActivateActCtx fActivateActCtx;
26
        f_CreateActCtxA fCreateActCtxA;
26
        f_CreateActCtxA fCreateActCtxA;
27
 
27
 
28
        if (!(vars->hKernel32 = LoadLibraryA("KERNEL32.DLL"))) return FALSE;
28
        if (!(vars->hKernel32 = LoadLibraryA("KERNEL32.DLL"))) return FALSE;
29
 
29
 
30
        if (!(fActivateActCtx = (f_ActivateActCtx)GetProcAddress(vars->hKernel32, "ActivateActCtx"))) { FreeLibrary(vars->hKernel32); return FALSE; }
30
        if (!(fActivateActCtx = (f_ActivateActCtx)(void*)GetProcAddress(vars->hKernel32, "ActivateActCtx"))) { FreeLibrary(vars->hKernel32); return FALSE; }
31
        if (!(fCreateActCtxA = (f_CreateActCtxA)GetProcAddress(vars->hKernel32, "CreateActCtxA"))) { FreeLibrary(vars->hKernel32); return FALSE; }
31
        if (!(fCreateActCtxA = (f_CreateActCtxA)(void*)GetProcAddress(vars->hKernel32, "CreateActCtxA"))) { FreeLibrary(vars->hKernel32); return FALSE; }
32
 
32
 
33
        ZeroMemory(&vars->actCtx, sizeof(vars->actCtx));
33
        ZeroMemory(&vars->actCtx, sizeof(vars->actCtx));
34
        vars->actCtx.cbSize = sizeof(vars->actCtx);
34
        vars->actCtx.cbSize = sizeof(vars->actCtx);
35
        vars->actCtx.hModule = hModule;
35
        vars->actCtx.hModule = hModule;
36
        vars->actCtx.lpResourceName = MAKEINTRESOURCEA(manifestResourceID);
36
        vars->actCtx.lpResourceName = MAKEINTRESOURCEA(manifestResourceID);
Line 46... Line 46...
46
 
46
 
47
BOOL DeactivateManifest(PManifestActivationCtx vars) {
47
BOOL DeactivateManifest(PManifestActivationCtx vars) {
48
        f_DeactivateActCtx fDeactivateActCtx;
48
        f_DeactivateActCtx fDeactivateActCtx;
49
        f_ReleaseActCtx fReleaseActCtx;
49
        f_ReleaseActCtx fReleaseActCtx;
50
 
50
 
51
        if (!(fDeactivateActCtx = (f_DeactivateActCtx)GetProcAddress(vars->hKernel32, "DeactivateActCtx"))) return FALSE;
51
        if (!(fDeactivateActCtx = (f_DeactivateActCtx)(void*)GetProcAddress(vars->hKernel32, "DeactivateActCtx"))) return FALSE;
52
        if (!(fReleaseActCtx = (f_ReleaseActCtx)GetProcAddress(vars->hKernel32, "ReleaseActCtx"))) return FALSE;
52
        if (!(fReleaseActCtx = (f_ReleaseActCtx)(void*)GetProcAddress(vars->hKernel32, "ReleaseActCtx"))) return FALSE;
53
 
53
 
54
        fDeactivateActCtx(0, vars->cookie);
54
        fDeactivateActCtx(0, vars->cookie);
55
        fReleaseActCtx(vars->hActCtx);
55
        fReleaseActCtx(vars->hActCtx);
56
 
56
 
57
        FreeLibrary(vars->hKernel32);
57
        FreeLibrary(vars->hKernel32);