*************************************************** Plug-ins API for ATI Tray Tools v1.0 API Version 1.1 (c) 2004 Ray Adams All right reserved. *************************************************** ATI Tray Tools = ATT What you have for plug-ins? 1. Full access to low level driver 2. Working with ports, in/out 3. Map frame buffer from physical address space to linear 4. Reading and setting clocks In next release of API: New kind of plug-ins. Runtime plugins. All runtime plug-ins will be loaded with ATT and all of them, which will have PL_SUSP_RUN flag, will be loaded each time after restoring from suspend/sleep/hibernate modes. If you have your own plug-ins, please email me with information about it and if it will be useful for users, I will put it in installation package. --------------------------------------------------------- Non run-time plugins. These plugins only start when you select it from menu. All plug-ins must export two functions 1. get_plug_inf - return information about plug-in This function must fill structure TPlugInfo (look in header files for your programing laguage) 2. exec_plugin - return true if success. *** Get_Plug_Inf *** As parameter take structure TPlugInfo Delphi: TGet_Plug_Info=procedure (var Info:TPlugInfo);stdcall; type TPlugInfo=packed record Sign:array[0..3] of char;//std 4 chars to identofy itself as a ATT plugin Menu_Text:array[0..50] of char; // text for menu PuginType:byte; //type of plugin reserved must be PL_STD end; C++: typedef struct tagTPlugInfo { char Sign[3]; //std 4 chars to identofy itself as a ATT plug-in char Menu_Text[50] of char; // text for menu char PluginType; //type of plug-in reserved must be PL_STD } TPlugInfo, *PPlugInfo; typedef void (STDAPICALLTYPE* lppget_plug_info)(PPlugInfo Data); *** Exec_Plugin *** Delphi: TExec_Plugin=procedure(Win_Handle:integer;ATT_Proc:Pointer):stdcall; Win_Handle - handle of ATT main window ATT_Proc - pointer to main function to work with ATT C++: typedef void (STDAPICALLTYPE* lppexec_plugin)(uint Win_Handle; void* ATT_Proc); Win_Handle - handle of ATT main window ATT_Proc - pointer to main function to work with ATT =========================================================== Run-Time plugins =========================================================== Run time plugins starts together with ATT. If enabled in "Run-Time plugins" configuration box. All runtime plugins must export some additional fucntions. ////////////////////////////////// //ATT Will execute this function before terminate. ////////////////////////////////// typedef void (STDAPICALLTYPE* lppdone_plugin)(); ////////////////////////////////// //ATT will execute this function after resuming from suspend/hibernate mode //Plug-In must decide waht to do at this time. //if you don't need any actions just create dummy procedure ////////////////////////////////// typedef void (STDAPICALLTYPE* lppsuspend_restore)(); ////////////////////////////////// //Run Configuration for plugin ////////////////////////////////// typedef void (STDAPICALLTYPE* lppconfig_plugin)(); Look for an example in plugins\example folder. CPU Load Meter Plugin. A few words about how CPU Load Metter plugin work. When this plugin executed, its create an invisible window and create Timer function for this window. After window creating, plugin put and icon in system tray. Then each 1 second, plugins update icon in system tray to show current CPU Usage. In resources, plugin stores 15 small icons which will be displayed while measuring CPU Usage. How to create run time plugins? Its up to you how :). It can be depended on what this plugin should do. For example, PCI Register Set is run time plugin. But this plugin doesn't create any window while executed. When ATI Tray Tools execute "PCI Register Set" plugin, using exec_plugin, plugin run procedure to program all selected registers and stop execution. Its differ from CPU Load plugins because its do nothing after execution. Information about commands you can find in include files for your language. plugins.pas - Delphi version plugins.h - C++ version =========================================================== Some example plugins can be found in delphi and vc++ folders.