Register DLL file on Windows Server 2008 R2

前端 未结 8 1683
旧巷少年郎
旧巷少年郎 2021-02-18 14:23

I\'m trying to register a COM DLL file on Windows Server 2008 R2. Here are the steps I took:

  1. Run cmd as administrator
  2. c:\\windows\\syst
相关标签:
8条回答
  • 2021-02-18 15:13

    That's the error you get when the DLL itself requires another COM server to be registered first or has a dependency on another DLL that's not available. The Regsvr32.exe tool does very little, it calls LoadLibrary() to load the DLL that's passed in the command line argument. Then GetProcAddress() to find the DllRegisterServer() entry point in the DLL. And calls it to leave it up to the COM server to register itself.

    What that code does is fairly unguessable. The diagnostic you got is however pretty self-evident from the error code, for some reason this COM server needs another one to be registered first. The error message is crappy, it doesn't tell you what other server it needs. A sad side-effect of the way COM error handling works.

    To troubleshoot this, use SysInternals' ProcMon tool. It shows you what registry keys Regsvr32.exe (actually: the COM server) is opening to find the server. Look for accesses to the CLSID key. That gives you a hint what {guid} it is looking for. That still doesn't quite tell you the server DLL, you should compare the trace with one you get from a machine that works. The InprocServer32 key has the DLL path.

    0 讨论(0)
  • 2021-02-18 15:13

    You need the full path to the regsvr32 so %windir$\system32\regsvr32 <*.dll>

    0 讨论(0)
提交回复
热议问题