Jump to content

Object Dock Sdk


Recommended Posts

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 post

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 post

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 post

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 post

Thanks bobah13... sure it might get handy.

This is what I once added to the OD SKD while investingating on DockletRemoveSelf

BOOL 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 by Smaky
Link to post

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 ; lParam
push eax ; wParam
push 58Fh ; Msg
push esi ; hWnd
call ds:PostMessageW

So, 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 docklet

what do you think ?

Link to post

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 1
push edx
call sub_3B23B20

Which simply calls DockletRemoveSelf by getting a reference to the function using GetModuleHandle & GetProcAddress (as usual):

sub_3B23B20 proc near				   

arg_0= dword ptr 4
arg_4= dword ptr 8

push offset aDockletremoves ; "DockletRemoveSelf"
push 0 ; lpModuleName (ObjectDock.exe)
call ds:GetModuleHandleA
push eax ; hModule
call ds:GetProcAddress
test eax, eax
jz short locret_3B23B44
ecx, [esp+arg_4]
edx, [esp+arg_0]
push ecx
push edx
call eax

locret_3B23B44:
retn
sub_3B23B20 endp

So 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 by Smaky
Link to post

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 by Smaky
Link to post

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 post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...