aximp fails on DLL with seperate TLB dispinterface reference

  • Thread starter Thread starter Aaron Heusser
  • Start date Start date
A

Aaron Heusser

I have encountered a problem using aximp (.NET 2003) and I
was wondering if anyone has any knowledge/experience with
this issue:

0) Create a simple ATL DLL (MyControl.dll) with an ActiveX
control in it (mine is a legacy ATL Composite Control).

1) Create a separate ATL DLL (MyInterface.dll) which
contains an IDispatch interface declaration in it
(IMyDISPInterface). importlib("MyInterface.tlb") and add
IMyDISPInterface support to the ActiveX object in
MyControl.dll.

2) Add a dispinterface declaration to MyInterface.dll
(IMyEventInterface). Add IMyEventInterface as the
[default, source] interface on the ActiveX control.

In this case, aximp reports the following

"AxImp Error: Object reference not set to an instance of
an object."

Additional point of interest: This problem does not occur
if the dispinterface is defined in MyControl.dll. It only
appears to be a problem when it is declared in a separate
TLB.

Any insight would be appreciated!
 
Thanks for sending the link. Unfortunately, this appears
to be a somewhat different issue. The KB article is
discussing a problem in Microsoft Visual Studio .NET
(2002). I am running 2003 (.NET Framework v1.1).
Additionally, the article discusses tlbimp not aximp.

However, the article did seem to be describing a somewhat
similar problem. So I verified that the DLL's mentioned
in the article are indeed newer on my machine by examining
the properties of the dll's found in
c:\winnt\Microsoft.NET\Framework\v1.1.4322.

To further satisfy my curiosity I tried just doing a

As far as I was able to determine, this appeared to work
fine (at least, no error displayed and when viewed with
ildasm, the IL looked "reasonable"). So, this would seem
to indicate that, in my situation, there is some issue
with aximp ... not tlbimp.
 
Back
Top