From: Herby on
Im currently refactoring an MFC application to an MFC DLL.
What reasons would stop regsvr32 registering the DLL?

It gives the following hint
"Please ensure you have the appropriate permissions to modify the
registry."

Which I can assure you I do have.

My hunch is it is something to do with some global data that may be
being created etc - which was fine in an exe but now not in a DLL ?

Are there some definate do's/dont's when using a DLL vs an EXE ?

Has anybody had this type of problem before?

Im just having to eliminate lots of code to try and find the culprit?

From: Ajay Kalra on



"Herby" <prmarjoram(a)gmail.com> wrote in message
news:1161857915.272084.140140(a)i3g2000cwc.googlegroups.com...
> Im currently refactoring an MFC application to an MFC DLL.
> What reasons would stop regsvr32 registering the DLL?
>
> It gives the following hint
> "Please ensure you have the appropriate permissions to modify the
> registry."
>
> Which I can assure you I do have.
>
> My hunch is it is something to do with some global data that may be
> being created etc - which was fine in an exe but now not in a DLL ?
>
> Are there some definate do's/dont's when using a DLL vs an EXE ?
>
> Has anybody had this type of problem before?
>
> Im just having to eliminate lots of code to try and find the culprit?
>

It would appear probelm is the permissions. Typically regsvr32 will fail
because all the dependent dlls of that module being registered are not
found. You can use Depends.exe on that module and see if you have all the
dependent DLLs.

--
Ajay Kalra [MVP - VC++]
ajaykalra(a)yahoo.com



From: Herby on

Ajay Kalra wrote:
> "Herby" <prmarjoram(a)gmail.com> wrote in message
> news:1161857915.272084.140140(a)i3g2000cwc.googlegroups.com...
> > Im currently refactoring an MFC application to an MFC DLL.
> > What reasons would stop regsvr32 registering the DLL?
> >
> > It gives the following hint
> > "Please ensure you have the appropriate permissions to modify the
> > registry."
> >
> > Which I can assure you I do have.
> >
> > My hunch is it is something to do with some global data that may be
> > being created etc - which was fine in an exe but now not in a DLL ?
> >
> > Are there some definate do's/dont's when using a DLL vs an EXE ?
> >
> > Has anybody had this type of problem before?
> >
> > Im just having to eliminate lots of code to try and find the culprit?
> >
>
> It would appear probelm is the permissions. Typically regsvr32 will fail
> because all the dependent dlls of that module being registered are not
> found. You can use Depends.exe on that module and see if you have all the
> dependent DLLs.
>
> --
> Ajay Kalra [MVP - VC++]
> ajaykalra(a)yahoo.com

I do have the DLLs. If i comment out certain code, then certain
modules get excluded from linkage and then its ok. Although im not
clear what code is causing it - very time-consuming at the moment. Why
would the exclusion of certain obj files from linkage cause regsvr32 to
behave differently?

If it cant find a particular DLL - it should say so -