Click here to Skip to main content
15,897,518 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Application pauses Pin
valikac2-Jan-04 6:08
valikac2-Jan-04 6:08 
GeneralDifference between malloc and LocalAlloc Pin
Member 2214801-Jan-04 21:11
Member 2214801-Jan-04 21:11 
GeneralRe: Difference between malloc and LocalAlloc Pin
Tibor Blazko1-Jan-04 21:35
Tibor Blazko1-Jan-04 21:35 
GeneralRe: Difference between malloc and LocalAlloc Pin
Member 2214801-Jan-04 21:57
Member 2214801-Jan-04 21:57 
GeneralRe: Difference between malloc and LocalAlloc Pin
Tibor Blazko2-Jan-04 0:40
Tibor Blazko2-Jan-04 0:40 
Generalflex.exe Pin
murali_utr1-Jan-04 20:50
murali_utr1-Jan-04 20:50 
GeneralRe: flex.exe Pin
murali_utr1-Jan-04 20:57
murali_utr1-Jan-04 20:57 
Generalproblem in windows programming...please help Pin
sam_mou1-Jan-04 20:12
sam_mou1-Jan-04 20:12 
hai, i am a beginner of the c++ programming,and i am now doing a windows programming project of write and read through a serial port using c++. i have totaly no idea of how to do the windows programming.
i would able to write and read to the serial port in dos mode only. this is my simple program:


int main()
{
char path[BUFLEN];
DWORD byteswritten;
DWORD bytesread;
DCB portDCB;
char read[BUFLEN];






cout << "Enter the characters:" << endl;
cin.getline(path,100);


HANDLE comport;

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



if (comport == INVALID_HANDLE_VALUE)
{
cout << "Problem opening com port " << endl;
exit(1);
}




GetCommState(comport,&portDCB);

portDCB.BaudRate=14400;
portDCB.Parity=NOPARITY;
portDCB.StopBits=ONESTOPBIT;
portDCB.ByteSize = 8;

SetCommState(comport,&portDCB);



if(WriteFile(comport,path ,strlen(path),&byteswritten,NULL))
{
cout<<"******write to the com port******"<
GeneralRe: problem in windows programming...please help Pin
Marek Grzenkowicz1-Jan-04 21:03
Marek Grzenkowicz1-Jan-04 21:03 
Generalselection of .lib as per the client Pin
utkarsharma1-Jan-04 18:31
utkarsharma1-Jan-04 18:31 
GeneralGetting two listboxes to track quicker Pin
shultas1-Jan-04 16:58
shultas1-Jan-04 16:58 
GeneralRe: Getting two listboxes to track quicker Pin
Gary R. Wheeler2-Jan-04 4:18
Gary R. Wheeler2-Jan-04 4:18 
GeneralRe: Getting two listboxes to track quicker Pin
shultas2-Jan-04 11:01
shultas2-Jan-04 11:01 
GeneralRe: Getting two listboxes to track quicker Pin
Gary R. Wheeler2-Jan-04 13:56
Gary R. Wheeler2-Jan-04 13:56 
Generalcolon operation Pin
FlyingDancer1-Jan-04 16:31
FlyingDancer1-Jan-04 16:31 
GeneralRe: colon operation Pin
Ted Ferenc1-Jan-04 21:57
Ted Ferenc1-Jan-04 21:57 
GeneralRe: colon operation Pin
FlyingDancer2-Jan-04 0:22
FlyingDancer2-Jan-04 0:22 
GeneralRe: colon operation Pin
Ted Ferenc2-Jan-04 0:32
Ted Ferenc2-Jan-04 0:32 
GeneralRe: colon operation Pin
FlyingDancer2-Jan-04 1:28
FlyingDancer2-Jan-04 1:28 
GeneralRe: colon operation Pin
FlyingDancer2-Jan-04 2:22
FlyingDancer2-Jan-04 2:22 
GeneralRe: colon operation Pin
Ted Ferenc2-Jan-04 2:53
Ted Ferenc2-Jan-04 2:53 
GeneralRe: colon operation Pin
FlyingDancer2-Jan-04 16:48
FlyingDancer2-Jan-04 16:48 
GeneralRe: colon operation Pin
Prakash Nadar1-Jan-04 22:14
Prakash Nadar1-Jan-04 22:14 
GeneralRe: colon operation Pin
FlyingDancer2-Jan-04 2:17
FlyingDancer2-Jan-04 2:17 
GeneralRe: colon operation Pin
Jörgen Sigvardsson2-Jan-04 8:45
Jörgen Sigvardsson2-Jan-04 8:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.