Hello guys i'm an other time here!
i have this code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
#include "iostream"
#include "windows.h"
#include <msclr\marshal_cppstd.h>
namespace Downloadervc {
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
using namespace std;
using namespace msclr::interop;
//lot of shift...
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
System::String^ url;
System::String^ path;
url = this->textBox1->Text;
path = this->textBox2->Text;
std::string sUrl = marshal_as<std::string>(url);
std::string sPath = marshal_as<std::string>(path);
URLDownloadToFileA(NULL, sUrl.c_str(), sPath.c_str(),0, NULL);
}
|
this code looks great but he gives me errors that i can't understand!
Why?
using visual studio 2015, CLR application with 1 form
i'm just learning winapi so i'm a little bit noob ahaha |
Last edited on
Thanks! this way worked for me
but why my way didn't work?
EDIT
and for the download status? (i mean percentage)
EDIT 2
OMG That's a really slow download! Is it normal?
Last edited on