Closed forderud closed 1 year ago
Motivation: Want to support deployments where MyServer is running in a background service that is auto-started at system bootup.
Tasks:
AppID
HKCR\AppID\{APPID}\RunAs = "Interactive User"
CoInitializeSecurity
RegisterTypeLibForUser
CoGetClassObject failure: Class not registered (0x80040154)
Extract from atlbase.h (with inlining of parameters):
atlbase.h
CoRegisterClassObject(*pclsid, p, CLSCTX_LOCAL_SERVER, REGCLS_MULTIPLEUSE | REGCLS_SUSPENDED, &pCache->dwRegister); ... CoResumeClassObjects();
LoadTypeLibEx(tlbPath, REGKIND_REGISTER, ...) seem to fail silently if not running with admin privileges.
LoadTypeLibEx(tlbPath, REGKIND_REGISTER, ...)
Links:
Support for manually started server processes was introduced in 775ed376df895924185386fe18901d3fa307d8de . I think that will be sufficient for this project.
Motivation: Want to support deployments where MyServer is running in a background service that is auto-started at system bootup.
Tasks:
AppID
registration and registerHKCR\AppID\{APPID}\RunAs = "Interactive User"
CoInitializeSecurity
to allow non-elevated clients to connect. exampleTested configurations
RegisterTypeLibForUser
)CoGetClassObject failure: Class not registered (0x80040154)
Background information
COM security
CoInitializeSecurity
RPC_C_AUTHN_LEVEL_NONEMicrosoft ATL reference impl
Extract from
atlbase.h
(with inlining of parameters):TypeLib registration
LoadTypeLibEx(tlbPath, REGKIND_REGISTER, ...)
seem to fail silently if not running with admin privileges.Links:
Links