I am asking anyone who has encountered a similar problem for hints about the
possible cause, and fixes, if possible. The situation is as following:
Description: I am running NT performance monitoring tool (perfmon) on
Workstation A (running NT4.0 SP3). Perfmon looks at a remote system,
Workstation B (also running NT 4.0 SP 3). Workstation B contains my dll for
loading my custom counters into perfmon. Call that dll CounterLoader.
Workstation B also contains local COM server executable (COMServer) that
extracts necessary performace data from agent, running on B. COMServer is a
standalone executable written with ATL and MFC.
Steps: A launches perfmon. Workstation B is selected from the list of
machines in the domain. Perfmon attaches to a winlogon process on
Workstation B through RPC calls, and loads CounterLoader dll into winlogon's
process space. CounterLoader.dll does a CoCreateInstance on COMServer.
COMServer executable communicates with an agent running on B, caches and
calculates statistics about it. CounterLoader extracts that performance data
though func calls on COMServer's interface pointer it got in CoCreate. That
data propagates back to perfmon on A, and is displayed.
Problem: When CounterLoader.dll does a CoCreateInstance on COMServer,
Workstation B displays an error message box "The dynamic load library
USER32.dll has failed to initalize, exiting abnormally". COMServer is loaded
at that point, but attaching a de* to it does not help. When OK button
on the message box is clicked, COMServer is unloaded, CoCreate returns with
"Server failed to execute" HRESULT error code. No visible exceptions are
being trapped in CounterLoader.dll If perfmormance monitor is run against
Workstation A, and LoadCounters are directrly loaded into perfmon's proc
space, bypassing attachment to remote machine's winlogon, then everything
works. The problem, as far as I can tell, lies in the interaction of COM with
winlogon process. If you think that you encountered a similar problem, or
even if you saw this message box in a different context, please respond. I
would be grateful for any information.
Data General Corp.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.veryComputer.com/; Search, Read, Discuss, or Start Your Own