memory garbling across dll boundaries

This is a discussion on memory garbling across dll boundaries within the C++ Programming forums, part of the General Programming Boards category; after upgrading some projects to VS 2010, i'm now getting some truly odd behavior. there are 3 parts to this ...

  1. #1
    3735928559
    Join Date
    Mar 2008
    Location
    RTP
    Posts
    839

    memory garbling across dll boundaries

    after upgrading some projects to VS 2010, i'm now getting some truly odd behavior.

    there are 3 parts to this particular monstrosity:

    a .NET client application
    a C++/CLI interop wrapper DLL
    a native DLL

    the .NET application and the wrapper are part of the same solution, the native DLL a precompiled binary manually loaded at runtime.

    there are 2 structs, allocated in the wrapper, which contain pointers. these are getting lost in the call into the native dll.

    there is also a plain old char* that gets passed in; it is unscathed.

    win7 x64 vs2010

    any ideas greatly appreciated.

    already found this:

    Potential Errors Passing CRT Objects Across DLL Boundaries

    everything is being compiled as /MDd, which appears to be debug version of /MD

  2. #2
    3735928559
    Join Date
    Mar 2008
    Location
    RTP
    Posts
    839
    /Zp 4 is the solution

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Allocate memory inside allocated memory block?
    By Heidi_Nayak in forum C Programming
    Replies: 14
    Last Post: 04-15-2009, 04:19 PM
  2. C CGI program, and CONTENT_TYPE and boundaries.
    By Dino in forum Networking/Device Communication
    Replies: 3
    Last Post: 03-17-2008, 07:06 AM
  3. Word boundaries
    By slippy in forum C++ Programming
    Replies: 8
    Last Post: 12-02-2007, 02:00 PM
  4. Replies: 2
    Last Post: 09-28-2006, 01:06 PM
  5. DLL boundaries and delete.
    By aker_y3k in forum C++ Programming
    Replies: 2
    Last Post: 09-04-2004, 09:05 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21