Register a .dll or .ocx in c++


I am trying to register a dll from my code(Windows 7, 64-bit Application). I opened my application with administrator rights. You can see the code snippet below.

hinst = ShellExecute(NULL, _T("open"), L"regsvr32.exe", str, NULL, SW_SHOWNORMAL);
str -> fully qualified path of the file like  C:\\XXXX\\XXXX\\XXXX.dll"

The ShellExecute returns the following:"0x0000002a" and fails to register the file

What could be the issue?

asked on Stack Overflow May 30, 2017 by Sandeep Kumar • edited May 30, 2017 by lalithkumar

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0