-
July 12th, 2003, 02:55 PM
#1
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
-
July 12th, 2003, 11:44 PM
#2
It is very difficult to debug a program with limited information. Post the code that causes the problem.
Kuphryn
-
July 13th, 2003, 12:15 AM
#3
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.
-
July 13th, 2003, 04:14 AM
#4
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|