The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

Need help with C/C++ by sakarikl2001-11-09 00:27:53
  Me too... by Pic2001-11-09 14:52:16
    Your problem seems different. by Beavis 2001-11-09 19:20:08
1) If you use Visual C++ and don't mind using MFC, the CSocket class will probably give you the functionality you want.

2) By Using TCP/IP and setting up a dialup connection, your program will work over any medium. How the IP number is assigned is another matter though.

3) If you just want to play with serial IO, or anything else through the win32 api, you want some kind of reference to the win32 api itself.
check on the following functions to get a 32 bit handle that identifies the device:
BOOL SetCommConfig() // can be used to set the baud rate
You can find the type of device assigned to a handle with
GetFileType(handle)
When done, you must close it with CloseHandle()
Most devices under win32 are opened using the CreateFile function.
HANDLE CreateFile("COM?", desiredAccess, shareMode, SecurityAttributes...)
That's it, unless you want to use threads. If you're starting, I don't advise it.

I think Option 2 is your best for Windows. Even if you don't get anything working, the knowledge will be of use. MSDN is an effective reference for MFC.
4)If you're running Windows but want knowledge that applies to other platforms, install cygwin and use Berkley sockets over TCP/IP.
[ Reply ]
      Actually 1 is not a separate option (n/t) by Beavis2001-11-09 19:48:08

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)