Click here to Skip to main content
16,017,650 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionwaht does "Invalid Address specified to RtlValidateHeap" mean? Pin
greenwyx12-Oct-05 14:56
greenwyx12-Oct-05 14:56 
AnswerRe: waht does "Invalid Address specified to RtlValidateHeap" mean? Pin
Chris Losinger12-Oct-05 15:14
professionalChris Losinger12-Oct-05 15:14 
GeneralRe: waht does "Invalid Address specified to RtlValidateHeap" mean? Pin
greenwyx12-Oct-05 15:27
greenwyx12-Oct-05 15:27 
GeneralRe: waht does "Invalid Address specified to RtlValidateHeap" mean? Pin
Chris Losinger12-Oct-05 15:43
professionalChris Losinger12-Oct-05 15:43 
GeneralRe: waht does "Invalid Address specified to RtlValidateHeap" mean? Pin
greenwyx12-Oct-05 15:51
greenwyx12-Oct-05 15:51 
GeneralRe: waht does "Invalid Address specified to RtlValidateHeap" mean? Pin
Prakash Nadar13-Oct-05 6:04
Prakash Nadar13-Oct-05 6:04 
GeneralRe: waht does "Invalid Address specified to RtlValidateHeap" mean? Pin
greenwyx13-Oct-05 14:36
greenwyx13-Oct-05 14:36 
QuestionProcessor Information 32-bit app on 64-bit Machine Pin
sergioh7812-Oct-05 14:32
sergioh7812-Oct-05 14:32 
Hello. This is a problem I'm encoutering. I have a program compiled on a 32-bit system. Yet, I want to detect the Process Affinity Mask and System Affinity Mask on a 64-bit System which contains 64 logical processors. The problem is that:

BOOL GetProcessAffinityMask(
HANDLE hProcess,
PDWORD_PTR lpProcessAffinityMask,
PDWORD_PTR lpSystemAffinityMask
);

and

BOOL SetProcessAffinityMask(
HANDLE hProcess,
DWORD_PTR dwProcessAffinityMask
);

These functions have a DWORD_PTR data type that is a 32-bit data type in a 32-bit system and 64-bit data type in a 64-bit system when the code is compile native mode( 32-bit or 64-bit ). Since my application is compiled in a 32-bit system, the DWORD_PTR will be a 32-bit mask. When I run this application in a 64-bit system, I get the process affinity mask and system affinity as 32-bit value. This implies that even though, I have 64-bit system with 64 logical processor, my application can only see the process affinity mask and system affinity mask for 32 logical processors.

What this implies is that my 32-bit application can only be set to run on any 32 logical processors, but I would never be able to have my application run in all processors since my process affinity mask data type is 32-bit and system process affinity is also 32-bit.

So, my questions is, how can I set my application 32-bit app to run on all 64 logical processors when my code was compiled in a 32-bit system?

One Answer which I already know: I have to compile my code 64-bit native in order to be able to make my application have the ability to choose any of the 64 logical processors to run on. But then that implies a 32-bit app would never be able to choose to run on any logical processor it chooses to in a system with 64 logical processors since the GetProcessAffinity( ... ) will only return 32-bit affinity mask. This will also apply when you are setting the process affinity, SetProcessAffinityMask( ... )

I would appreciate a quick response. Thanks.


P.S. For those trying to detect all the processors in a 64-bit system with a 32-bit application, which contain more than 32 logical processors good luck. If you are able to do it, please email me at: sergioah78@yahoo.com. If no one can do it, then that means we have a limitation when we run a 32-bit app on a 64-bit system. If we have more than 32 logical processors, we can only choose up to 32 logical processors to run the 32-bit application.




sergioah78@yahoo.com
Sergio
QuestionSubclassing MFC controls for ActiveX Pin
gaarons12-Oct-05 13:03
gaarons12-Oct-05 13:03 
QuestionNeed Help With Calculation Pin
WackoWolf12-Oct-05 12:40
WackoWolf12-Oct-05 12:40 
AnswerRe: Need Help With Calculation Pin
Roger Allen12-Oct-05 13:38
Roger Allen12-Oct-05 13:38 
AnswerRe: Need Help With Calculation Pin
David Crow13-Oct-05 3:19
David Crow13-Oct-05 3:19 
QuestionAccelerator key issue in hosted ActiveX control Pin
Ian Bowler12-Oct-05 12:35
Ian Bowler12-Oct-05 12:35 
QuestionCResourceException Pin
LighthouseJ12-Oct-05 12:08
LighthouseJ12-Oct-05 12:08 
QuestionMultiLingual Resource Pin
jim45612-Oct-05 11:54
jim45612-Oct-05 11:54 
Questionmalloc and free problem. Pin
Jader8912-Oct-05 11:47
Jader8912-Oct-05 11:47 
AnswerRe: malloc and free problem. Pin
Jader8912-Oct-05 11:51
Jader8912-Oct-05 11:51 
AnswerRe: malloc and free problem. Pin
Anonymous12-Oct-05 12:02
Anonymous12-Oct-05 12:02 
GeneralRe: malloc and free problem. Pin
Jader8912-Oct-05 12:08
Jader8912-Oct-05 12:08 
GeneralRe: malloc and free problem. Pin
LighthouseJ12-Oct-05 12:10
LighthouseJ12-Oct-05 12:10 
AnswerRe: malloc and free problem. Pin
sunit512-Oct-05 20:43
sunit512-Oct-05 20:43 
QuestionVisual C++ .Net Dialog Help Wizard Pin
Cubzfan12-Oct-05 11:14
Cubzfan12-Oct-05 11:14 
QuestionEnumProcesses question Pin
Gary Wheeler12-Oct-05 10:43
Gary Wheeler12-Oct-05 10:43 
AnswerRe: EnumProcesses question Pin
Prakash Nadar12-Oct-05 22:45
Prakash Nadar12-Oct-05 22:45 
GeneralRe: EnumProcesses question Pin
Gary Wheeler13-Oct-05 2:18
Gary Wheeler13-Oct-05 2:18 

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.