msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Internetopen generates Error 20001

 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB WinAPI
Author Message
vbuser



Joined: 04 Feb 2008
Posts: 4

PostPosted: Mon Feb 04, 2008 4:33 am    Post subject: Internetopen generates Error 20001 Reply with quote

Hi,



I'm using the function InternetOpen, InternetConnect and FtpPutFile to put a
file onto a FTP-Server.

Generally it's working very well, every minute a file ist generated.



But about every 14 days i get the error, when using InternetOpen: 20001, No
more handles can be generated.



Of course I use InternetCloseHandle to close then handles, given by
InternetOpen und InternetConnect.



Can anyone help ?



Thanks

Gerard

Archived from group: microsoft>public>vb>winapi
Back to top
View user's profile Send private message
Sinna



Joined: 04 Oct 2007
Posts: 191

PostPosted: Mon Feb 04, 2008 1:17 pm    Post subject: Re: Internetopen generates Error 20001 Reply with quote

vbuser wrote:
> Hi,
>
>
>
> I'm using the function InternetOpen, InternetConnect and FtpPutFile to put a
> file onto a FTP-Server.
>
> Generally it's working very well, every minute a file ist generated.
>
>
>
> But about every 14 days i get the error, when using InternetOpen: 20001, No
> more handles can be generated.
>
>
>
> Of course I use InternetCloseHandle to close then handles, given by
> InternetOpen und InternetConnect.
>
>
>
> Can anyone help ?
>
>
>
> Thanks
>
> Gerard
>
>
>
>
The error description exactly describes what's happening: you're running
out of resources.

Some suggestions:
- Make sure all handles created are released using InternetCloseHandle
(as you mentioned)
- In general it is good practice to release the handles created in
*reverse* order. In some cases (especially when dealing with objects)
the handle is not released.
- Check if an error occurs, the handles are cleaned up too.

Hope this helps,
Sinna
Back to top
View user's profile Send private message
vbUser



Joined: 06 Feb 2008
Posts: 1

PostPosted: Wed Feb 06, 2008 4:58 pm    Post subject: Re: Internetopen generates Error 20001 Reply with quote

> vbuser wrote:
>> Hi,
>>
>>
>>
>> I'm using the function InternetOpen, InternetConnect and FtpPutFile to
>> put a file onto a FTP-Server.
>>
>> Generally it's working very well, every minute a file ist generated.
>>
>>
>>
>> But about every 14 days i get the error, when using InternetOpen: 20001,
>> No more handles can be generated.
>>
>>
>>
>> Of course I use InternetCloseHandle to close then handles, given by
>> InternetOpen und InternetConnect.
>>
>>
>>
>> Can anyone help ?
>>
>>
>>
>> Thanks
>>
>> Gerard
>>
>>
>>
>>
> The error description exactly describes what's happening: you're running
> out of resources.
>
> Some suggestions:
> - Make sure all handles created are released using InternetCloseHandle (as
> you mentioned)
> - In general it is good practice to release the handles created in
> *reverse* order. In some cases (especially when dealing with objects) the
> handle is not released.
> - Check if an error occurs, the handles are cleaned up too.
>
> Hope this helps,
> Sinna


Hi Sinna,

thanks für your answer.
I could not find something in my code, which was wrong.
So I'll wait for another 14 days...

Gerhard
Back to top
View user's profile Send private message
Sinna



Joined: 04 Oct 2007
Posts: 191

PostPosted: Thu Feb 07, 2008 1:24 pm    Post subject: Re: Internetopen generates Error 20001 Reply with quote

vbUser wrote:
>> vbuser wrote:
>>> Hi,
>>>
>>>
>>>
>>> I'm using the function InternetOpen, InternetConnect and FtpPutFile to
>>> put a file onto a FTP-Server.
>>>
>>> Generally it's working very well, every minute a file ist generated.
>>>
>>>
>>>
>>> But about every 14 days i get the error, when using InternetOpen: 20001,
>>> No more handles can be generated.
>>>
>>>
>>>
>>> Of course I use InternetCloseHandle to close then handles, given by
>>> InternetOpen und InternetConnect.
>>>
>>>
>>>
>>> Can anyone help ?
>>>
>>>
>>>
>>> Thanks
>>>
>>> Gerard
>>>
>>>
>>>
>>>
>> The error description exactly describes what's happening: you're running
>> out of resources.
>>
>> Some suggestions:
>> - Make sure all handles created are released using InternetCloseHandle (as
>> you mentioned)
>> - In general it is good practice to release the handles created in
>> *reverse* order. In some cases (especially when dealing with objects) the
>> handle is not released.
>> - Check if an error occurs, the handles are cleaned up too.
>>
>> Hope this helps,
>> Sinna
>
>
> Hi Sinna,
>
> thanks für your answer.
> I could not find something in my code, which was wrong.
> So I'll wait for another 14 days...
>
> Gerhard
>
>
Perhaps you can show us some code (but it will be probably too large).

Sinna

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
InternetOpen , InternetConnect and InternetQueryOption Hi, Plz help.. i am a bit new to this.... I want to test the following code(which queries the username and the user name is retrieved in the szBuf)

Ftp Error : 12039 Unable to connect error Hi to all, Thank you in advance to who are reading this posting. We have implemented a tool throuh which we can upload files to the remote server ( this FTP tool) using wininet.dll in Visuavl Basic 6.0. While we are running this appliation in the server

Retrieving the error description for an API error. Using VB.net 2003 I have an application that calls several API functions (mostly RAS related). I would like to be able to display the error description and not just an error number. The problem is that the APIs all just return an integer value (either dir

Still Error = 87

got an error with RegSetValueExByte Hi, I want to know if someone can help me with this error in VB6. I got an error 0xc000005 with vba6.dll when I call the function Grosseur = - + 1 r = strValue, 0&, REG_BINARY,
Post new topic   Reply to topic    msvisual.com Forum Index -> VB WinAPI All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group