6 Document History Protocol (translated by Benjamin Gandon) The Document History Protocol allows you to manage a global list of recently used file (like in the Call menu of Texel for instance). It also allows you to make a quick launch menu bar (like the one of Start-Me-Up). So, let's present briefly with C notation the involved structure: #define DHST_ADD 0xdadd #define DHST_ACK 0xdade typedef struct { char *appname, *apppath, *docname, *docpath; } DHSTINFO; Every time the user opens a file, the application looks for the 'DHST' Cookie. If found, the lower word (two bytes) contains the AED ID value of the DHST server to witch the DHST_ADD message is to be sent. The application allocates a DHSTINFO structure in global memory and fills it with these values: appname: Application name (z.B. "Texel") apppath: Absolute path of the application program file (z.B. "c:\program\texel.app") docname: Document name (z.B. "balmer.txl") docpath: Absolute path of the document file (z.B. "d:\daten\balmer.txl") Then the application sends the following message to the DHST server: msg[0] DHST_ADD msg[1] ap_id msg[2] 0 msg[3] and msg[4] Pointer to the filled DHSTINFO structure msg[5] 0 msg[6] 0 msg[7] 0 The application receives the following Message answer. After receiving this answer, with the allocated memory for the DHSTINFO structure may be freed. msg[0] DHST_ACK msg[1] ap_id msg[2] 0 msg[3] and msg[4] Pointer to the DHSTINFO structure (the one send with DHST_ADD) msg[5] 0 msg[6] 0 msg[7] 0 means that an error occured, any other value means: OK