MT4 false alarm while passing strings from MQL4 when MQL4 has been pre-compiled

 

After much struggling with passing strings to and from MQL4 I found a way to do it by passing arrays of strings.  The problem now, if you can even call it a problem ,is that the logs are falsely reporting an error.

2013.01.31 13:37:59    VNetSigFeed EURUSD,H4: function '__winhttp_WinHttpQueryOption' call from dll 'mt4_winhttp.dll' critical error c0000005 at 777CE41B.

The reason I say falsely reporting an error is because the function actually succeeded and produced the correct output even though this error is being displayed.  This false error is reported the second time the function is used, but not the first or the third. Here is the relevant code....

void __winhttp_WinHttpQueryOption(string &retval[], int offset, int resource, int option);

string winhttp_WinHttpQueryOption(int offset, int resource, int option) {
    string s1 = "################################################################";
    string s2 = "################################################################";
    string s3 = "################################################################";
    string s4 = "###############################################################";   
    string p[1];
    string out;
   
    p[0] = StringConcatenate(s1,s2,s3,s4);   
    __winhttp_WinHttpQueryOption(p, offset, resource, option);  
    out = p[0];
    return (out);

}

The weird part is there is a solution to make this false error go away temporarily. Recompile the MQL4. This causes the expert adviser to reload and the false error doesn't return. When meta-trader is closed and re-opened the error message returns.  Does anyone know a hack to suppress this odd behavior?

Reason: