Author |
Topic |
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
Posted - Mar 17 2004 : 6:47:45 PM
|
I've got a problem with some types defined in the standard Windows SDK headers. Symbols like SERVICE_STATUS_HANDLE or SC_HANDLE are shown as unknown (and yes, they are reddish underlined here) although the header file (WinSvc.h) is included. Opening the header file and searching for the symbol reveals that VA knows this symbol and shows it properly colored. Back to the file where its used ... unknown symbol.
Looking at how these symbols are defined:DECLARE_HANDLE(SERVICE_STATUS_HANDLE); which is #define DECLARE_HANDLE(name) typedef void * name So here lies the culprit - VA does not take these definitions across file boundaries. They are only correctly resolved in the file where the #define resides.
Anything that can be done? Please?
[edit] Defining these types of symbols in VA's stdafx.h (why you call that afx, its not MFC?) would be a solution, but a incorrect one. I think that VA should be able to understand at least the "standard" headers used by everybody. [/edit] |
Edited by - Uniwares on Mar 17 2004 7:39:46 PM |
|
LarryLeonard
Tomato Guru
USA
1041 Posts |
Posted - Mar 17 2004 : 8:32:42 PM
|
I was with you right up to the point you said, "I think that VA should be able to understand at least the 'standard' headers used by everybody."
Just because it's a standard header, doesn't make it any easier to work with. I remember the first time I compiled an MFC project at Warning Level 4, and got hundreds and hundreds and hundreds of warnings - all from the standard headers! It was my introduction to #pragma warning. Seems like before VC6, Warning Level 4 always compiled cleanly... or was it VC5 ...
Anyway, you're right that it would be nice to be able to get to those symbols. Somewhere recently they talked about how they don't parse files from top to bottom, they do it as you type. But then again, the 'standard' headers aren't going to change, so they must be parsing them in some order, wouldn't you think? But maybe it's not the 'correct' order, as far as being able to do what we want. Boy, this stuff hurts my head, this late at night...
Also, I know why it's called 'Afx' instead of 'MFC' - let me know if you want the whole boring explanation...
|
|
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
Posted - Mar 17 2004 : 9:02:51 PM
|
Yes, for the 'standard' SDK headers are some rules defined which will never ever change (otherwise even MS cant compile their stuff anymore). No, it doesnt make it any easier, given the way MS uses and reuses some macros.
I know the story about Afx and MFC, I was just wondering why WT uses it. I'd understand a 'stdwt.h' or 'stdtomato.h' or even a 'stdred.h' but 'stdafx.h' ?? |
|
|
Cezariusz
Tomato Guru
Poland
244 Posts |
Posted - Mar 18 2004 : 03:53:24 AM
|
quote: Also, I know why it's called 'Afx' instead of 'MFC' - let me know if you want the whole boring explanation...
Actually, I've been always wondering why it's Afx, so I'd love to hear the story. |
Cezariusz Marek https://midicat.net/ |
|
|
LarryLeonard
Tomato Guru
USA
1041 Posts |
Posted - Mar 18 2004 : 08:42:41 AM
|
quote: I'd understand a 'stdwt.h' or 'stdtomato.h' or even a 'stdred.h' but 'stdafx.h'??
Yeah, 'stdafx.h' is a seriously bad name for that file. I try to avoid name collisions whenever possible, and have a bias for long, descriptive names, so I'd call it "VAX_Standard_Stuff.h" or something...
quote: Actually, I've been always wondering why it's Afx, so I'd love to hear the story.
Back in the old days, when MFC was being created, the original name of the project was "Application Framework". So, apparently the style then was prefix your symbols with the abbreviation of your group's name. In this case, that would be "Af" - but unfortunately, there was already a group at Microsoft that used those initials (I never heard what their name was - "Antitrust Fighting"?), so they just appended an "x", to create "Afx".
Then they changed the whole thing to "Microsoft Foundation Classes", but - gasp - never went back to rename their symbols for consistency. (That should have been our first clue.)
|
|
|
Stephen
Tomato Guru
United Kingdom
781 Posts |
Posted - Mar 18 2004 : 08:50:47 AM
|
Antitrust fighting? Ho ho! |
Stephen Turner ClickTracks http://www.clicktracks.com/ Winner: ClickZ's Best Web Analytics Tool 2003 & 2004
|
|
|
WannabeeDeveloper
Tomato Guru
Germany
775 Posts |
Posted - Mar 18 2004 : 09:27:55 AM
|
Isn't Micro$oft one of the biggest supporters of TCPA?
Looks like they're not that "Anti" (anymore?)
Nice story, didn't know that, too... |
|
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Mar 18 2004 : 10:52:16 AM
|
For VA X, it's After-everything-else FiX |
Whole Tomato Software, Inc. |
|
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
Posted - Mar 18 2004 : 1:52:00 PM
|
No, that cant be right. You are telling us that VAX parses this file before everything else, so it should be BFX. Ha! Got ya. |
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Mar 18 2004 : 3:16:02 PM
|
Good point.
We should say, "After we tried tweaking our parser to make sense of multiple, convoluted and macro-intensive definitions, create a FiX in the stdafx.h file." |
Whole Tomato Software, Inc. |
|
|
WannabeeDeveloper
Tomato Guru
Germany
775 Posts |
Posted - Mar 18 2004 : 3:38:52 PM
|
quote: Originally posted by support
"After we tried tweaking our parser to make sense of multiple, convoluted and macro-intensive definitions, create a FiX in the stdafx.h file."
Now that's what I call a "readable Header Filename" |
|
|
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
Posted - Mar 18 2004 : 4:23:41 PM
|
And with a mere 135 chars it does not even exceed MAX_PATH. |
|
|
|
Topic |
|