Aqua-Soft Forums: Object Dock Sdk - Aqua-Soft Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Object Dock Sdk Rate Topic: -----

#1 User is offline   BOBAH13 Icon

  • Group: Developers
  • Posts: 465
  • Joined: 06-September 08

Posted 29 May 2009 - 04:55 AM

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.
0

#2 User is offline   Smaky Icon

  • Group: Member
  • Posts: 586
  • Joined: 19-April 08

Posted 29 May 2009 - 02:48 PM

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.
0

#3 User is offline   Ghostwalker Icon

  • Group: Member
  • Posts: 1,990
  • Joined: 05-March 03

Posted 29 May 2009 - 03:09 PM

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.
0

#4 User is offline   BOBAH13 Icon

  • Group: Developers
  • Posts: 465
  • Joined: 06-September 08

Posted 29 May 2009 - 04:50 PM

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.
0

#5 User is offline   Smaky Icon

  • Group: Member
  • Posts: 586
  • Joined: 19-April 08

Posted 29 May 2009 - 07:11 PM

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.
0

#6 User is offline   BOBAH13 Icon

  • Group: Developers
  • Posts: 465
  • Joined: 06-September 08

Posted 30 May 2009 - 04:20 AM

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.
0

#7 User is offline   Smaky Icon

  • Group: Member
  • Posts: 586
  • Joined: 19-April 08

Posted 30 May 2009 - 05:56 AM

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?

This post has been edited by Smaky: 31 May 2009 - 03:31 AM

0

#8 User is offline   BOBAH13 Icon

  • Group: Developers
  • Posts: 465
  • Joined: 06-September 08

Posted 31 May 2009 - 02:41 PM

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 ?
0

#9 User is offline   Smaky Icon

  • Group: Member
  • Posts: 586
  • Joined: 19-April 08

Posted 01 June 2009 - 03:35 PM

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.

This post has been edited by Smaky: 01 June 2009 - 06:10 PM

0

#10 User is offline   BOBAH13 Icon

  • Group: Developers
  • Posts: 465
  • Joined: 06-September 08

Posted 01 June 2009 - 03:42 PM

I'm not sure that is docklet data structure :) but try to test with differents wparam.
0

#11 User is offline   Smaky Icon

  • Group: Member
  • Posts: 586
  • Joined: 19-April 08

Posted 01 June 2009 - 06:17 PM

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.

This post has been edited by Smaky: 01 June 2009 - 06:59 PM

0

#12 User is offline   matonga Icon

  • Group: Developers
  • Posts: 1,286
  • Joined: 04-September 06

Posted 04 June 2009 - 09:05 PM

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.
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic