"rupert" <an*******@discussions.microsoft.com> wrote in message
news:15****************************@phx.gbl...
I have loaded Xll+ which is a excel development addin. I
have included as first line of my VC++ module (visual
studio.net 2003):
#using <mscorlib.dll>
and yet get compile error:
fatal error C1190: managed tageted code requires '#using
<mscorlib.dll>' and '/clr' option
Choose Properties from the Project menu. Then click on the Configuration
folder. Under it, select the General Options. In the edit box labelled "Use
Managed Extensions" in the right pane make sure "Yes" is selected. That
turns on the "/clr" switch that the diagnostic references.
That should remove the error but note that I have no idea as to whether
Excel add-ins may be cast in managed code. You may want to post again in a
group devoted to Office development topics.
If it turns out that you can not use managed code in an add-in, then you'd
likely have to use one of the interoperability mechanisms ("it just works"
aka IJW or "Platform Invoke" aka P/Invoke) to get your unmanaged Excel DLL
to load a managed assembly and to make use of the services that assembly
provides.
Just by the way, if you get stuck, you should be able to find help on
interoperability issues here.
Regards,
Will