Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 18th, 2003, 02:23 AM
Registered User
 
Join Date: Jun 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using WININET.DLL from .NET

I have a VB.NET program that needs to programmatically use FTP to send files from one machine to another. WININET.DLL has functions which appear to be suited to this. I am having trouble getting it to work. On the call to function ConnectServer in the DLL, even though it returns non zero handle, the Err variable is non zero. Before posting some sample code, I would like to ask if anyone has done what I am trying, or is WININET.DLL only a VB6 product that is not usable on .NET. Thanks in advance.

Rob
 
Old June 23rd, 2003, 02:38 AM
Authorized User
 
Join Date: May 2003
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Wininet.dll is not the VB6 file it is used by the OS and other application so that you can use the Wininet.dll under the .NET environment

Deepesh Jain
VB,VBA & .NET Specialist
Wiley Support Team
 
Old July 1st, 2003, 02:56 AM
Authorized User
 
Join Date: Jun 2003
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Rob!

I have used Wininet.dll for FTP files from one location to another and it never gave me any problem...Although I did it in VB6...but I can say with confidence that it should work with .NET too. When u set reference to the DLL in .NET, .NET creates an interop...so it should be able to call all the functions inside the DLL like FTPPut, FTPGet etc...We have used COM DLLs in our project and they work fine as they would in VB6...Just check whether u have set the reference properly and whether the Interop is made for the DLL in bin\debug directory...

cheers,
debsoft


Quote:
quote:Originally posted by [email protected].a
 I have a VB.NET program that needs to programmatically use FTP to send files from one machine to another. WININET.DLL has functions which appear to be suited to this. I am having trouble getting it to work. On the call to function ConnectServer in the DLL, even though it returns non zero handle, the Err variable is non zero. Before posting some sample code, I would like to ask if anyone has done what I am trying, or is WININET.DLL only a VB6 product that is not usable on .NET. Thanks in advance.

Rob
 
Old July 1st, 2003, 11:59 AM
Authorized User
 
Join Date: Jun 2003
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

or you could re-write the wininet API Calls for FTP in .NET. I did them for one of my projects.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert .NET dll to COM dll used by VB 6.0 gvprashanth .NET Framework 1.x 0 December 4th, 2006 05:05 AM
WinInet Regie Visual C++ 5 December 29th, 2005 01:21 AM
WinInet jain30 Visual C++ 0 December 1st, 2005 01:43 AM
Problem with wininet IgorT VB How-To 1 September 2nd, 2004 10:20 AM
Urgent: using WinInet.dll pocket pc applications rcmetta BOOK: Professional C#, 2nd and 3rd Editions 0 May 3rd, 2004 01:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.