HOWTO: Ch? ?nh n?i ti?p c?ng l?n hn COM9

D?ch tiu ? D?ch tiu ?
ID c?a bi: 115831 - Xem s?n ph?m m bi ny p d?ng vo.
Bung t?t c? | Thu g?n t?t c?


CreateFile() c th? ?c s? d?ng ? c ?c m?t x? l? ?n m?t c?ng n?i ti?p. "Win32 L?p tr?nh vin c?a tham kh?o"m?c nh?p cho"CreateFile()"? c?p ?n r?ng nh?ng chia s? ch? ? ph?i l 0, tham s? t?o ph?i l OPEN_EXISTING, v cc m?u ph?i l NULL.

CreateFile() l thnh cng khi b?n s? d?ng "COM1" thng qua "com9" cho tn c?a cc t?p tin; Tuy nhin, thng i?p
?c tr? l?i n?u b?n s? d?ng "com10" ho?c cao hn.

N?u tn c?ng l \\.\COM10, m?t cch chnh xc ? ch? ra s? n?i ti?p Port t?i m?t cu?c g?i ?n CreateFile() l nh sau:
      "\\\\.\\COM10",     // address of name of the communications device
      fdwAccess,          // access (read-write) mode
      0,                  // share mode
      NULL,               // address of security descriptor
      OPEN_EXISTING,      // how to create
      0,                  // file attributes
      NULL                // handle of file with attributes to copy

Ghi ch: C php ny c?ng lm vi?c cho c?ng COM1 thng qua COM9. H?i ?ng nh?t ?nh s? cho php b?n ch?n c?ng tn cho m?nh. C php ny ho?t ?ng cho nh?ng ng?i tn l t?t.

Thu?c tnh

ID c?a bi: 115831 - L?n xem xt sau cng: 23 Thang Chin 2011 - Xem xt l?i: 3.0
p d?ng
  • Microsoft Win32 Application Programming Interface, khi ?c dng v?i:
    • Microsoft Windows 98 Standard Edition
    • Microsoft Windows Millennium Edition
T? kha:
kbapi kbcommport kbhowto kbkernbase kbserial kbmt KB115831 KbMtvi
My d?ch
QUAN TRONG: Bi vi?t ny ?c d?ch b?ng ph?n m?m d?ch my c?a Microsoft ch? khng ph?i do con ng?i d?ch. Microsoft cung c?p cc bi vi?t do con ng?i d?ch v c? cc bi vi?t do my d?ch ? b?n c th? truy c?p vo t?t c? cc bi vi?t trong C s? Ki?n th?c c?a chng ti b?ng ngn ng? c?a b?n. Tuy nhin, bi vi?t do my d?ch khng ph?i lc no c?ng hon h?o. Lo?i bi vi?t ny c th? ch?a cc sai st v? t? v?ng, c php ho?c ng? php, gi?ng nh m?t ng?i n?c ngoi c th? m?c sai st khi ni ngn ng? c?a b?n. Microsoft khng ch?u trch nhi?m v? b?t k? s? thi?u chnh xc, sai st ho?c thi?t h?i no do vi?c d?ch sai n?i dung ho?c do ho?t ?ng s? d?ng c?a khch hng gy ra. Microsoft c?ng th?ng xuyn c?p nh?t ph?n m?m d?ch my ny.
Nh?p chu?t vo y ? xem b?n ti?ng Anh c?a bi vi?t ny:115831

Cung cp Phan hi


Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from