🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #10480

Re: Thread problem

#10480
From: Remy Lebeau (TeamB)
Date: Sat, 10 Apr 2004 22:06
21 lines
1593 bytes
"ScOe" <cbinders@hotmail.com> wrote in message
news:40786a8e@newsgroups.borland.com...
> When i put InternetReadFile in Thread it does not
> read anything ... same thing without thread work fine.

Is the internet resource being loaded from the same thread that is reading
it?

>     while(InternetReadFile(hResource, buf, sizeof (buf), &bytesRead)){

You are not checking the return value of InternetReadFile().  When it
returns FALSE, GetLastError() and InternetGetLastResponseInfo () tell you
exactly why it failed.  You are probably working with an invalid resource.

>     pLnLoading->hResource = hResource;

How exactly are you loading the resource?


Gambit
Technical Details
Message-ID: <40786feb$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40786a8e@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,a263a901284a81a5
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-04-10 15:09:46 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <40786a8e@newsgroups.borland.com>
Subject: Re: Thread problem
Date: Sat, 10 Apr 2004 15:06:52 -0700
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 67.22.138.253
Message-ID: <40786feb$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1081634795 67.22.138.253 (10 Apr 2004 15:06:35 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail