Difficulty importing library with VC++

Hello, I am having a small difficult using the SetupAPI library.  I
made the call: SetupDiDestroyDeviceInfoList and when I build my code,
it tells me that it is unable to resolve the reference to
__imp__SetupDiDestroyDeviceInfoList.  I went to MSDN and I found that
this is located in SetupAPI.lib.

In Visual Studio C++ .net, I went into the Project Properties and under
linker->Generl->Additional_Library_Directories, I added the path that
will point to SetupAPI.lib which has the function defined in it.

It still doesn't work.  Then I thought that maybe MSDN lied to me, so I
disected the binary of SetupAPI.lib file and found that it did in fact
have "__imp__SetupDiDestroyDeviceInfoList" defined inside this library.

So now I am sort of stuck because I didn't think that there was
something else I had to do to use this library.  I thought all i have
to do is call the function, add where the compiler could find the .lib
file for this function and thats it.  Do I have to add any code or
anything like that?  Is it possible that VC++ is confused?

0
TheFakeJon (91)
9/12/2006 3:25:50 AM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
575 Views

Similar Articles

[PageSpeed] 24

"sleeper" <TheFakeJon@gmail.com> wrote in message 
news:1158031549.943550.51460@i42g2000cwa.googlegroups.com...
> Hello, I am having a small difficult using the SetupAPI library.  I
> made the call: SetupDiDestroyDeviceInfoList and when I build my code,
> it tells me that it is unable to resolve the reference to
> __imp__SetupDiDestroyDeviceInfoList.  I went to MSDN and I found that
> this is located in SetupAPI.lib.
>
> In Visual Studio C++ .net, I went into the Project Properties and under
> linker->Generl->Additional_Library_Directories, I added the path that
> will point to SetupAPI.lib which has the function defined in it.
>
> It still doesn't work.  Then I thought that maybe MSDN lied to me, so I
> disected the binary of SetupAPI.lib file and found that it did in fact
> have "__imp__SetupDiDestroyDeviceInfoList" defined inside this library.
>
> So now I am sort of stuck because I didn't think that there was
> something else I had to do to use this library.  I thought all i have
> to do is call the function, add where the compiler could find the .lib
> file for this function and thats it.  Do I have to add any code or
> anything like that?  Is it possible that VC++ is confused?
>

Did you also add a dependency to SetupAPI.lib under the solution properties 
Configuration Properties\Linker\Input\Additional Dependencies?

-Pete 


0
Pete4450 (53)
9/12/2006 3:53:47 AM
Is the DLL and lib available on your machine?  Sometimes you have to 
download an SDK for various functionality.

Tom

"sleeper" <TheFakeJon@gmail.com> wrote in message 
news:1158031549.943550.51460@i42g2000cwa.googlegroups.com...
> Hello, I am having a small difficult using the SetupAPI library.  I
> made the call: SetupDiDestroyDeviceInfoList and when I build my code,
> it tells me that it is unable to resolve the reference to
> __imp__SetupDiDestroyDeviceInfoList.  I went to MSDN and I found that
> this is located in SetupAPI.lib.
>
> In Visual Studio C++ .net, I went into the Project Properties and under
> linker->Generl->Additional_Library_Directories, I added the path that
> will point to SetupAPI.lib which has the function defined in it.
>
> It still doesn't work.  Then I thought that maybe MSDN lied to me, so I
> disected the binary of SetupAPI.lib file and found that it did in fact
> have "__imp__SetupDiDestroyDeviceInfoList" defined inside this library.
>
> So now I am sort of stuck because I didn't think that there was
> something else I had to do to use this library.  I thought all i have
> to do is call the function, add where the compiler could find the .lib
> file for this function and thats it.  Do I have to add any code or
> anything like that?  Is it possible that VC++ is confused?
> 


0
tserface (3860)
9/12/2006 5:20:14 PM
Reply:

Similar Artilces:

