: : : Why is it that when I use the GetCurrentHwProfile() I keep getting
: : : this error from my compiler. Incidentally, I am using Windows XP and
: : : the compiler is VS6.
: : :
: : : error C2065: 'GetCurrentHwProfile' : undeclared identifier.
: : :
: : : The same message also appears when I use the HW_PROFILE_INFO.
: : :
: : : error C2065: 'HW_PROFILE_INFO' : undeclared identifier.
: : :
: : : I have used the correct header files but still I keep getting the
: : : errors.
: : :
: : : I then decided to declare both the structure and the function
: : : explicitly in the application and naturally enough the program
: : : compiled without any complaints but the output was pure gibberish.
: : :
: : : What is happening and more importantly why?
: : :
: : : Oh! yes, I did use the example in toto given by Microsoft with the
: : : same result.
: : :
: : : Thanks.
: : :
: :
: : From what I can tell from
: :
http://msdn.microsoft.com/en-us/library/ms724311(VS.85).aspx you
: : need to "(..) define the _WIN32_WINNT macro as 0x0400 or later."
: : (last line of text before the example).
: : I think they do this to make you aware that this is a highly version
: : specific API.
: : Best Regards,
: : Richard
: :
: : The way I see it... Well, it's all pretty blurry
:
: I tried to use that ID in both the source and compiler options, but
: VS kept this _WINNT... "unnoticed", so I used the brute force
: approach - simply open these compiler headers and copy/paste the
: definitions you need into your code. Protect with ifdef's for next
: compiler.
:
:
:I did what you suggested AsmGuru62 but to no avail. I opened winbase.h :and did a copy and paste of the relevant section in my application but to
:no avail. I kept getting the same error messages. To cut a long story :short, I merely rewrote the application in Visual Studio 2008 and I had :it running with no hassle. That it worked is satisfying but I still would :like it to work in VSC++6. Hope I can manage that. Then my efforts would :indeed be satisfying.