Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# equivalent of VB DLL function declaration (InternetSetOption)?

Tags:

c#

vb.net

What is the C# equivalent of this VB code?

Private Declare Auto Function InternetSetOption Lib "wininet.dll" (ByVal hInternet As IntPtr, ByVal dwOption As Integer, ByVal lpBuffer As IntPtr, ByVal lpdwBufferLength As Integer) As Boolean
like image 282
Yo Momma Avatar asked May 10 '11 07:05

Yo Momma


1 Answers

Here it is:

[DllImport("wininet.dll", SetLastError = true, CharSet = CharSet.Auto)]
public static extern bool InternetSetOption(
    IntPtr hInternet, 
    int dwOption, 
    IntPtr lpBuffer, 
    int dwBufferLength
);
like image 52
Darin Dimitrov Avatar answered Nov 16 '22 00:11

Darin Dimitrov