Click here to Skip to main content
15,915,163 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: create a plane thru 3 points (c++) Pin
raesa28-Aug-08 21:23
raesa28-Aug-08 21:23 
QuestionHow to extract a string between two delimiters ? Pin
kapardhi28-Aug-08 18:56
kapardhi28-Aug-08 18:56 
AnswerRe: How to extract a string between two delimiters ? Pin
Nibu babu thomas28-Aug-08 19:06
Nibu babu thomas28-Aug-08 19:06 
AnswerRe: How to extract a string between two delimiters ? Pin
Jijo.Raj28-Aug-08 19:22
Jijo.Raj28-Aug-08 19:22 
AnswerRe: How to extract a string between two delimiters ? Pin
sashoalm28-Aug-08 21:22
sashoalm28-Aug-08 21:22 
QuestionHow to send a 'string' to a port ? Pin
AprNgp28-Aug-08 18:51
AprNgp28-Aug-08 18:51 
AnswerRe: How to send a 'string' to a port ? Pin
Rajesh R Subramanian28-Aug-08 19:24
professionalRajesh R Subramanian28-Aug-08 19:24 
GeneralRe: How to send a 'string' to a port ? Pin
AprNgp28-Aug-08 19:29
AprNgp28-Aug-08 19:29 
i m configuring the COM3 port as follows ...
DCB dcb;
   HANDLE hCom;
   BOOL fSuccess;
   TCHAR *pcCommPort = TEXT("COM3");
   DWORD dwBytesWritten = 0;
   hCom = CreateFile( pcCommPort,
                    GENERIC_READ | GENERIC_WRITE,
                    0,    // must be opened with exclusive-access
                    NULL, // default security attributes
                    OPEN_EXISTING, // must use OPEN_EXISTING
                    0,    // not overlapped I/O
                    NULL  // hTemplate must be NULL for comm devices
                    );

   if (hCom == INVALID_HANDLE_VALUE) 
   {
       // Handle the error.
       printf ("CreateFile failed with error %d.\n", GetLastError());
       return (1);
   }

   // Build on the current configuration, and skip setting the size
   // of the input and output buffers with SetupComm.

  // SecureZeroMemory(&dcb, sizeof(DCB));
   dcb.DCBlength = sizeof(DCB);
   fSuccess = GetCommState(hCom, &dcb);

   if (!fSuccess) 
   {
      // Handle the error.
      printf ("GetCommState failed with error %d.\n", GetLastError());
      return (2);
   }

   // Fill in DCB: 57,600 bps, 8 data bits, no parity, and 1 stop bit.

	dcb.BaudRate = CBR_57600;     // set the baud rate
	dcb.ByteSize = 8;             // data size, xmit, and rcv
	dcb.Parity = NOPARITY;        // no parity bit
    dcb.StopBits = ONESTOPBIT;    // one stop bit

   fSuccess = SetCommState(hCom, &dcb);

   if (!fSuccess) 
   {
      // Handle the error.
      printf ("SetCommState failed with error %d.\n", GetLastError());
      return (3);
   }

   _tprintf (TEXT("Serial port %s successfully reconfigured.\n"),pcCommPort);


Apurv

GeneralRe: How to send a 'string' to a port ? Pin
AprNgp28-Aug-08 19:35
AprNgp28-Aug-08 19:35 
GeneralRe: How to send a 'string' to a port ? Pin
Rajesh R Subramanian28-Aug-08 19:48
professionalRajesh R Subramanian28-Aug-08 19:48 
QuestionCreateThread Function question Pin
monsieur_jj28-Aug-08 16:16
monsieur_jj28-Aug-08 16:16 
AnswerRe: CreateThread Function question Pin
Jijo.Raj28-Aug-08 18:15
Jijo.Raj28-Aug-08 18:15 
GeneralRe: CreateThread Function question Pin
monsieur_jj28-Aug-08 20:07
monsieur_jj28-Aug-08 20:07 
QuestionRe: CreateThread Function question Pin
Mark Salsbery29-Aug-08 8:59
Mark Salsbery29-Aug-08 8:59 
AnswerRe: CreateThread Function question Pin
monsieur_jj31-Aug-08 16:23
monsieur_jj31-Aug-08 16:23 
GeneralRe: CreateThread Function question Pin
Mark Salsbery1-Sep-08 7:35
Mark Salsbery1-Sep-08 7:35 
GeneralRe: CreateThread Function question Pin
monsieur_jj1-Sep-08 14:17
monsieur_jj1-Sep-08 14:17 
QuestionHtmlHelp v x64 Pin
Chris Losinger28-Aug-08 14:12
professionalChris Losinger28-Aug-08 14:12 
Questionproblem with RegEnumValue to read the values in the registry.. Pin
hariakuthota28-Aug-08 12:23
hariakuthota28-Aug-08 12:23 
QuestionRe: problem with RegEnumValue to read the values in the registry.. Pin
David Crow28-Aug-08 15:36
David Crow28-Aug-08 15:36 
AnswerRe: problem with RegEnumValue to read the values in the registry.. Pin
Jijo.Raj28-Aug-08 18:24
Jijo.Raj28-Aug-08 18:24 
AnswerRe: problem with RegEnumValue to read the values in the registry.. Pin
krmed29-Aug-08 0:48
krmed29-Aug-08 0:48 
QuestionHow to have use different version resources for different configurations Pin
Wheatbread28-Aug-08 6:06
Wheatbread28-Aug-08 6:06 
AnswerRe: How to have use different version resources for different configurations Pin
enhzflep28-Aug-08 7:29
enhzflep28-Aug-08 7:29 
AnswerRe: How to have use different version resources for different configurations Pin
Michael Dunn29-Aug-08 13:12
sitebuilderMichael Dunn29-Aug-08 13:12 

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.