ActiveX DLL loading

ActiveX DLL loading

Anonymous
Not applicable
287 Views
4 Replies
Message 1 of 5

ActiveX DLL loading

Anonymous
Not applicable
I am having a problem getting my ActiveX DLL to load. I am using the
following code:

(setq obj (vlax-create-object "Steel.StlUtil"))

My file is called Steel.dll and i have 2 seperate class files:

Channel(channelform.cls)
StlUtil(utilities.cls)

when I run this code all I get is NIL after.

The dll file works fine when I refenence it inside a Visual Basic EXE
program.

Any help will be appricated
I am new at ActiveX and this my first attempt at this.

I am going to post the DLL fine in customer files NG.

Thanks.

Lenny
0 Likes
288 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
Try this instead.

(setq *Application* (vlax-get-acad-object))
(setq obj (vla-getinterfaceobject *Application* "Steel.StlUtil"))

You may also want to note that vlax-invoke-method does not appear to work.
Instead, use vlax-invoke.

I believe the latter method has been deprecated, but since it is the only
one I can get to work, it is what I use.

Chuck


"Lenny Louque" wrote in message
news:BA85E0E3CA4B3718FDE0708E1A2D8C39@in.WebX.maYIadrTaRb...
> I am having a problem getting my ActiveX DLL to load. I am using the
> following code:
>
> (setq obj (vlax-create-object "Steel.StlUtil"))
>
> My file is called Steel.dll and i have 2 seperate class files:
>
> Channel(channelform.cls)
> StlUtil(utilities.cls)
>
> when I run this code all I get is NIL after.
>
> The dll file works fine when I refenence it inside a Visual Basic EXE
> program.
>
> Any help will be appricated
> I am new at ActiveX and this my first attempt at this.
>
> I am going to post the DLL fine in customer files NG.
>
> Thanks.
>
> Lenny
>
>
>
>
>
0 Likes
Message 3 of 5

Anonymous
Not applicable
I am now getting a different error:

; error: Automation Error. Problem in loading application

Any idea what could be causing this? Does this mean my DLL might be
incorrect?

Thanks.
Lenny


"Chuck Gabriel" wrote in message
news:4FF1751A5E0022BB52C7447D5C145422@in.WebX.maYIadrTaRb...
> Try this instead.
>
> (setq *Application* (vlax-get-acad-object))
> (setq obj (vla-getinterfaceobject *Application* "Steel.StlUtil"))
>
> You may also want to note that vlax-invoke-method does not appear to work.
> Instead, use vlax-invoke.
>
> I believe the latter method has been deprecated, but since it is the only
> one I can get to work, it is what I use.
>
> Chuck
>
>
> "Lenny Louque" wrote in message
> news:BA85E0E3CA4B3718FDE0708E1A2D8C39@in.WebX.maYIadrTaRb...
> > I am having a problem getting my ActiveX DLL to load. I am using the
> > following code:
> >
> > (setq obj (vlax-create-object "Steel.StlUtil"))
> >
> > My file is called Steel.dll and i have 2 seperate class files:
> >
> > Channel(channelform.cls)
> > StlUtil(utilities.cls)
> >
> > when I run this code all I get is NIL after.
> >
> > The dll file works fine when I refenence it inside a Visual Basic EXE
> > program.
> >
> > Any help will be appricated
> > I am new at ActiveX and this my first attempt at this.
> >
> > I am going to post the DLL fine in customer files NG.
> >
> > Thanks.
> >
> > Lenny
> >
> >
> >
> >
> >
>
>
0 Likes
Message 4 of 5

Anonymous
Not applicable
Are you certain "Steel" is the correct library name?

I doubt there is anything wrong with your DLL, since, as you mentioned
before, it works fine in VB.


"Lenny Louque" wrote in message
news:06DD70E426383856A8117EAD1B5BAD1A@in.WebX.maYIadrTaRb...
> I am now getting a different error:
>
> ; error: Automation Error. Problem in loading application
>
> Any idea what could be causing this? Does this mean my DLL might be
> incorrect?
>
> Thanks.
> Lenny
0 Likes
Message 5 of 5

Anonymous
Not applicable
Did you call (vl-load-com) before you tried to create the object?

"Lenny Louque" wrote in message
news:06DD70E426383856A8117EAD1B5BAD1A@in.WebX.maYIadrTaRb...
> I am now getting a different error:
>
> ; error: Automation Error. Problem in loading application
>
> Any idea what could be causing this? Does this mean my DLL might be
> incorrect?
>
> Thanks.
> Lenny
>
0 Likes