--- title: "AAL2GenGetHSMModuleVersionCmd" slug: "a3s-cppprg-hsm-aal2gengethsmmoduleversioncmd-4-0" updated: 2026-11-11T10:00:40Z published: 2026-11-11T10:00:40Z canonical: "docs.onespan.com/a3s-cppprg-hsm-aal2gengethsmmoduleversioncmd-4-0" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.onespan.com/llms.txt > Use this file to discover all available pages before exploring further. # AAL2GenGetHSMModuleVersionCmd ## Function prototype ```cpp aat_int32 AAL2GenGetHSMModuleVersionCmd( aat_byte *Cmd, aat_int32 *CmdSize); ``` ## Description This function creates a command for the HSM to process. It is used to retrieve the version of the current Authentication Suite Server SDK for HSM module (Thales ProtectServer or Entrust nShield). > This function must be used with the post-HSM API AAL2ProcGetHSMModuleVersionRpl. ## Parameters | Type | Name | Use | Description | | --- | --- | --- | --- | | aat_byte * | Cmd | O | Up to 2 bytes that serialize the GET HSM MODULE VERSION command type and the input data to the get Module HSM Module Version function on the HSM: - Command Type - 2 bytes | | aat_int32 * | CmdSize | I/O | On entry, this parameter contains the size of the Cmd buffer. On exit, this parameter contains the length of the Cmd message. | ## Return codes | Code | Meaning | Code | Meaning | | --- | --- | --- | --- | | 0 | Success | 1025 | Data buffer too small | | 590 | Invalid command pointer | | |