tdubroff
asked on
Free Win95/98, WinNT drivers for RS232 communications??
Anyone know of free drivers out there? To be more specific, I'd just like to open a COM port at a specific baud rate, then write data to it and receive data from it. I don't want or need anything fancy (no modem-manipulation).
ASKER
Edited text of question.
I don't exactly understand your problem, because drivers for the comm port should automatically be supplied with windows(95/98/nt). If the comm port is not supported then, maybe, try your windows CD.
Good sites for finding drivers are:
http://www.driverguide.com/
http://www.driverzone.com/
from kamarey's link:
http://winfiles.cnet.com/drivers/bios.html
If these doesn't work try the home site of your PCs make and search for device drivers.
You shouldn't need a driver for your comm port because it is usually supplied automatically with your operating system.
Good sites for finding drivers are:
http://www.driverguide.com/
http://www.driverzone.com/
from kamarey's link:
http://winfiles.cnet.com/drivers/bios.html
If these doesn't work try the home site of your PCs make and search for device drivers.
You shouldn't need a driver for your comm port because it is usually supplied automatically with your operating system.
ASKER
Ideally I'd like a .lib file and a .h file so that I could make calls to driver functions which would allow me to communicate over the COM port. I hope thats more specific.
Ok. I see what you mean now. If you are using Visual C++ then all I think you have to do to communicate with the comm is add the MS Comm Control. To add this click
menu->project->add to project-> components and controls
This will give you a dialog asking what control you want to add. Double click on registered activeX controls and scroll along until you find the Microsoft communications control. Insert this into your project and this should allow you to use comm functions. I Dont think you need header files, but if you do it will say so in the MSDN help. This can be located on-line if you dont have it.
All this is persuming that you are using Visual C++.
Please Post a comment if I'm incorrect in any of the above.
menu->project->add to project-> components and controls
This will give you a dialog asking what control you want to add. Double click on registered activeX controls and scroll along until you find the Microsoft communications control. Insert this into your project and this should allow you to use comm functions. I Dont think you need header files, but if you do it will say so in the MSDN help. This can be located on-line if you dont have it.
All this is persuming that you are using Visual C++.
Please Post a comment if I'm incorrect in any of the above.
ASKER
Sorry for rejecting the answer as you just opened up a whole new world to me. I did as you said and plopped in the MSCOMM control. This added the CMSComm class to my project.
I thought I could just instantiate the class and start using it, but I get an error. Here is a small snippet and the error. I hope you can help!
CMSComm _comport;
_comport.SetCommPort(1); // <-- dies here
_comport.SetSettings("1152 00,N,8,1") ;
_comport.SetInputLen(0);
_comport.SetPortOpen(true) ;
// Eventually this function is called and it dies on
// the ASSERT
void AFX_CDECL CWnd::InvokeHelper(DISPID dwDispID, WORD wFlags, VARTYPE vtRet,
void* pvRet, const BYTE* pbParamInfo, ...)
{
ASSERT(m_pCtrlSite != NULL); // not an OLE control (not yet, at least)
if (m_pCtrlSite == NULL)
return;
va_list argList;
va_start(argList, pbParamInfo);
m_pCtrlSite->InvokeHelperV (dwDispID, wFlags, vtRet, pvRet, pbParamInfo,
argList);
va_end(argList);
}
How do I make m_pCtrlSite non-NULL? What does the comment mean by not yet an OLE control??
Hopefully you can answer, and then I'll give you all the points. Thanks!
I thought I could just instantiate the class and start using it, but I get an error. Here is a small snippet and the error. I hope you can help!
CMSComm _comport;
_comport.SetCommPort(1); // <-- dies here
_comport.SetSettings("1152
_comport.SetInputLen(0);
_comport.SetPortOpen(true)
// Eventually this function is called and it dies on
// the ASSERT
void AFX_CDECL CWnd::InvokeHelper(DISPID dwDispID, WORD wFlags, VARTYPE vtRet,
void* pvRet, const BYTE* pbParamInfo, ...)
{
ASSERT(m_pCtrlSite != NULL); // not an OLE control (not yet, at least)
if (m_pCtrlSite == NULL)
return;
va_list argList;
va_start(argList, pbParamInfo);
m_pCtrlSite->InvokeHelperV
argList);
va_end(argList);
}
How do I make m_pCtrlSite non-NULL? What does the comment mean by not yet an OLE control??
Hopefully you can answer, and then I'll give you all the points. Thanks!
Its a while since I worked with MSComm so I'm a little usure of the workings of it.
At a glance I think its because you haven't actually created the object yet. This function is in the class itself. You call the function create and pass it the window name etc.
I'm going to have to get back to you on this and it won't be till next monday. Sorry about this delay. In the mean time try messing around with the create function.
At a glance I think its because you haven't actually created the object yet. This function is in the class itself. You call the function create and pass it the window name etc.
I'm going to have to get back to you on this and it won't be till next monday. Sorry about this delay. In the mean time try messing around with the create function.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I haven't gotten around to testing it out yet, but I pretty much did that after your previous suggestion of using the Create function. I also had to add something like AfxEnableOleControls() or something like that.
Thanks for your help. Also, do you recommend any books that describe these controls in general? Are these ActiveX controls?
Thanks for your help. Also, do you recommend any books that describe these controls in general? Are these ActiveX controls?
tdubroff,
Yes these are activeX controls. If you search the msdn help you will see how they use a different method of communicating with the comm port which is more complicated. The MSComm object makes the programming of this alot easier by using functions that set port numbers, baud rates etc.
To create an object to simplify the original method of programming you must create an activeX component to do this... as you probably already know.
Off the top of my head I don't know of any books that deal with this (sorry), but if I come across some I will get back to you.
Regards,
Con.
P.S. Thank you very much for the points.
Yes these are activeX controls. If you search the msdn help you will see how they use a different method of communicating with the comm port which is more complicated. The MSComm object makes the programming of this alot easier by using functions that set port numbers, baud rates etc.
To create an object to simplify the original method of programming you must create an activeX component to do this... as you probably already know.
Off the top of my head I don't know of any books that deal with this (sorry), but if I come across some I will get back to you.
Regards,
Con.
P.S. Thank you very much for the points.
http://www.shoc.ch/update.htm