Announcement

Collapse
No announcement yet.

PB/DLL call a VB DLL?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PB/DLL call a VB DLL?

    I know this may sound strange, but I have a situation where I want to have a PowerBasic DLL call a function in a VB DLL.
    The reason: I have an OCX control that I have purchased that has an excellant eval function (VSOCX from VIdeoSoft).
    They do not offer it as a DLL, only as an OCX. So I have created a VB ActiveX DLL that contains this control on a form, with 1 function exposed so that I can call it.
    But, when I run the VB EXE that calls the PowerBasic DLL that calls the VB/DLL it says it cannot load the PB/DLL.

    Hopefully this makes sense.

    I'm guessing that this is not possible.
    If anyone know of an excellant Eval DLL or code I can use in my production code then I would be very grateful.

    Thanks!

    Kerry

    ------------------

  • #2
    It may be possible to make your solution work. However, if you check
    the Files and Add-on Vendors sections of this web site, you will find
    many eval functions that work readily with PowerBASIC.


    ------------------
    Tom Hanlin
    PowerBASIC Staff

    Comment


    • #3
      Originally posted by Kerry Francis:
      I know this may sound strange, but I have a situation where I want to have a PowerBasic DLL call a function in a VB DLL.
      The reason: I have an OCX control that I have purchased that has an excellant eval function (VSOCX from VIdeoSoft).
      They do not offer it as a DLL, only as an OCX. So I have created a VB ActiveX DLL that contains this control on a form, with 1 function exposed so that I can call it.
      But, when I run the VB EXE that calls the PowerBasic DLL that calls the VB/DLL it says it cannot load the PB/DLL.

      If you want to call the VB DLL or the VB EXE you can pass the address of
      a call back function (in a VB module), to the PB DLL. The address is obtained
      via the function addressof. The PB DLL can call the VB function using CALL DWORD
      and the address passed from VB.

      Examples of using addressof are in MSDN, examples of CALL DWORD are in PB Help.

      Hope this helps.

      ------------------

      Comment


      • #4
        I just took a look but I couldn't find it.

        It is here though, eval software. Some guy using PB wrote some stuff for an airline company or something.

        grrrrrr it's frustrating but I can't remember what it was called, it's on this forum though and it's fast, I downloaded the DLL from his web page a few weeks ago



        ------------------

        Paul Dwyer
        Network Engineer
        Aussie in Tokyo
        (Paul282 at VB-World)

        Comment


        • #5
          Thanks Tom, Chuck and Paul,
          I did look through the forums a few weeks ago and found an
          eval function that someone had written, but it did not fill my
          needs (numeric and string support, support for AND & OR). I did
          look at the one eval library that was in the add-in section and
          had similar results. I did come across a code library for
          VB that I am now in the middle of converting to PB. Works really
          well so my problem is solved (plus is alot more elegant that the
          kludge I was starting).

          Thanks!

          Kerry

          ------------------

          Comment


          • #6
            Originally posted by Kerry Francis:

            I did come across a code library for VB that I am now in the middle of converting to PB. Works really
            well
            Do you have a URL?

            --
            Best Regards
            Peter Scheutz



            ------------------
            Best Regards
            Peter Scheutz

            Comment


            • #7
              Yes. It is at: http://www.aivosto.com/eval.html

              ------------------

              Comment


              • #8
                Originally posted by Kerry Francis:
                Yes. It is at: http://www.aivosto.com/eval.html

                Thanks

                --
                Peter



                ------------------
                Best Regards
                Peter Scheutz

                Comment


                • #9
                  Kerry,

                  I would suggest to take a look at the JA COM/PB 2.0 evaluation version
                  at: http://www.jazzagesoft.com. It contains PB samples showing
                  how to:

                  - call a VB DLL, in fact a COM inproc server, from within a
                  PB application. The VB DLL exposes a VB class directly
                  callable in PB.
                  - invoke the same VB class exposed by a VB EXE (out-of-proc
                  COM server) using exactly the same code as in the case
                  of the VB DLL, thanks to the power and magic <g> of COM.
                  - load a PB DLL from a VB Form and let it manipulate directly
                  one of the OCXs that form includes (an MS Calendar in this case)
                  - create OCXs in PB/DLL DDT or non DDT forms

                  Philippe Monteil
                  JAZZAge Software

                  ------------------


                  [This message has been edited by Philippe Monteil (edited February 01, 2001).]

                  Comment

                  Working...
                  X