Re: PB 4.1 - how to FTP without WinInet library ?
From: John Spaith [MS] (jspaith_at_ONLINE.microsoft.com)
Date: 02/05/04
- Next message: Marc: "Re: driver development"
- Previous message: Shawn Baker: "linking GWES"
- In reply to: anonymous_at_discussions.microsoft.com: "Re: PB 4.1 - how to FTP without WinInet library ?"
- Next in thread: SergeiR: "Re: PB 4.1 - how to FTP without WinInet library ?"
- Reply: SergeiR: "Re: PB 4.1 - how to FTP without WinInet library ?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 5 Feb 2004 13:46:57 -0800
Hi,
I've looked over your code below and I can't see what's causing the
problems. As Mark said, unfortunately HttpLite is officially unsupported.
In the future we do planning on actually supporting and documenting it, but
we can't presently.
However, we have an application named FtpUpdate that downloads new images to
CE devices that uses the FTP functionality of httplite. It is shipped in
Platform Builder in %_WINCEROOT%\public\wceshellfe\oak\FTPUpdate. The only
suggestion I can give you would be to check out the FTP specific source code
in this dir and try to and copy and paste it into your program and hope that
that code path makes everything just work.
Hope this helps and good luck!
-- John Spaith Software Design Engineer, Windows CE Microsoft Corporation This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use. © 2003 Microsoft Corporation. All rights reserved. <anonymous@discussions.microsoft.com> wrote in message news:a95f01c3ebe2$f128b920$a501280a@phx.gbl... > Hi Mark ! > > Thanks a lot for the tip! It really saves lots of work. > > I have followed your directions, and quite succeded, > but ... > > So let me check with you whether or not I have made it > through. > > a) my code comments out #include "wininet.h" and replace > it with #include "dubinet.h" > > b)inside dubinet.h file, located at > C:\WINCE410\PUBLIC\COMMON\OAK\INC > > I look for a line with "CESYSGEN IF DUBINET_DUBFTP" and > for another line with " " > > and they are > > 1173 : // @CESYSGEN IF DUBINET_DUBFTP > 1437 : // @CESYSGEN ENDIF > > so they are both commented out ! Well, delete them anyway > as you direct. > > c) go to the cesysgen.bat file for my project in > C:\WINCE410\PUBLIC\EmCORE_minimal\WINCE410\Geode\oak\MISC > and insert the two lines in the beginning of it, i.e. line > numbers are 54 and 55 > > d)do a full command line rebuild, followed by a > RebuildPlatform command from PB 4.1 > > e) observe the appearance of the httplite.dll in the > Release build of the project ! > > Looks great ! It is just 69kbytes, very good ! > > f) test the newly build dll. > > Well, things went wrong here ... > > LoadLibrary(httplite.dll) - success > InternetOpenW()- success > InternetConnectW(hInet, v_szServerName, > > INTERNET_INVALID_PORT_NUMBER, > m_tszLoginName, // LPCTSTR lpszUserName > > m_tszPassword, // LPCTSTR lpszPassword > INTERNET_SERVICE_FTP, > > INTERNET_FLAG_PASSIVE, 0)) - sucess > > FtpFindFirstFileW(hFTP, v_szSourceName, &FindFileData, > > INTERNET_FLAG_NO_CACHE_WRITE, 0) - success > FtpOpenFileW(hFTP, v_szSourceName, GENERIC_READ, > FTP_TRANSFER_TYPE_BINARY | > INTERNET_FLAG_RELOAD, > 0) - susccess > InternetReadFile(hOpen, pBuffer, cBufferSize, > > &dwBytesRead) - returns success several > times, but after several blocks downloaded the number of > bytes read is not what was requested. GetLastError() > returns 0 ... It only gets a small portion of a file ... > > can't find where the problem is. Mark, did all the > functions from Httplite.dll work well for you ? > > I have no problems using exact same code with Wininet.dll. > Should the code be different for httplite.dll ?? > > Best regards > Sergei > > >-----Original Message----- > >Hey Sergei. Don't go implementing a whole new FTP client > just yet. > > > >We had the same problem. We have a headless > configuration, and we made > >heavy use of WinInet in a 2.11 platform. When we moved > to 2.12, WinInet > >became part of IE. Luckily, we found that the > functionality was still > >available through "dubinet." Unfortunately, "dubinet" > went away with CE > >3.0. > > > >Luckily, it looks like all of that functionality came > back in httplite in CE > >4.0, and we're actively using it in a product running CE > 4.20. We haven't > >had any problems with it yet. The only thing we had to > do, at the > >recommendation of a Microsoft developer, was make a > slight modification to > >the file "\public\common\oak\inc\dubinet.h." You need to > remove the two > >"CESYSGEN IF DUBINET_DUBFTP" tags, or you won't get > proper prototypes for > >the FTP functionality. Then, we just added the two > following lines to our > >cesysgen.bat file: > > > >set __SYSGEN_HTTPLITE=1 > >set __SYSGEN_HTTPLITE_FTP=1 > > > >Rebuild, link the "httplite.lib" import library to our > app, include > >"dubinet.h", and we were rolling. > > > >I know the modifications to the public\common file suck, > but we couldn't > >find a better way, short of redefining all of those > prototypes ourselves. > >Try it. It works. > > > >Mark Murawski > >Vocollect, Inc. > > > >"sergeir" <anonymous@discussions.microsoft.com> wrote in > message > >news:945401c3eaf2$f6b3ce70$a101280a@phx.gbl... > >> Thanks Maxim for the idea. Unless there is another > >> solution found ( either some handcraft play around PB > or a > >> third party library), we could think about it. > >> > >> You mean by using ws2.dll ( and .lib), right ? > >> > >> Anyone who are using CE httplite library please advise ! > >> > >> > >> Sincerely > >> Sergei > >> > >> >Implement the FTP protocol yourself on top of sockets - > >> not this huge a task, > >> >provided you will need a subset only. > >> >Get the appropriate RFC and start coding. > >> > > >> >-- > >> >Maxim Shatskih, Windows DDK MVP > >> >StorageCraft Corporation > >> >maxim@storagecraft.com > >> >http://www.storagecraft.com > >> > >> > >> >-----Original Message----- > >> >> Is there another way to still use FTP simple > functions > >> >> available but do not include this huge WinInet.DLL in > >> the > >> >> image ? > >> > > > > > >. > >
- Next message: Marc: "Re: driver development"
- Previous message: Shawn Baker: "linking GWES"
- In reply to: anonymous_at_discussions.microsoft.com: "Re: PB 4.1 - how to FTP without WinInet library ?"
- Next in thread: SergeiR: "Re: PB 4.1 - how to FTP without WinInet library ?"
- Reply: SergeiR: "Re: PB 4.1 - how to FTP without WinInet library ?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|