Re: Why can't open other com port




Bruno van Dooren 寫道:

I want to open a com port that is from PCI board.
I can control that port ( com 13 ) by VB with MSCOMM control, work
well.

Now, it can't work in VC, could you please advice?

If you try to run your VC code, the VB program is closed, right?
COM ports can be opened by only 1 process at a time.

void InitialiseWindows(char *arg)
{
DCB
config;

COMMTIMEOUTS
timeouts;

// Open the com port required

com_handle = CreateFile
(
arg,
GENERIC_READ | GENERIC_WRITE,
0,
0,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,

What is the text in arg?

--

Kind regards,
Bruno van Dooren
bruno_nos_pam_van_dooren@xxxxxxxxxxx
Remove only "_nos_pam"

Hi,
Sure, VB already close.
um..
Here is my call method:

int main(int argc, char* argv[])
{
argv[1] = "com2";
InitialiseWindows(argv[1]);
return 0;
}

.



Relevant Pages

  • Re: Barcode - scanning from com3
    ... A Bluetooth serial port works exactly like any standard COM port so ... The important thing to remember when using the MSComm control is to ... >Shouldn't you set the Qwerty/Azerty settings in the scanner? ...
    (microsoft.public.fox.programmer.exchange)
  • Re: 16+ comm ports
    ... I guess that Dick Greer told me that altering the MSCOMM control by hacking ... COM port over LAN. ... Did a lot of assembly code ...
    (microsoft.public.vb.controls)
  • Re: From COM port to USB... help and need some advice!
    ... If you buy a Serial-USB device it should come with drivers that expose a COM ... your application can still use the MSComm control ... > connected via a COM Port in VB6. ... now I want the device to have USB capablilities as ...
    (microsoft.public.development.device.drivers)
  • Re: Problem with MSComm and Remote Desktop
    ... this is a know problem with Terminal Server. ... When you try to perform a read operation on a COM port by using the MSComm ... The MSComm control uses the "return quickly" feature of the Windows COM port ...
    (microsoft.public.vb.controls)
  • Re: Why cant open other com port
    ... I can control that port by VB with MSCOMM control, ... Now, it can't work in VC, could you please advice? ... What is the text in arg? ...
    (microsoft.public.vc.language)