From: sureshmylavarapu on
Hi Friends,

I am facing the a problem while trying to build a project which tries
to register an ActiveX control. The build fails showing the message
error PRJ0019: A tool returned an error code from "Registering ActiveX
Control".

I went thru some of the mails posted on the similar topics but i
couldn't get the answer to solve mine.

Below i am placing the BuildLog.htm


Creating command line "mt.exe
@x:\source\qryserver\Debug\RSP0000058762904.rsp /nologo"
Creating temporary file
"x:\source\qryserver\Debug\BAT0000068762904.bat" with contents
[
@echo Manifest resource last updated at %TIME% on %DATE% >
..\Debug\mt.dep
]
Creating command line "x:\source\qryserver\Debug\BAT0000068762904.bat"
Creating temporary file
"x:\source\qryserver\Debug\BAT0000078762904.bat" with contents
[
@echo off

regsvr32 /s /c "x:\bin\qryserverd.dll"

echo regsvr32 exec. time > "x:\source\qryserver\\Debug\regsvr32.trg"



if errorlevel 1 goto VCReportError

goto VCEnd

:VCReportError

echo Project : error PRJ0019: A tool returned an error code from
"Registering ActiveX Control"

exit 1

:VCEnd
]
Creating command line "x:\source\qryserver\Debug\BAT0000078762904.bat"


Pls let me know where the exact problem lies.

Thanks in Advance.

Regards,
Suresh.

From: Igor Tandetnik on
<sureshmylavarapu(a)gmail.com> wrote in message
news:1151944463.394112.256740(a)v61g2000cwv.googlegroups.com
> I am facing the a problem while trying to build a project which tries
> to register an ActiveX control. The build fails showing the message
> error PRJ0019: A tool returned an error code from "Registering ActiveX
> Control".

For some reason, your control fails during the registration. You would
have to debug it to find out why.

Make sure Project | Properties | Linker | General | Register Output is
set to No. Also go to Project | Properties | Build Events | Post-Build
Event. It's likely that Command Line setting invokes regsvr32 - if so,
set Excluded From Build to Yes. As a result of these changes, your
control will not be automaically registered duing build process, which
would allow you to build successfully.

Now you need to find out why it fails to register in the first place. Go
to Project | Properties | Debugging, set Command to regsvr32.exe and
Command Arguments to "$(TargetPath)". Put a breakpoint into
DllRegisterServer implementation in ProjectName.cpp. Run under
debugger - you will hit a breakpoint - single-step from there, figure
out where it fails.

Once you get it to register successfully, you would probably want to
undo the changes you made to project properties.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


From: sureshmylavarapu on
Thanks Igor,

I am able to resolve the issue. There are some dependency issues. When
I checked with dependecy walker I found one of it's dependency is
missing. Once that's resolved I am able to register this dll.

thanks for the info provided I got lot of input's from it

Suresh


Igor Tandetnik wrote:
> <sureshmylavarapu(a)gmail.com> wrote in message
> news:1151944463.394112.256740(a)v61g2000cwv.googlegroups.com
> > I am facing the a problem while trying to build a project which tries
> > to register an ActiveX control. The build fails showing the message
> > error PRJ0019: A tool returned an error code from "Registering ActiveX
> > Control".
>
> For some reason, your control fails during the registration. You would
> have to debug it to find out why.
>
> Make sure Project | Properties | Linker | General | Register Output is
> set to No. Also go to Project | Properties | Build Events | Post-Build
> Event. It's likely that Command Line setting invokes regsvr32 - if so,
> set Excluded From Build to Yes. As a result of these changes, your
> control will not be automaically registered duing build process, which
> would allow you to build successfully.
>
> Now you need to find out why it fails to register in the first place. Go
> to Project | Properties | Debugging, set Command to regsvr32.exe and
> Command Arguments to "$(TargetPath)". Put a breakpoint into
> DllRegisterServer implementation in ProjectName.cpp. Run under
> debugger - you will hit a breakpoint - single-step from there, figure
> out where it fails.
>
> Once you get it to register successfully, you would probably want to
> undo the changes you made to project properties.
> --
> With best wishes,
> Igor Tandetnik
>
> With sufficient thrust, pigs fly just fine. However, this is not
> necessarily a good idea. It is hard to be sure where they are going to
> land, and it could be dangerous sitting under them as they fly
> overhead. -- RFC 1925