请问你(lcl_003)为什么把
if (hNewCommFile = INVALID_HANDLE_VALUE) then
if SysIni.ReadBool('zy', 'WriteCard', True) then
raise ECommsError.Create( 'Error opening serial port' )
else Exit;
改为:
if hNewCommFile = INVALID_HANDLE_VALUE then
raise ECommsError.Create( 'Error opening serial port' );