Application compiled with Win2K/XP DDK works fine. But doesnt work with WIN98 DDK

Discussion in 'Windows Vista Drivers' started by Srix, Sep 13, 2005.

  1. Srix

    Srix Guest

    I got a requirement to develop an application which checks the status
    of NIC card, enables or disables it. I used SetupDi...,
    Cm_Get_Devnode_Status_Ex, Getadapterinfo api for this purpose and
    compiled with Windows DDK 2k/xp on VC6. They worked perfectly on
    Windows 2k/XP machines :)

    The probblem started when I tried to compile it for windows 98
    machines. In order to compile for Windows 98, I installed VC++ 4.2 &
    win98 ddk (DDK doc said it is compatible only with VC4.2 compiler) on a
    Windows 98 machine. Unlike win2K/XP DDK, the Win98 DDK didnt contain
    the "Iphlpapi.h". So, I downloaded the PSDK2003 and installed it. When
    I tried to compile the same code in this setup, I got the following

    1) There were lot of conflict in typedef declaration between Win98 DDK
    & PSDK2003 headers. After struggling for couple of days i managed to
    compile it.

    2) Then came the linker errors:


    D:\PSDK2003\Lib\iphlpapi.lib : fatal error LNK1106: invalid file or
    disk full: cannot seek to 0x3d50d14b

    when i referred MSDN, it said the reason could be lack of space or
    corrupted hardisk. But I have more than 500 MB left and 'thorough'
    scandisk didnt find any problemwith the hardisk. Then i comented
    GetAdaptersInfo() which required this Library. On compiling, I got
    another Link error...

    error LNK2001: unresolved external symbol "unsigned long __stdcall
    CM_Get_DevNode_Status_Ex(unsigned long *,unsigned long *,unsigned
    long,unsigned long,void *)"([email protected]@[email protected])

    But the library path and include path are properly set. Don't know
    wwhat is causing the error!

    When i checked Win2K/XP, I saw that there is a separate include
    directory for driver development (c:\winddk\3790.1830\inc\ddk\wxp\) and
    for application interface with devices (c:\winddk\3790.1830\inc\wxp\).
    But in Win98 DDK, there is only one include directory!!

    Does that mean only driver (.drv,.sys files) can be developed using
    the Win98 DDK? I am stuck here, and really confused about how to
    proceed! Your help will be highly appreciated.

    Thank you in advance.

    Srix, Sep 13, 2005
    1. Advertisements

  2. Did you see this note concerning the CM functions?

    "If you intend that your device installation application run on Windows
    9x/Me, or Windows NT 4.0 or earlier, and you use the CM_Xxx functions, be
    sure that CfgMgr32.lib appears before SetupAPI.lib in the sources file. If
    your application is intended to run only on Windows 2000 or a later NT-based
    operating system, you can omit CfgMgr32.lib."

    I haven't used the CM functions on 98/ME myself, but I have used the SetupDi
    functions. There I use VS .NET 2003 for all platforms. The major wrinkle
    that I found in using SetupDi on 98/ME is that 98/ME only support the ANSI
    character set. You must implement the wide-character versions using
    character conversions if you need them.

    Good luck,

    Thomas F. Divine, Windows DDK MVP
    Thomas F. Divine [DDK MVP], Sep 13, 2005
    1. Advertisements

  3. Srix

    Pavel A. Guest

    Do you really need to support win98?
    The win98 requirement is often just cut-and-paste from some previous
    product documents.
    I remember several times when after telling to management that support for
    win9x adds development time and even can delay product shipping,
    they simply removed this requirement.

    Pavel A., Sep 15, 2005
  4. Srix

    Srix Guest

    I Thank evry body for their replies.

    I tried putting CfgMgr32.lib before SetupAPI.lib and compiled it. But
    still getting error.

    D:\PSDK2003\Lib\iphlpapi.lib : fatal error LNK1106: invalid
    file or
    disk full: cannot seek to 0x3d50d14b

    Moreover, in the include path win98 ddk comes before PSDK 2003. when i
    compiled the code with this include order it gave 47 errors. Then, I
    put PSDK path before WIN98 DDK path and compiled the same code (
    without cleanig the object files). To my surprise the no. of error
    reduced. Then i kept repeating this process ( alternating include path
    and compiling) which considerably reduced errors on each build and
    finally compiled without errors.

    I got the link errors mentioned in the original post only after this. I
    think the LNK1106 error is becuase , VC 4.2 compiler was unable to
    understand the PSDK2003 lib file format.

    Anyway, I think ,I have to skip doing this development for WIN98 :(

    thanks again for evrybody's help
    Srix, Sep 16, 2005
  5. Srix

    Pavel A. Guest

    This is very possible, no surprise at all. You could PSDK contemporary to VC4.
    Pavel A., Sep 17, 2005
  6. Srix

    Tim Roberts Guest

    Quite correct. The format of an import library changed in VC 6 in an
    incompatible way.
    Tim Roberts, Sep 17, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.