IPB

Welcome Guest ( Log In | Register )

> foobar2000 Tech Support Forum Rules

Please read foobar2000 Tech Support Forum Rules before posting and comply with all the points.
Failure to provide all the information pointed out in the above document in your post is considered wasting other people's time and in extreme cases will lead to your topic getting locked without a reply.


See also: Hydrogenaudio Terms of Service.

 
Reply to this topicStart new topic
Incompatibility with Actual Window Manager, problem with foo_ui_std
Alex Belyakov
post Nov 19 2009, 06:15
Post #1





Group: Members
Posts: 3
Joined: 19-November 09
Member No.: 75081



Hi there,

I'm a developer in Actual Tools. Recently, one of our users reported a strange incompatibility with our Actual Window Manager and foobar2000. It seemed that foobar's main window removed a window subclass, which our hooking library set to provide additional functions.

I've made a small research in fb2k's internals, and it seems that one of functions in foo_ui_std.dll checks GWL_WNDPROC in the main window, and resets it to a default value whenever it changes. In foobar2000 version 0.9.6.9, the function address in foo_ui_std.dll is 1009b570. The corresponding C-like code would be as follows:
CODE
if (m_Wnd && m_WndProcStub && (GetWindowLong(m_Wnd, GWL_WNDPROC) != m_WndProcStub)) {
SetWindowLong(m_Wnd, GWL_WNDPROC, m_WndProcStub);
}
return 1;
If I NOP calling SetWindowLong out of the code, our subclass is not removed from the main window, and all the fb2k's features seem to work fine.
Could you please consider removing or redesigning this part of your UI library, to make those who use both foobar2000 and our products happy? smile.gif

Thank you in advance for considering this.
I can provide any additional technical info, if you need it.

This post has been edited by Alex Belyakov: Nov 19 2009, 06:16
Go to the top of the page
+Quote Post
Zao
post Nov 19 2009, 07:27
Post #2





Group: Members (Donating)
Posts: 910
Joined: 25-September 03
From: Umeň, Sweden
Member No.: 9001



As for redistributing a modified foo_ui_std.dll, I'm quoting the foobar2000 license:
QUOTE
Only unmodified installers can be redistributed; redistribution of foobar2000 binaries in any other form is not permitted.

As for the lovely window procedure protection code you've found, it's likely there to enforce the following clause in the SDK license:
QUOTE
It is illegal to use this SDK as a part of foobar2000 components that operate outside of legally documented programming interfaces (APIs), such as using window procedure hooks to modify user interface behaviors. We believe components doing so to be harmful to our userbase by introducing compatibility issues and dependencies on undocumented behaviors of our code that may change at any time without any notice or an update to the SDK which would reflect the change.


--------------------
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.
Go to the top of the page
+Quote Post
Alex Belyakov
post Nov 19 2009, 15:58
Post #3





Group: Members
Posts: 3
Joined: 19-November 09
Member No.: 75081



QUOTE (Zao @ Nov 19 2009, 07:27) *
As for redistributing a modified foo_ui_std.dll, I'm quoting the foobar2000 license:
QUOTE
Only unmodified installers can be redistributed; redistribution of foobar2000 binaries in any other form is not permitted.


I see.
But my post was not about redistribution, only about making foobar2000 and AWM compatible smile.gif

QUOTE (Zao @ Nov 19 2009, 07:27) *
As for the lovely window procedure protection code you've found, it's likely there to enforce the following clause in the SDK license:
QUOTE
It is illegal to use this SDK as a part of foobar2000 components that operate outside of legally documented programming interfaces (APIs), such as using window procedure hooks to modify user interface behaviors. We believe components doing so to be harmful to our userbase by introducing compatibility issues and dependencies on undocumented behaviors of our code that may change at any time without any notice or an update to the SDK which would reflect the change.


This restriction is about fb2k's components.
Why a 3rd party tool cannot use hooking? It has nothing to do with any undocumented features of foobar2000.
Go to the top of the page
+Quote Post
Zao
post Nov 19 2009, 16:24
Post #4





Group: Members (Donating)
Posts: 910
Joined: 25-September 03
From: Umeň, Sweden
Member No.: 9001



As for redistribution, you offered to provide a modified (bad) and old (even worse) foo_ui_std.dll to your customers.

As for the clause about window procedures, that was to provide a rationale and history for why foobar2000 protects its wndproc.
Before its introduction, there were a lot of crashes and general instability due to the window being subclassed.
As component authors and third party applications wouldn't stop messing with it, even with randomized window class names, the current anti-tamper functionality was introduced with great success.


--------------------
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.
Go to the top of the page
+Quote Post
Alex Belyakov
post Nov 19 2009, 17:48
Post #5





Group: Members
Posts: 3
Joined: 19-November 09
Member No.: 75081



Ok, I got your point.
I'll pass this to our customer.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 23rd October 2014 - 19:08