HeapAlloc not working in a 64-bit program


  1. Posts : 254
    windows 7 Pro 64 bit
       #1

    HeapAlloc not working in a 64-bit program


    3-25-2013
    Thanks for any help.
    Running Windows 7 64-bit pro with all the goodies.
    Hp Pavilion

    For a 64-bit program written in GoAsm 64-bit.
    The value in HeapAlloc is a variable number.
    GetProcessHeap executed without an error.
    HeapAlloc fails and gives a blue screen with
    Microsofts "AppCrash" message in the details.
    The other HeapAlloc return values did not appear.
    My testmsg3 never gets executed.

    DATA SECTION
    PtrMem dq 0
    HeapHandle dq 0
    testmsg3 db 'after HeapAlloc',0

    .code

    ;other code

    invoke GetProcessHeap
    mov [HeapHandle],rax
    invoke HeapAlloc [HeapHandle],HEAP_GENERATE_EXCEPTIONS,120000
    mov [PtrMem],rax

    ;test code begin
    invoke MessageBox, [hWnd], addr testmsg3, addr testmsg3, MB_OK ;true
    ; test code end

    ;other code
      My Computer


  2. Posts : 254
    windows 7 Pro 64 bit
    Thread Starter
       #2

    I might have found the culprit.
    When the blue screen appears and a window to cancel the program appears, under details,
    lots of stuff is listed. Under Fault Module Name is "ntdll.dll"
    I am running windows 7 pro 64-bit with all the updates.

    Since I have no control over this module I am at a loss as to how to proceed.
    Sure could use some guidance.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 03:02.
Find Us