Talk:Vcl
bool TForm4::OpenCOMPort(String Port) {
wchar_t DeviceName[80];
StrPCopy(DeviceName, (Port)); ComFile = CreateFile(DeviceName, GENERIC_READ | GENERIC_WRITE, 0, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
if(ComFile == INVALID_HANDLE_VALUE ) // IF THE PORT CANNOT BE OPENED, BAIL OUT-> { Result = false ; //if( ComFile == INVALID_HANDLE_VALUE) Application->Terminate(); } else { Result = true; }
}
I have find error which is "[bcc32 Error] Unit4.cpp(397): E2034 Cannot convert 'unsigned int' to 'void *'