|
pooja_friends wrote: How to do that in VC++
That's hard to say given the lack of information you've provided.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
pooja_friends wrote: edit some system file
do you have problem with this portion
pooja_friends wrote: restart or shutdown
or this one
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
In my application i have edited the system file for one reason.If i run my application in non-administrator user means application doesnt because of rights for editing that file.so i need do editing system while restarting the system.
|
|
|
|
|
ProcessShellCommand() call causes an unhandled exception in VS2005..
Anybody has solution plz reply..
THanks
|
|
|
|
|
Probably you don't initialize the parameters being sent to this function.
What happens when you debug ur code. Can you post some relevant code snippet.
it shouldn't be the function that would be causing a crash.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Check all needed and Zero all unneeded parameters.
Greetings from Germany
|
|
|
|
|
How are you verifying this? Have you called ParseCommandLine on the CCommandLineInfo first?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
HI all ,
Well i definitely do a ParseCommandLine(cmdInfo);
and later if (!ProcessShellCommand(cmdInfo))
return FALSE;
cmdInfo members are as follows
m_nShellCommand = FileNew
m_bRunEmbedded = 0;
m_bRunAutomated = 0;
m_bShowSplash =1;
Rest all string members of cmdInfo are empty
Callstack at unhandled exception
msvcr80.dll!_crt_debugger_hook(int _Reserved=2015552886)
|
|
|
|
|
THis problem happens for my VS2003 code after i port it to VS2005
|
|
|
|
|
So how are you verifying that ProcessShellCommand() is the culprit?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
i need to do a button click only once and after the button is clicked once i need to disable the buttonclick option untill the operations inside the button click get completed,what should be done???
|
|
|
|
|
I think it's same as your question, Disable the Button window (call CWnd::EnableWindow(FALSE)) in the button event handler and enable it (CWnd::EnableWindow(TRUE)) after done.
|
|
|
|
|
|
manju#123 wrote: ,e I want result as "http://SERVER".....
_tcscat
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
thank you sir..
I got it..
manju
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|
|
And why did you delete the original post? Just adding "answered" on the topic by editing it is anough and maybe others can take profit of your question.
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
I create a MFC prject with a dialog.
I add a button to the dialog in resource.
But when I double click the button and want to add the even of click.
It appears the error message and stop the addding.
Somebody could tell me how to solve this problem.
The error message when I double click the button in thae dialog:
Add/Remove operation is impossible, becuase the code element CDialogCommon is read only
PS:CDialogCommon is the class I created and bounded it with a Dialog.
|
|
|
|
|
akira32 wrote: Add/Remove operation is impossible, becuase the code element CDialogCommon is read only
The message itself it is clear that you cannot added new handler because the file is read only. So just take the DialogCommon.h and CDialogCommon.cpp and remove the readonly attribute
|
|
|
|
|
Hello everyone,
I am confused what is the function of the 4 assembly instructions? I posted the 4 assembly instructions and related whole source code/assembly code below.
Any ideas?
00BA13CC lea edi,[ebp-0C0h]
00BA13D2 mov ecx,30h
00BA13D7 mov eax,0CCCCCCCCh
00BA13DC rep stos dword ptr es:[edi]
int sumExample (int a, int b)
{
00BA13C0 push ebp
00BA13C1 mov ebp,esp
00BA13C3 sub esp,0C0h
00BA13C9 push ebx
00BA13CA push esi
00BA13CB push edi
00BA13CC lea edi,[ebp-0C0h]
00BA13D2 mov ecx,30h
00BA13D7 mov eax,0CCCCCCCCh
00BA13DC rep stos dword ptr es:[edi]
return a + b;
00BA13DE mov eax,dword ptr [a]
00BA13E1 add eax,dword ptr [b]
}
#include <iostream>
using namespace std;
int sumExample (int a, int b)
{
return a + b;
}
int main()
{
int c = sumExample (100, 200);
cout << c << endl;
return 0;
}
thanks in advance,
George
|
|
|
|
|
George_George wrote: Any ideas?
I think you are running a debug version. In the release version it wont come.
The purpose of that instructions is to initialize all the memory location of from ebp-0C0h to edp with value 0CCCCCCCCh. The address "ebp - 0C0h" to ebp is the stack range of the function sumExample().
|
|
|
|
|
Thanks Naveen,
1.
You are correct, I am using debug version. So, only debug version will initialize stack used in current function to zero, and release version will not (I have tried in my sample, it is yes. Here I want to ask for a general answer.)
2.
How do you calculate the memory used will be 0x0C0 bytes?
regards,
George
|
|
|
|
|
George_George wrote: So, only debug version will initialize stack used in current function to zero
No to 0 but to 0x0CCCCCCCC
George_George wrote: How do you calculate the memory used will be 0x0C0 bytes?
Compiler does this at compile time itself. It calculate this value by adding the size of variables, flags to push etc.
|
|
|
|
|
Cool, nave!
From the code I posted in my 1st post, do you have any ideas why the stack used is 30h? I am very confused why the address begins with ebp-0C0h?
regards,
George
|
|
|
|
|
George_George wrote: do you have any ideas why the stack used is 30h?
Stack size is actually C0h. An that 30h is a counter ( C0h/4 = 30h ). I dont know why the stack size became C0h in your case. May be the compiler allocates atleast that much stack for a function and I have found it depends on the compiler version.
|
|
|
|
|
Thanks nave,
I found why I am confused by reading your reply, the counter is in the basis of 4-byte, not 1-byte, correct?
regards,
George
|
|
|
|