HComm=CreateFile (Port, DESIREDACCESS GENERIC_READ | DESIREDACCESS. GENERIC_WRITE, SHAREMODE. FILE_SHARE_READ | SHAREMODE. FILE_SHARE_WRITE, null, CREATIONDISPOSITION. OPEN_EXISTING, 0, null);
If (hComm==INVALID_HANDLE_VALUE)
{
Return the Convert. ToInt32 (GetLastError ());
}
GetLastError ()="87
Screening for four or five days, have been or return 87, checked the parameter error,,, get dizzy, there is a great god help me advice the problem!
Another:
1, the virtual machine serial com0 mapping com4 (actual equipment serial port is com4)
public string Port="COM0:";
2,
Private const string DLLPATH=".//Windows//coredll DLL ";
CodePudding user response:
Back to The 87-87 The parameter is incorrect.CodePudding user response: