Cannot link IoCreateDevice

Posted on 2004-11-21
Last Modified: 2012-06-27
I am trying to build a device driver for Windows using the xp ddk.

The code compile but does not link. I am using the compiler and linker that comes with the ddk.

The linker gives the following error.
unresolved external symbol __imp__IoCreateDevice referenced

I tried all the static libraries that exports this symbol in the ddk but none of them seems to work.

Question by:danielj040300
    LVL 48

    Accepted Solution

    What libraries do you use for linking? Standard list for WDM driver is:
    ntoskrnl.lib hal.lib wdm.lib wmilib.lib

    If project has cpp files, all DDK #include directives should be inside of extern "C" block:

    extern "C"
        #include <ntddk.h>
    LVL 1

    Author Comment

    I will try it.
    LVL 1

    Author Comment

    No it does not work.
    LVL 1

    Author Comment

    The problem was that I tried to use my own Makefile and not the ddk makefile.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Suggested Solutions

    Title # Comments Views Activity
    VB Email Check 2 239
    how do i use CLI when building the dll 1 85
    Need some help with open a dialog 5 185
    Debug Error using Visual C++ 6.0 5 136
    The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
    In Easy String Encryption Using CryptoAPI in C++ ( I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now