I am new to .NET,c# and windows programming. I want to increase the max number of connections that the .NET web browser control can create per server. I found that by changing INTERNET_OPTION_MAX_CONNS_PER_SERVER option using InternetSetOption function in wininet.dll, i can do that.
I have done the below import.
[DllImport("wininet.dll", SetLastError = true, CharSet = CharSet.Auto)]
private static extern bool InternetSetOption(
IntPtr hInternet,
int dwOption,
IntPtr lpBuffer,
int lpdwBufferLength);
From the msdn doc, IntPtr lpBuffer should be an unsigned long int. Can anyone please tell me how i can create IntPtr for a unsigned long int variable.
Some sample invocation of InternetSetOption in c# to set max connections to 50 will be helpful.
PS: i cannot use change the registry settings using regedit.exe to increase the number of connections