Welcome Guest ( Log In | Register )

> foobar2000 Development Forum Rules

This forum is for developer discussions only. If you have a problem / bug report / idea / feature request that isn't related to foobar2000 SDK, post it in an appropiate forum instead - tech support questions go to support forum, everything else goes to general forum.
All non-developer posts on this forum will be removed. Continued abuse of this forum will result in admin actions (warnings, account suspension).

Reply to this topicStart new topic
Legality, core_api wndproc hooking legality and why...
post Apr 17 2011, 02:49
Post #1

Group: Members
Posts: 1
Joined: 17-April 11
Member No.: 89865


Just starting out as a component developer. I was perusing the SDK for some function which I need to use, and I came across this little tidbit here:

//! Retrieves main app window. WARNING: this is provided for parent of dialog windows and such only;
using it for anything else (such as hooking windowproc to alter app behaviors) is absolutely illegal.
HWND get_main_window();

(core_api.h, line 12)

absolutely illegal eh?

Just wondering what the reason for that was, and what it violates in the terms of use.

Thank you.

This post has been edited by superfun_awesome: Apr 17 2011, 02:50
Go to the top of the page
+Quote Post
post Apr 17 2011, 02:59
Post #2

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

There is no legit reason to subclass the application window, and if you do, you violate a whole lot of invariants of the core and the UI component you're using (as you not necessarily are using Default UI).
If you have needs that require you to subclass the main window, and they cannot be satisfied through the public API, chances are that you should be writing an UI component in the first place, or stop doing ill things.
In the past, there has been components that have tried to augment the main window in improper ways, like hooking to have child windows that track the dimensions of the player window, intercepting messages they shouldn't, and generally causing great instability. The Win32 world is a very fragile place to live, and such components make the job of keeping foobar2000 stable impossible.

As for what it violates in the terms of use, it's about "don't use anything not in the public API".

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
post Apr 17 2011, 11:54
Post #3

Group: Developer (Donating)
Posts: 834
Joined: 1-December 07
Member No.: 49165

Oh yeh, if you ever dare to release a component which violates the SDK's license, expect to be banned for eternity from this forum until the issue is fixed.
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: 26th November 2015 - 15:27