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. C / C++ / MFC
  4. help creating a COM/ATL wrapper for a USB Scanner for VB6

help creating a COM/ATL wrapper for a USB Scanner for VB6

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialc++com
2 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.
  • E Offline
    E Offline
    E Wolf
    wrote on last edited by
    #1

    My first program in VC6 (ever) is a wrapper so the the DLLs provided by our Scanner vendor can be used in our VB6 application. (They won't provide compatible DLLs) I did some experimental programs and successfully wrapped the librarys in a vc6 program and created a test dialog to access the function. Good to go. Then I followed this COM/ATL example: http://www.codeproject.com/Articles/96/Beginner-s-Tutorial-COM-ATL-Simple-Project I Created a COM project just like the example, added my includes for the provided vendor DLLs and abstracted access to the library calls. Wonderfully, magically the library shows up the the VB6 reference list. I include it just like in the example program and when I try to access the simplest function (Is the scanner connected?) the call to the function CRASHES VB6 with an access violation! I'm at the end of ideas here. I did run depends.exe against the 4 library DLLs that our vendor provided and there are a number of DLL dependencies missing on my machine. Could my problem be those missing dependencies alone? (They reference IE dlls that I don't believe are applicable to anything I'm asking the library to do.) Thanks for your time.

    L 1 Reply Last reply
    0
    • E E Wolf

      My first program in VC6 (ever) is a wrapper so the the DLLs provided by our Scanner vendor can be used in our VB6 application. (They won't provide compatible DLLs) I did some experimental programs and successfully wrapped the librarys in a vc6 program and created a test dialog to access the function. Good to go. Then I followed this COM/ATL example: http://www.codeproject.com/Articles/96/Beginner-s-Tutorial-COM-ATL-Simple-Project I Created a COM project just like the example, added my includes for the provided vendor DLLs and abstracted access to the library calls. Wonderfully, magically the library shows up the the VB6 reference list. I include it just like in the example program and when I try to access the simplest function (Is the scanner connected?) the call to the function CRASHES VB6 with an access violation! I'm at the end of ideas here. I did run depends.exe against the 4 library DLLs that our vendor provided and there are a number of DLL dependencies missing on my machine. Could my problem be those missing dependencies alone? (They reference IE dlls that I don't believe are applicable to anything I'm asking the library to do.) Thanks for your time.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Quite possibly yes, but it is impossible to be sure. You would need to collect some decent debug information in order to be certain why the crash occurs.

      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