core_api Namespace Reference


Functions

 PFC_DECLARE_EXCEPTION (exception_wrong_thread, pfc::exception_bug_check,"This method can be called only from the main thread")
 Exception thrown by APIs locked to main app thread when called from another thread.
HINSTANCE get_my_instance ()
 Retrieves HINSTANCE of calling DLL.
const char * get_my_file_name ()
 Retrieves filename of calling dll, excluding extension, e.g. "foo_asdf".
const char * get_my_full_path ()
 Retrieves full path of calling dll, e.g. file://c:.dll.
HWND get_main_window ()
 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.
bool are_services_available ()
 Tests whether services are available at this time. They are not available only during DLL startup or shutdown (e.g. inside static object constructors or destructors).
bool assert_main_thread ()
 Tests whether calling thread is main app thread, and shows diagnostic message in debugger output if it's not.
void ensure_main_thread ()
 Throws exception_wrong_thread if calling thread is not main app thread.
bool is_main_thread ()
 Returns true if calling thread is main app thread, false otherwise.
bool is_shutting_down ()
 Returns whether the app is currently shutting down.
bool is_initializing ()
 Returns whether the app is currently initializing.
const char * get_profile_path ()
 Returns filesystem path to directory with user settings, e.g. file://c:.


Function Documentation

bool core_api::are_services_available (  ) 

Tests whether services are available at this time. They are not available only during DLL startup or shutdown (e.g. inside static object constructors or destructors).

bool core_api::assert_main_thread (  ) 

Tests whether calling thread is main app thread, and shows diagnostic message in debugger output if it's not.

void core_api::ensure_main_thread (  ) 

Throws exception_wrong_thread if calling thread is not main app thread.

HWND core_api::get_main_window (  ) 

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.

const char* core_api::get_my_file_name (  ) 

Retrieves filename of calling dll, excluding extension, e.g. "foo_asdf".

const char* core_api::get_my_full_path (  ) 

Retrieves full path of calling dll, e.g. file://c:.dll.

HINSTANCE core_api::get_my_instance (  ) 

Retrieves HINSTANCE of calling DLL.

const char* core_api::get_profile_path (  ) 

Returns filesystem path to directory with user settings, e.g. file://c:.

bool core_api::is_initializing (  ) 

Returns whether the app is currently initializing.

bool core_api::is_main_thread (  ) 

Returns true if calling thread is main app thread, false otherwise.

bool core_api::is_shutting_down (  ) 

Returns whether the app is currently shutting down.

core_api::PFC_DECLARE_EXCEPTION ( exception_wrong_thread  ,
pfc::exception_bug_check  ,
"This method can be called only from the main thread"   
)

Exception thrown by APIs locked to main app thread when called from another thread.


Generated on Fri Apr 18 13:56:58 2008 for foobar2000 SDK by  doxygen 1.5.5