using /clr switch for ATL application raises an exception when the application is terminating.
-
Hi, i have created a sample ATL application in VS2010, added ATL Simple object. it has only one method int getVal() { return 10; } i have enabled /clr switch in the project properties and build in release mode. (i have added /clr because i want to consume some objects build in C#.net) after registering the dll, i have consumed the COM object in vbscript. (the code below) dim obj set obj = createobject("MySample.COMSample") msgbox obj.getVal() set obj = nothing this is very simple COM object. if i run the above script, it will show message box "10". once i press ok, there is an popup with an exception message below. --------------------------- WScript.exe - Application Error --------------------------- The exception unknown software exception (0xc0020001) occurred in the application at location 0x7c812aeb. Click on OK to terminate the program --------------------------- OK --------------------------- if i remove /clr switch and build it run the Vbscirpt. i don't see the popup error. any suggestion why there an exception when /clr switch is used ? Thanks in advance.