udefrag.dll Logo udefrag.dll

Architecture - Reference Manual - Guides

Driver

Functions

void udefrag_reload_settings (void)
 Reloads udefrag.dll specific options.
BOOL WINAPI DllMain (HANDLE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
 udefrag.dll entry point.
void __stdcall udefrag_monolithic_native_app_init (void)
 Initializes all libraries required for the native application.
void __stdcall udefrag_monolithic_native_app_unload (void)
 Frees resources of all libraries required for the native application.
int __stdcall udefrag_init (void)
 Initializes the UltraDefrag engine.
int __stdcall udefrag_unload (void)
 Unloads the UltraDefrag engine.
DWORD WINAPI engine_start (LPVOID p)
 Thread procedure delivering a disk defragmentation command to the driver.
int __stdcall udefrag_start (char *volume_name, UDEFRAG_JOB_TYPE job_type, int cluster_map_size, STATUPDATEPROC sproc)
 Delivers a disk defragmentation command to the driver in a separate thread.
int __stdcall udefrag_stop (void)
 Stops the running disk defragmentation job.
int __stdcall udefrag_get_progress (STATISTIC *pstat, double *percentage)
 Retrieves the progress information of the running disk defragmentation job.
int __stdcall udefrag_get_map (char *buffer, int size)
 Retrieves the cluster map of the currently processing volume.
char *__stdcall udefrag_get_default_formatted_results (STATISTIC *pstat)
 Retrieves the default formatted results of the completed disk defragmentation job.
char *__stdcall udefrag_get_error_description (int error_code)
 Retrieves a human readable error description for the error codes defined in udefrag.h header file.

Function Documentation

void udefrag_reload_settings ( void   ) 

Reloads udefrag.dll specific options.

Note:
Internal use only.

Definition at line 43 of file settings.c.

Referenced by udefrag_start().

void __stdcall udefrag_monolithic_native_app_init ( void   ) 

Initializes all libraries required for the native application.

Note:
Designed especially to replace DllMain functionality in case of monolithic native application. Call this routine in the beginning of NtProcessStartup() code.

Definition at line 71 of file udefrag.c.

void __stdcall udefrag_monolithic_native_app_unload ( void   ) 

Frees resources of all libraries required for the native application.

Note:
Designed especially to replace DllMain functionality in case of monolithic native application. Don't call it before winx_shutdown() and winx_reboot(), but call always before winx_exit().

Definition at line 85 of file udefrag.c.

int __stdcall udefrag_init ( void   ) 

Initializes the UltraDefrag engine.

Returns:
Zero for success, negative value otherwise.

Definition at line 95 of file udefrag.c.

int __stdcall udefrag_unload ( void   ) 

Unloads the UltraDefrag engine.

Returns:
Zero for success, negative value otherwise.

Definition at line 116 of file udefrag.c.

DWORD WINAPI engine_start ( LPVOID  p  ) 

Thread procedure delivering a disk defragmentation command to the driver.

Note:
  • Only a single command may be sent at the same time.
  • Internal use only.

Definition at line 129 of file udefrag.c.

Referenced by udefrag_start().

int __stdcall udefrag_start ( char *  volume_name,
UDEFRAG_JOB_TYPE  job_type,
int  cluster_map_size,
STATUPDATEPROC  sproc 
)

Delivers a disk defragmentation command to the driver in a separate thread.

Parameters:
[in] volume_name the name of the volume.
[in] job_type the type of the job.
[in] cluster_map_size the size of the cluster map, in bytes.
[in] sproc an address of the callback procedure to be called periodically during the running disk defragmentation job. This parameter may be NULL.
Returns:
Zero for success, negative value otherwise.

Definition at line 152 of file udefrag.c.

References engine_start(), udefrag_reload_settings(), and udefrag_stop().

int __stdcall udefrag_stop ( void   ) 

Stops the running disk defragmentation job.

Returns:
Zero for success, negative value otherwise.

Definition at line 208 of file udefrag.c.

Referenced by udefrag_start().

int __stdcall udefrag_get_progress ( STATISTIC *  pstat,
double *  percentage 
)

Retrieves the progress information of the running disk defragmentation job.

Parameters:
[out] pstat pointer to the STATISTIC structure.
[out] percentage pointer to the variable receiving progress percentage.
Returns:
Zero for success, negative value otherwise.

Definition at line 224 of file udefrag.c.

int __stdcall udefrag_get_map ( char *  buffer,
int  size 
)

Retrieves the cluster map of the currently processing volume.

Parameters:
[out] buffer pointer to the map buffer.
[in] size the buffer size, in bytes.
Returns:
Zero for success, negative value otherwise.

Definition at line 252 of file udefrag.c.

char* __stdcall udefrag_get_default_formatted_results ( STATISTIC *  pstat  ) 

Retrieves the default formatted results of the completed disk defragmentation job.

Parameters:
[in] pstat pointer to the STATISTIC structure, filled by udefrag_get_progress() call.
Returns:
A string containing default formatted results of the disk defragmentation job defined in passed structure.
Note:
This function may be useful for console and native applications.

Definition at line 273 of file udefrag.c.

char* __stdcall udefrag_get_error_description ( int  error_code  ) 

Retrieves a human readable error description for the error codes defined in udefrag.h header file.

Parameters:
[in] error_code the error code.
Returns:
A pointer to zero-terminated ANSI string containing detailed error description.

Definition at line 310 of file udefrag.c.


Generated on Sat May 29 23:06:44 2010 for udefrag.dll by doxygen 1.6.2