Message 1 of 7
Selfwritten DLL with MFC- and ATL-Support

Not applicable
08-07-2002
11:42 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi!
I used the ATL Wizard from Visual Studio 6.0 to create a DLL with MFC-
and ATL-Support.
Well, I inserted the acrxEntryPoint Function, exported the Symbol and
adapted the project settings (base address, etc.) to meet my needs.
Currently, I'm already able to load the ARX in AutoCAD (with the
arx/load command), but when I unload the DLL, my application crashes
AutoCAD and the error-message is:
------------------------------------------
Debug Assertion Failed!
Program: C:\WINNT\system32\regsvr32.exe
File: [...]\atlbase.h
Line: 5700
Expression: pM ->m_hInst != 0
[...]
-------------------------------------------
I guess, I have to register some stuff before using it, right?
I am not experienced with ATL or anything like that, I just had to
create an arx-project without the help of the ObjectARX wizard. This
project must be able to create a Toolbar and for this I need access to
IAcadMenuGroup a.s.o. and this stuff needs ATL.
Well, my application loads into AutoCAD, I can call functions in it, I
can work with it - although I'm getting the following message when
loading it:
"AXSupport.arx uses Memory from MSVCRTD.DLL, but AutoCAD uses Memory
from MSVCRT.DLL. This may lead to problems."
(Note: This error message may not match the exact english one - I
translated it from German to English).
Thanks in advance,
--
| .-. | CCNA Alexander Griesser | .''`. |
| /v\ \ Software Developer, EDV Software Service / : :' : |
| /( )\ | Bahnhofstr. 8, 9500 Villach | `. `' |
| ^^ ^^ `-------------------------------------------------' `- |
I used the ATL Wizard from Visual Studio 6.0 to create a DLL with MFC-
and ATL-Support.
Well, I inserted the acrxEntryPoint Function, exported the Symbol and
adapted the project settings (base address, etc.) to meet my needs.
Currently, I'm already able to load the ARX in AutoCAD (with the
arx/load command), but when I unload the DLL, my application crashes
AutoCAD and the error-message is:
------------------------------------------
Debug Assertion Failed!
Program: C:\WINNT\system32\regsvr32.exe
File: [...]\atlbase.h
Line: 5700
Expression: pM ->m_hInst != 0
[...]
-------------------------------------------
I guess, I have to register some stuff before using it, right?
I am not experienced with ATL or anything like that, I just had to
create an arx-project without the help of the ObjectARX wizard. This
project must be able to create a Toolbar and for this I need access to
IAcadMenuGroup a.s.o. and this stuff needs ATL.
Well, my application loads into AutoCAD, I can call functions in it, I
can work with it - although I'm getting the following message when
loading it:
"AXSupport.arx uses Memory from MSVCRTD.DLL, but AutoCAD uses Memory
from MSVCRT.DLL. This may lead to problems."
(Note: This error message may not match the exact english one - I
translated it from German to English).
Thanks in advance,
--
| .-. | CCNA Alexander Griesser
| /v\ \ Software Developer, EDV Software Service / : :' : |
| /( )\ | Bahnhofstr. 8, 9500 Villach | `. `' |
| ^^ ^^ `-------------------------------------------------' `- |