home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 November / Chip_2004-11_cd1.bin / tema / fax / download / ventafax5 / vfvh5519i.exe / RCDATA / CABINET / readme.txt < prev    next >
Text File  |  2003-06-27  |  4KB  |  126 lines

  1. Adding a VentaFax Plug-In 
  2.  
  3. A plug-in is a dynamic-link library (*.DLL) file which function is called after each reception and transmission session. To install a plug-in, put its file to the \PLUGINS subfolder. Next, in the settings window open the Miscellaneous - Plug-Ins tab. The plug-in file name should appear in the list of plug-ins. Check the corresponding box and click the Apply button.
  4.  
  5. The AfterSession function is called from the plug-in in a separate thread. If several plug-ins are installed, several threads are running simultaneously, without waiting for the called function completion. 
  6.  
  7. The situation is possible when the AfterSession function is called several times in succession. Please keep this in mind when developing plug-ins. 
  8.  
  9.  
  10. Plug-In Functions Description
  11.  
  12. 1. A plug-in must contain at least the 'AfterSession' function as follows:
  13.  
  14. // Delphi
  15.  
  16.   TAfterSession = function(R : TRec32C) : longint; stdcall;
  17.  
  18. The following functions and procedures can also be present:
  19.  
  20. 2. The 'PluginName' function. It returns the short plug-in name. 
  21.  
  22. const
  23.      cNameLength   = 16;
  24.  
  25. type
  26.  
  27.   pTaPluginName = ^TaPluginName;
  28.   TaPluginName  = array[0..cNameLength-1] of Char;
  29.  
  30.   TPluginName = procedure(const pPluginName: pTaPluginName; const Size: DWord); stdcall;
  31.  
  32.  
  33.   pPluginName - the pointer to a buffer for the function to fill up; 
  34.  
  35.   Size - the size of the buffer.
  36.  
  37. 3. The 'PluginDescription' function. It returns the description of the plug-in.
  38.  
  39. const
  40.      cDescriptionLength = 1024;
  41. type
  42.  
  43.   pTaPluginDescription = ^TaPluginDescription;
  44.   TaPluginDescription  = array[0..cDescriptionLength-1] of Char;
  45.  
  46.   TPluginDescription= procedure(const pPluginDescription: pTaPluginDescription; const Size: DWord); stdcall;
  47.  
  48.   pPluginDescription - the pointer to a buffer for the function to fill up;
  49.  
  50.   Size - the size of the buffer.
  51.  
  52. 4. The 'Configure' procedure. It is called when a plug-in setting is necessary. 
  53.  
  54.   TConfigure = procedure(hWnd: THandle); stdcall;
  55.  
  56.   hwnd - parent window handle.
  57.  
  58.  
  59. TRec32C Structure Description.
  60. ------------------------------
  61.  
  62.   TDaTi = record
  63.     Year  : word;
  64.     Month : word;
  65.     Day   : word;
  66.     Hour  : word;
  67.     Min   : word;
  68.     Sec   : word;
  69.   end;
  70.  
  71.   PTRec32C = ^TRec32C;
  72.   TRec32C = Record
  73.     Phone : array[0..63] of char;
  74.     Company  : array[0..63] of char;
  75.     ToAbonent : array[0..73] of char;
  76.     FileName : array[0..255] of char;
  77.     DocName : array[0..73] of char;
  78.     Result, Speed, Quality : word;
  79.     Date : TDaTi;
  80.     Min, Sec : word;
  81.     Pages : word;
  82.     LastPage : word;
  83.     NBlock   : longint;
  84.     NBadBlock: longint;
  85.     Attr : word;
  86.     ExtData : array[0..63] of char;
  87.     CSI : array[0..21] of char;
  88.     NCF : array[0..63] of char;
  89.     RecId : longint;
  90.     AbId : longint;
  91.     CompName: array[0..31] of char;
  92.     Reserve : array[0..63] of char;
  93.   end;
  94.  
  95. where 
  96.  
  97. Phone - the phone number the message was transmitted to (in case of
  98.         transmission) or the phone number identified as the Caller ID 
  99.        (in case of reception);
  100. Company - the "To" field. Usually it is the recipient company name;
  101. ToAbonent - the "Attn." field. Usually it is the message recipient's 
  102.             name.
  103. FileName - the received or transmitted file name or the service 
  104.            announcement name;
  105. DocName - file description;
  106. Result - session completion code;
  107. Speed - in case of at facsimile reception/transmission shows the 
  108.         reception/transmission speed. In case of sound file 
  109.         recording/playback shows the sampling frequency;
  110. Quality - the facsimile resolution. 0 for normal, 1 for fine;
  111. Date - session date and time;
  112. Min, Sec - session duration;
  113. Pages - in case of reception - the number of pages received
  114.         in case of facsimile transmission - the number of pages in 
  115.            the document to be transmitted
  116.         in case of voice message recording/playback - the message 
  117.            duration in milliseconds (low-order word);
  118. LastPage - in case of facsimile transmission - the number of 
  119.            transmitted pages 
  120.            in case of voice message recording/playback - the message 
  121.            duration in milliseconds (high-order word);
  122. NBlock - the number of received/transmitted frames in ECM mode;
  123. NBadBlock - the number of re-received/retransmitted frames in ECM 
  124.             mode;
  125. Attr - session attributes.
  126.