Re: Delphi DLL / VB app
- From: erewhon@xxxxxxxxxx (J French)
- Date: Mon, 25 Apr 2005 08:07:09 +0000 (UTC)
On 24 Apr 2005 09:46:38 -0700, "DanG" <dang57@xxxxxxxxxxx> wrote:
>Thanks Markku
>
>I tried it as I did in Access, and again, it worked.
>
>But it got me thinking. I had added a DLL reference in Access and VB
>to the test project, then did the CreateObject. But the real VB app
>cannot do that. It doesn't know anything about my DLL, other than that
>there will be a function called "Process". So I attempted to do a
>'late bind" by changing the "dim myObject" statement to only define
>"Object" rather than my DLL. That did fail at execution.
>
>So what would VB need to do to locate my DLL? I couldn't come up with
>a good example. All I've seen as an example is:
>
>Dim myObject as Object
>set myObject = CreateObject(dllname.classname)
>
>...but that doesn't work. Assuming that VB really does have a way to
>do the late-bind, I expect the VB application does that. But if the
>call to the DLL fails, then maybe there is something I need to do in
>the DLL to allow VB to complete the late bind.
An AX DLL has two names
1) The physical name of the file on disk
2) The 'logical' name
When the DLL is registered the 'logical' name is inserted in the
Registry ( RegSvr32 does this by invoking a normal function in the
DLL called IIRC DllSelfRegister )
So to invoke it one can use:
Set X = CreateObject( "logicalname.exposedclass" )
>From then on one uses: X.process
I suspect (but am not sure ) that your parameter could be an
OleVariant.
The result should be a 2 byte integer containing 0 or -1
HTH
.
- Follow-Ups:
- Re: Delphi DLL / VB app
- From: DanG
- Re: Delphi DLL / VB app
- References:
- Delphi DLL / VB app
- From: DanG
- Re: Delphi DLL / VB app
- From: Markku Nevalainen
- Re: Delphi DLL / VB app
- From: DanG
- Delphi DLL / VB app
- Prev by Date: Re: Could someone explain this variable please
- Next by Date: Re: Switching between applications
- Previous by thread: Re: Delphi DLL / VB app
- Next by thread: Re: Delphi DLL / VB app
- Index(es):
Relevant Pages
|
|