|
Is there an easy way (using Visual Studio 2005) to port all of the settings in the project properties from "Debug" mode to "Release" mode without having to type in every single change one line at a time?
(Yes, I know the settings should have been typed in under "All Configurations" instead of "Debug" to begin with, but they weren't.)
|
|
|
|
|
I made use of copy-paste by loading the .vcproj file in a text editor to solve my issues, and I think I'm good to go now. Feel free to let me know if a command or utility for this kind of issue exists, anyway.
|
|
|
|
|
Hi in my application i am creating some folders(keys) under Hkey_LocalMachine using the RegCreateKeyEx() fucntion its working fine in xp and 98 operaign system but wheni use the same code for VISTA its nto creating in localmachine its going to current user by default..
Can anybosy suggest me the reason for this
Thanks in advance....
|
|
|
|
|
This is one of the protection mechanisms in Windows Vista. Unfortunately, I don't know if or how you can defeat it (or if you should even want to).
|
|
|
|
|
Something to do with the administrator credentials on VISTA machine... So are you logged on to the VISTA machine with admin privileges and thrn running your application
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Run the application as Administrator
Regards,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
Introduction to Object-Oriented JavaScript
|
|
|
|
|
You need to include a security section in your manifest file to prevent Registry and File Virtualization for your application (or have the user turn User Access Control [UAC] off).
I would recommend the manifest resource file with the security section since it allows you to use registry and file functions without getting false positives from virtualization. I use "AsInvoker" for user apps.
"Windows via C/C++, Fifth Edition" by Richter has some good information on dealing with Vista and using manifests correctly.
|
|
|
|
|
Can u please make it a bit clear in "turn off the User Access Control [UAC]"....
|
|
|
|
|
Why is it people always gravitate toward the option that I didn't recommend?
Turning off UAC is as simple as going to "control panel", "User Accounts", "Turn User Access Control on or off".
However, the system will keep reminding you eternally that your security settings leave you vulnerable. Turning off UAC is really only useful for a simple test to see if your programmatic behavior/problem is related to UAC. You should not design your application with the requirement that the user set their security settings in any particular fashion.
The Microsoft endorsed way of properly designing an application for UAC is to use a security manifest section in your manifest file/resource.
Windows Vista Application Development Requirements for User Account Control Compatibility[^]
Create and Embed an application manifest[^]
Certified for Logo Test Case[^]
|
|
|
|
|
I want to duplicate an object, knowing only a base object and the type_info
In following sample, with function DuplicateObject(.), I want to duplicate an object pVarA.
Does anybody have an idea ?
Best regards.
//*****************************************************
class classA
{
public :
classA( string MyComment)
{
_MyComment = MyComment;
}
string _MyComment;
};
//*****************************************************
class classB : public classA
{
public:
classB( string MyComment, string MyOtherComment)
: classA( MyComment)
{
_MyOtherComment = MyOtherComment;
}
string _MyOtherComment;
};
//*****************************************************
void DuplicateObject( classA *pVarA, const type_info& pType)
{
static_cast<ptype> *pVarB = new static_cast<ptype>( ""); // !!! problem
*pVarB = *pVarA; // !!! problem
}
//*****************************************************
void func()
{
// dupplicate object of same class (classic)
classA *pVarA1 = new classA( "hello world !");
classA *pVarA2 = new classA( "");
*pVarA2 = *pVarA1;
// dupplicate object of heritance (problem !!!)
classB *pVarB1 = new classB( "hello world !", "come on !");
DuplicateObject( pVarB1, typeid( pVarB1));
}
|
|
|
|
|
Please read the posting guidelines before posting (formating of your code).
Do you want to clone an existing object, is that right ? If that's what you want, why don't you simply provide a virtual virtual Clone function in the base class that you redefine for the child classes:
classA* classA::Clone()
{
return new classA(this);
}
classB* classB::Clone()
{
return new classB(this);
}
If your classes contains more than simple data (e.g. pointers) you will need to provide a copy constructor in order to adapt it to your need. Otherwise the Clone function will be enough.
|
|
|
|
|
Why not just provide a copy constructor and be done with it? I don't understand the need for a ::Close() function.
|
|
|
|
|
If you have polymorphic types in a container and want to duplicate them (or some of them), you don't know the exact type of the object. So, if you have a virtual Clone function, you can simply work with the base class and call the Clone function to have a duplicate of the correct type of your polymorphic object.
Of course, this is used in very specific cases only
Gary R. Wheeler wrote: ::Close() function
It's a Clone function
|
|
|
|
|
Okay, okay. It's only 4 keys away on the keyboard...
|
|
|
|
|
Cédric,
Thank you for your answer.
But I think it's more difficult.
classA is the base class for all my messages (objects exchange through mailslots).
classB, classC, etc have herited from classA (they are more sophisticated messages).
My function called "Duplicate" function is in reality a function to send a message of classB, C, etc to SEVERAL mailslots (several destination).
So, I want to "give" my sophisticated message reference with its type (which is typeid( xVar)) to my function, wich will do a loop in order to duplicate the given message as necessary as to send it to ALL the mailslots.
It's the destination thread which delete the object after processing.
So, I want to "clone" the object, but the parameter of the function is of type "classA" (which is common to all types), and the type is only known by TYPEID.
Is there a possibility to do that ?
Best regards
|
|
|
|
|
Ok,
Now I have understand the mechanism.
Only a small detail : all the Clone() methods needs to have the same return type. So it's necessary to cast the returned result :
class classB : public classA
{
//...
}
classA* classA::Clone()
{
return new classA(this);
}
classA* classB::Clone()
{
return (classA *) new classB(this);
}
Thank you.
|
|
|
|
|
Hi, sorry for the late answer but I was in holidays.
marcelcerdanjunior wrote: Only a small detail : all the Clone() methods needs to have the same return type. So it's necessary to cast the returned result :
Not necessarily, you can use a 'covariant return type', which means that your classB::Clone method can return a classB* (because classB inherits from classA). Anyway, you never need to cast classB into classA: classB IS already a classA object.
|
|
|
|
|
Dear All,
My project requirement is VC++ application need to create setup package and deployment in VC++ with out using dll file(im having exe file only).
It will be much helpful to me to give some advice on this..
Thank you very much,
Yours,
Anitha
|
|
|
|
|
u looking for NSIS[^] or use Installshield.
Or do you want to create an application installer?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I have developed a MFC application.I need to create a setup pack for that application.
Thanks & Regards
Anitha
|
|
|
|
|
then you can use NSIS or installshield. Even with visual studio you can create setup and deployment project
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
We use Inno Setup[^]. It is a very good freeware installer.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Hi sashoalm,
I red that innosetup document.That installation document given for Visual C++ 6.0.But Im using Visual Studio 2005.Is it possible for Visual Studio 2005.
Thanks & Regards
Anitha
|
|
|
|
|
Yes, it is possible. You just have to create an iss file and specify in it which files are part of the setup.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Hi sashoalm,
I have created the setup package.But i need to install a driver before the exe file execution. Is it possible?
Thanks & Regards
Anitha
|
|
|
|