Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 struct/typedef is not found with typedef syntax
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

xMRi
Tomato Guru

Germany
315 Posts

Posted - Mar 03 2008 :  08:33:17 AM  Show Profile  Reply with Quote
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.

Martin Richter [rMVP] WWJD http://blog.m-ri.de
"A well-written program is its own heaven; a poorly written
program is its own hell!" The Tao of Programming

feline
Whole Tomato Software

United Kingdom
18947 Posts

Posted - Mar 03 2008 :  09:31:10 AM  Show Profile  Reply with Quote
I thought I recognised this:

case=2302

An alternative workaround is to use a #define for typedef struct, e.g.

#define FELINE_STRUCT typedef struct

FELINE_STRUCT tagAGOVD_CMD : public AGOVD_HDR
{
	BYTE	m_buffer[AGOVD_MAX_CMD_LENGTH-sizeof(AGOVD_HDR)];
} AGOVD_CMD;


and add the line:

#define FELINE_STRUCT class

to VA's stdafx.h file.

http://docs.wholetomato.com?W302

zen is the art of being at one with the two'ness
Go to Top of Page

xMRi
Tomato Guru

Germany
315 Posts

Posted - Mar 03 2008 :  09:53:44 AM  Show Profile  Reply with Quote
Than it is better to use 2 statements:


struct tagAGOVD_CMD : public AGOVD_HDR
{
	BYTE	m_buffer[AGOVD_MAX_CMD_LENGTH-sizeof(AGOVD_HDR)];
};
typedef tagAGOVD_CMD AGOVD_CMD;


This works too!

Martin Richter [rMVP] WWJD http://blog.m-ri.de
"A well-written program is its own heaven; a poorly written
program is its own hell!" The Tao of Programming
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18947 Posts

Posted - Mar 03 2008 :  10:18:20 AM  Show Profile  Reply with Quote
Very true, and rather obvious when I see it

zen is the art of being at one with the two'ness
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Jan 27 2009 :  9:22:23 PM  Show Profile  Reply with Quote
case=2302 is fixed in build 1715

Whole Tomato Software, Inc.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000