Article View: borland.public.cppbuilder.nativeapi
Article #14497Re: WinInet autodial/hangup
From: Dmitry Mikhilov
Date: Tue, 12 Aug 2003 16:12
Date: Tue, 12 Aug 2003 16:12
21 lines
1933 bytes
1933 bytes
Very easy - just use reference counter. Initial value is 0; each time when any process needs connection, if counter value is zero, then InternetAutoDial is called and counter is incremented, otherwise only increment counter. And when process doesn't needs the connection anymore, it decrements the counter;. if it becomes zero, then call Hangup function. Dmitry. "nicolasr" <nicolasrNOSPAMATSIGNgmx.net> wrote: news:3f32df19$1@newsgroups.borland.com... > Hi, > not sure if this is the most appropriate group, but... > Example : > 1. Process A calls InternetAutodial, the connection is established > 2. Process B calls InternetAutodial, the connection is already established, > so > B can use the connection. > 3. Process A has done its online-work ans calls InernetAutodialHangup, the > Sonnection is closed > 4. Process B produces Errors because it still needs the connection
Technical Details
Message-ID:
<3f3911cd@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3f32df19$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,46e50953b90bc92c X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-08-12 09:22:37 PST From: "Dmitry Mikhilov" <dm1@fromru.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f32df19$1@newsgroups.borland.com> Subject: Re: WinInet autodial/hangup Date: Tue, 12 Aug 2003 20:12:00 +0400 Lines: 22 MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit 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: 195.131.110.226 Message-ID: <3f3911cd@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1060704717 195.131.110.226 (12 Aug 2003 09:11:57 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail