Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If Windows Defender displays a warning message after blocking your program, you should have the option to add your program to a list of "allowed items" which will allow it to run unencumbered while real time protection remains enabled. Admittedly, this is only a viable option if you are working with non-production/personal code (and if Defender is even displaying a warning message at all).</p> <p>That said, it is possible that Defender has detected some possible risk based on the way you are using the wininet library -- would it be possible to use lower-level sockets instead? If this is the only network code you use, it would be easy to replicate it through the generic winsock library and there's a good chance that Defender would be much less inclined to block your program if you use it instead of wininet. <hr> <strong>Edit</strong>: In addition to testing the MFC fragment separately as I suggested in the comments below, it may be worthwhile to try it the standard WinAPI way -- the idea being, if there's something wrong with the wininet library on your computer, this code should also fail to connect:</p> <pre><code>int read = 0; char* str = "*/*", buff[1024] = {}; HINTERNET inet = InternetOpen("GRB", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0); if (!(inet=InternetConnect(inet, "twitter.com", 80, "username", "password", INTERNET_SERVICE_HTTP, 0, 0))) cout &lt;&lt; "conn failed" &lt;&lt; endl; if (!(inet=HttpOpenRequest(inet, "GET", "/account/verify_credentials.xml", NULL, NULL, (const char**)&amp;str, 0, 0))) cout &lt;&lt; "open failed" &lt;&lt; endl; if (!HttpSendRequest(inet, NULL, 0, NULL, 0)) cout &lt;&lt; "send failed" &lt;&lt; endl; InternetReadFile(inet, buff, 1023, (DWORD*)&amp;read); cout &lt;&lt; buff &lt;&lt; endl; system("pause"); </code></pre> <p>(designed to be a console program, be sure to include the correct headers/libraries)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload