Re: [閒聊] C語言大師請進
※ 引述《ousapas (komica123)》之銘言:
: ※ 引述《yam276 ('_')》之銘言:
: : 就是R
: : 我要把一個
: 你要不要把整個程式上傳這樣比較好幫你
在StackOverflow找到這個
HANDLE hCom; // declare a HANDLE (not a pointer to one)
success = openport(&hCom); // pass the function a pointer to the HANDLE
ReadFile(hCom......); // use the HANDLE
int openport(HANDLE *hCom) // We receive a pointer
{
*hCom = CreateFile(......) // Write to the variable being pointed to
ReadFile(*hCom......)
return 0;
}
那就這樣做吧
雖然看起來有點醜
==
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 123.193.249.34 (臺灣)
※ 文章網址: https://www.ptt.cc/bbs/Marginalman/M.1624010761.A.383.html
※ 編輯: yam276 (123.193.249.34 臺灣), 06/18/2021 18:06:15
推
06/18 18:07,
4年前
, 1F
06/18 18:07, 1F
推
06/18 18:15,
4年前
, 2F
06/18 18:15, 2F
討論串 (同標題文章)