Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. VB DLL for C App

VB DLL for C App

Scheduled Pinned Locked Moved Visual Basic
comsecurityquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NoizeGod
    wrote on last edited by
    #1

    Thanks in advance, I'm trying to author a DLL plugin for an existing application that was written in C. In other words, the C code can not change. Unfortunately, the app doesn't implement COM and I'm writing the DLL in VB6 which only implements ActiveX DLL (using COM). The app does support loading all the DLL's in a certain directory and I've got a sample header file for the function call syntax. Unfortunately, I know VB and not C so I'm trying to convert the header into VB. I've found a way to export the functions from my DLL and the calling app does recognize them, so step 1 is out of the way. The next step is to manually initialize COM on the calling thread so VB will play nice? Then TLS can be loaded? I think these are the correct steps but obviously, I'm having implementing them. Does anybody have any leads, examples and/or links where I can learn about this more? Surely somebody has written VB plugins for a C app? :confused: Thanks Joe

    C 1 Reply Last reply
    0
    • N NoizeGod

      Thanks in advance, I'm trying to author a DLL plugin for an existing application that was written in C. In other words, the C code can not change. Unfortunately, the app doesn't implement COM and I'm writing the DLL in VB6 which only implements ActiveX DLL (using COM). The app does support loading all the DLL's in a certain directory and I've got a sample header file for the function call syntax. Unfortunately, I know VB and not C so I'm trying to convert the header into VB. I've found a way to export the functions from my DLL and the calling app does recognize them, so step 1 is out of the way. The next step is to manually initialize COM on the calling thread so VB will play nice? Then TLS can be loaded? I think these are the correct steps but obviously, I'm having implementing them. Does anybody have any leads, examples and/or links where I can learn about this more? Surely somebody has written VB plugins for a C app? :confused: Thanks Joe

      C Offline
      C Offline
      CT CHANG
      wrote on last edited by
      #2

      if the C code can not be change, then you how invoke the VB DLL in your C app? K-PAX? CHANGE THE WAY YOU LOOK AT YOURSELF, OTHERS & THE WORLD...

      N 1 Reply Last reply
      0
      • C CT CHANG

        if the C code can not be change, then you how invoke the VB DLL in your C app? K-PAX? CHANGE THE WAY YOU LOOK AT YOURSELF, OTHERS & THE WORLD...

        N Offline
        N Offline
        NoizeGod
        wrote on last edited by
        #3

        K-PAX, Thanks for responding. As mentioned in my original message, "The app does support loading all the DLL's in a certain directory". Thanks Joe

        C 1 Reply Last reply
        0
        • N NoizeGod

          K-PAX, Thanks for responding. As mentioned in my original message, "The app does support loading all the DLL's in a certain directory". Thanks Joe

          C Offline
          C Offline
          CT CHANG
          wrote on last edited by
          #4

          ;P i miss that. As you have the header file for the DLL export function prototype which going to load by the C app. So i guest developing the Dll with C/C++ is the choise. As VB can not create normal WIN32 DLL as the LoadLibrary API need a valid dll entry point which does not generated in VB ActiveX Dll. K-PAX? CHANGE THE WAY YOU LOOK AT YOURSELF, OTHERS & THE WORLD...

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups