Click here to Skip to main content
16,019,109 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionEasy questions about C++ [modified] Pin
akirilov20-Nov-08 23:34
akirilov20-Nov-08 23:34 
AnswerRe: Easy questions about C++ Pin
Cedric Moonen20-Nov-08 23:58
Cedric Moonen20-Nov-08 23:58 
GeneralRe: Easy questions about C++ Pin
akirilov21-Nov-08 0:16
akirilov21-Nov-08 0:16 
GeneralRe: Easy questions about C++ Pin
Maximilien21-Nov-08 0:43
Maximilien21-Nov-08 0:43 
GeneralRe: Easy questions about C++ Pin
Cedric Moonen21-Nov-08 1:04
Cedric Moonen21-Nov-08 1:04 
AnswerRe: Easy questions about C++ Pin
Code-o-mat21-Nov-08 0:06
Code-o-mat21-Nov-08 0:06 
GeneralRe: Easy questions about C++ Pin
akirilov21-Nov-08 0:22
akirilov21-Nov-08 0:22 
GeneralRe: Easy questions about C++ [modified] Pin
Code-o-mat21-Nov-08 0:29
Code-o-mat21-Nov-08 0:29 
Ok, new edit, i misread you there the first time. LocalAlloc gives you a handle to a memory location, not the memory location itself. Declare your variable as HANDLE, not int, since LocalALloc, unless specified differently, will give you a HANDLE. You have to use LocalLock and LocalUnlock to actually access the memory. But may i ask why you need to use LocalAlloc instead of new or malloc? So basicly, if you have to use LocalAlloc you have to LocalLock(handle), this will give you a void * pointer that points at the memory you allocated, you can feed this to WriteFile (didn't go into WriteFile itself so i assume you know what you are doing with that) and then use LocalUnlock to unlock the memory, also use LocalFree to free it.

modified on Friday, November 21, 2008 6:36 AM

GeneralRe: Easy questions about C++ Pin
akirilov21-Nov-08 4:17
akirilov21-Nov-08 4:17 
GeneralRe: Easy questions about C++ Pin
Code-o-mat21-Nov-08 6:23
Code-o-mat21-Nov-08 6:23 
GeneralRe: Easy questions about C++ Pin
bulg21-Nov-08 12:59
bulg21-Nov-08 12:59 
GeneralConfusions related to Dll. Pin
Nilesh Hamane20-Nov-08 23:34
Nilesh Hamane20-Nov-08 23:34 
GeneralRe: Confusions related to Dll. Pin
SandipG 20-Nov-08 23:50
SandipG 20-Nov-08 23:50 
GeneralRe: Confusions related to Dll. Pin
tasumisra21-Nov-08 1:14
tasumisra21-Nov-08 1:14 
GeneralRe: Confusions related to Dll. Pin
22491721-Nov-08 15:41
22491721-Nov-08 15:41 
QuestionDelete Shortcut file Pin
MsmVc20-Nov-08 22:11
MsmVc20-Nov-08 22:11 
AnswerRe: Delete Shortcut file Pin
Chandrasekharan P20-Nov-08 22:19
Chandrasekharan P20-Nov-08 22:19 
GeneralRe: Delete Shortcut file Pin
MsmVc20-Nov-08 22:29
MsmVc20-Nov-08 22:29 
AnswerRe: Delete Shortcut file Pin
Iain Clarke, Warrior Programmer20-Nov-08 22:39
Iain Clarke, Warrior Programmer20-Nov-08 22:39 
GeneralRe: Delete Shortcut file Pin
MsmVc20-Nov-08 22:53
MsmVc20-Nov-08 22:53 
GeneralRe: Delete Shortcut file Pin
Iain Clarke, Warrior Programmer20-Nov-08 23:03
Iain Clarke, Warrior Programmer20-Nov-08 23:03 
QuestionColored cursor became Black cursor in Vista Pin
Rahul Vaishnav20-Nov-08 22:00
Rahul Vaishnav20-Nov-08 22:00 
QuestionDynamic Edit Boxes Pin
Chandrasekharan P20-Nov-08 21:30
Chandrasekharan P20-Nov-08 21:30 
AnswerRe: Dynamic Edit Boxes Pin
Cedric Moonen20-Nov-08 21:41
Cedric Moonen20-Nov-08 21:41 
GeneralRe: Dynamic Edit Boxes Pin
Chandrasekharan P20-Nov-08 23:11
Chandrasekharan P20-Nov-08 23:11 

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.