Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create/expose multithreaded WINSOCK TCP in a class

Status
Not open for further replies.

rogerv

Programmer
May 28, 2001
6
US
HELP!

We only have 4 days to write a VB 6 MDI app that users
can interactively configure to monitor and manage dynamic
statistical and state data that we can pull from our remote tcp servers.
The backend tcp servers already use a proprietary tcp
protocol to communicate with an existing interface we wrote with
VC++.

We are URGENTLY looking for any suggestions from experience, knowledge or code samples
with regard to VB work arounds for the apparent limitations of VB below that are currently
obstacles to our project requirements as described.

We need:

- An ActiveX component
- that runs unattended
- that exposes multiple instances of a single class
- the class is wrapped around a winsock control tcp client
with its own thread of execution
- this class' properties are user-defined
- this class acts as a cache for active data pages
requested from the tcp server process
- the cache dimensions and structure are defined
at run-time by a tcp command upon connecting
- each page of the cache will have a timer control
- a cache page timer event will initiate a tcp command to refresh the
timer's active cache page from the server

- MDI app
- references the activex component above
- allows users to create and reference multiple
active cache objects from the activex component

- MDI child form
- allows users to link multiple active cache objects to the form
- allows users to select the active cache page to view in
a datagrid with an ado recordset as the data source
- the ado recordset is populated from the active cache page
- if multiple active cache objects are active their cache
pages are consolidated
- a timer on the form will initiate a method call on the cache
object reference(s) to refresh the active cache page(s)

Any help would be greatly appreciated, thanks in advance.

p.s. madlarry if you read this, I've read some of your posts
regarding winsock implementation, I'm hoping you can
help, thx.
 
Sorry, forgot to paste this to the post.

Apparent Limitations of VB:

1) WINSOCK and TIMER controls must be anchored to FORMS containers
2) an activex exe component exposing single-use objects in UNATTENDED
mode can not contain interface objects like FORMS
3) MDI form apps MUST be single threaded and can NOT utilize MULTITHREADED
VB activex DLL or Exe components, thus the use of an ACTIVEX EXE running in
UNATTENDED mode whose public interface exposes SINGLE-USE objects
with separate instances of the exe
4) MULTITHREADED STANDALONE activex exe apps can NOT contain MDI forms
 
rogerrv -

You can get around a lot of the limitations by writing to the Winsock API from a standalone Active-X EXE. You'd have one standard EXE which provides the GUI, and he uses COM to talk to the "worker" Active-X EXEs.

My only concern is that you only have given yourself 4 days. I doubt you can do it in that timeframe. Maybe 6 long days, if you're really good and had a library of VB Winsock calls already defined.

Chip H.
 
chiph,

Yeah, I should have mentioned we're aware of those options.
You were on the nose, the time doesn't allow. We also have libraries of our own VC++ code we code use to accomplish the same thing with our C wrappers but again it would take to long. We were looking to speed up and simplify the dev and support. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top