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. Class Object Initialization Timing Issue from ActiveX Server (EXE Server) in VB

Class Object Initialization Timing Issue from ActiveX Server (EXE Server) in VB

Scheduled Pinned Locked Moved Visual Basic
helpquestioncomsysadmintutorial
1 Posts 1 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.
  • S Offline
    S Offline
    Steve Pullan
    wrote on last edited by
    #1

    I have a timing problem with class objects becoming available to external processes from an ActiveX Server (EXE Server) before the Main() function has completed initialization. The EXE Server is set to be single threaded (i.e. thread pool = 1) and the class objects are all multiuse. The class objects require resources initialized by Main() and thus when the external process creates one of these objects, the object's initialization fails because the required resources are not available. This is apparently a well known problem with ActiveX Servers but I am not in a position to rearchitect or rewrite the code - I am stuck with VB 6. My question is this: how can I control the availability of the class objects until AFTER the EXE Server Main() function has completed? I have read articles which state that you can overcome the problem with calls to CoRegisterClassObject() with the REGCLS_SUSPENDED option and then calling CoResumeClassObjects() when initialization is complete, but no samples on how to do this from VB 6. TIA. ...Steve

    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