Skip to main content

Topic: Legality (Read 1700 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.

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:

Code: [Select]
//! 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.
  • Last Edit: 16 April, 2011, 09:50:21 PM by superfun_awesome

  • Zao
  • [*][*][*][*][*]
  • Developer (Donating)
Reply #1
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.

  • mudlord
  • [*][*][*][*][*]
  • Developer (Donating)
Reply #2
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.