framework classes for WinInet.dll?

G

Guido Kraus

Hi,

I try to establish a dial-up internet connection in my
VB.NET application. I found some VB6 code examples for
wininet.dll which is part of the Win32 API.

Example:

Private Declare Function InternetAutodial
Lib "wininet.dll"
(ByVal dwFlags As Long, ByVal hwndParent As Long) As Long

Is there an equivalent API in the .NET framework or do I
have to call wininet.dll from my VB.NET app directly?

Thanks,
Guido
 
M

Mattias Sjögren

Guido,
Is there an equivalent API in the .NET framework or do I
have to call wininet.dll from my VB.NET app directly?

I'm pretty sure there isn't, so you probably still have to call
InternetAutodial. The VB.NET version should be

Declare Function InternetAutodial Lib "wininet.dll" (ByVal dwFlags As
Integer, ByVal hwndParent As IntPtr) As Boolean



Mattias
 
Y

Yan-Hong Huang[MSFT]

Hello Guido,

Thanks for posting in the group.

Mattias is right. There is no corresponding namespace or classes in .NET
class library to do the same work yet. All we need to do is to use PInvoke
to call these Win32 APIs in .NET programming.

Please refer to
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconconsumingunmanaged
dllfunctions.asp?frame=true for details on PInvoke.

Does that answer your question?

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! ¨C www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!Content-Class: urn:content-classes:message
!From: "Guido Kraus" <[email protected]>
!Sender: "Guido Kraus" <[email protected]>
!Subject: framework classes for WinInet.dll?
!Date: Thu, 11 Sep 2003 05:50:15 -0700
!Lines: 17
!Message-ID: <[email protected]>
!MIME-Version: 1.0
!Content-Type: text/plain;
! charset="iso-8859-1"
!Content-Transfer-Encoding: 7bit
!X-Newsreader: Microsoft CDO for Windows 2000
!Thread-Index: AcN4Yz9t3ZjXyGD8QxWJZ3rPSabxPQ==
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Newsgroups: microsoft.public.dotnet.framework
!Path: cpmsftngxa06.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework:53473
!NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
!X-Tomcat-NG: microsoft.public.dotnet.framework
!
!Hi,
!
!I try to establish a dial-up internet connection in my
!VB.NET application. I found some VB6 code examples for
!wininet.dll which is part of the Win32 API.
!
!Example:
!
!Private Declare Function InternetAutodial
!Lib "wininet.dll"
!(ByVal dwFlags As Long, ByVal hwndParent As Long) As Long
!
!Is there an equivalent API in the .NET framework or do I
!have to call wininet.dll from my VB.NET app directly?
!
!Thanks,
!Guido
!
 
G

Guido Kraus

Thanks for your help!

I successfully called WinInet.dll

Guido
-----Original Message-----
Hello Guido,

Thanks for posting in the group.

Mattias is right. There is no corresponding namespace or classes in .NET
class library to do the same work yet. All we need to do is to use PInvoke
to call these Win32 APIs in .NET programming.

Please refer to
http://msdn.microsoft.com/library/en- us/cpguide/html/cpconconsumingunmanaged
dllfunctions.asp?frame=true for details on PInvoke.

Does that answer your question?

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! ¨C www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!Content-Class: urn:content-classes:message
!From: "Guido Kraus" <[email protected]>
!Sender: "Guido Kraus" <[email protected]>
!Subject: framework classes for WinInet.dll?
!Date: Thu, 11 Sep 2003 05:50:15 -0700
!Lines: 17
!Message-ID: <[email protected]>
!MIME-Version: 1.0
!Content-Type: text/plain;
! charset="iso-8859-1"
!Content-Transfer-Encoding: 7bit
!X-Newsreader: Microsoft CDO for Windows 2000
!Thread-Index: AcN4Yz9t3ZjXyGD8QxWJZ3rPSabxPQ==
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Newsgroups: microsoft.public.dotnet.framework
!Path: cpmsftngxa06.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework:53473
!NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
!X-Tomcat-NG: microsoft.public.dotnet.framework
!
!Hi,
!
!I try to establish a dial-up internet connection in my
!VB.NET application. I found some VB6 code examples for
!wininet.dll which is part of the Win32 API.
!
!Example:
!
!Private Declare Function InternetAutodial
!Lib "wininet.dll"
!(ByVal dwFlags As Long, ByVal hwndParent As Long) As Long
!
!Is there an equivalent API in the .NET framework or do
I
 
