[Solved] Uploading to an FTP server

I don’t know C++/CLI, but the following statement is certainly wrong: _FtpWebRequest->Method = System::Net::WebRequestMethods::Ftp.UploadFile; System::Net::WebRequestMethods::Ftp is a type and, as the error message indicates (you could have given us the line number!) you’re trying to use it as an expression. Are you trying to obtain a pointer to a static member function? Did you thus … Read more

[Solved] C++ Cli code stucked [closed]

The code you provided does not work on any numbers. The only thing it does is construct some SQL query check its result During the SQL-query-construction, the code does not assume any “numbers” to be provided. It actually uses a variable called password_txt->Text, which suggests it’s some form of TextBox control. The code gets the … Read more

[Solved] Can the delete operator be used instead of the Marshal.FreeHGlobal method to free memory from a wchar_t*?

Don’t use Marshal::StringToHGlobalUni in C++/CLI. Use either PtrToStringChars (accesses Unicode characters in-place, no allocation) or marshal_as<std::wstring> (manages the allocation with a smart pointer class that will free it correctly and automatically) Apart from the fact that StringToHGlobalUni requires you to free the memory manually, the name of that function is completely misleading. It has absolutely … Read more