We help IT Professionals succeed at work.

How to copy the existing dll onto a new one?

Reeds
Reeds asked
on
Medium Priority
514 Views
Last Modified: 2013-11-20
I have a dll called SAT10_UE.dll generated by my code in VC++. I want to copy this over to a dll by another name.
I went to the Custom Built Setup in the project properties and in the command line wrote : Copy SAT10_UE.dll SAT10_BarCodeUE.dll. Still, I can't copy it over after compiling.Please help
Comment
Watch Question

mahesh1402IT Professional
Top Expert 2005

Commented:
What exactly you want to do ?

>>in the command line wrote : Copy SAT10_UE.dll SAT10_BarCodeUE.dll. Still, I can't copy it over after compiling.Please help

Have you tried closing your DLL project and issue Copy.. command on prompt ?

MAHESH

Author

Commented:
I am working on Windows XP, writing my program in Visual C++. FAter I compile, the code the dll is created in the Debug/Res folder. I want to copy the resulting dll(SAT10_UE.dll ) to new one (SAT10_BarCodeUE.dll).

 I went to the project properties in Visula Studio environment and then to Custom Build Setup. Here there is a CommandLine, Description,Outputs and Additional Dependencies. In the box for command line, I wrote Copy SAT10_UE.dll SAT10_BarCodeUE.dll
mahesh1402IT Professional
Top Expert 2005

Commented:
also have you tried it by unregistering DLL using /u option ?

regsvr32 /u SAT10_UE.dll

Copy SAT10_UE.dll SAT10_BarCodeUE.dll


MAHESH
mahesh1402IT Professional
Top Expert 2005

Commented:
try to unregister existing as above then copy and then again register new

MAHESH

Author

Commented:
I am sorry, but I am new to al this. Should I give this in the coammnline as well before copying

Author

Commented:
I tried it, but still the new dll is not being created

Author

Commented:
regsvr32 /u SAT10_UE.dll

Copy SAT10_UE.dll SAT10_BarCodeUE.dll

regsvr32 /u SAT10_BarCodeUE.dll


This is what I did

Author

Commented:
I get this warning after compilation:

SAT10_UE : warning PRJ0029 : The 'Outputs' property for the project-level custom build step is not set. The custom build step will be skipped.


What do I set the output property as?
mahesh1402IT Professional
Top Expert 2005

Commented:
thats because you have not specified any output.. where you have to spcify name of output file.

mahesh1402IT Professional
Top Expert 2005

Commented:
http://msdn2.microsoft.com/en-us/library/hefydhhy(VS.80).aspx <== refer this


e.g

.\$(InputName).xxx


MAHESH
mahesh1402IT Professional
Top Expert 2005

Commented:
in custom build section below 'Commands'  input box there is Output input box specify output name there as said above.

Refer above link for more.

MAHESH
AndyAinscowFreelance programmer / Consultant
CERTIFIED EXPERT

Commented:
In my opinion you are looking in the wrong place.   (This DOES work, I have used it for years)
Post build in the project properties.
copy SAT10_UE.dll SAT10_BarCodeUE.dll


you may also need to put the path if the path is different
IT Professional
Top Expert 2005
Commented:
you may use $(ProjectPath) $(ProjectName) etc macros for path name etc purpose.

Get this macros here
http://msdn2.microsoft.com/en-us/library/c02as0cs(VS.80).aspx

MAHESH

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
AndyAinscowFreelance programmer / Consultant
CERTIFIED EXPERT

Commented:
This may also be of use.
Link tab of the dll
Output file name - enter SAT10_BarCodeUE.dll

by default the output file name is the name of the project.  You can, however, provide your own name here - so no need for your copy command (as you are just effectively renaming it in what you posted as your copy command)

Author

Commented:
thanks for all you help
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.