Solved

DCOM security

Posted on 2000-03-06
2
301 Views
Last Modified: 2008-02-20
Everyone known,When dcom client connect to dcom server ,How to known dcom client's machine name in the dcom server?
0
Comment
Question by:shala
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 2591401
This can be done by using a channel hook. Don Box explained this technique some time earlier in MSJ.

See

http://www.develop.com/dbox/com/hooks/hosthook/

for the code & explanations

Quote from the page:

"HostHook - A Custom Channel Hook for Recovering Host Name of Caller/Callee

HostHook is a custom channel hook that sends the IP address, process and thread ID of the direct and original caller as an ORPC_EXTENT. This hook is useful for finding out the location of a caller inside a COM method invocation. It is also useful for finding out where a given method executed after the proxy returns control to the client thread. "
0
 
LVL 86

Expert Comment

by:jkr
ID: 2591415
>>How to known dcom client's machine name in the dcom
>>server?

If you've got the IP on the server side, simply use

    WSADATA wsaData;
   
    if (::WSAStartup(MAKEWORD(1, 1), &wsaData) == 0)
    {
        char szHostName[256];

              HOSTENT* phe;

              phe = gethostbyaddr ( ...);

              if ( phe)
                 {
                   printf ( "%s\n", phe->h_name);
                 }
 

        ::WSACleanup();
    }
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question