Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 676217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:54:13+00:00 2026-05-14T00:54:13+00:00

This is really a follow on question to a previous one , where I

  • 0

This is really a follow on question to a previous one, where I need to register applications, TLBs and OCXs per user, rather than into HKLM. I have written the following code – based on answers here and elsewhere, BUT the TLB is not registered – no error is thrown, just nothing happens (this code snippet comes from the Embarcadero website.

procedure RegisterTypeLibrary(TypeLib: ITypeLib; const ModuleName: string);
var
  Name: WideString;
  HelpPath: WideString;
  RegisterTypeLibForUser : function(tlib: ITypeLib; szFullPath, szHelpDir: POleStr): HResult; stdcall;
  res : HResult;
begin
  Name := ModuleName;
  HelpPath := ExtractFilePath(ModuleName);
  res:=RegisterTypeLib(TypeLib, PWideChar(Name), PWideChar(HelpPath));
  if res <> S_OK then begin
    @RegisterTypeLibForUser:=GetProcAddress(GetModuleHandle('oleaut32.dll'), 'RegisterTypeLibForUser');
    if (@RegisterTypeLibForUser <> nil) then begin
      res:=RegisterTypeLibForUser(TypeLib, PWideChar(Name), PWideChar(HelpPath));
    end;
  end;
  //MessageBox(GetForegroundWindow, PChar(IntToHex(res, 8)), nil, MB_OK);
  OleCheck(res);
end;

Anyone got any pointers as I am now lost.

Update :

Thanks for all the help and suggestions, so to clarify …

As I understand that it, I shouldn’t require elevated permission, and so this should to be working, but I could be wrong. Application isn’t virtualized (or at least it isn’t meant to be), at the moment it just calls the above code, and nothing else.

If I run it as admin it works (or at least doesn’t throw an error), not elevating it gives me an error. So can I just not do this at all, or am I doing it wrong? This is the same as when I register it via regsvr32, although that is a slightly different question – how to do the same, but for OCX controls.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T00:54:14+00:00Added an answer on May 14, 2026 at 12:54 am

    You still need to setup the reg keys as shown in the QC (your link) but this time in the current user registry.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a follow up of the Previous Question It got really complicated so
This is a follow up to a previous question that I had before about
This is a follow up to a previous question . if I have multiple
I´m not sure if this is really a programming question, but it's related to
To follow from my previous question about virtual and multiple inheritance (in a cross
This is a follow-up to an earlier question I posted on EF4 entity keys
OK, this kind of follows on from my previous question . What I would
this is a follow up to my recent question ( Code for identifying programming
This is in a way a follow-up of a previously unanswered question of mine
This really, really urks me, so I hope that someone can give me a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.