|
Hello!
I want to establish data sessions between 1 server and n-clients. The data communication would be progressing between 1 server and n-clients simultaneously.
i.e.one server and many clients.i.e. N client machines would be connecting and communicating with 1 server machine. Once the connection is established, server would be accepting the data sent by the clients and then the same data would be again sent back to the same client who sent it to the server, through modem. The application should have the capability to do data transmission and receive simulnateously with n-clients.
The application is supposed to run on Win 98,WinNT, WIN 2000 and Win XP. I am using C programming and TAPI 2.0. I do not want to use COM/DCOM. Can you please tell me if it is possible to build an application of n-clients and 1 server using language C, TAPI 2.0 and without COM/DCOM.
I already have built an application for data communication between single client and single server.
Data transmission is done through the COM port to which the modem is connected.
While programming for 1-server 1 client I have made use of async comm by using CreateEvent(), ReadFile(), WriteFile() (for communciation between COM ports), WaitforSingleObject() and GetOverlappedResult().
The configuration I am using is :
There is a modem connected to the server machine and there are n (say 4) client machines. Each client has a modem connected to it. The data communication is via the modem through the COM port to send and recieve data (data communication--> client to server back to client).
If suppose, the server is waiting for connection and a client connects to the server, the connection is established and the data communication is started. Now another client attempts to connect to the server, will that client be able to connect to server ?? (as the first client is still holding the line and busy in data communication).
Do I have to have some other specialised hardware so that other clients may also connect to server simultaneously. (same as in EPBX systems).
or do I need to have some software which will help me connect n-clients to 1 server.
Could you please guide me amd give some idea about how to go about solving this problem.
Your advise would be of great help to me.
Thanking you.
With Regards,
Sandeep Shetty
|
|
|
|
|
Hello All,
Anyone with a nice algorithm to randomly generate points in a polygon? Random points based on the bounding boxes are not working nicely.
Any help or tip?
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for programming contract anywhere!
|
|
|
|
|
You mean you want to generate random points which are within the polygon ?
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Yes. I have the coordinates of the polygon and I need to be able to randomly select a given number of points from within the polygon. The aim is to draw dots in the polygon randomly, something to show low and high density polygons.
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for programming contract anywhere!
|
|
|
|
|
Two ways you could do this:
1. Generate a mask bitmap. Make it black and draw a filled polygon in white. Then for each point you generate, check if that pixel in the mask is white
2. To find out if a point is inside the polygon, use the ratio of x2-x1/y2-y1 to find out the slope of each line. Then use that ratio to figure out if that point is inside that line, or not.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Hello Christian,
Thanks for the suggestions. Currently, I am doing this
1. Get the bounding box of the polygon and use it to generate the random points.
2. Create a region CRgn out of the polygon and test if the point lies in the region PtInRegion, if not generate another till I get the required number of points.
The application, however, requires a lot of speed and it deals with many polygons. I will try your suggestions too to see which is faster and less memory consuming.
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for programming contract anywhere!
|
|
|
|
|
Look at this link. Point inside a polygon is BIG deal to 3d/2d game programmers.
Point Inside Polygon
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
Thanks, it is yet another step closer to the goal.
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for programming contract anywhere!
|
|
|
|
|
I suspect the mask will be fastest. If you make the mask a DIBSection it will be fastest of all, you'll have access to the underlying bits without having to call GetPixel in a DC.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
hello All,
I want to show the SaveDialog box in a button click .How is it possible??
SSN
|
|
|
|
|
Check out GetSaveFileName()
--Mike--
My really out-of-date homepage
"Why does anyone have a web page? Too much free time... not enough friends... justifying owning a computer." -- Noel Crane on Felicity
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
i need to develop a code which takes in a image .tiff file and reads the certain contains of the imagage and stores them in the .csv format file....can any one help me in how to achieve this.Actually this image is a bank cheque that is scanned and stored as .tiff file and need to read the amount, payable to and cheque number from the cheque image can anu help me out regarding this i will be much thankful to u all
waiting for reply
thanks in advance
BSR
|
|
|
|
|
How to get the path of the shell (Explorer)?
For example:
I open my C:\ using Explorer, i want get the from the Explorer Windows Handle...
|
|
|
|
|
I use a WndProc hook in my system...
use this WndProc hook, i have painted a button in the caption of every program. when press this button, i want it pop up a menu( the owenr draw menu), i failed. It is just effective in Explorer program, not effective in Visual Studio program, the menu item is disable...
why?
|
|
|
|
|
When you're in the leftmost pane of the Visual C++ IDE, with the ClassWizard, FileView, ResourceView... is there a keyboard shortcut to switch between the three? I'm really big on keyboardability but have never found a way to switch between these tabs without wasting my time grabbing the mouse.
Thanks.
-Jason
nirgle.bitdevil.com
|
|
|
|
|
|
|
Hey Guys
I was wondering if someone could tell me the function that allows you to browse through the available drives and folders on yourcomputer and select which one to use.
Cheers
Peter
|
|
|
|
|
SHBrowseForFolder()
---
It may be that your sole purpose in life is simply to serve as a warning to others.
|
|
|
|
|
Merry Christmas Everyone
I hope someone can help me. I was wondering if there is an easy way to draw a line where the pixels alternate colour, I want to draw a grid over a bitmap the same way that the resource editor does, with alternating dark and light gray pixels. If I create a pen with the PS_DOT style, the dots and spaces are 4 pixels in length, and that looks like crap. Right now I am using the SetROP2() function with the R2_NOT flag. It looks good if the bitmap has light colours, but not if the bitmap has dark colours. I guess I could draw the lines one pixel at a time, but I am hoping there is an easier way. If any one knows, I would appreciate hearing from you. Thanks.
---
It may be that your sole purpose in life is simply to serve as a warning to others.
|
|
|
|
|
You can create a pattern brush and then use that one pixel wide to generate a line.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Works great, thanks for the idea.
---
It may be that your sole purpose in life is simply to serve as a warning to others.
|
|
|
|
|
Hi.
Conventionally speaking, do you declare and initialize variables at the beginning of a function or loop or right before usage.
For example:
int main()
{
char temp;
cin >> temp;
cout << "1234... & " << temp;
cin >> temp;
cout << temp;
int x;
cin >> x;
cout << temp << " & " << x;
return 0;
}
The arbitrary code above depicts declaration of variables right before usage (int x).
Which way is most convention is arguably better?
Thanks,
Kuphryn
|
|
|
|
|
|
Thanks!
As of today, I have begun to declare variable when:
1) there is something to initialize it with
int x = ...functure return, something added/subtract, etc, to other variables
2) right before its usage
int x = 3;
cout << x;
The only time I declare a variable at the top:
int x = 0;
is when it will be referenced to.
function(int &aboveX)
cout << aboveX;
So aboveX is a reference to x.
I began learning and practicing C++ about four months ago. I find something really interesting. I find that when you first learn C++ in college and reading beginner C++ books, the professor and author typically recommend declaring variables right at the top. They make it like it is imperative that we do that or the program may not work. Now, I feel that the programmer is in control of the program and that he/she can declare variables wherever is appropriate. As I mentioned, I feel it is much easier to recognize variable when the program declare them accord to the examples above.
Kuphryn
|
|
|
|