BOBAH13 Posted May 29, 2009 Report Share Posted May 29, 2009 Hello guys.I found this SDK on the official web site.But when I open ObjectDock.exe in IDA Pro, I can see 2 functions which weren't included in the SDK. Here it's:DockletDoClickAnimation & DockletRemoveSelf.Does anybody know there descriptions ? I mean arguments (type of data) and result of each function.Thanks. Vlad. Link to comment
Smaky Posted May 29, 2009 Report Share Posted May 29, 2009 Well once I experimented with DockletRemoveSelf... I believed that it should remove the docklet from the dock... as many of the OD provided docklet do... but when I tried it the docklet crashed. To be fair I did not expend much time on this. Link to comment
Ghostwalker Posted May 29, 2009 Report Share Posted May 29, 2009 I don't program windows applications but my guess for DockletDoClickAnimation would be to get it to do what the weather docklet does on click. Seems they may not want to share this info so that their docklets are the only ones with these attributes. Link to comment
BOBAH13 Posted May 29, 2009 Author Report Share Posted May 29, 2009 so, weather docklet of objectdock can work only at OD, even it doesn't at rocket dock (because rocketdock doesn't export these functions). any ideas ? it's strange, why they didn't include these two functions. Link to comment
Smaky Posted May 29, 2009 Report Share Posted May 29, 2009 Who knows... OD 1.90 was supposed to be an intermin version towards OD 2... which has been "under development" for almost two years. Whenever you ask about it's release they would say they are working on it... but no release date, no facts whatsoever. So I believe the SDK will change and maybe some of the "undocumented" functions will too. Link to comment
BOBAH13 Posted May 30, 2009 Author Report Share Posted May 30, 2009 then I will see it at IDA (arguments and asm-code, what is it, and for). If you are interseted in it, I will publish what I will get to know about it. Link to comment
Smaky Posted May 30, 2009 Report Share Posted May 30, 2009 (edited) Thanks bobah13... sure it might get handy.This is what I once added to the OD SKD while investingating on DockletRemoveSelfBOOL DockletRemoveSelf(HWND hwndDocklet){ typedef BOOL(__stdcall *DUMMY_TYPEDEF)(HWND hwndDocklet); DUMMY_TYPEDEF HostDockletRemoveSelf = (DUMMY_TYPEDEF) GetProcAddress(GetModuleHandle(NULL), "DockletRemoveSelf"); if(!HostDockletRemoveSelf) return FALSE; return HostDockletRemoveSelf(hwndDocklet);}as I already said, It just crashed the dock when I called it.Then... I added the following for DockletDoClickAnimation:void DockletDoClickAnimation(HWND hwndDocklet){ typedef void(__stdcall *DUMMY_TYPEDEF)(HWND hwndDocklet); DUMMY_TYPEDEF HostDockletDockletDoClickAnimation = (DUMMY_TYPEDEF) GetProcAddress(GetModuleHandle(NULL), "DockletDoClickAnimation"); if(!HostDockletDockletDoClickAnimation) return; HostDockletDockletDoClickAnimation(hwndDocklet);}And tested it out with one of my docklets... I found it resulted in the very same response to DockletDoAttentionAnimation... that is do the animation configured for the docklet, nothing else... did you find anything else? Edited May 31, 2009 by Smaky Link to comment
BOBAH13 Posted May 31, 2009 Author Report Share Posted May 31, 2009 I think hWnd - Docklet's handle (argument like other SDK functions)int __stdcall DockletRemoveSelf(HWND hWnd,WPARAM wParam)mov esi, [esp+hWnd]push esi ; hWnd&mov eax, [esp+wParam]push 0 ; lParampush eax ; wParampush 58Fh ; Msgpush esi ; hWndcall ds:PostMessageWSo, may be Docklet call this function and send its data (wParam) and its handle (hWnd). Then OD send message 0x58f to its handle to make OD destroy this dockletwhat do you think ? Link to comment
Smaky Posted June 1, 2009 Report Share Posted June 1, 2009 (edited) So, you've found that there is a second parameter which may be a pointer to the DOCKLET_DATA structure? Let me test it out.Edit. Well it did not work, passing a pointer to the DOCKLET_DATA structure to the WPARAM parameter still crashes the dock. I think it will be needed to understand what OD does with that parameter during processing of message 0x58f. I tried sending a BOOL and the docklet handle to it, but it still crashes.Ok, using IDA with a docklet I found the following code for the menu item which removes the docklet from the dock:mov edx, [edi]push 1push edxcall sub_3B23B20Which simply calls DockletRemoveSelf by getting a reference to the function using GetModuleHandle & GetProcAddress (as usual):sub_3B23B20 proc near arg_0= dword ptr 4arg_4= dword ptr 8push offset aDockletremoves ; "DockletRemoveSelf"push 0 ; lpModuleName (ObjectDock.exe)call ds:GetModuleHandleApush eax ; hModulecall ds:GetProcAddresstest eax, eaxjz short locret_3B23B44ecx, [esp+arg_4]edx, [esp+arg_0]push ecxpush edxcall eaxlocret_3B23B44: retnsub_3B23B20 endpSo it seems that is simply calls DockletRemoveSelf passing the handler & a "1" (boolean)... which it was something I have already tried... then it returns and the menu handling routine and ends (OnRightButtonClick). So it seems that ObjectDock asyncronously displays the confirmation dialog and deletes the docklet. But as I said, calling it by passing a BOOLEAN 1 did not work. Edited June 1, 2009 by Smaky Link to comment
BOBAH13 Posted June 1, 2009 Author Report Share Posted June 1, 2009 I'm not sure that is docklet data structure but try to test with differents wparam. Link to comment
Smaky Posted June 1, 2009 Report Share Posted June 1, 2009 (edited) No, I'm almost sure it is not... I believe it's a BOOLEAN. look my previous post.Edit: I made it work, the correct function definition should be:BOOL DockletRemoveSelf(HWND hwndDocklet, BOOL bConfirmDeletion){ typedef BOOL(__stdcall *DUMMY_TYPEDEF)(HWND hwndDocklet, BOOL bConfirmDeletion); DUMMY_TYPEDEF HostDockletRemoveSelf = (DUMMY_TYPEDEF) GetProcAddress(GetModuleHandle(NULL), "DockletRemoveSelf"); if(!HostDockletRemoveSelf) return FALSE; return HostDockletRemoveSelf(hwndDocklet, bConfirmDeletion);}The second BOOLEAN argument displays/hides the deletion confirmation dialog box. Edited June 1, 2009 by Smaky Link to comment
matonga Posted June 4, 2009 Report Share Posted June 4, 2009 If there is some way to programatically add docklet instances too, then that and DockletRemoveSelf is all it's needed to dinamically add tasks, drives, etc... to ObjectDock! It's a pitty the function is undocumented, though. Link to comment
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now