473,729 Members | 2,309 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with LNK2019 error and DiInstallDriver function

Hello, I was hoping someone could help me with a compile issue I'm
having in Visual Studio 2005 using the v6.0 Microsoft SDK. I
apologize in advance if I'm posting to any groups that don't relate to
this topic. I'm just trying to hit the groups that seem relevant.

I have an application that is installing Drivers to the OS. I was
using the UpdateDriverFor PlugAndPlayDevi ces() function to handle
this. It works fine, but on VISTA I get prompted by Windows Security
if the Driver isn't pre-installed first. To avoid this I want to use
the DiInstallDriver () function which will Pre-Install the driver first
and then install it to any device that uses it.

The problem I'm having is that everytime I try to compile now that
I've added a reference in my code to DiInstallDriver (), I get the
following error:

Error 13 error LNK2019: unresolved external symbol _DiInstallDrive rW
referenced in function "private: void __thiscall
ScanHardware::U pdateDriver(cla ss ScanResult *)" (?
UpdateDriver@Sc anHardware@@AAE XPAVScanResult@ @@Z) ScanHardware.ob j
Error 14 fatal error LNK1120: 1 unresolved externals C:\Projects
\UIUHWScan++\De bug\UIUHWScan++ .exe 1

I'm a relative novice in the area of C++, so ANY help would be
greatly appreciated.

Apr 11 '07 #1
1 2620

"Rymfax" <cw*****@bigban gllc.comwrote in message
news:11******** **************@ n76g2000hsh.goo glegroups.com.. .
Hello, I was hoping someone could help me with a compile issue I'm
having in Visual Studio 2005 using the v6.0 Microsoft SDK. I
apologize in advance if I'm posting to any groups that don't relate to
this topic. I'm just trying to hit the groups that seem relevant.

I have an application that is installing Drivers to the OS. I was
using the UpdateDriverFor PlugAndPlayDevi ces() function to handle
this. It works fine, but on VISTA I get prompted by Windows Security
if the Driver isn't pre-installed first. To avoid this I want to use
the DiInstallDriver () function which will Pre-Install the driver first
and then install it to any device that uses it.

The problem I'm having is that everytime I try to compile now that
I've added a reference in my code to DiInstallDriver (), I get the
following error:
From the DiInstallDriver documentation:

"Declared in newdev.h. Include newdev.h. Link to newdev.lib. "
However, since this is a Vista-only function, I would suggest that you use
LoadLibrary and GetProcAddress to call it if available, that way your app
won't totally refuse to run on XP and earlier.

>
Error 13 error LNK2019: unresolved external symbol _DiInstallDrive rW
referenced in function "private: void __thiscall
ScanHardware::U pdateDriver(cla ss ScanResult *)" (?
UpdateDriver@Sc anHardware@@AAE XPAVScanResult@ @@Z) ScanHardware.ob j
Error 14 fatal error LNK1120: 1 unresolved externals C:\Projects
\UIUHWScan++\De bug\UIUHWScan++ .exe 1

I'm a relative novice in the area of C++, so ANY help would be
greatly appreciated.

Apr 20 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2161
by: Vishal Saxena | last post by:
Hi, I am new to this news group, hope to get prompt solution from you, gurus of VC. Well i had a project developed in VC++ 6.0, it uses Adobe Plugin Development SDK, I am trying to upgrade my project to VC++.NET, below is the code snipplet from the project
1
2126
by: Hadi | last post by:
Hi, I have two files libqdbm.dll.a and qdbm.dll. In cygwin libqdbm.dll.a is located in /usr/local/lib while qdbm.dll is located in windows/system32. I have my test project which I compiled in cygwin using the following command: gcc -I/usr/local/include -o test test.c -L/usr/local/lib -lqdbm
3
5848
by: YAN KANG / SU | last post by:
Hi, All I am migrating to Studio .NET 2003 from Studio 6.0 and Studio .NET 2002. When I compiled my code, which is compilable both in VC++ 6.0 and Studio .NET 2002, I have an error LNK2019 as the following ------------------------------------------------------------------------- error LNK2019: unresolved external symbol "class CPV3<double> __cdecl operator*(double,class CPV3<double> const &)" (??D@YA?AV?$CPV3@N@@NABV0@@Z) referenced in...
3
2224
by: Chris B | last post by:
Im trying out VS.NET 2003 by trying to make my own single linked list library. Im trying to use templates but keep getting LNK2019 errors. Right now I slimmed down my project to just the main.cpp, linked list.cpp/h and Node.cpp/h My error messages: LibTest error LNK2019: unresolved external symbol "public: __thiscall CSL::SingleLinkedList<int>::~SingleLinkedList<int>(void)" (??1?$SingleLinkedList@H@CSL@@QAE@XZ) referenced in function...
2
1581
by: hazizpour | last post by:
Hello I hope I am in the correct newsgroup, if not please let me know. I am trying to build a sample for using a certain library ( IFC mapping to C++ classes, see www.cstb.fr) with MS Visual Studio 2003. When building a sample program, I get the error mentioned in the title: LNK2019 Here is a snippet of the error message:
6
4195
by: Nicros | last post by:
Hi, I have a simple project, with a main application and a static library. I call a function from one of the classes in the static lib, but during compile time I get the LNK2019 problem. Strange thing is that if I call a different function there is no compile error with that one. Both public, both defined in the header and implemented in the cpp file.
2
5282
by: rangalo | last post by:
Hi All, I have succeeded in compiling a massive project, originally from vc6 to VS .Net 2005. Now, while linking I am having loads of linker errors with the above code. LNK20019 and LNK2001. Giving error msg that some symbol is not found. Actually, the library with the symbol has been already compiled as dll. here is the buildlog of one of the projects in the solution. I also attach the implementation of a small class which is referenced...
1
3973
by: Rymfax | last post by:
I have an application that is installing Drivers to the OS. I was using the UpdateDriverForPlugAndPlayDevices() function to handle this. It works fine, but on VISTA I get prompted by Windows Security if the Driver isn't pre-installed first. To avoid this I want to use the DiInstallDriver() function which will Pre-Install the driver first and then install it to any device that uses it. The problem I'm having is that everytime I try to...
4
9056
by: jk2l | last post by:
Error 10 error LNK2019: unresolved external symbol __imp__glBindTexture@8 referenced in function "public: void __thiscall GLTexture::Use(void)" (?Use@GLTexture@@QAEXXZ) GLTexture.obj Error 11 error LNK2019: unresolved external symbol __imp__glEnable@4 referenced in function "public: void __thiscall GLTexture::Use(void)" (?Use@GLTexture@@QAEXXZ) GLTexture.obj Error 12 error LNK2001: unresolved external symbol __imp__glEnable@4 Model_3DS.obj ...
2
11483
by: hjazz | last post by:
Hi all, I'm new to VS, and I'm using Visual Studio .NET 2003. I'm trying to write a program which uses pcap libraries. However, I keep getting the following errors: error LNK2019: unresolved external symbol __imp__inet_ntoa@4 referenced in function _got_packet error LNK2019: unresolved external symbol __imp__ntohs@4 referenced in function _got_packet error LNK2019: unresolved external symbol _Search referenced in function _got_packet...
0
9426
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9200
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9142
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6022
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4795
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3238
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2680
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2163
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.