Click here to Skip to main content
16,006,001 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Bloody sdk memory exception? Pin
fjdiewornncalwe25-Oct-10 4:26
professionalfjdiewornncalwe25-Oct-10 4:26 
QuestionRightJustify a widechar string Pin
T.RATHA KRISHNAN13-Oct-10 1:08
T.RATHA KRISHNAN13-Oct-10 1:08 
AnswerRe: RightJustify a widechar string Pin
Chris Losinger13-Oct-10 1:24
professionalChris Losinger13-Oct-10 1:24 
GeneralRe: RightJustify a widechar string Pin
T.RATHA KRISHNAN13-Oct-10 1:29
T.RATHA KRISHNAN13-Oct-10 1:29 
GeneralRe: RightJustify a widechar string Pin
Chris Losinger13-Oct-10 1:31
professionalChris Losinger13-Oct-10 1:31 
GeneralRe: RightJustify a widechar string Pin
CPallini13-Oct-10 1:38
mveCPallini13-Oct-10 1:38 
AnswerRe: RightJustify a widechar string Pin
Cedric Moonen13-Oct-10 1:49
Cedric Moonen13-Oct-10 1:49 
QuestionProxy authentication failed error code is 407. Same code works fine without proxy. Pin
amar_mhetre13-Oct-10 0:49
amar_mhetre13-Oct-10 0:49 
The above code works fine if no proxy authentication at server side. It fails as soon as proxy authentication is applied.
Please help me to sort out whre i am wrong. Any kind of help appreciated.

CInternetSession ises(NULL,1,INTERNET_OPEN_TYPE_PROXY, _T("192.168.9.10:8080"),NULL);
CFile* file=new CFile();//There might occur a connection error
try
{
CString url = _T("http://someurl.com/somepath";)
DWORD dwFlags = INTERNET_FLAG_TRANSFER_ASCII | INTERNET_FLAG_EXISTING_CONNECT;
file = ises.OpenURL(url);//CInternetSession::OpenURL(url) returns a source code in CHttpFile;

}
catch(CInternetException* e)
{ //If an error occured, show messagebox with errorcode

} //catch(CInternetException *ex)
catch(CException *ex)
{

WCHAR str[500];
DWORD errorCode = GetLastError();
ex->GetErrorMessage(str, GetLastError());
AfxMessageBox(str);
}

CString result;
UINT len=1024;
char buf[1024];
source=L"";
while(len > 0)
{
len=file->Read(buf,1024);
if(len>0)
result.Append(CString(buf),len);
}
file->Close();
ises.Close();

Thanks and Regards,
Amar Mhetre
AnswerRe: Proxy authentication failed error code is 407. Same code works fine without proxy. Pin
Rahul Vaishnav13-Oct-10 1:56
Rahul Vaishnav13-Oct-10 1:56 
GeneralRe: Proxy authentication failed error code is 407. Same code works fine without proxy. Pin
amar_mhetre13-Oct-10 2:06
amar_mhetre13-Oct-10 2:06 
GeneralRe: Proxy authentication failed error code is 407. Same code works fine without proxy. Pin
Rahul Vaishnav13-Oct-10 2:45
Rahul Vaishnav13-Oct-10 2:45 
GeneralRe: Proxy authentication failed error code is 407. Same code works fine without proxy. Pin
amar_mhetre13-Oct-10 2:56
amar_mhetre13-Oct-10 2:56 
QuestionDebug assersion error Pin
MKC00213-Oct-10 0:33
MKC00213-Oct-10 0:33 
AnswerRe: Debug assersion error Pin
Niklas L13-Oct-10 0:35
Niklas L13-Oct-10 0:35 
GeneralRe: Debug assersion error Pin
MKC00215-Oct-10 2:37
MKC00215-Oct-10 2:37 
AnswerRe: Debug assersion error Pin
David Crow13-Oct-10 8:16
David Crow13-Oct-10 8:16 
GeneralRe: Debug assersion error Pin
MKC00215-Oct-10 2:40
MKC00215-Oct-10 2:40 
QuestionRe: Debug assersion error Pin
David Crow15-Oct-10 2:49
David Crow15-Oct-10 2:49 
AnswerRe: Debug assersion error Pin
MKC00216-Oct-10 3:11
MKC00216-Oct-10 3:11 
AnswerRe: Debug assersion error Pin
David Crow16-Oct-10 11:24
David Crow16-Oct-10 11:24 
GeneralRe: Debug assersion error [modified] Pin
MKC00217-Oct-10 18:49
MKC00217-Oct-10 18:49 
AnswerRe: Debug assersion error Pin
David Crow18-Oct-10 9:56
David Crow18-Oct-10 9:56 
QuestionFile creation date and time Pin
john563212-Oct-10 21:09
john563212-Oct-10 21:09 
AnswerRe: File creation date and time Pin
trotwa12-Oct-10 21:27
trotwa12-Oct-10 21:27 
GeneralRe: File creation date and time Pin
Richard MacCutchan12-Oct-10 22:39
mveRichard MacCutchan12-Oct-10 22:39 

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.