Re: Delphi DLL / VB app



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
.



Relevant Pages

  • Problem with performance of IDE devices
    ... index 0, dll tcpstk.dll, context 0x3f8a5c9 ... 0x801abbe8: FSREG: Mounted ROM portion of boot registry ... 0x8014abcc: FSREG: Invalid HKEY 0x00000000 ...
    (microsoft.public.windowsce.platbuilder)
  • Re: HowTo: Unregister a DLL/Control when the File no longer Exists
    ... Tony Proctor wrote: ... recorded in the registry. ... However, matching them up without the original DLL ... The main project references one of the DLLs, ...
    (microsoft.public.vb.general.discussion)
  • Re: How do I load a third party driver in Windows CE 6.0
    ... I had a look at the link to the documentation you sent a link to and I ... I would get a dll to load. ... What do I have to do in the registry to get my dll to ... then myusbdevicedriver.dll will get loaded when I attach my USB device. ...
    (microsoft.public.windowsce.embedded)
  • Re: HowTo: Unregister a DLL/Control when the File no longer Exists
    ... projects, in the correct order, and deals with this exact situation Karl ... "registry bloat" by not cleaning the registry properly over a period ... The main project references one of the DLLs, ... another DLL. ...
    (microsoft.public.vb.general.discussion)
  • Re: VX2 - My Victory!
    ... I was having problem with an unknown VX2 spyware. ... it will call a DLL. ... >> I search the registry for these two files. ... I DID NOT RESTART THE COMPUTER. ...
    (microsoft.public.security.virus)