Re: I got SPDRP_ADDRESS error



You can download the latest PSDK even if you aren't using it in VS6. Then you look at it,
and suppose it has

#define SPDRP_ADDRESS (0x0000001C)

then you can create a header file

newapis.h

in which you add

#ifndef _SPDRP_ADDARESS
#define SPDRP_ADDRESS (0x0000001C)
#endif

so your code will compile with either PSDK in any compiler. Since this is a code value to
the API, it will work with any platform that implements this code value. Note that if you
run you code on an earlier platform that does not have support for this code in its
implementation of the API, you will get an error back, but if you run it on any platform
which *does* have the API support, it will work, no matter what compiler you used to
compile the code.
joe

On 9 Jan 2007 21:54:07 -0800, "zdk" <nx2zdk@xxxxxxxxx> wrote:

Thank you very much for your worth answer.

if I'd like to use VS6 SDK(I don't have VS2003 so far),do you know how
to retrieve Hardware address range info. ?

Warachet S.

Joseph M. Newcomer wrote:
You probably have an obsolete platform SDK. My VS6 SDK doesn't define this symbol, but my
VS2003 SDK does. Note that this suggests that not all platforms might support this
option, so be prepared for that...
joe
On 9 Jan 2007 20:48:44 -0800, "zdk" <nx2zdk@xxxxxxxxx> wrote:

My purpose is to retrieve PCI device address range..

,and in my code I use SPDRP_ADDRESS as this below function parameter:

while (!SetupDiGetDeviceRegistryProperty(
hDevInfo,
&DeviceInfoData,
SPDRP_ADDRESS,
&DataT,
(PBYTE)buffer,
buffersize,
&buffersize))


but I got

: error C2065: 'SPDRP_ADDRESS' : undeclared identifier
Error executing cl.exe.


When I see
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/devio/base/setupdigetdeviceregistryproperty.asp

Is it really undeclared?

Any help or suggest would be greatly appriciated.
Thank you very much.

Warachet S.
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Re: LSP Sample from Platform SDK Breaking Application Functionalit
    ... Try using the PSDK ... I also tried to compile it with VS2008 and it didnt work. ... No restart required after installing/uninstalling the lsp. ... sever to quickly check if things are working ok after the installation ...
    (microsoft.public.win32.programmer.networks)
  • Re: Problem Cloning PUBLIC directory
    ... you must remove the feature from your platform and ... rebuild, otherwise, the binaries from the old PUBLIC atadisk driver still ... >I fixed the SOURCES file and now everything compiles correctly. ... >>> PlatformBuilder 5.0 and having some problems getting it to compile. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: LSP Sample from Platform SDK Breaking Application Functionalit
    ... Try using the PSDK ... I also tried to compile it with VS2008 and it didnt work. ... No restart required after installing/uninstalling the lsp. ... it was the path to the dll when installing the LSP. ...
    (microsoft.public.win32.programmer.networks)
  • Re: how to detect the compile is 32 bits or 64 bits?
    ... determined by whether you have a 32- or 64-bit platform. ... Suppose I have an algorithm, such as a cryptography algorithm, that ... but the chunk size differs for the two cases. ... available at compile time increases compiler optimization opportunities ...
    (comp.lang.c)
  • Re: Serial programming
    ... I have no Hyperterminal-like on my pocket PC! ... > modifications required to make it compile). ... > right now have ARM processor support as a part of my compiler. ... > platform, and run another on a laptop, then presumably they can talk to ...
    (microsoft.public.windowsce.embedded.vc)

Loading