[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] File streams on URL - clarification



My lord. It's amazing Windows programmers live
long enough to finish typing their code. Much
less debugging it...

-- Joe

Kalin Nakov wrote:
> Java:
> try {
>      URL url = new URL("ftp://ftp.mysite.com/myfile.txt";);
>      InputStream input = url.openStream();
> }
> catch (Exception e) {
> }
> 
> Win32 API:
> IMoniker *pmkrRemote = NULL;
> IBindCtx *pbctxBinder = NULL;
> IStream *pstmInput = NULL;
> CreateURLMoniker(NULL, L"ftp://ftp.mysite.com/myfile.txt";, &pmkrRemote);
> CreateBindCtx(0, &pbctxBinder);
> pmkrRemote->BindToStorage(pbctxBinder, NULL, IID_IStream, (PVOID*)
> &pstmInput);

-- Joe Knapka
"I won't be havin' with that!" -- Granny Weatherwax