TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
gongdehui
NA
63
0
Error :Unable to load DLL (Setupapi.lib)
Nov 2 2004 2:22 AM
In my C# code: public class Win32 { ...... [DllImport("Setupapi.lib", CharSet=CharSet.Auto)] public static extern IntPtr SetupDiGetClassDevs( [In]System.Guid ClassGuid, [In]string Enumerator, [In]IntPtr hwndParent, [In]int Flags ); ...... } public class usbdevice { ...... hDevInfo = Win32.SetupDiGetClassDevs(Win32.GUID_DEVINTERFACE_USB_DEVICE, //usb class GUID null, // Enumerator ...... } when invoke the SetupDiGetClassDevs(),a error occurs,it says: "An unhandled exception of type 'System.DllNotFoundException' occured in usbdevice.exe" "Additionas information:Unable to loas DLL (Setupapi.lib)". what's the problem? Thanks! new IntPtr(null), Win32.DIGCF_PRESENT | Win32.DIGCF_DEVICEINTERFACE); //flags
Reply
Answers (
4
)
Linking forms
Why SetupDiEnumDeviceInterfaces() always returns false?