经过串口调试工具可以手动用蓝牙向开发板传送数据,但是代码却不行,出了什么问题?

#include
#include
#include
using namespace std;
int main() {
const wchar_t *port=L"COM4"; //宽字节字符
HANDLE hcom; //HANDLE是句柄
hcom = CreateFile(_T("port"), GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (hcom == INVALID_HANDLE_VALUE) {
cout << "打开串口失败" << endl;
system("pause");
exit(-1);
}
else cout << "We succeed" << endl;
return 0;
}