none
CopyMemory error RRS feed

  • Question

  • I'm having trouble with calling the CopyMemory API function from my powerbuilder application, only from certain PCs.  Appears to be a hardware problem, but some of the machines have rather updated hardware, so I'm not sure that's the problem, though signs certainly point that way.

    A summary of the problem:

    The powerbuilder application is failing on is the windows API function:

    CopyMemory(devmode2, PrnInfo.pdevmode, SIZEOF_devmode)

     

    CopyMemory function refers to windows API function:

    Function long CopyMemory(REF STRUCTURE Destination[], long Source, long Length) library "kernel32.dll" Alias For "RtlMoveMemory;Ansi"
    Function long CopyMemory(REF STRUCTURE Destination, long Source, long Length) library "kernel32.dll" Alias For "RtlMoveMemory;Ansi"

    This application crashes before I can get the return code from the function call.

    It is stored in c:\windows\system32\kernel32.dll, version 5.1.2600.2180, and the PCs that do not have the error have the same .dll and version number as the PCs which do have the error.

    What is strange is that the error only occurs on certain PCs, some of them having 1G of RAM.  On of the PCs experiencing failure on this function has a 1G RAM and a 3060MHz Celeron CPU.  All PCs are windows XP.

    Any ideas why we might be experiencing this problem?

    Any information would be greatly appreciated.

    • Moved by Kevin Woley Wednesday, August 5, 2009 8:43 PM to find the right forum (From:Windows Events)
    Friday, July 24, 2009 5:54 PM

Answers

  • Hi,
    I think passing bad parameters to CopyMemory is a much more likely explanation for the crash you are seeing. You need to debug your code (with a debugger to catch the crash in action and try to figure out why the memory you are passing is bad). Most likely it is due to a bug in your code or one of the libraries you are using.
    Thanks,
    Alex

    Saturday, July 25, 2009 4:35 PM

All replies

  • Hi,
    I think passing bad parameters to CopyMemory is a much more likely explanation for the crash you are seeing. You need to debug your code (with a debugger to catch the crash in action and try to figure out why the memory you are passing is bad). Most likely it is due to a bug in your code or one of the libraries you are using.
    Thanks,
    Alex

    Saturday, July 25, 2009 4:35 PM
  •  

    Thank you for visiting the Microsoft forum. This forum focuses on Windows Events (ETW and the Windows Event Log) and related technologies. I am moving your question to the moderator forum ("Where is the forum for..?"). The owner of the forum will direct you to the correct forum to get your question answered.

     

    Thank you,

    Kevin

    Wednesday, August 5, 2009 8:42 PM