using Winsock in an ActiveX .DLL 
Author Message
 using Winsock in an ActiveX .DLL

I need to write an ActiveX .DLL that can implement Winsock to
get a document though HTTP and return it's contents as a string though
one of my components methods.

I'm then going to instance this .DLL in an Active Server Page and call
this method to return the contents of an HTML document as a string and
use server-side JScript regular expressions to extract bits of content.

My question is regarding the control I wish to make? Is there any
alternative to using Win32 API calls to Winsock?

It appears to me that this is the only option when developing a .DLL
without UI.

Also, is there any good examples of using Winsock to pull down a file
using HTTP in VB though Win32 API calls?

Sent via Deja.com
http://www.*-*-*.com/



Sat, 05 Jul 2003 12:04:36 GMT  
 using Winsock in an ActiveX .DLL
You can have loaded forms in ActiveX Dlls which are not shown enabling
you to use ActiveX controls in an ActiveX DLL. You have four options to
use Windows sockets withing VB:

1/ Use the WinSock control that ships with VB - be careful as this has
some interesting limitations when using multiple sockets in the same
application.
2/ Call the Windows Sockets API directly.
3/ Use a third party ActiveX Socket Component.
4/ Use the Inet control to retrieve the pages directly. Again this
control can do some strange things.

Option 1 is the least work. Options 1/ and 3/ will be medium amount of
work as you only need to implement the HTTP protocol. Option 2 is the
most work as working with Windows Sockets gets very messy and you still
have to implement the HTTP protocol.

Have you thought about using a third party HTTP component? Our ARHTTP
ActiveX DLL (see http://www.aristoline.co.uk if you are interested) will
probably do just what you want - it can retrieve a web page in 5 or 6
lines of Script.

How long have you got to develop this DLL? If you need to learn Windows
Sockets and HTTP you could be working on it for a goods few weeks maybe
monthes.

Nigel Hatchett
www.aristoline.co.uk
Developers of ActiveX Components (Windows Sockets, HTTP, SMTP, RAS/DUN
etc)

Quote:

> I need to write an ActiveX .DLL that can implement Winsock to
> get a document though HTTP and return it's contents as a string though
> one of my components methods.

> I'm then going to instance this .DLL in an Active Server Page and call
> this method to return the contents of an HTML document as a string and
> use server-side JScript regular expressions to extract bits of content.

> My question is regarding the control I wish to make? Is there any
> alternative to using Win32 API calls to Winsock?

> It appears to me that this is the only option when developing a .DLL
> without UI.

> Also, is there any good examples of using Winsock to pull down a file
> using HTTP in VB though Win32 API calls?

> Sent via Deja.com
> http://www.deja.com/



Mon, 07 Jul 2003 08:23:25 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Using Winsock in an ActiveX Dll

2. Using Winsock in an ActiveX Dll

3. Using Winsock from within a ActiveX DLL

4. Using a Winsock Control in a ActiveX DLL

5. Using a Winsock Control in a ActiveX DLL

6. activeX dll, using Winsock and some kind of a timer

7. activeX dll, using Winsock and some kind of a timer

8. Winsock Activex DLL and winsock events

9. call winsock DLL from an ActiveX DLL

10. ActiveX Exe Using ActiveX Dll?

11. Using ActiveX compnts to create ActiveX DLL

12. Winsock control in ActiveX DLL

 

 
Powered by phpBB® Forum Software