Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1548 + VS2005 parses WIN32_FIND_DATA wrong

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
SvenC Posted - Mar 06 2007 : 2:10:50 PM
Hi,

I get wrong intellisense members when I use WIN32_FIND_DATA variables.
I am using VAX 1548 in VS 2005 SP1 and the following minimal C++ native console app shows the behaviour.


#include "stdafx.h"
#include <windows.h>

int _tmain(int argc, _TCHAR* argv[])
{
WIN32_FIND_DATA wfd;
wfd. // here I get a wrong member bData
// members available with _MAC defined are
// also shown incorrectly
return 0;
}

I am doing a unicode build and use the standard SDK of VS2005. Pressing F12 on WIN32_FIND_DATA leads me to this definition in winbase.h:

typedef struct _WIN32_FIND_DATAW {
DWORD dwFileAttributes;
FILETIME ftCreationTime;
FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime;
DWORD nFileSizeHigh;
DWORD nFileSizeLow;
DWORD dwReserved0;
DWORD dwReserved1;
WCHAR cFileName[ MAX_PATH ];
WCHAR cAlternateFileName[ 14 ];
#ifdef _MAC
DWORD dwFileType;
DWORD dwCreatorType;
WORD wFinderFlags;
#endif
} WIN32_FIND_DATAW, *PWIN32_FIND_DATAW, *LPWIN32_FIND_DATAW;


HTH to reproduce the behaviour on your dev systems.

Regards,
SvenC
2   L A T E S T    R E P L I E S    (Newest First)
SvenC Posted - Mar 07 2007 : 12:57:54 AM
Thanks for reproducing this. I am still an F12 user but I will try to remember alt-g, also.

C++ has a one definition rule, so it would not be allowed to have two types with the same name in the same namespace. In this case you see a structure in shtypes.h which is used when processed by midl. This is done be checking #ifdef WINBASE_DEFINED_MIDL.

I think it might be helpfull to exclude symbol information inside of this define. As this information might be usefull sometimes, it might also be helpfull if those "second best" members are displayed at the end of the list maybe with a different icon. Just a thought with not too high priority.

bye,
SvenC
feline Posted - Mar 06 2007 : 4:02:03 PM
I am seeing the same problem here. Accepting "bData" and doing alt-g on it takes me to:

C:\\Program Files\\Microsoft Visual Studio 8\\VC\\PlatformSDK\\include\\shtypes.h - line 134

which is the structure WIN32_FIND_DATAA, and a couple of lines further down the structure WIN32_FIND_DATAW

While, as you have found, there is a structure with the same name in:

C:\\Program Files\\Microsoft Visual Studio 8\\VC\\PlatformSDK\\include\\winbase.h

So VA seems to be merging the two together, since they are both the "same" structure.

The _MAC elements being suggested, this is the well known effect of VA scanning "inactive" code so that it offers you help with it, but I understand why that is not helpful here.

case=5379

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000