Hi Sorry guys please check this to avoid confusions and I am expecting the reasons why it is crashing while using memcpy.
char *data = Buffer(it has some data defined not only declaration); //it has some data content
int dataLenth = LenghtOData(the data has been defined and declared above);
BYTE* data_ptr = new BYTE[SOME_LENGTH]; //SOME_LENGTH is cont in value
memcpy(data_ptr, &data[0], dataLength);
here dataLength and lengthOfData are same consider that..
here dataLength and lengthOfData are same consider that..
No, lengthOfData does not exist, dataLenth and LenghtOData have the same value, according to your last post.
Your code works only if SOME_LENGTH = dataLenth = LenghtOData = dataLength...
Too many variables for a single value!!!