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#
  4. Need urgent help

Need urgent help

Scheduled Pinned Locked Moved C#
csharpcomlinuxjsonhelp
5 Posts 3 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
    ass3aad
    wrote on last edited by
    #1

    Please I want to know how to register dll com component in C# using windows API not shell command. Please I need it very urgent. -- modified at 11:55 Monday 15th May, 2006

    J 1 Reply Last reply
    0
    • A ass3aad

      Please I want to know how to register dll com component in C# using windows API not shell command. Please I need it very urgent. -- modified at 11:55 Monday 15th May, 2006

      J Offline
      J Offline
      Judah Gabriel Himango
      wrote on last edited by
      #2

      Umm, AFAIK, you can do this only using the regsvr32 executable. Thus, you will have to pass it a shell command. What's wrong with that? You can still use C# code to execute the shell command:

      Process proc = new Process();
      proc.StartInfo.FileName = "regsvr32";
      proc.StartInfo.Arguments = "myComDll.dll";
      proc.Start();

      Tech, life, family, faith: Give me a visit. I'm currently blogging about: Islamic Domination: Coming to a Jewish state near you! The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

      A 1 Reply Last reply
      0
      • J Judah Gabriel Himango

        Umm, AFAIK, you can do this only using the regsvr32 executable. Thus, you will have to pass it a shell command. What's wrong with that? You can still use C# code to execute the shell command:

        Process proc = new Process();
        proc.StartInfo.FileName = "regsvr32";
        proc.StartInfo.Arguments = "myComDll.dll";
        proc.Start();

        Tech, life, family, faith: Give me a visit. I'm currently blogging about: Islamic Domination: Coming to a Jewish state near you! The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

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

        Thank you for your help I know that I can still use C# code by using shell commands. But actually I am doing it for someone that asked me to do it using windows API without using the shell commands! So please if you/anyone have any ideas please send it. Thank you

        J D 2 Replies Last reply
        0
        • A ass3aad

          Thank you for your help I know that I can still use C# code by using shell commands. But actually I am doing it for someone that asked me to do it using windows API without using the shell commands! So please if you/anyone have any ideas please send it. Thank you

          J Offline
          J Offline
          Judah Gabriel Himango
          wrote on last edited by
          #4

          As far as I know, COM dlls are registered on the system using regsvr32. I've never seen an API that registers a COM dll manually. That said, I'm no COM expert. I mean, dll registration is simply adding the dll to the system and making it known throughout the registry; all things that can be done with the Win32 API of course. In the end though, I see no reason not to simply use the regsvr32 executable; that's what it's there for. I suppose you might want to try the COM forum instead, as this more pertains to COM than C#.

          Tech, life, family, faith: Give me a visit. I'm currently blogging about: Islamic Domination: Coming to a Jewish state near you! The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

          1 Reply Last reply
          0
          • A ass3aad

            Thank you for your help I know that I can still use C# code by using shell commands. But actually I am doing it for someone that asked me to do it using windows API without using the shell commands! So please if you/anyone have any ideas please send it. Thank you

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            There is no one API call that does this. You have to open the component file, parse and get the ALL of the GUIDs and names for each object, method, property, ...whatnot.... Then write each GUID and name to the registry in the appropriate locations. You can try to implement something like this, probably taking you 6 months of work as you figure out the internals of COM and the API's involved. Or, do it the easy way, and shell out to RegSrv32, and have it done in 5 minutes. Which option do you think would be more cost effective? Dave Kreskowiak Microsoft MVP - Visual Basic

            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