Click here to Skip to main content
15,890,882 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Parsing in C/C++ Pin
jschell15-Aug-14 9:24
jschell15-Aug-14 9:24 
QuestionCLongBinary Limited to 255 Bytes Pin
Drakesal13-Aug-14 21:52
Drakesal13-Aug-14 21:52 
QuestionRe: CLongBinary Limited to 255 Bytes Pin
Richard MacCutchan13-Aug-14 22:17
mveRichard MacCutchan13-Aug-14 22:17 
AnswerRe: CLongBinary Limited to 255 Bytes Pin
Drakesal13-Aug-14 22:39
Drakesal13-Aug-14 22:39 
GeneralRe: CLongBinary Limited to 255 Bytes Pin
Richard MacCutchan13-Aug-14 23:21
mveRichard MacCutchan13-Aug-14 23:21 
GeneralRe: CLongBinary Limited to 255 Bytes Pin
Drakesal13-Aug-14 23:24
Drakesal13-Aug-14 23:24 
QuestionRe: CLongBinary Limited to 255 Bytes Pin
David Crow15-Aug-14 3:37
David Crow15-Aug-14 3:37 
AnswerRe: CLongBinary Limited to 255 Bytes Pin
Stefan_Lang14-Aug-14 4:44
Stefan_Lang14-Aug-14 4:44 
Have you verified that GlobalAlloc actually worked? Does file.Read() actually read the full file? Check the return value of the Read function to see how many bytes have been read.

255K doesn't seem that large. However, the Global** functions and the CFile class are ancient, and I wouldn't be surprised if they had some built-in restrictions...

On a sidenote, since you immediately lock the memory after allocation, why do you use GMEM_MOVEABLE? And since you immediately free the memory after use, why do you even use the GLOBAL** functions at all, why don't you simply use new and delete instead? That would be faster, requires less code, and takes less effort to read and understand the code!
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)

GeneralRe: CLongBinary Limited to 255 Bytes Pin
Richard MacCutchan14-Aug-14 5:40
mveRichard MacCutchan14-Aug-14 5:40 
AnswerRe: CLongBinary Limited to 255 Bytes Pin
Randor 14-Aug-14 15:18
professional Randor 14-Aug-14 15:18 
GeneralRe: CLongBinary Limited to 255 Bytes Pin
Drakesal14-Aug-14 20:12
Drakesal14-Aug-14 20:12 
QuestionAutomatic Transfer File [Real-TIme] Pin
Irwan Saifranto13-Aug-14 12:02
Irwan Saifranto13-Aug-14 12:02 
AnswerRe: Automatic Transfer File [Real-TIme] Pin
CPallini13-Aug-14 21:18
mveCPallini13-Aug-14 21:18 
AnswerRe: Automatic Transfer File [Real-TIme] Pin
Richard MacCutchan13-Aug-14 22:14
mveRichard MacCutchan13-Aug-14 22:14 
QuestionC++ Vector Array in Template Pin
Member 1100457313-Aug-14 4:19
Member 1100457313-Aug-14 4:19 
SuggestionRe: C++ Vector Array in Template Pin
Richard MacCutchan13-Aug-14 4:55
mveRichard MacCutchan13-Aug-14 4:55 
AnswerRe: C++ Vector Array in Template Pin
CPallini13-Aug-14 8:45
mveCPallini13-Aug-14 8:45 
GeneralRe: C++ Vector Array in Template Pin
Stefan_Lang14-Aug-14 2:34
Stefan_Lang14-Aug-14 2:34 
GeneralRe: C++ Vector Array in Template Pin
CPallini14-Aug-14 2:40
mveCPallini14-Aug-14 2:40 
Questionhave to modify a prn file which is generated by printer Pin
Member 1091823813-Aug-14 0:53
Member 1091823813-Aug-14 0:53 
AnswerRe: have to modify a prn file which is generated by printer Pin
Satya Chamakuri13-Aug-14 1:17
Satya Chamakuri13-Aug-14 1:17 
AnswerRe: have to modify a prn file which is generated by printer Pin
Satya Chamakuri13-Aug-14 1:21
Satya Chamakuri13-Aug-14 1:21 
AnswerRe: have to modify a prn file which is generated by printer Pin
CPallini13-Aug-14 2:08
mveCPallini13-Aug-14 2:08 
AnswerRe: have to modify a prn file which is generated by printer Pin
Stefan_Lang14-Aug-14 4:09
Stefan_Lang14-Aug-14 4:09 
QuestionKeyboard Arrow Key Control in C++ Pin
Member 1100457312-Aug-14 18:33
Member 1100457312-Aug-14 18:33 

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.