HELP w/ importing PST file!!!
I had exported my Outlook Express 6.0 emails intoa PST file and now, on a different computer, can not seem to open the file or access my emails....please help! thanks! Not possible. OE cannot export to a PST format. What did you really do? -- Russ Valentine [MVP-Outlook] "Jeff" <jeff@zaltman.org> wrote in message news:02ab01c3c303$4af90da0$a001280a@phx.gbl... > I had exported my Outlook Express 6.0 emails intoa PST > file and now, on a different computer, can not seem to > open the file or access my emails....please help! thanks! I have two.pst files called back...

Flip Difficulty
I am running Visio 2003 SP1. I have drawn a home floor plan. I select the entire floorplan, and try to "flip" it (for example, I want the garage on the right instead of the left, so I mirror, or flip, the entire plan). I get an error message and then the drawing is mis-configured with lines going in odd directions, like it flipped some objects but not others. Here are two of the error messages 01. "An error (318) occurred during the action Flip Horizontal. Referenced cell Wall.629!Connections.X4 does not exist". 02. "An error (318) occurred during the action F...

how to import data from outlook express for mac
Hello, I'm changing my net from macintosh to windows xp, and I was wondering how to import all the data (messages, contacts, etc) from outlook express for macintosh to outlook express or outlook 2002 on my windows xp I have the outlook express macintosh files, but I can't import any data. Maybe I have to do another step before... Any idea? Thank you Xavi ...

Importing Addressbook
I am using MS Outlook 2003. I used the personal folder backup tool that I downloaded from Microsoft's website to back up my personal folders and addressbook before I rebuilt my computer. After reinstalling Office, I was able to import my mail settings but not my addressbook. The addressbook was backed up as a .pst file and Outlook won't recognize it when I try to import as a data file. Any help would be much appreciated. Shahab Why would you import a native file format? Just open it. -- Russ Valentine [MVP-Outlook] "Shahab Mushtaq" <s_mushtaq@hotmail.com>...

