1

i know how to this in .net i want to know how in pure c and not c++

thanks.

John Dibling
  • 99,718
  • 31
  • 186
  • 324
Ali Tarhini
  • 5,278
  • 6
  • 41
  • 66

2 Answers2

1

You can use the COM interface to use WMI from pure C applications. WMI COM Reference: http://msdn.microsoft.com/en-us/library/aa389276(VS.85).aspx

Mahmoud Al-Qudsi
  • 28,357
  • 12
  • 85
  • 125
0

Using OLE you resolves instance of class ManagementClass and follow resolving all other interfaces. Also (if you use MSVC compiler) you can use #import directive to expose expected dll

Look at this sample on msdn: http://msdn.microsoft.com/en-us/library/aa392093(VS.85).aspx

Dewfy
  • 23,277
  • 13
  • 73
  • 121