Witam wszystkich Mam utworzony DLL, który odczytuje dane w pliku tekstowym na serwerze i wszystko działa poprawnie.
Teraz chcę podzielić adres URL w DLL i przekazać część ścieżki jako parametr wejściowy w moim kodzie mql, ale to nie działa.
moja biblioteka DLL to:
Wstawiono kod extern C {__declspec (dllexport) int main (std :: wstring Patc) {std :: ofstream fout (Lc: \\ test \\ _ test.htm); std :: wstring url = Lhttps:/mysite.com/ Patch; HINTERNET hopen = InternetOpen (LMyAppName, INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0); if (hopen) {flagi DWORD = INTERNET_FLAG_DONT_CACHE; if (url.find (Lhttps:/) == 0) flags | = INTERNET_FLAG_SECURE; HINTERNET hinternet = InternetOpenUrl (hopen, url.c_str (), NULL, 0, flagi, 0); if (hinternet) {char buf # 91; 10000 # 93 ;; DWORD received = 0; int i; while (InternetReadFile (hinternet, buf, sizeof (buf), received)) {if (! received) break;/fout.write(buf, received); int I = 0; int II = 5; for (i = 0; i = = received; i ) {//- mój odczytany kod jest dobry !!! } system (PAUSE); } InternetCloseHandle (hinternet); } InternetCloseHandle (hopen); } return 0; }}
Mój kod Test Mql4 to:
Wstawiono kod #import Dll1.dll int main (string Patch); #import nt OnInit () {Print (Serial:, main (Read.txt)); return (INIT_SUCCEEDED); }