visual c++ - LoadTypeLibEx is failing while running an application in session 0 (service session) -


Text after "

In my application, I'm loading a type library like this

  ITypeLib * Typelib = zero; Tlbpath = "some path" hr = LoadTypeLibEx (tlbpath, REGKIND_REGISTER, and typelib); HR = Register Type Libuffer User (Typelib, TLbpt, Faucet);   

When I run as Administrator / User, I am able to load TLB and all entries are loaded in the Registry.

When I run the same application through the service in the session 0, I am typing as TYPE_E_CANTLOADLIBRARY .

In addition to this, UnRegisterTypeLibForUser is created with all entries that will remove, while LoadTypeLibEx

In my case, UnRegisterTypeLibForUser is executed but entries are not being deleted in the registry

I use the code given below Done

  UnRegisterTypeLibForUser (tlibatr-> GUID, tlibatr-> wMajorVerNum, tlibatr-> WMinorVerNum, LOCALE_NEUTRAL, SYS_WIN32);   

Can tell for some reason why the LoadTypeLibEx failed to register the running application in session 0 and how to fix it?

I found a solution to my problem.

I gave the TLB to the virtual drive path and did not provide the system path. Ie X: .... \ vlt.tlb and not E: .. \ XRoot ... \ vlt.tlb

Then in session 0, we must give system path.

Thanks Hans Paccent.

Can someone tell why the UnRegisterTypelibForUser is not removing entries in the registry?

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -