The follwing code is valid.
But if used neither AGOVD_CMD nor AGOVD_LOGON is known by VAX.
typedef struct tagAGOVD_HDR
{
DWORD m_dwSize;
DWORD m_dwCommand;
} AGOVD_HDR;
#define AGOVD_MAX_CMD_LENGTH 512
typedef struct tagAGOVD_CMD : public AGOVD_HDR
{
BYTE m_buffer[AGOVD_MAX_CMD_LENGTH-sizeof(AGOVD_HDR)];
} AGOVD_CMD;
typedef struct tagAGOVD_LOGON : public AGOVD_HDR
{
LONG m_lIdUser;
LONG m_lIdPjState;
WCHAR m_szServerName[64+1];
WCHAR m_szDBName[64+1];
WCHAR m_szCallbackNo[64+1];
} AGOVD_LOGON;
If I splitt the struct definition and typedef into 2 statements it works.