Help! Why RegConnectRegistry works in exe but not DLL?

  • Thread starter Thread starter John Smith
  • Start date Start date
J

John Smith

I've written an exe that calls RegConnectRegistry to connect to a remote
computer's HKEY_USER (although in my example code I'm actually connecting to
the local computer). This all works perfectly in the exe when called from a
command-line.

However, when I ported the code to a DLL, RegConnectRegistry now fails with
"error 53" "network path was not found" even though I'm hardcoding the
Server name in both the exe and dll (for testing purposes).

Any idea why it works in an exe and not a dll?
 
Back
Top