Click here to Skip to main content
15,920,053 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionretrieve executable path by hwnd Pin
Giorgi Dalakishvili11-Jun-07 8:03
mentorGiorgi Dalakishvili11-Jun-07 8:03 
AnswerRe: retrieve executable path by hwnd Pin
Mark Salsbery11-Jun-07 8:41
Mark Salsbery11-Jun-07 8:41 
GeneralRe: retrieve executable path by hwnd Pin
Giorgi Dalakishvili11-Jun-07 8:52
mentorGiorgi Dalakishvili11-Jun-07 8:52 
GeneralRe: retrieve executable path by hwnd Pin
Mark Salsbery11-Jun-07 8:55
Mark Salsbery11-Jun-07 8:55 
GeneralRe: retrieve executable path by hwnd Pin
Mark Salsbery11-Jun-07 9:09
Mark Salsbery11-Jun-07 9:09 
GeneralRe: retrieve executable path by hwnd Pin
Giorgi Dalakishvili11-Jun-07 9:19
mentorGiorgi Dalakishvili11-Jun-07 9:19 
GeneralRe: retrieve executable path by hwnd Pin
Mark Salsbery11-Jun-07 9:22
Mark Salsbery11-Jun-07 9:22 
QuestionAutomatically upgrade firmware for home routers Pin
capulett11-Jun-07 6:25
capulett11-Jun-07 6:25 
I have an application which needs to upgrade firmwares of home routers automatically. I sniffed the outside packets when I click "upgrade" button and put everything I got in the code and do an HTTP Post function(not API. It works for other senario.). But it does not work. My question is why it does not work and how to make it work. Is it because HTTP protocol does not allow file upload like this? I have to have a web browser or email application to assist the file uploading?? Please advise me.

My code looks like this:
virtual int UpgradeFirmware(CString firmwareImage, CString RouterIP, CString Username, CString Password)
{
CString url = "http://" + RouterIP + "/upgrade.cgi";
CString ref = "http://" + RouterIP + "/Upgrade.htm";

CString request = "-----------------------------7d71f91e504ea";
request += "\nContent-Disposition: form-data; name=\"UpgradeFile\";";
request += " filename=\"C:\\firmware\\Netgear WGR614 V2\\wgr614v3_v2_16rc4.chk\"";
request += "\nContent-Type: application/octet-stream";
request += "\n-----------------------------7d71f91e504ea--";

CString page = HTTPPost(url, request, Username, Password, ref);
if(page.Find("Settings are successful.")>0)
return 0;
}


capulett
QuestionRe: Automatically upgrade firmware for home routers Pin
David Crow11-Jun-07 6:39
David Crow11-Jun-07 6:39 
AnswerRe: Automatically upgrade firmware for home routers Pin
capulett11-Jun-07 7:03
capulett11-Jun-07 7:03 
QuestionExport File to Excel with CSpreadSheet Class Pin
mikobi11-Jun-07 4:55
mikobi11-Jun-07 4:55 
QuestionRe: Export File to Excel with CSpreadSheet Class Pin
David Crow11-Jun-07 6:05
David Crow11-Jun-07 6:05 
QuestionEdit control Pin
tom groezer11-Jun-07 4:47
tom groezer11-Jun-07 4:47 
QuestionRe: Edit control Pin
David Crow11-Jun-07 6:02
David Crow11-Jun-07 6:02 
AnswerRe: Edit control Pin
tom groezer11-Jun-07 6:08
tom groezer11-Jun-07 6:08 
QuestionRe: Edit control Pin
David Crow11-Jun-07 6:22
David Crow11-Jun-07 6:22 
AnswerRe: Edit control Pin
tom groezer11-Jun-07 8:29
tom groezer11-Jun-07 8:29 
GeneralRe: Edit control Pin
David Crow11-Jun-07 8:35
David Crow11-Jun-07 8:35 
GeneralRe: Edit control Pin
tom groezer11-Jun-07 21:04
tom groezer11-Jun-07 21:04 
QuestionRe: Edit control Pin
David Crow12-Jun-07 2:30
David Crow12-Jun-07 2:30 
QuestionFind Parent Dialog data in custom control on dialog? [modified] Pin
ldsdbomber11-Jun-07 4:00
ldsdbomber11-Jun-07 4:00 
AnswerRe: Find Parent Dialog data in custom control on dialog? Pin
ldsdbomber11-Jun-07 6:21
ldsdbomber11-Jun-07 6:21 
GeneralRe: Find Parent Dialog data in custom control on dialog? Pin
Mark Salsbery11-Jun-07 6:54
Mark Salsbery11-Jun-07 6:54 
GeneralRe: Find Parent Dialog data in custom control on dialog? Pin
ldsdbomber11-Jun-07 21:27
ldsdbomber11-Jun-07 21:27 
GeneralRe: Find Parent Dialog data in custom control on dialog? Pin
Mark Salsbery12-Jun-07 6:31
Mark Salsbery12-Jun-07 6:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.