DLL registration problem

H

Harish Kumar Dixit

Hi friends,

i making a COM DLL in vc++ , this DLL is using a 3rd party dll
function. i m calling a function of this DLL.

But i m getting error

error PRJ0050: Failed to register output. Please ensure you have the
appropriate permissions to modify the registry.


when i m commenting that function calling statement then no error
comes and it project compiles successfully.


I got tired of it...

PLz help me if anyone have some idea,,

Thanks in advance...

**Harish**
 
S

SvenC

Hi,

Harish Kumar Dixit said:
Hi friends,

i making a COM DLL in vc++ , this DLL is using a 3rd party dll
function. i m calling a function of this DLL.

So you have a dependency to that 3rd party dll and the loader needs to find
that dll when your dll is loaded
But i m getting error
error PRJ0050: Failed to register output. Please ensure you have the
appropriate permissions to modify the registry.

The registration step is the last step *after* your dll was successfully
built. Registration is done by loading your dll and calling the
DllRegisterServer function. When your dll is loaded from the output
directory the 3rd party dll will be needed. If it is not found, i.e. not in
the same directory as your dll, not in the current directory, not in
%windir%, not in %windir%\system32 not in the current directory, than your
dll cannot be loaded.

Try copying the 3rd party dll into the directory your dll is created in and
registration should work.
when i m commenting that function calling statement then no error
comes and it project compiles successfully.

It did compile (and link) successfully without commenting out that function.
Just look in the output directory and you will find the dll. By commenting
out all function calls to your 3rd party dll the linker is smart enough to
remove the dependency to the 3rd party dll, hence your can be loaded without
the other dll around.
I got tired of it...

HTH,
SvenC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top