Y

Yan-Hong Huang[MSFT]

Hi Guido,

I am glad to hear it and thanks to Mattias's help too.

Thanks very much for participating the community. :)

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!Content-Class: urn:content-classes:message
!From: "Guido Kraus" <[email protected]>
!Sender: "Guido Kraus" <[email protected]>
!References: <[email protected]>
<[email protected]>
!Subject: RE: framework classes for WinInet.dll?
!Date: Fri, 12 Sep 2003 05:05:31 -0700
!Lines: 77
!Message-ID: <[email protected]>
!MIME-Version: 1.0
!Content-Type: text/plain;
! charset="iso-8859-1"
!Content-Transfer-Encoding: quoted-printable
!X-Newsreader: Microsoft CDO for Windows 2000
!Thread-Index: AcN5Jimd2JtJJ/lOQ5O7l8e/XttikQ==
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Newsgroups: microsoft.public.dotnet.framework
!Path: cpmsftngxa06.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework:53555
!NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
!X-Tomcat-NG: microsoft.public.dotnet.framework
!
!Thanks for your help!
!I successfully called WinInet.dll
!Guido
!>-----Original Message-----
!>Hello Guido,
!>
!>Thanks for posting in the group.
!>
!>Mattias is right. There is no corresponding namespace or
!classes in .NET
!>class library to do the same work yet. All we need to do
!is to use PInvoke
!>to call these Win32 APIs in .NET programming.
!>
!>Please refer to
!>http://msdn.microsoft.com/library/en-
!us/cpguide/html/cpconconsumingunmanaged
!>dllfunctions.asp?frame=true for details on PInvoke.
!>
!>Does that answer your question?
!>
!>Best regards,
!>Yanhong Huang
!>Microsoft Online Partner Support
!>
!>Get Secure! ¨C www.microsoft.com/security
!>This posting is provided "AS IS" with no warranties, and
!confers no rights.
!>
!>--------------------
!>!Content-Class: urn:content-classes:message
!>!From: "Guido Kraus" <[email protected]>
!>!Sender: "Guido Kraus" <[email protected]>
!>!Subject: framework classes for WinInet.dll?
!>!Date: Thu, 11 Sep 2003 05:50:15 -0700
!>!Lines: 17
!>!Message-ID: <[email protected]>
!>!MIME-Version: 1.0
!>!Content-Type: text/plain;
!>! charset="iso-8859-1"
!>!Content-Transfer-Encoding: 7bit
!>!X-Newsreader: Microsoft CDO for Windows 2000
!>!Thread-Index: AcN4Yz9t3ZjXyGD8QxWJZ3rPSabxPQ==
!>!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!>!Newsgroups: microsoft.public.dotnet.framework
!>!Path: cpmsftngxa06.phx.gbl
!>!Xref: cpmsftngxa06.phx.gbl
!microsoft.public.dotnet.framework:53473
!>!NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
!>!X-Tomcat-NG: microsoft.public.dotnet.framework
!>!
!>!Hi,
!>!
!>!I try to establish a dial-up internet connection in my
!>!VB.NET application. I found some VB6 code examples for
!>!wininet.dll which is part of the Win32 API.
!>!
!>!Example:
!>!
!>!Private Declare Function InternetAutodial
!>!Lib "wininet.dll"
!>!(ByVal dwFlags As Long, ByVal hwndParent As Long) As
!Long
!>!
!>!Is there an equivalent API in the .NET framework or do
!I
!>!have to call wininet.dll from my VB.NET app directly?
!>!
!>!Thanks,
!>!Guido
!>!
!>
!>.
!>
!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top