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. ActiveX registration

ActiveX registration

Scheduled Pinned Locked Moved C / C++ / MFC
c++comoophelpquestion
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.
  • M Offline
    M Offline
    marcomars
    wrote on last edited by
    #1

    Hello, my MFC dialog based app uses a freeware activex I found on the net. To use it, the relative ocx file must be registered in the system. Is there a way to make the app do itself without the user having to run regsvr32 c:\..... ? I added the lines STARTUPINFO si; PROCESS_INFORMATION pi; ZeroMemory( &si, sizeof(si) ); ZeroMemory( &pi, sizeof(pi) ); CreateProcess(NULL, // No module name (use command line). "regsvr32 MyOcx.ocx",// Command line. NULL, // Process handle not inheritable. NULL, // Thread handle not inheritable. FALSE, // Set handle inheritance to FALSE. 0, // No creation flags. NULL, // Use parent's environment block. NULL, // Use parent's starting directory. &si, // Pointer to STARTUPINFO structure. &pi ); // Pointer to PROCESS_INFORMATION structure.*/ inside InitInstance(). It seems to partially work: with the ocx unregistered, the first time I execute the app it brings out the information message box saying "DllRegisterServer MyOcx..." From now on each time I execute the app first I see the box and finall the app. I'd love to skip the first dummy execution and to close automatically the system info box without having to hit OK. Any suggestion about this? Thanks for the precious help. Marco.

    A 1 Reply Last reply
    0
    • M marcomars

      Hello, my MFC dialog based app uses a freeware activex I found on the net. To use it, the relative ocx file must be registered in the system. Is there a way to make the app do itself without the user having to run regsvr32 c:\..... ? I added the lines STARTUPINFO si; PROCESS_INFORMATION pi; ZeroMemory( &si, sizeof(si) ); ZeroMemory( &pi, sizeof(pi) ); CreateProcess(NULL, // No module name (use command line). "regsvr32 MyOcx.ocx",// Command line. NULL, // Process handle not inheritable. NULL, // Thread handle not inheritable. FALSE, // Set handle inheritance to FALSE. 0, // No creation flags. NULL, // Use parent's environment block. NULL, // Use parent's starting directory. &si, // Pointer to STARTUPINFO structure. &pi ); // Pointer to PROCESS_INFORMATION structure.*/ inside InitInstance(). It seems to partially work: with the ocx unregistered, the first time I execute the app it brings out the information message box saying "DllRegisterServer MyOcx..." From now on each time I execute the app first I see the box and finall the app. I'd love to skip the first dummy execution and to close automatically the system info box without having to hit OK. Any suggestion about this? Thanks for the precious help. Marco.

      A Offline
      A Offline
      Antony M Kancidrowski
      wrote on last edited by
      #2

      use "regsvr32 myocx.ocx /s" NOTE: /s parameter this makes it register silently! :D Ant. I'm hard, yet soft.
      I'm coloured, yet clear.
      I'm fuity and sweet.
      I'm jelly, what am I?
      - David Williams (Little Britain)

      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