Unresolved Externals

Hi ,

I am using the function IoGetConfigurationInformation to get the number
of hard disks that are attached to my computer. I am doing this in VC++
however everytime i get a linking error which is ::

error LNK2001: unresolved external symbol “__declspec(dllimport) struct
_CONFIGURATION_INFORMATION * __cdecl
IoGetConfigurationInformation(void)”
(_imp?IoGetConfigurationInformation@@YAPAU_CONFIGURATION_INFORMATION@@XZ)

i think this is because i have not included a .lib file though i am not
sure. Can someone please tell me what to do about this.

Thank You


Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Exported as xxxxx@0 from ntoskrnl.lib. It looks
like you have a name-mangling problem. I think you need to either adjust
project config (preprocessor definitions or compiler flags) or wrap ntddk.h
in extern “C” block.

– CCP

----- Original Message -----
From: anjita jachak
To: NT Developers Interest List
Sent: Tuesday, February 12, 2002 8:58 PM
Subject: [ntdev] Unresolved Externals

Hi ,

I am using the function IoGetConfigurationInformation to get the number
of hard disks that are attached to my computer. I am doing this in VC++
however everytime i get a linking error which is ::

error LNK2001: unresolved external symbol “__declspec(dllimport) struct
_CONFIGURATION_INFORMATION * __cdecl
IoGetConfigurationInformation(void)”
(_imp?IoGetConfigurationInformation@@YAPAU_CONFIGURATION_INFORMATION@@XZ)

i think this is because i have not included a .lib file though i am not
sure. Can someone please tell me what to do about this.

Thank You


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

hi,

IoGetConfigurationInformation can be used only in kernel mode and as
mentioned in the ddk, can be called only at PASSIVE_LEVEL. In order to get
drive information in user mode programs, try using the GetLogicalDrives and
GetDriveType API’s.

Regards.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Thank You for the prompt reply. I will try this out in office and let you know the results. Thank You once again.
Chris Pearson wrote: Exported as xxxxx@0 from ntoskrnl.lib. It looks
like you have a name-mangling problem. I think you need to either adjust
project config (preprocessor definitions or compiler flags) or wrap ntddk.h
in extern “C” block.

– CCP

----- Original Message -----
From: anjita jachak
To: NT Developers Interest List
Sent: Tuesday, February 12, 2002 8:58 PM
Subject: [ntdev] Unresolved Externals

Hi ,

I am using the function IoGetConfigurationInformation to get the number
of hard disks that are attached to my computer. I am doing this in VC++
however everytime i get a linking error which is ::

error LNK2001: unresolved external symbol “__declspec(dllimport) struct
_CONFIGURATION_INFORMATION *__cdecl
IoGetConfigurationInformation(void)”
(_imp?IoGetConfigurationInformation@@YAPAU_CONFIGURATION_INFORMATION@@XZ)

i think this is because i have not included a .lib file though i am not
sure. Can someone please tell me what to do about this.

Thank You


You are currently subscribed to ntdev as: xxxxx@yahoo.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

---------------------------------
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com