Overview
This section describes the various messages used by HWAccess and external libraries.
Message format follows the standard WIN32 API. The common library included with the SDK, performs all necessary translation so a message arrives with only 2 used arguments. Those are the WPARAM and LPARAM. AM_ messages are send by HWAccess to the DLL. LM_ type messages are send by the DLL to HWAccess request inginformation. The AM_ messages are within the User message range WM_USER to WM_USER+0x0FFF. The LM_ messages are within the User message range WM_USER+0x1000 to WM_USER+0x1FFF. Command messages relate the WPARAM with a command identifier. Most messages relate the LPARAM argument with a structure pointer unless otherwise noted..
AM_ Type Messages
AM_ Type messages are send by HWAccess to the DLL requesting the library to perform an operation. Such operations may include information to update the Parameters and View windows, Configuration Dialog updates as well as initialization and termination of the library. The following table summarizes the AM_ type messages:
| This is the first message to the DLL to perform initialization. | |
| This is the last message to the DLL signals a termination request. | |
| Request for Parameters window initialization. | |
| Notification the user did a Mouse right-click operation to one of the DLL entries in the Parameters window. | |
| Optional Request to retrieve help information about an item. | |
| Request to update colors of the DLL controls. | |
| Request to receive the total buffer required for the data transfer operation. | |
| Request to update the main View buffer with DLL information. | |
| Request for Configuration Dialog initialization. | |
| Notification for the DLL to add entries in the main menu of HWAccess | |
| Request for initialization of active controls |
All AM_ type messages are regular function calls to the commondll.lib There the common dispatcher uses a single argument pointer of type PTHREADINFO. When the commondll.lib is integrated with an external library it decodes these function calls to windows messages and dispatches them to the DLL main message loop. With MFC, such a message loop can be implemented in a class derived by CCommonDll in the main class of the external library.
If you decide to interface your library with WIN32 API most of the common library interface description is not applicable.
LM_ Type Messages
LM_ Type messages are send by the DLL to HWAccess requesting the application to perform an operation. Such operations may include H/W access, updates in the Parameters window as well as information about the HWAccess framework. The following table summarizes the LM_ type messages:
| Request to empty the message queue where all LM_ type messages are stored | |
| Request to update the Parameters window | |
| Request to insert an entry for in the Parameters window. | |
| Request to remove an entry from the Parameters window. | |
| Request to retrieve information for an entry in the Parameters window | |
| Request update of the second status pane. | |
| Request to update the main View of HWAccess. | |
| Request to retrieve the current data from the View of HWAccess | |
| Request to retrieve the size in bytes used by HWAccess to display the current view in the main View window | |
| Request to retrieve the Foreground and Background colors used in the main View window. | |
| Request to register a submenu that contains identifiers with HWAccess | |
| Request to update the watch value | |
| Request to insert a watch. | |
| Request to remove a watch. | |
| Request to retrieve information for a watch. | |
| Request to read a H/W port. | |
| Request to write to a H/W port | |
| Request to read a H/W port using a buffer | |
| Request to write to a H/W port using a buffer | |
| Request to perform a R/W operation to a H/W port | |
| Request to perform a R/W operation to a H/W port using a buffer. | |
| Request to perform multiple access to a H/W port. | |
| Request to sample a H/W port using a buffer | |
| Request to read a range of linear addresses | |
| Request to write to a range of linear addresses | |
| Request to perform multiple access to a linear address | |
| Request to sample a linear address. | |
| Request to read a model specific register | |
| Request to write to a model specific register | |
| Request to calculate the processor speed | |
| Request to access multiple MSRs for R/W | |
| Request to retrieve system speed information |

