こんにちはすべて私は、サーバー上のテキストファイル内のデータを読み取るDLLを作成し、すべて正常に動作します。
今私は、DLL内のURLを分割し、パスの一部を入力パラメータとして私のmqlコードで渡したいが、動作しません。
私のDLLは:
挿入されたコードextern C {__declspec(dllexport)int main(std :: wstring Patc){std :: ofstream fout(Lc:\\ test \\ _ test.htm); std :: wstring url = Lhttps://mysite.com/ パッチ。 HINTERNET hopen = InternetOpen(LMyAppName、INTERNET_OPEN_TYPE_PRECONFIG、NULL、NULL、0); if(hopen){DWORD flags = INTERNET_FLAG_DONT_CACHE; if(url.find(Lhttps://)== 0)flags | = INTERNET_FLAG_SECURE; HINTERNET hinternet = InternetOpenUrl(hopen、url.c_str()、NULL、0、flags、0); if(hinternet){char buf#91; 10000#93 ;; DWORD受信= 0; int i; (InternetReadFile(hinternet、buf、sizeof(buf)、received)){if(!received)break;/fout.write(buf、received); int I = 0; int II = 5; for(i = 0; i lt; received; i ){// - 私の読み取りコードは良いです!!! }システム(PAUSE); } InternetCloseHandle(hinternet); } InternetCloseHandle(hopen); } 0を返します。 }}
私のコードテストMql4です:
挿入されたコード#import Dll1.dll int main(文字列パッチ); #import nt OnInit(){Print(シリアル:、main(Read.txt));リターン(INIT_SUCCEEDED); }