Home > other >  Wince createfile 6.0 virtual machine back to 87
Wince createfile 6.0 virtual machine back to 87

Time:09-24

Vs2008 c # wince6.0 simplified Chinese simulator

 
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:

reference 1/f, worldy response:
return 87:87, The parameter is incorrect.

Which parameter is wrong?

CodePudding user response:

Suggestion:

HANDLE hComm;
HComm=CreateFile (gszPort,
GENERIC_READ | GENERIC_WRITE,
0,
0,
OPEN_EXISTING,
FILE_FLAG_OVERLAPPED ,//without overlapping remove
0);
  • Related