sg

Perşembe, Aralık 22, 2005

[Google-Desktop-Developer] Re: Plugin installer: closing sidebar or shutting down the GDS

Cat and poz

    I just forgot that I had a similar problem with building under VS, but in the project post-build section I added regsvr32 /u {dll} and never had this problem anymore...

Thanks

On 12/21/05, poz <satishkumr@hotmail.com> wrote:

Try building the sample c++ project that comes with the SDk and see if
that also has the same issue (unable to build after unregistering). If
not, it means that the sidebar properly unloads unregistered DLLs but
in your case the DLL is having refcount problems.


Cat wrote:
> I've been running into a similar problem. I unregister the plugin using
> regsvr32 /u, and the panel disappears from the Sidebar, but the DLL is
> still used by the GoogleDesktopDisplay process. As as result, linking
> my project fails. I'm unsure whether this is a DLL reference count
> problem in my DLL or if it is indeed a bug in GD.
>
> The way I force GD to release my DLL is to change the display state of
> GD to "None" (right-click on tray icon, select None) and then change it
> back to Sidebar. Here's some code that works on my machine:
>
>       HWND hGDMon = FindWindow(_T("_GD_Mon"), NULL);
>       if(hGDMon) {
>               SendMessage(hGDMon, WM_COMMAND, 8470 /* None */, 0);
>               Sleep(5000);
>               SendMessage(hGDMon, WM_COMMAND, 8467 /* Sidebar */, 0);
>       }
>
> I can see at least two bugs of this method: you don't know what the
> initial state of the GD was (i.e., the user could have set it to
> Deskbar, and you're resetting it to Sidebar); also, it's
> version-dependent (even though these parameters don't look like they
> will change any time soon, they are undocumented internals on which
> Google makes no guarantee). But hey, it works.
>
> Note: For the curious, these "magic" command IDs are actually the IDs
> of the corresponding localized string resources in
> GoogleDesktopResources_XX.dll (where XX is your language code).
>
> -cat


0 Comments:

Yorum Gönder

<< Home


Komik Videolar   islam  şarkı sözleri  yemek tarifleri  gelibolu  huzur   sağlık