how to import messages to outlookexpress from outlook 2003
Can anyone plesae guide me as to how to import all folders or just one particular folder from outlook/office2003 to outlookexpress. outlook file format is pst while OLe is .dbx I am using oulook2003 on my desktop & outlook express on my Notebook but would like to syncronize upgload messages to my NB from desktop You must have Outlook on both machines as only Outlook can "translate" the ..pst file for export. Alternatively, you can export from your desktop Outlook to your desktop OE and then copy the files from the desktop OE to your laptop. --� Milly Staples [MVP - O...

.PST Difficulty
If you could follow the dialogue and help me out in anyway....I am a littl concerned as this is my only copy... Dialogue: Question I am getting this error when I attempt to copy the .pst file I have burned to a cd rom to my locasl hard disk: Cannot Copy Sept22: Invalid MS DOS Function I am a little concerned since since the machine I have taken this information from and burned to cd is no lonbger available...Any ideas? Response: How are you trying to copy the file? My Response I am just selecting it from the cd rom..and dragging it to a folder...As well I have tried Copy and Past...

Outlook 2002
I'm having a problem importing a PST file. I created the file (in Outlook 2002) on my desktop PC and saved it to a CD. I'm now trying to import that file from the CD to the copy of Outlook 2002 on my laptop PC. I keep getting an error message that says "File access is denied. You do not have the permission required to access the file . . . (file name)." Any ideas on what I'm doing wrong? Thanks! Steve Williams Steve Williams wrote: > I'm having a problem importing a PST file. I created the > file (in Outlook 2002) on my desktop PC and saved it to ...

Importing CSV files #3
Normally when you click on a csv file excel opens it witout problem. However I have one user who when they click on the csv file finds that it open in an unformatted state. In order to open the file properly she has to go through the import process and place a tick in the comma section. When this is done all the data is formatted correctly. I am able to open this file without problem on my machine. In order to try and fix this I uninstalled and reinstalled office. I also tried doing it under another profile on the same machine to see if it was a profile problem. It also failed. ...

Importing in Outlook 2002
I am trying to import a file from excel to outlook and have created a custom made contact form. When running the import wizard, it brings up the default in the mapping area instead of my custome made contact form. Any ideas?? I have made my custome form my default. Thanks! ...

Difficulty in setting hotmail acct. as main (personal) folder
Just recently I purchased a new Pocket PC handheld which came wit inbox(ppc) and outlook 2002(pc). I installed them both and they wor great. I can sync my emails to the unit and read them anywhere. However, I noticed that it will only import items from my persona folder (which seems is a non-html email acct). Question: Is it possible to configure outlook 2002 to make hotmail th personal folder? If not, would it be possible to create a macro tha can transfer all emails from the hotmail acct to the personal folder? It would be a time saver. Thanks, Hovi ----------------------------------...

Import-Mailbox cmdlet
I've read lots of docs on this but none of them makes it clear whether you can import multiple PSTs, the way you could with ExMerge. Ideally, I'd like to point the untility at Exchange Server on the one hand and the PST folder on the other and get it to populate the existing (but empty) user mailboxes. Failing that, being able to import multiple PSTs for a single user wouldn't be the end of the world. But doing one PST at a time certainly would be. Because we use BackupAssist to export quarterly PSTs, we have a lot of them (five years worth) Best - Anthony "anthony...

Difficulty importing library with VC++
Hello, I am having a small difficult using the SetupAPI library. I made the call: SetupDiDestroyDeviceInfoList and when I build my code, it tells me that it is unable to resolve the reference to __imp__SetupDiDestroyDeviceInfoList. I went to MSDN and I found that this is located in SetupAPI.lib. In Visual Studio C++ .net, I went into the Project Properties and under linker->Generl->Additional_Library_Directories, I added the path that will point to SetupAPI.lib which has the function defined in it. It still doesn't work. Then I thought that maybe MSDN lied to me, so I disected t...

Export works
Using Office 2003 - When I export from Outlook 2003 it work and creates the PST file. When I try to import, browsing for file, I cannot find the PST file to import? It is there when I use Windows Explorer? Is there a setting missing or what? Thanks Always choose your save locations carefully ;-) By default Outlook export to the following folder; C:\Documents and Settings\%username%\Local Settings\Application Data\Microsoft\Outlook\ Make sure you include hidden and system files and folders when searching for pst-file. -- Roady [MVP] www.howto-outlook.com Tips of the month: -Creatin...

Important task using visio
Hi, I have a very important presentation to give and am planning to give using visio but however am new to visio environment. Thepresentation is about say the task carried by 2 companies during a project that is the 2 companies share different responsibilities during project implementation The flow is: Comany A Task 1 Comapany B Task 2 Task 3 Company A Task 4 Company B Task 5 Task 6 The flow can be analogous to a computer program flow Can anyone help me how 2 implement in visio?? Hello Raj, There's the main Visio 2007 Help and How-to page over here: http://office.microsof...

Importing mail from Windows Mail to WLM
I recently upgraded from Vista to Windows 7 Home Premium. I successfully imported mail from Windows Mail to WLM but am unable to view the imported messages. Help! View | Layout | Folder Pane. Is: Show Storage Folders checked? -- Bruce Hagen MS-MVP [Mail] Imperial Beach, CA "len" <len@discussions.microsoft.com> wrote in message news:1D902CFE-2318-4345-9897-E66138F3AD4E@microsoft.com... >I recently upgraded from Vista to Windows 7 Home Premium. I successfully > imported mail from Windows Mail to WLM but am unable to view the...

Outlook changes dates on messages imported from Outlook Express
When importing e-mail messages from Outlook Express into Outlook, some of the original message dates and times are changed to the date and time of the import action. How can I import e-mail messages without losing the original date information? export from oe to outlook and the dates will be correct. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Author, Google and Other Search Engines (Visual QuickStart Guide) Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center...

