Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "enumdevicedrivers" in [All]

psapi

.

private static extern bool EnumDeviceDrivers(

.

Declare Function EnumDeviceDrivers Lib "psapi.dll" (TODO) As TODO

.

private static extern bool EnumDeviceDrivers(

.

Remember, this ONLY enumerates device drivers that are currently loaded. If a plug-n-play device is not inserted, its driver probably won't be enumerated by EnumDeviceDrivers. With the 'load addresses' returned by this function, you can get the drivers' base names using the GetDeviceDriverBaseName function.

.

        private static extern bool EnumDeviceDrivers(

.

            success = EnumDeviceDrivers(null, 0, out bytesNeeded);

.

                Console.WriteLine("Call to EnumDeviceDrivers failed!  To get extended error information, call GetLastError.");

.

            success = EnumDeviceDrivers(ddAddresses, arraySizeBytes, out bytesNeeded);

.

                Console.WriteLine("Call to EnumDeviceDrivers failed!  To get extended error information, call GetLastError.");

.
Documentation
[EnumDeviceDrivers] on MSDN
.

This function takes a 'load address' that needs to be obtained from EnumDeviceDrivers.

.

        private static extern bool EnumDeviceDrivers(

.

            success = EnumDeviceDrivers(null, 0, out bytesNeeded);

.

                Console.WriteLine("Call to EnumDeviceDrivers failed!  To get extended error information, call GetLastError.");

.

            success = EnumDeviceDrivers(ddAddresses, arraySizeBytes, out bytesNeeded);

.

                Console.WriteLine("Call to EnumDeviceDrivers failed!  To get extended error information, call GetLastError.");


 
Access PInvoke.net directly from VS: