I have created this C function to send data through a serial port.
Is there a VB version of these function calls?



hnd = CreateFile ("COM1:",GENERIC_READ | GENERIC_WRITE,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);

Status = SetCommState(hnd,&MyDCB);

if (!Status)
{
Status = GetLastError();
}
Status = WriteFile (hnd, string, lstrlen(string), &count, NULL);