Sign in to follow this  
ankhd

Oh CL.exe" exited with code -1073741515.

Recommended Posts

Hey all, probably not the forum, but its is related to Visual studio c++ express 10.

 

To get that error I think you remove the Excutable directories path from the properties page.

 

I was following this here, But this leads to the error.

 

Google is not helpfull it saying that vc is bung but its not its only the directories settings.

 

How can I fix it.

 

im not enven sure if Arduino can in fact be put on visual c++ it wants all sorts of it own stdbool and crap wtf.

 

sad.png .

 

I only want to read the serial port I can read it but it prints out the data and some hehe from here. This doe's read but it has extra data I cant find

how they terminate the stream the board writes to the port.

Share this post


Link to post
Share on other sites

Hey all.

 

Have a crude serial read going on now. I modified the Class here with a change in the read function to read 1 byte or wait until it has data in the queue.

And created a Parser that looks at that char and compares its to a newline '\n' or a carriage return '\r' or add to a buffer.

 

Works for the purpose.(going to buy a wifi card soon anyway).

 

One more issue was that the board was sending too many temp messages and flooding the queue, Which left me wondering why the temperature was not increasing

as quick as it was on the Love o meter's LED lights, And in the arduino's IDE viewer.

 

heres me hack or the serial read.

.


//we dont return un till we get data now
int Serial::ReadData(char *buffer, unsigned int nbChar)
{
    //Number of bytes we'll have read
    DWORD bytesRead;
    //Number of bytes we'll really ask to read
    unsigned int toRead;

    //Use the ClearCommError function to get status info on the Serial port
    ClearCommError(this->hSerial, &this->errors, &this->status);

	//we will spin on the empty buffer
	while(status.cbInQue < 1)
	{
		Sleep(200);

		ClearCommError(hSerial, &errors, &status);
	}

    //Check if there is something to read
    if(this->status.cbInQue>0)
    {
        //If there is we check if there is enough data to read the required number
        //of characters, if not we'll read only the available characters to prevent
        //locking of the application.
        //if(this->status.cbInQue>nbChar)
      //  {
            toRead = nbChar;
      //  }
       // else
      //  {
		//	return -1;
          //  toRead = this->status.cbInQue;
       // }

        //Try to read the require number of chars, and return the number of read bytes on success
        if(ReadFile(this->hSerial, buffer, toRead, &bytesRead, NULL) && bytesRead != 0)
        {
            return bytesRead;
        }

    }

    //If nothing has been read, or that an error was detected return -1
    return -1;

}




//--------------------------------------------------------------------------
//this will read data 1 byte at a time until it gets to the carrage return
//then it will return the message
//---------------------------------------------------------------------------
int Serial::ParseData(char *outbuffer, int buffersize)
{
	static int pos = 0;
  int rpos;
  char readch;

  while(ReadData(&readch, 1) > 0)

 // if(readch > 0) 
  {
    switch (readch) 
	{
      case '\n': // Ignore new-lines
        break;
      case '\r': // Return on CR
        rpos = pos;
        pos = 0;  // Reset position index ready for next time
        return rpos;
      default:
        if (pos < buffersize-1) 
		{
          outbuffer[pos++] = readch;
          outbuffer[pos] = 0;
        }
    }
  }

  return -1;
}//end ParseData
////////////////////////////////////////////////////////////////////////////////////


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this