I have just started writing a basic Active X application, written
in .NET C++, to be used in a VB.NET application.
I started out with a method ("Squareit") and a property ("Count"). I
used the standard Wizard for both of them. They appeared in the IDL
file as:
interface IFDMApp : IDispatch{
[id(1), helpstring("method SquareIt")] HRESULT SquareIt([in] DOUBLE
dblIn, [out,retval] DOUBLE* SqVal);
[propget, id(2), helpstring("property Count")] HRESULT Count([out,
retval] LONG* pVal);
[propput, id(2), helpstring("property Count")] HRESULT Count([in]
LONG newVal);
};
Everything compiled and linked OK, but when I reference the resulting
DLL in a VB.Net project and load the ActiveX component, neither the
method or propery are exposed.
This would seem to be basic. I've gone through two reference books
and neither of them mentions a thing about this. This has to be
something simple that I'm missing, but what?
SvenC - 09 Oct 2007 16:31 GMT
Hi fdmaxey,
> I have just started writing a basic Active X application, written
> in .NET C++, to be used in a VB.NET application.
[quoted text clipped - 12 lines]
> DLL in a VB.Net project and load the ActiveX component, neither the
> method or propery are exposed.
Please show your client code. Do you use the interface IDFMApp or a more
general type Object?
I would expect code like this:
Dim app As IFDMApp
app = CreateObject("Something.FDMApp")
' app.Count and app.SquareIt should be available through intellisense
--
SvenC