Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

winsock .. threaded ? (VB6)

Posted on 2004-09-13
5
Medium Priority
?
326 Views
Last Modified: 2013-11-13
hi !
i wanted to ask .. does the winsock_dataarrival function run in a separate thread ?
is there any call back function in VB6 that runs in a separate thread ?

thanks :)
muskad202
0
Comment
Question by:muskad202
2 Comments
 
LVL 2

Expert Comment

by:Lethal_J
ID: 12043990
Im not sure that i understand the question, but the "DataArrival" sub runs seperatly from anything else (unless you specifically code it not to... in which case things could get messy).  When Winsock detects incoming data, the sub is autocalled and processes any commands written within.

This might help you understand the functions and subs a bit more.  Its a simple 'Terminal' program demo for "Winsock Programming"

http://www.vbip.com/winsock/winsock_terminal.asp
0
 
LVL 26

Accepted Solution

by:
EDDYKT earned 80 total points
ID: 12044559
Since VB is single threaded and each message call from outside must be go through ONE / SIGNLE message pump. so that all messages from outside must be in queue.


Except you use createthread API which is internal from VB app and not going through the message pump so that that is the only way for VB to work on mutli-threaded. again this does not work to get message from outside.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show, step by step, how to integrate R code into a R Sweave document
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question