Re: URLDownloadToFileW Error
From: Bruce Eitman \(eMVP\) (beitmannospam_at_NOSPAM_applieddata.NOSPAM_net)
Date: 10/05/04
- Next message: Doug Forster: "Re: Can you debug DLL call from RAPI (ceinvoke)??? eVC 3 or 4"
- Previous message: Bruce Eitman \(eMVP\): "Re: eVC++ 4.0 Problem"
- In reply to: Susan: "Re: URLDownloadToFileW Error"
- Next in thread: Arvind: "Re: URLDownloadToFileW Error"
- Reply: Arvind: "Re: URLDownloadToFileW Error"
- Reply: Susan: "Re: URLDownloadToFileW Error"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 4 Oct 2004 22:22:52 -0400
Arvind please take advantage of tools like a debugger. MessageBox is cool,
but not very productive for finding your problem. It only gives you a look
at progress, you need to look at the data. This can be done using watch in
the debugger.
Susan, the txt file that he is opening has a list of URLs so I think that
the slash is right. It is going from URL to local file. Why he would want
to reverse the string is beyond me. Whether anything else is right I don't
know.
-- Bruce Eitman (eMVP) Senior Engineer beitman AT applieddata DOT net Applied Data Systems www.applieddata.net An ISO 9001:2000 Registered Company Microsoft WEP Gold-level Member Do have an opinion on the effectiveness of Microsoft Windows Mobile and Embedded newsgroups? Let us know! https://www.windowsembeddedeval.com/community/newsgroups "Susan" <susan@pile_HATE_SPAM_DOT_com> wrote in message news:uSQefEhqEHA.3700@TK2MSFTNGP15.phx.gbl... > Are you telling me that '\' changes to '/' when you do the string reverse? > > Can you print this out to debug? > > You are onto something big here. On my emulator, I get the following. > > Original String: \Storage Card\filename.txt > Reversed String: txt.emanelif\draC egarotS\ > > So, you are changing the internal representation of the characters, and this > is only happening for the backslash. > > Wow. > > "Arvind" <arvinds@erivasystems.com> wrote in message > news:%23ADeR8gqEHA.3172@TK2MSFTNGP10.phx.gbl... > > _wcsrev(filen); > > filen = wcstok( filen, seps ); > > _wcsrev(filen); > > > > im using here.. > > for getting filename from the fullpath > > > > > > -- > > "eRiva Systems" - Where Technology Meets Life, Every Minute. > > > > arvindr@erivasystems.com > > > > www.erivasystems.com > > > > "Susan" <susan@pile_HATE_SPAM_DOT_com> wrote in message > > news:OHIveVgqEHA.896@TK2MSFTNGP12.phx.gbl... > > > So, you are reversing the string. > > > > > > But I didn't see the command where you are reversing the actual > character > > > itself. And I don't believe that command exists. But, please, I could > be > > > mistaken. > > > > > > "abc" -> "cba" Notice that the letter "c" still opens on the right. > The > > > character itself hasn't been changed, just the order of the string. > > > > > > "Arvind" <arvinds@erivasystems.com> wrote in message > > > news:e$BDYRgqEHA.1272@TK2MSFTNGP09.phx.gbl... > > > > im reversing the string then using this "/" > > > > :-) > > > > > > > > > > > > BTW how to use > > > > IBindStatusCallback::OnProgress > > > > > > > > and update progressbar in the same dialog?? > > > > any sample code or app for updating progressbar in urldownloadtofile? > > > > > > > > > > > > > > > > > > > > -- > > > > "eRiva Systems" - Where Technology Meets Life, Every Minute. > > > > > > > > arvindr@erivasystems.com > > > > > > > > www.erivasystems.com > > > > > > > > "Susan" <susan@pile_HATE_SPAM_DOT_com> wrote in message > > > > news:uyZAqLgqEHA.556@TK2MSFTNGP11.phx.gbl... > > > > > Off the top... > > > > > TCHAR *pAn = TEXT("/"); //for parsing \ from fullpath > > > > > > > > > > If this is the real code, don't you want a backslash? > > > > > > > > > > > > > > > "Arvind" <arvinds@erivasystems.com> wrote in message > > > > > news:OuOXfDgqEHA.3744@TK2MSFTNGP10.phx.gbl... > > > > > > Hello, > > > > > > > > > > > > Im getting error when i try to download multiple files using > > > > > > URLDownloadToFile > > > > > > > > > > > > the followinga re the code sample which im using. > > > > > > > > > > > > any idea to make it work? > > > > > > > > > > > > > > > > > > > > > > > > { > > > > > > FILE* file = _tfopen(_T("\\Storage Card\\downloadlist.txt"), > > > _T("r")); > > > > > > > > > > > > TCHAR tstr[100]; > > > > > > TCHAR *pAn = TEXT("/");//for parsing \ from fullpath > > > > > > TCHAR *seps = pAn; > > > > > > > > > > > > > > > > > > TCHAR sl[100] = _T("\\"); > > > > > > TCHAR sl1[100] = _T("\\"); > > > > > > /////////////////////////////////// > > > > > > //adding last 3 > > > > > > TCHAR *pAnsi = TEXT(".wmv"); > > > > > > > > > > > > TCHAR *ext = pAnsi; > > > > > > > > > > > > > > > > > > TCHAR dPath[100] = _T("\\Storage Card\\");//pdpath; > > > > > > > > > > > > > > > > > > MessageBox(_T("To Download Files Connect PDA to Internet!"), > > > _T("Click > > > > > > Ok!"), MB_OK); > > > > > > > > > > > > while(_fgetts(tstr, 100, file)!= NULL) > > > > > > > > > > > > { > > > > > > MessageBox(tstr, _T("Click Ok!"), MB_OK); > > > > > > > > > > > > TCHAR temp[100]; > > > > > > memset( temp, '0', 100 ); > > > > > > > > > > > > TCHAR *filen = NULL; > > > > > > wcscpy(temp,tstr); > > > > > > filen = temp; > > > > > > > > > > > > int l = wcslen(filen); > > > > > > _wcsrev(filen); > > > > > > filen = wcstok( filen, seps ); > > > > > > _wcsrev(filen); > > > > > > MessageBox(filen,_T("arvi1"), MB_OK); > > > > > > wcscat(sl1,dPath); > > > > > > wcscat(sl1,sl); > > > > > > wcscpy(dPath,sl1); > > > > > > wcscat(dPath,filen); > > > > > > > > > > > > MessageBox(dPath,_T("Downloaded..."), MB_OK); > > > > > > > > > > > > HRESULT hr; > > > > > > > > > > > > hr = > > > ::URLDownloadToFileW(NULL,(LPCTSTR)tstr,(LPTSTR)dPath,0,NULL); > > > > > > //The following URLDownloadToFileW are working > > > > > > //hr = ::URLDownloadToFileW(NULL,(LPCTSTR)tstr,_T("\\Storage > > > > > > Card\\arvind.enc"),0,NULL); > > > > > > > > > > > > wcscpy(dPath,_T("\\Storage Card\\")); > > > > > > wcscpy(sl,_T("\\")); > > > > > > wcscpy(sl1,_T("\\")); > > > > > > } > > > > > > fclose(file); > > > > > > MessageBox(_T("Complete!"),_T("Download..."), MB_OK); > > > > > > } > > > > > > > > > > > > > > > > > > -- > > > > > > "eRiva Systems" - Where Technology Meets Life, Every Minute. > > > > > > > > > > > > arvindr@erivasystems.com > > > > > > > > > > > > www.erivasystems.com > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
- Next message: Doug Forster: "Re: Can you debug DLL call from RAPI (ceinvoke)??? eVC 3 or 4"
- Previous message: Bruce Eitman \(eMVP\): "Re: eVC++ 4.0 Problem"
- In reply to: Susan: "Re: URLDownloadToFileW Error"
- Next in thread: Arvind: "Re: URLDownloadToFileW Error"
- Reply: Arvind: "Re: URLDownloadToFileW Error"
- Reply: Susan: "Re: URLDownloadToFileW Error"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|