Re: Delphi DLL / VB app



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.

Suggestions are welcome.

Cheers
Dan

.



Relevant Pages

  • Re: How to programmatically tell if a DLL is present?
    ... attempt at creating an object from the DLL and set a flag for the rest ... Dim MyObject as DllObject ... create an instance of one of the classes the DLL exposes. ...
    (microsoft.public.vb.general.discussion)
  • Re: How to programmatically tell if a DLL is present?
    ... Not sure if it's the best method but you could just error trap the first ... attempt at creating an object from the DLL and set a flag for the rest ... Dim MyObject as DllObject ... create an instance of one of the classes the DLL exposes. ...
    (microsoft.public.vb.general.discussion)
  • Re: Using a dll in vba
    ... Dim MyObject As DLLProjectName.MyObjectClass ... Microsoft MVP - Excel ... The sub cleanup is public in the dll and I have also created ...
    (microsoft.public.excel.programming)
  • Re: Delphi DLL / VB app
    ... I had added a DLL reference in Access and VB ... >Dim myObject as Object ... >call to the DLL fails, then maybe there is something I need to do in ... Registry (RegSvr32 does this by invoking a normal function in the ...
    (comp.lang.pascal.delphi.misc)
  • COM->.net Assembly Binding: "Cannot find the assembly..."
    ... I'm trying to call a .net DLL from within the VB6 IDE. ... In my mind, this first log entry proves that the CODEBASE option is working, ... LOG: Where-ref bind. ... LOG: Dynamic Base = NULL ...
    (microsoft.public.dotnet.framework.interop)