Import/Export command missing
I am running Outlook 2002 on XP Pro. I can't find the import/export command under the File tab!!! How can I restore it? Thank you. Cyril ...

CWinApp Difficulties
I am beginning work on an application (let's call it PRO) that extends the functionality of our basic program (let's call the basic program PLUS). PRO will contain all the functionality of PLUS, so it makes sense (to me at least) to inherit as much as I can from PLUS to decrease the amount of code maintainance needed. Therefore, I have created a new project, and created a CPROView that inherits from CPLUSView, a CPRODoc that inherits from CPLUSDoc, and a CPROApp that inherits from CPLUSApp. The last class is where the problem is occuring. Everything compiles and runs, but the const...

Ranking difficulty
Hi All Have a small problem. I wish to do thh following: I created a ranking by ranking the scores and named it RANKID. RankId Name Score 1 JOhn 100 2 Mark 95 3 Greg 90 4 Mike 80 and then i'm calculating the difference between the value above it. like this 1 JOhn 0 2 Mark 5 3 Greg 5 4 Mike 10 I currently; Select max(score) from Tablex as x where rankid=x!rankid+1 and name=x!name which works fine however if i have a tied score like this 1 JOhn 100 2 Mark 90 2 Greg ...

Import RMS data to small business accounting 2006
We would like to have the ability to import RMS data into Small Business Accounting 2006 (new). Perhaps in the next service pack we could see that integration. Thank you ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Commu...

Importing Contacts & phonenumbers
Hi, When importing phone numbers like '+32 11 52 36 24' the bulk import tool from CRM3.0 creates the phonenumber like '11 52 36 24', so it drops the country code. How can I tell CRM3.0 to leave the countrycode alone and just import the whole text? Thanks I think you need to remove the + sign. -- Matt Wittemann http://icu-mscrm.blogspot.com "Powerbouwer" wrote: > Hi, > > When importing phone numbers like '+32 11 52 36 24' the bulk import tool > from CRM3.0 creates the phonenumber like '11 52 36 24', so it drops the > count...

importing mbox?
I've been using Microsoft Entourage on OS X. I'm switching to Windows and Outlook. Is there any way to import my email from Entourage to Outlook? Entourage exports mbox, but Outlook doesn't seem to be able to import mbox files. Advice? ...

Importing Data & Refresh Data Problem
I have for some time updating a worksheet in Excel 2002 from a CSV file. The source of that file has now switched from comma separated to tab separated. I can't seem to prevent Excel from trying to read the file wrong. I have tried renaming to .txt and .tab to no effect. I can't even import the tab-separated file into a blank worksheet within the same Excel file. The import text wizard will not start up. It seems that Excel knows about the original file and I haven't figured out how to remove that information. How do I cancel out Excel's inappropriate knowledge of the fi...

Professional Services Tools Library, KB898996
I am using PSTL to recreate the Sy00500 table, and one of the steps is to recreate a trigger that is advised by Toolkit. It says to use SQL Query analyzer, and open the Triggers.cmp file at this path: \GP\SQL\Install\0\Company I can find this path or the Triggers.cmp file anywhere on our Dynamics install. Am I missing something? ( I am on V10, SP3 and not V8 and V9 referred to in the TK) thanks! -- Doug Hi Doug, With Version 10, you can use the recently added "Database Maintenance" facility. This should be visible when viewed from Start --> Programs --> Microsft...

outlook difficulty
Hi When i attempt to open a hyperlink or even attempt to click on a signature in mails sent to me i get the following message. (This operation has been cancelled due to restrictions in effect on this computer-please contact your system administrator). I should say i'm the sole user of this computer and cannot get to the bottom of this issue ,any help would be very much appreciated. Thanks In Advance Robert Johnson, you wrote on Wed, 4 Apr 2007 15:18:29 +0100: > This operation has been cancelled due to restrictions in effect on > this computer-please contact your system...