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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?iso-8859-1?B?S2VyZW0gR/xtcvxrY/w=?=

    #1

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

    Hi,

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


    WINSETUPAPI BOOL WINAPI
    SetupDiBuildCla ssInfoListEx(
    IN DWORD Flags,
    OUT LPGUID ClassGuidList,
    IN DWORD ClassGuidListSi ze,
    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

    --
    -----------------------
    Beste Grüsse / Best regards / Votre bien devoue
    Kerem Gümrükcü
    Latest Project: http://www.codeplex.com/restarts
    Latest Open-Source Projects: http://entwicklung.junetz.de
    -----------------------
    "This reply is provided as is, without warranty express or implied."

  • =?iso-8859-1?B?S2VyZW0gR/xtcvxrY/w=?=

    #2
    [SOLVED ]Re: C# translation and call of SetupDiBuildCla ssInfoListEx(.. .)

    Hi,

    here are the solved and stable working versions:

    [DllImport("Setu pAPI.dll")]
    [return: MarshalAs(Unman agedType.Bool)]
    public static extern bool SetupDiBuildCla ssInfoList([In] int flags,
    [Out] Guid[] guidList,
    [In] uint guidListSize,
    [Out] out uint requiredSize);

    [DllImport("setu papi.dll", SetLastError = true)]
    [return: MarshalAs(Unman agedType.Bool)]
    private static extern bool SetupDiBuildCla ssInfoListEx([In] uint Flags,
    [Out] Guid[] ClassGuidList,
    [In] uint ClassGuidListSi ze,
    [Out] out uint RequiredSize,
    [In] string MachineName,
    [In, Out] IntPtr Reserved);


    Regards

    Kerem


    --
    -----------------------
    Beste Grüsse / Best regards / Votre bien devoue
    Kerem Gümrükcü
    Latest Project: http://www.codeplex.com/restarts
    Latest Open-Source Projects: http://entwicklung.junetz.de
    -----------------------
    "This reply is provided as is, without warranty express or implied."
    "Kerem Gümrükcü" <kareem114@hotm ail.comschrieb im Newsbeitrag
    news:u8410808IH A.5224@TK2MSFTN GP05.phx.gbl...
    Hi,
    >
    can someone please give me a translation of this call from C to C#:
    >
    >
    WINSETUPAPI BOOL WINAPI
    SetupDiBuildCla ssInfoListEx(
    IN DWORD Flags,
    OUT LPGUID ClassGuidList,
    IN DWORD ClassGuidListSi ze,
    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
    >
    --
    -----------------------
    Beste Grüsse / Best regards / Votre bien devoue
    Kerem Gümrükcü
    Latest Project: http://www.codeplex.com/restarts
    Latest Open-Source Projects: http://entwicklung.junetz.de
    -----------------------
    "This reply is provided as is, without warranty express or implied."

    Comment

    Working...