truncation of constant value Error

 

Hi,

more annoying than a major problem, but when I try and use the following I get the "truncation of constant value Error"

#define INTERNET_FLAG_RELOAD            0x80000000

#import "wininet.dll"
   int InternetOpenUrlW(int, string, string, int, int, int);
#import

InternetOpenUrlW(hOpen, sUrl, NULL, 0, INTERNET_FLAG_RELOAD, 0);

I realise that 0x80000000 is equivalent to the integer 2147483648, and that an integer in mql has a maximum value of 2147483647 and this is causing the error, but does anyone know a workaround?

Thanks

PaulB

 
Paul_B: I realise that 0x80000000 is equivalent to the integer unsigned integer 2147483648, and that an integer in mql has a maximum value of 2147483647
// int InternetOpenUrlW(int, string, string,  int,  int,  int);
   int InternetOpenUrlW(int, string, string, uint, uint, uint);
InternetOpenUrl function (Windows)
http://msdn.microsoft.com /en-us /library /windows /desktop /aa385098(v=vs.85).aspx
HINTERNET InternetOpenUrl(
  _In_  HINTERNET hInternet,
  _In_  LPCTSTR lpszUrl,
  _In_  LPCTSTR lpszHeaders,
  _In_  DWORD dwHeadersLength,
  _In_  DWORD dwFlags,
  _In_  DWORD_PTR dwContext
);
 
Paul_B:

Hi,

more annoying than a major problem, but when I try and use the following I get the "truncation of constant value Error"

I realise that 0x80000000 is equivalent to the integer 2147483648, and that an integer in mql has a maximum value of 2147483647 and this is causing the error, but does anyone know a workaround?

Thanks

PaulB

#import "wininet.dll"
   int InternetOpenUrlW(int, string, string, int, uint, int);
#import
 

Brilliant, thanks, that was simple.

Kind regards

PaulB

Reason: