HANDLE Cport[16];
char comports[16][10]={"\\\\.\\COM1", "\\\\.\\COM2", "\\\\.\\COM3", "\\\\.\\COM4",
"\\\\.\\COM5", "\\\\.\\COM6", "\\\\.\\COM7", "\\\\.\\COM8",
...
Type: Posts; User: yohanevindra
HANDLE Cport[16];
char comports[16][10]={"\\\\.\\COM1", "\\\\.\\COM2", "\\\\.\\COM3", "\\\\.\\COM4",
"\\\\.\\COM5", "\\\\.\\COM6", "\\\\.\\COM7", "\\\\.\\COM8",
...
Hyperterminal is using the same COM port since I have only this one USB-to-serial adapter.
Yes..my development board can communicate with Hyperterminal
I'm assuming that hyperterminal...
I can communicate perfectly on hyperterminal. when i connect the TX and RX pins together, I get what i typed..
the code that you found in that pdf is what is around the net..plus there's that...
When I run my code, it starts of with the "serial port does not exist" error. And then even when I run the library (for which I inserted the link) it gives the error "unable to open the com port"....
I need to program some software to be able to send and receive serial msgs. I've looked at a lot of places on the net, and on MSDN, and here is some code i got from most places on the net.
...
thanks for that! yeah...the filename was too small.thanks for that!
#include <stdio.h>
#include <stdlib.h>
int main()
{
int n;
int p,t;
t = 1;
p = 1;
thanks for that! sprintf worked..
tho sprintf attaches a '\0' to the end of the string, but i will have to delete that wouldnt i?otherwise the file operators cant handle the null character right?
i need t read and write to files. but the problem is there are several of them, and they vary according to numbers..
for example, i need to read from r1t001, r1t002...and so on, and write to files...
thanks heaps for that kermit!!!
will have a look at those 2 links and also just enabled those 2 extra warnings..hopefully i'll get my program working soon :)
thanks kermit and dwks!!!got it working!!!i really need to get upto date on my pointers..i've been learning C for ages and its still hard to get my head around it..know of any good tutorials online?...
ohh..and in the print statement where i print out the strings which need to be compared to and the input argument, when i run this program, it jus gives out weird symbols..not what has been input..
ok so
void main (int argc, char *argv[])
did the trick. but now my other problem is taking the arguments, and comparing it to other strings and doing something when they're equal. have i...
my main aim here, is to get the command line arguments, and ideally assign them to variables and them and do something.. trouble is, the program doesnt seem to work..and inspite of 0 errors and...
i made the changes as suggested and removed the address operator. but still its the same result..
in the main file where the thread which writes to the struct is created ive done this
struct...
ok..so my program uses threads..but the basics are this...lets say i have file1.c, file2.c and file3.c..
atm, i have defined the struct in a file called struct_definitions.h... so basically file1...