error LNK2001:unresolved extern GUID_DEVINTERFACE_DISK

Hi Everyone,

I am trying to use IoGetDeviceInterfaces() to get a list of device interfaces for disks in our kernel mode, non-pnp driver. The code compiles okay, but linking fails with an unresolved extern for GUID_DEVINTERFACE_DISK. Some people on the Net mentioned needing to include uuid.lib, which I’ve done, but the issue persists. I would really appreciate your help to figure out why I cannot link. I am using WinDDK 7600.16385.1.

Thank you for your help!
Mike

#include <ntifs.h>
#include <wdm.h>
#include <ntddstor.h>

status = IoGetDeviceInterfaces(&GUID_DEVINTERFACE_DISK, NULL, 0, &pDeviceList);
if (NT_SUCCESS(status))
{
.
.
.

TARGETLIBS=$(TARGETLIBS) $(DDK_LIB_PATH)\ntstrsafe.lib <br> $(DDK_LIB_PATH)\wdmsec.lib <br> $(DDK_LIB_PATH)\uuid.lib</ntddstor.h></wdm.h></ntifs.h>

#Include “initguid.h”

Before ntddstor.h

d

dent from a phine with no keynoard

-----Original Message-----
From: xxxxx@a-bit-of-help.com
Sent: Friday, March 25, 2011 5:47 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] error LNK2001:unresolved extern GUID_DEVINTERFACE_DISK

Hi Everyone,

I am trying to use IoGetDeviceInterfaces() to get a list of device interfaces for disks in our kernel mode, non-pnp driver. The code compiles okay, but linking fails with an unresolved extern for GUID_DEVINTERFACE_DISK. Some people on the Net mentioned needing to include uuid.lib, which I’ve done, but the issue persists. I would really appreciate your help to figure out why I cannot link. I am using WinDDK 7600.16385.1.

Thank you for your help!
Mike

#include <ntifs.h>
#include <wdm.h>
#include <ntddstor.h>

status = IoGetDeviceInterfaces(&GUID_DEVINTERFACE_DISK, NULL, 0, &pDeviceList);
if (NT_SUCCESS(status))
{
.
.
.

TARGETLIBS=$(TARGETLIBS) $(DDK_LIB_PATH)\ntstrsafe.lib <br> $(DDK_LIB_PATH)\wdmsec.lib <br> $(DDK_LIB_PATH)\uuid.lib


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</ntddstor.h></wdm.h></ntifs.h>

That did the trick! Thank you very much, Doron!

Mike