G
Guest
Hi,
I have a problem in getting the status of the modem. Here is my code:
HANDLE hfile;
DCB dcb;
hfile = CreateFile("BCM V.92 56K Modem", GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL);
i(hfile != INVALID_HANDLE_VALUE)
{
GetCommState(hfile, &dcb);
}
This code is very simple, but it is not working. The CreateFile call can return correct handle, but the GetCommState call always fails. Can you help me figure out the problem? Thank you very much!
I have a problem in getting the status of the modem. Here is my code:
HANDLE hfile;
DCB dcb;
hfile = CreateFile("BCM V.92 56K Modem", GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL);
i(hfile != INVALID_HANDLE_VALUE)
{
GetCommState(hfile, &dcb);
}
This code is very simple, but it is not working. The CreateFile call can return correct handle, but the GetCommState call always fails. Can you help me figure out the problem? Thank you very much!