Proxy/Stub issue

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

  1. George2

    George2

    Joined:
    Feb 12, 2008
    Messages:
    108
    Likes Received:
    0
    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. Advertisements

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,536
    Arcadius A.
    Jan 10, 2004
  2. vidy5300
    Replies:
    0
    Views:
    1,084
    vidy5300
    Jun 7, 2004
  3. Dal Mon

    Proxy vs. Stub

    Dal Mon, Jun 8, 2005, in forum: Java
    Replies:
    4
    Views:
    16,936
    Dal Mon
    Jun 9, 2005
  4. ebby83@gmail.com

    RMIC proxy stub compiler problems

    ebby83@gmail.com, Mar 14, 2006, in forum: Java
    Replies:
    4
    Views:
    3,257
    Thomas Fritsch
    Mar 14, 2006
  5. 35085675@qq.com

    Facebook Proxy | MySpace Proxy

    35085675@qq.com, Aug 14, 2007, in forum: Java
    Replies:
    0
    Views:
    1,773
    35085675@qq.com
    Aug 14, 2007
  6. Karsten Wutzke
    Replies:
    1
    Views:
    1,067
    Steven Simpson
    Aug 20, 2007
  7. Klein Stéphane
    Replies:
    3
    Views:
    781
    Steve Holden
    Dec 20, 2009
  8. Alejandro Molina

    Proxy and non Proxy configurations

    Alejandro Molina, Jul 15, 2004, in forum: ASP .Net Security
    Replies:
    0
    Views:
    293
    Alejandro Molina
    Jul 15, 2004
Loading...