ZenWINX Logo ZenWINX

Architecture - Reference Manual - Guides

Startup and Shutdown

Functions

int __stdcall kb_open (void)
 Opens all existing keyboards.
void __stdcall kb_close (void)
 Closes all opened keyboards.
void winx_init_synch_objects (void)
 Initializes the synchronization objects used in the debugging routines.
void winx_destroy_synch_objects (void)
 Destroys the synchronization objects used in the debugging routines.
void __stdcall zenwinx_native_init (void)
 Initializes the library.
void __stdcall zenwinx_native_unload (void)
 Frees library resources.
int __stdcall winx_init (void *peb)
 Initializes the native application.
void __stdcall winx_exit (int exit_code)
 Terminates the calling native process.
void __stdcall winx_reboot (void)
 Reboots the computer.
void __stdcall winx_shutdown (void)
 Shuts down the computer.

Function Documentation

int __stdcall kb_open ( void   ) 

Opens all existing keyboards.

If checking of first keyboard fails wait ten seconds for the initialization. This is needed for wireless devices.

Returns:
Zero for success, negative value otherwise.
Note:
Internal use only.

Definition at line 57 of file keyboard.c.

References kb_open_internal(), winx_printf(), and winx_sleep().

Referenced by winx_init().

void __stdcall kb_close ( void   ) 

Closes all opened keyboards.

Note:
Internal use only.

Definition at line 92 of file keyboard.c.

Referenced by winx_exit(), winx_reboot(), and winx_shutdown().

void winx_init_synch_objects ( void   ) 

Initializes the synchronization objects used in the debugging routines.

Note:
Internal use only.

Definition at line 46 of file dbg.c.

References winx_create_event().

Referenced by zenwinx_native_init().

void winx_destroy_synch_objects ( void   ) 

Destroys the synchronization objects used in the debugging routines.

Note:
Internal use only.

Definition at line 70 of file dbg.c.

References winx_destroy_event().

Referenced by zenwinx_native_unload().

void __stdcall zenwinx_native_init ( void   ) 

Initializes the library.

Note:
Designed especially to replace DllMain functionality in case of monolithic native application.

Definition at line 57 of file zenwinx.c.

References winx_init_synch_objects().

void __stdcall zenwinx_native_unload ( void   ) 

Frees library resources.

Note:
Designed especially to replace DllMain functionality in case of monolithic native application.

Definition at line 68 of file zenwinx.c.

References winx_destroy_synch_objects().

int __stdcall winx_init ( void *  peb  ) 

Initializes the native application.

This routine prepares keyboards for working with user input related procedures.

Parameters:
[in] peb the Process Environment Block pointer.
Returns:
Zero for success, negative value otherwise.
Example:
 // native entry point
 void __stdcall NtProcessStartup(PPEB Peb)
 {
     winx_init(Peb);
     // your program code here
     // ...
     winx_exit(0); // successful exit
 }

Definition at line 92 of file zenwinx.c.

References kb_open().

void __stdcall winx_exit ( int  exit_code  ) 

Terminates the calling native process.

This routine releases all resources used by zenwinx library before the process termination.

Parameters:
[in] exit_code the exit status.

Definition at line 112 of file zenwinx.c.

References kb_close().

Referenced by kb_read_internal().

void __stdcall winx_reboot ( void   ) 

Reboots the computer.

Note:
If SE_SHUTDOWN privilege adjusting fails then the computer will not be rebooted and the program will continue the execution after this call.

Definition at line 128 of file zenwinx.c.

References kb_close(), and winx_enable_privilege().

void __stdcall winx_shutdown ( void   ) 

Shuts down the computer.

Note:
If SE_SHUTDOWN privilege adjusting fails then the computer will not be shut down and the program will continue the execution after this call.

Definition at line 145 of file zenwinx.c.

References kb_close(), and winx_enable_privilege().


Generated on Sat May 29 23:06:45 2010 for ZenWINX by doxygen 1.6.2