How do I call DllRegisterServer() safely?

I want to call DllRegisterServer() to register Indeo (IR50_32.DLL)...how do I make the call safely..and repress the RegSrv32 successful dialog box from comming up when its done?
hyperzapperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hyperzapperAuthor Commented:
Edited text of question.
0
interCommented:
Hi there,
feed the following proc with the file name


procedure RegisterDLL(FileName : string);
type
  TRegProc = function : HResult; stdcall;
var
  LibHandle : THandle;
  RegProc : TRegProc;
begin
  LibHandle := LoadLibrary(PChar(FileName));
  if LibHandle = 0 then ShowMessage('Could not open library');
  try
    @RegProc := GetProcAddress(LibHandle, 'DllRegisterServer');
    if @RegProc = Nil then
      ShowMessage('Could not find DLLResgiterServer');
    if RegProc <> 0 then
      ShowMessage('Could not register DLL');
  finally
    FreeLibrary(LibHandle);
  end;
end;


regards, igor
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
hyperzapperAuthor Commented:
Marvolous!  Nice clear routine...thanks
0
interCommented:
Thank you,

Note : if you want to unregister just change DLLregisterserver to string to unregister equivalent.

regards, igor
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.