CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 4 of 4
  1. #1
    Join Date
    May 1999

    Problem with ATL COM and pointers

    I've been working on an ATL COM component (a DLL), which employs some manipulation of pointers. Unless I comment out certain lines, regsvr32 returns an error, stating that LoadLibrary failed due to an "invalid access to memory location" error.

    Can anyone suggest what might be the problem here?

    I am using Visual Studio .NET under WinXP Professional.

    Thanks, RD

  2. #2
    Join Date
    Feb 2002
    It is very difficult to debug a program with limited information. Post the code that causes the problem.


  3. #3
    Join Date
    Jul 2003
    Before you ask about this problem again, I would suggest running regsvr32 through the debugger. It should at the very least give you more information about the problem you are having.
    To do this, from your project's properties goto 'Debugging'. From the Command dropdown, you should be able to select 'regsvr32'. Now, just set Command Arguments to '$(TargetPath)'.
    Start up your project, and you should be able to debug the exception that is being generated.

  4. #4
    Join Date
    May 1999
    The problem only occurs when objects using the code are placed in the global namespace. If they are contained within the COM component's class definition, they register OK.

    The suggestion to debug the "regsvr32" utility is intriguing, and I will most definitely try that out!

    Thanks all!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width