Determine Documentum host name when using Documentum.Interop.DFC C# assembly

736 Views Asked by At

I'm working on some rather old C# code that uses Documentum DFC (Documentum.Interop.DFC.dll 6.5.0.18). The Documentum server settings are stored within the dfc.properties file stored on my local machine, for example:

dfc.docbroker.host[0]=xyzserver.xyzdomain.net

dfc.docbroker.port[0]=5432

I would like to be able to determine, and write to a log file, the Documentum "docbroker" host and port number whenever the Documentum COM objects are instantiated. Here's what I have so far:

DfClientX xClient = new DfClientXClass();  // <=== This xClient should have the host in there somewhere... right?
IDfLoginInfo login = xClient.getLoginInfo();
login.setUser( localUserName );
login.setPassword( localUserPassword );

xClient is an interface of type DfClientX, it is instantiated as a COM object.

Looping through all of the properties of the object suggested by this post looks promising.

I've searched on the Documentum boards with no luck so far. I realize this question will be difficult to answer without having access to the Documentum software, but it seems like it should be a rather simple task... perhaps someone with more general COM knowledge can help out?

Thanks in advance!

1

There are 1 best solutions below

0
On BEST ANSWER

So after checking out the object in the Visual Studio watch window (not within the "tooltip" watch), I was able to use Intellisense to examine the properties available to the COM object and its properties. Here is how I am now able to determine the host name:

DfClientX xClient = new DfClientXClass(); IDfClient client = xClient.getLocalClient();

const string HOST_ATTRIBUTE = "dfc.docbroker.host";
var hostSetting = xClient.getLocalClient().getClientConfig().getString( HOST_ATTRIBUTE );
Logging.WriteLog( TraceEventType.Verbose, "*** {0} = {1}", HOST_ATTRIBUTE, hostSetting.ToString() );

Maybe this will help somebody else in the future.