Click here to Skip to main content
16,004,924 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: OT Pin
Bob Stanneveld30-Jun-05 23:31
Bob Stanneveld30-Jun-05 23:31 
GeneralRe: OT Pin
Toby Opferman1-Jul-05 9:00
Toby Opferman1-Jul-05 9:00 
GeneralRe: Yet another problem with LPCTSTR Pin
JWood22-Jun-05 10:17
JWood22-Jun-05 10:17 
GeneralRe: Yet another problem with LPCTSTR Pin
Bob Stanneveld22-Jun-05 7:02
Bob Stanneveld22-Jun-05 7:02 
GeneralRe: Yet another problem with LPCTSTR Pin
tomek1823-Jun-05 2:06
tomek1823-Jun-05 2:06 
GeneralRe: Yet another problem with LPCTSTR Pin
Bob Stanneveld23-Jun-05 2:29
Bob Stanneveld23-Jun-05 2:29 
GeneralRe: Yet another problem with LPCTSTR Pin
tomek1823-Jun-05 4:01
tomek1823-Jun-05 4:01 
GeneralRe: Yet another problem with LPCTSTR Pin
Bob Stanneveld23-Jun-05 4:18
Bob Stanneveld23-Jun-05 4:18 
As long as a pointer doesn't point to a class, you can convert it from anything to anything. Unless you don't know what you are doing, you will get away with it.

The serial class that you are using is a good one. I use it too in one of my programs. So the problem is definitly not there.
Your problem however, is that you don't pass the number of bytes in the buffer (pszData) to your SortData function. You have that number, since the serial class demands a buffer size for the read actions. I suggest that you use those values to determine how much data is recieved.


tomek18 wrote:
At the moment I am having problems converting Data types. Pointers, Strins, LPCTST, etc... I don't understand them much. And everytime I try a method I get an error saying something like: cant convert pointer to string vice versa.

Use static_cast<PointerType>(OtherPointerType) for this purpose.

I think that you are a little bit over your head with this project if you have problems like this. I suggest that you do some more reading about data types, pointer arithmic and such. The basics should be enough to get the job done.

Good luck with it.

P.S.
If you have some problems with something, by all means, ask and post the source code too! Otherwise we will not be able to help you much...

Behind every great black man...
            ... is the police. - Conspiracy brother


Blog[^]
GeneralRe: Yet another problem with LPCTSTR Pin
David Crow23-Jun-05 3:21
David Crow23-Jun-05 3:21 
Questionwhat is MFCO42D.DLL? Pin
liuyue22-Jun-05 5:44
liuyue22-Jun-05 5:44 
AnswerRe: what is MFCO42D.DLL? Pin
David Crow22-Jun-05 5:59
David Crow22-Jun-05 5:59 
GeneralRe: what is MFCO42D.DLL? Pin
liuyue22-Jun-05 14:29
liuyue22-Jun-05 14:29 
GeneralRe: what is MFCO42D.DLL? Pin
David Crow23-Jun-05 3:14
David Crow23-Jun-05 3:14 
AnswerRe: what is MFCO42D.DLL? Pin
ThatsAlok22-Jun-05 18:22
ThatsAlok22-Jun-05 18:22 
Generalget logged on user Pin
hph22-Jun-05 5:19
hph22-Jun-05 5:19 
GeneralRe: get logged on user Pin
David Crow22-Jun-05 5:55
David Crow22-Jun-05 5:55 
GeneralRe: get logged on user Pin
Toby Opferman22-Jun-05 9:12
Toby Opferman22-Jun-05 9:12 
GeneralRe: get logged on user Pin
hph22-Jun-05 22:24
hph22-Jun-05 22:24 
Generalcreate check boxes on run time Pin
softtec22-Jun-05 5:16
softtec22-Jun-05 5:16 
GeneralRe: create check boxes on run time Pin
David Crow22-Jun-05 5:19
David Crow22-Jun-05 5:19 
GeneralRe: create check boxes on run time Pin
softtec22-Jun-05 5:28
softtec22-Jun-05 5:28 
GeneralRe: create check boxes on run time Pin
David Crow22-Jun-05 5:39
David Crow22-Jun-05 5:39 
GeneralRe: create check boxes on run time Pin
softtec22-Jun-05 5:47
softtec22-Jun-05 5:47 
GeneralManifest Pin
Alex_Y22-Jun-05 5:05
Alex_Y22-Jun-05 5:05 
GeneralRe: Manifest Pin
Alex_Y22-Jun-05 9:08
Alex_Y22-Jun-05 9:08 

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.