Re:using activex dll in asp
I've managed to reach my class, but not the member fuction.
In VB I do a regular declaration
This works:
Dim conv As converter.Converter
(but I can't reach the member fuction.)
this is my automation object that is included in my activex library:
class ATL_NO_VTABLE TConverterImpl :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<TConverterImpl, &CLSID_Converter>,
public IDispatchImpl<IConverter, &IID_IConverter, &LIBID_converter>
{
public:
TConverterImpl() { }
// Data used when registering Object
//
DECLARE_THREADING_MODEL(otApartment);
DECLARE_PROGID("converter.Converter");
DECLARE_DESCRIPTION("");
// Function invoked to (un)register object
//
static HRESULT WINAPI UpdateRegistry(BOOL bRegister)
{
TTypedComServerRegistrarT<TConverterImpl>
regObj(GetObjectCLSID(), GetProgID(), GetDescription());
return regObj.UpdateRegistry(bRegister);
}
BEGIN_COM_MAP(TConverterImpl)
COM_INTERFACE_ENTRY(IConverter)
COM_INTERFACE_ENTRY2(IDispatch, IConverter)
END_COM_MAP()
public:
STDMETHOD(OnStartPage)(IUnknown* IUnk);
STDMETHOD(OnEndPage)();
STDMETHOD(setHeight)(long height);
#endif
//this is the cpp file:
#include <vcl.h>
#pragma hdrstop
#include "CONVERTERIMPL.H"
STDMETHODIMP TConverterImpl::OnStartPage (IUnknown* pUnk)
{
return S_OK;
STDMETHODIMP TConverterImpl::OnEndPage ()
{
return S_OK;
STDMETHODIMP TConverterImpl::setHeight(long height)
{
return E_NOTIMPL;
"Ola Eriksen" <o...@vivatech.no> skrev i melding
news:3e913943$1@newsgroups.borland.com...
Quote
> Hi there!
> I'm working on a BCB6 activex dll that I want to use in ASP and
VisualBasic.
> I've managed to export dll functions that I can use in VB.
> How do I export a class (object) in dll, so I can use the following syntax
> in VB:
> Dim t As Object
> set t = CreateObject("MyObject")
> and the same in ASP:
> set MyObject = Server.CreateObject("MyObject")
> Regards
> Ola Eriksen