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. COM
  4. VB COM problem

VB COM problem

Scheduled Pinned Locked Moved COM
questioncomsysadmintesting
3 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.
  • A Offline
    A Offline
    andyhk95
    wrote on last edited by
    #1

    Hi.. I have built a dll file using Visual Basic 6.0 and registered it in Component Services as a Server Component. Because the dll will run for more than 1 hour (approximately in about 85 minutes). The component can be called by ASP or EXE (built using VB also). The problem will come if there is more than one client application (could be ASP or EXE) call the component at the same time (for example 2 ASP request and 2 EXE file). Each client application will need to call the dll file and process the data (either insert/delete/retrieve records) based on their own data submitted by the user, so the data for first client application should not be processed by the second client application. But after doing the testing, I realized that somehow the first client will processed the data for second client application. And also another strange thing is the latest caller will be processed and finished first. For example, If the component is called by first EXE, then 2 seconds later there is another call from second EXE. The second EXE will be processed and finished first, the first EXE will wait until the second EXE finished to continue the process. Does anyone have same experience before? Or is this a limitation of component built using VB? Also what is the advantage of registering the component (dll file) in multiple Application (Package). Any suggestions will be appreciated. Thanks, Andy

    B 1 Reply Last reply
    0
    • A andyhk95

      Hi.. I have built a dll file using Visual Basic 6.0 and registered it in Component Services as a Server Component. Because the dll will run for more than 1 hour (approximately in about 85 minutes). The component can be called by ASP or EXE (built using VB also). The problem will come if there is more than one client application (could be ASP or EXE) call the component at the same time (for example 2 ASP request and 2 EXE file). Each client application will need to call the dll file and process the data (either insert/delete/retrieve records) based on their own data submitted by the user, so the data for first client application should not be processed by the second client application. But after doing the testing, I realized that somehow the first client will processed the data for second client application. And also another strange thing is the latest caller will be processed and finished first. For example, If the component is called by first EXE, then 2 seconds later there is another call from second EXE. The second EXE will be processed and finished first, the first EXE will wait until the second EXE finished to continue the process. Does anyone have same experience before? Or is this a limitation of component built using VB? Also what is the advantage of registering the component (dll file) in multiple Application (Package). Any suggestions will be appreciated. Thanks, Andy

      B Offline
      B Offline
      Brian Shifrin
      wrote on last edited by
      #2

      VB6 can only create STA components, and in my opinion is worthless for web development. Second: something wrong with your design don't you think? When web component takes 85 minutes to complete? Brian

      A 1 Reply Last reply
      0
      • B Brian Shifrin

        VB6 can only create STA components, and in my opinion is worthless for web development. Second: something wrong with your design don't you think? When web component takes 85 minutes to complete? Brian

        A Offline
        A Offline
        andyhk95
        wrote on last edited by
        #3

        Hi.. The web will only shell (asynschronous) a VB component. The web page do not need to wait until the component finished. SO, the web component is just to trigger only. Does it mean that there is no way to solve the problem because of thread limitation in VB?

        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