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

C / C++ / MFC

 
GeneralRe: CString with WNetAddConnection2 Pin
14-Feb-02 6:57
suss14-Feb-02 6:57 
GeneralRe: CString with WNetAddConnection2 Pin
Joaquín M López Muñoz14-Feb-02 7:02
Joaquín M López Muñoz14-Feb-02 7:02 
GeneralRe: CString with WNetAddConnection2 Pin
Michael Dunn14-Feb-02 7:51
sitebuilderMichael Dunn14-Feb-02 7:51 
GeneralCToolBar and 256 colors Pin
RobJones14-Feb-02 5:14
RobJones14-Feb-02 5:14 
GeneralRe: CToolBar and 256 colors Pin
Joaquín M López Muñoz14-Feb-02 6:20
Joaquín M López Muñoz14-Feb-02 6:20 
GeneralRe: CToolBar and 256 colors Pin
Nish Nishant14-Feb-02 8:44
sitebuilderNish Nishant14-Feb-02 8:44 
GeneralCInternetSession::OpenURL Pin
Ola Carlsson14-Feb-02 5:11
Ola Carlsson14-Feb-02 5:11 
GeneralRe: CInternetSession::OpenURL Pin
RobJones14-Feb-02 5:18
RobJones14-Feb-02 5:18 
Hello,
I use this bit of code to pull the text(source) from a provided url.. Maybe you can see something different with this code vrs yours.

CString CUserProfileDlg::GetFile(const char *url, const char *filename)
{
     char httpbuff[HTTPBUFLEN];
     TCHAR   szCause[2048];
     CString Cause;
     Cause.Format("YES");
 
     TRY
     {
          CInternetSession mysession;
          CStdioFile *remotefile = mysession.OpenURL(url,1,INTERNET_FLAG_TRANSFER_BINARY|INTERNET_FLAG_RELOAD);
 
          CFile myfile(filename, CFile::modeCreate|CFile::modeWrite|CFile::typeBinary);
          int numbytes;
 
          while (numbytes = remotefile->Read(httpbuff, HTTPBUFLEN))
		  {
               myfile.Write(httpbuff, numbytes);
		  }
     }
 
     CATCH_ALL(error)
     {
          error->GetErrorMessage(szCause,2046,NULL);
          Cause.Format("%s",szCause);
     }
     END_CATCH_ALL;
 
     return (Cause);
}


Rob
GeneralActive X and ISAPI Pin
Guillaume F.14-Feb-02 5:01
Guillaume F.14-Feb-02 5:01 
GeneralRe: Active X and ISAPI Pin
Derek Waters14-Feb-02 11:18
Derek Waters14-Feb-02 11:18 
GeneralRe: Active X and ISAPI Pin
Guillaume F.14-Feb-02 12:44
Guillaume F.14-Feb-02 12:44 
GeneralCommon File Dialogs and Shell Namespaces Pin
IScientist14-Feb-02 4:53
IScientist14-Feb-02 4:53 
GeneralRe: Common File Dialogs and Shell Namespaces Pin
IScientist14-Feb-02 23:48
IScientist14-Feb-02 23:48 
GeneralProblems when upgrading from VC 6.0 to .NET Pin
14-Feb-02 4:14
suss14-Feb-02 4:14 
GeneralRe: Problems when upgrading from VC 6.0 to .NET Pin
Mazdak14-Feb-02 4:34
Mazdak14-Feb-02 4:34 
GeneralRe: Problems when upgrading from VC 6.0 to .NET Pin
14-Feb-02 7:25
suss14-Feb-02 7:25 
GeneralRe: Problems when upgrading from VC 6.0 to .NET Pin
Tim Smith14-Feb-02 7:33
Tim Smith14-Feb-02 7:33 
GeneralRe: Problems when upgrading from VC 6.0 to .NET Pin
14-Feb-02 8:30
suss14-Feb-02 8:30 
GeneralRequery() Pin
Sonu Kapoor14-Feb-02 4:04
Sonu Kapoor14-Feb-02 4:04 
GeneralRe: Requery() Pin
Mazdak14-Feb-02 4:16
Mazdak14-Feb-02 4:16 
GeneralMFC, MsWord Automation Pin
Braulio Dez14-Feb-02 3:28
Braulio Dez14-Feb-02 3:28 
GeneralRe: MFC, MsWord Automation Pin
Joaquín M López Muñoz14-Feb-02 3:31
Joaquín M López Muñoz14-Feb-02 3:31 
GeneralRe: MFC, MsWord Automation Pin
Braulio Dez14-Feb-02 4:08
Braulio Dez14-Feb-02 4:08 
GeneralRe: MFC, MsWord Automation Pin
Joaquín M López Muñoz14-Feb-02 4:41
Joaquín M López Muñoz14-Feb-02 4:41 
GeneralRe: MFC, MsWord Automation Pin
Braulio Dez15-Feb-02 1:23
Braulio Dez15-Feb-02 1:23 

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.