COMperf: COM Performance Sample

Click to open or copy the COMperf project files.

This is the reference performance sample for COM/DCOM run on local and remote machines. This program is both a client and a server. It launches as a client by default, registering its executable as a server with COM and creating other instances of itself on remote and local machines to be servers. A single command-line argument is allowed for a remote server name. Performance numbers in calls/sec are output in tabular form. The sample tests COM and IDispatch method calls with two security levels: default/min and full. It uses DCOMCNFG to set default security to Authn Lvl to NONE for best comparison. Parameter sizes are varied to see the effect on security levels(~4/50/4k bytes). The sample uses Psperf.dll, which contains a MIDL-generated proxy/stub implementation.

Note   Put Psperf.dll in the same directory as this exe on all machines. Run the exe on each machine to automatically register the class code and proxy/stub dll. You can then run on either machine and pass a remote machine name (DNS or IP address) as a single command-line parameter.

Building SDK Samples

This sample uses the following keywords:

_tprintf; aptfreeautotest; aptfreecomtest; cclassfactory; clientthreadproc; cogetclassobject; coinitializeex; comarshalinterface; coregisterclassobject; corevokeclassobject; couninitialize; counmarshalinterface; createdisptypeinfo; createevent; createinstance; createstreamonhglobal; createthread; ctestcomperformance; ctimer; define_guid; dispatchmessage; dotests; exit; failed; fautoregister; formatmessage; fprintresults; freefreeautotest; freefreecomtest; freelibrary; getcurrentthreadid; getidsofnames; getlasterror; getmodulefilename; getprocaddress; gettypeinfo; gettypeinfocount; hresult_code; hresult_facility; invoke; levels; loadlibrary; localfree; lockserver; lstrcmpw; lstrcpy; lstrlen; makelangid; memset; message; messagebeep; msgwaitformultipleobjects; msgwaitformultipleobjectsex; multibytetowidechar; outputtime; peekmessage; queryblanket; queryinterface; queryperformancecounter; queryperformancefrequency; regclosekey; regcreatekey; regsetvalue; release; resumethread; seek; serverthreadproc; setblanket; setevent; sleep; start; stdmethodimp_; stop; succeeded; sysallocstring; sysallocstringbytelen; sysfreestring; text; usage; waitforsingleobject; wsprintf