Proxy/Stub issue

Discussion in 'C Programming' started by George2, Feb 14, 2008.

  1. George2

    George2

    Joined:
    Feb 12, 2008
    Messages:
    108
    Hello everyone,


    I am learning how to write a local out-of-process server and made a runnable program (including client, proxy DLL and server EXE). It works fine and I am inerested to learn how they are binded together internally. I have posted the registration items for EXE server, proxy DLL and interface as below. Here is my understanding of how a client will find the EXE server from component ID and interface. Please review and correct me if I am wrong.

    1. Client issue request through CoCreateInstance with interface ID IX and component ID Component1;
    2. IX maps to interface registration item and then find the related proxy/stub item in registry,

    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{32BB8323-B41B-11CF-A6BB-0080C7B2D682}\ProxyStubClsid32]
    @="{32BB8323-B41B-11CF-A6BB-0080C7B2D682}"

    3. In the proxy/stub item in registry, related physical DLL file will be found and loaded into client's process, here is the related item,

    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{32BB8323-B41B-11CF-A6BB-0080C7B2D682}\InProcServer32]
    @="D:\\Visual Studio 2008\\Projects\\test_exeserver1\\Debug\\test_proxy.dll"
    "ThreadingModel"="Both"

    4. For the requested component name, all the registry will be searched to find "Component1", until the following posted EXE Server item is found and then located (started) by its physical location

    [HKEY_CLASSES_ROOT\CLSID\{0C092C29-882C-11CF-A6BB-0080C7B2D682}\LocalServer32]
    @="D:\\Visual Studio 2008\\Projects\\test_exeserver1\\Debug\\test_exeserver1.exe"

    My understanding correct? Do I miss any information?

    --------------------
    EXE Server

    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOT\CLSID\{0C092C29-882C-11CF-A6BB-0080C7B2D682}]
    @="Inside COM, Chapter 10 Example, Component 1"

    [HKEY_CLASSES_ROOT\CLSID\{0C092C29-882C-11CF-A6BB-0080C7B2D682}\LocalServer32]
    @="D:\\Visual Studio 2008\\Projects\\test_exeserver1\\Debug\\test_exeserver1.exe"

    [HKEY_CLASSES_ROOT\CLSID\{0C092C29-882C-11CF-A6BB-0080C7B2D682}\ProgID]
    @="InsideCOM.Chap10.Cmpnt1.1"

    [HKEY_CLASSES_ROOT\CLSID\{0C092C29-882C-11CF-A6BB-0080C7B2D682}\VersionIndependentProgID]
    @="InsideCOM.Chap10.Cmpnt1"


    Proxy/Stub DLL

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{32BB8323-B41B-11CF-A6BB-0080C7B2D682}]
    @="PSFactoryBuffer"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{32BB8323-B41B-11CF-A6BB-0080C7B2D682}\InProcServer32]
    @="D:\\Visual Studio 2008\\Projects\\test_exeserver1\\Debug\\test_proxy.dll"
    "ThreadingModel"="Both"

    Interface

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{32BB8323-B41B-11CF-A6BB-0080C7B2D682}]
    @="IX"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{32BB8323-B41B-11CF-A6BB-0080C7B2D682}\NumMethods]
    @="5"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{32BB8323-B41B-11CF-A6BB-0080C7B2D682}\ProxyStubClsid32]
    @="{32BB8323-B41B-11CF-A6BB-0080C7B2D682}"
    --------------------


    thanks in advance,
    George
    George2, Feb 14, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Arcadius A.

    Webservice: Stub vs. proxy

    Arcadius A., Jan 10, 2004, in forum: Java
    Replies:
    0
    Views:
    2,198
    Arcadius A.
    Jan 10, 2004
  2. Andoni
    Replies:
    0
    Views:
    317
    Andoni
    Apr 26, 2004
  3. insouciant

    RMI: Stub Not Found Exception

    insouciant, Aug 12, 2004, in forum: Java
    Replies:
    0
    Views:
    1,034
    insouciant
    Aug 12, 2004
  4. Dal Mon

    Proxy vs. Stub

    Dal Mon, Jun 8, 2005, in forum: Java
    Replies:
    4
    Views:
    13,396
    Dal Mon
    Jun 9, 2005
  5. ebby83@gmail.com

    RMIC proxy stub compiler problems

    ebby83@gmail.com, Mar 14, 2006, in forum: Java
    Replies:
    4
    Views:
    2,996
    Thomas Fritsch
    Mar 14, 2006
Loading...

Share This Page