C# translation and call of SetupDiBuildClassInfoListEx(...)

  • Thread starter Thread starter Kerem Gümrükcü
  • Start date Start date
K

Kerem Gümrükcü

Hi,

can someone please give me a translation of this call from C to C#:


WINSETUPAPI BOOL WINAPI
SetupDiBuildClassInfoListEx(
IN DWORD Flags,
OUT LPGUID ClassGuidList,
IN DWORD ClassGuidListSize,
OUT PDWORD RequiredSize,
IN PCTSTR MachineName, OPTIONAL
IN PVOID Reserved,
);

Here is the MSDN detail:
http://msdn.microsoft.com/en-us/library/ms792976.aspx



TIA

Regards

Kerem

--
 
Hi,

here are the solved and stable working versions:

[DllImport("SetupAPI.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool SetupDiBuildClassInfoList([In] int flags,
[Out] Guid[] guidList,
[In] uint guidListSize,
[Out] out uint requiredSize);

[DllImport("setupapi.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool SetupDiBuildClassInfoListEx([In] uint Flags,
[Out] Guid[] ClassGuidList,
[In] uint ClassGuidListSize,
[Out] out uint RequiredSize,
[In] string MachineName,
[In, Out] IntPtr Reserved);


Regards

Kerem


--
 
Back
Top