|
sorry you test it in eclipse c\c++ ide?
|
|
|
|
|
Well I see you already got an answer in Q&A. Please do not post questions in more than one forum in future.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
|
i use eclipse newly but this code did not work in this ide
|
|
|
|
|
Please stop repeating yourself and go and read the information that CPallini provided to resolve this issue.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
i rad it befor and i know that eclips did not show the console.but eclips have console tab and in that tab did not show any thing.
|
|
|
|
|
Go to the eclipse website and ask there.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
This is not a C/C++/MFC question, but an Eclipse question.
Doesn't Eclipse also have an Output tab?
Part of the problem may be that you do not have a \n in the output stream. You might try that and/or calling fflush() after the call to printf() . Calling setbuf() might also be a consideration.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
modified 26-Nov-12 16:52pm.
|
|
|
|
|
no i cant find it if you can pleas say to me
|
|
|
|
|
i ask it in eclipse.org forum and this is the answer:
"
printf("insert a");
fflush(stdout);
scanf("%d",&a);
|
|
|
|
|
What about:
printf("insert a: \n");
scanf("%d", &a);
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
printf("insert a");
fflush(stdout);
scanf("%d",&a);
just this code work.and solve the problem
|
|
|
|
|
Dear Community,
I'm using C++ to develop a small Bootstrapper (Setup.exe) application in C++. Using CreateProcess() to launch a .hta (HTML Application) which is used as a UI. It then calls other installers one by one which includes *.exe, *.msi etc.
What I'm trying to do is if I execute my Setup.exe, it asked for UAC for once and launch .hta so that it doesn't required UAC any further. Here is my code:
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) );
if( CreateProcess(NULL, "C:\\Windows\\MsHta.exe SetupGUI.hta" ,
NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi ))
{
WaitForSingleObject(pi.hProcess, INFINITE );
CloseHandle( pi.hProcess );
CloseHandle( pi.hThread );
I actually saw same in an application installer, but I don't have its Setup.exe's source code.
Thanks a lot.
Farrukh
|
|
|
|
|
I think it is nothing to do with how you call CreateProcess. If your main application Setup.exe is launched in elevated mode, all processes lunched by this application will be launched in elevated mode.
In order to have an elevated prompt for your Setup.exe, you need to create manifest.
This simple manifest will trigger the UAC prompt for your application:
="1.0"="UTF-8"="yes"
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<ms_asmv2:trustInfo xmlns:ms_asmv2="urn:schemas-microsoft-com:asm.v2">
<ms_asmv2:security>
<ms_asmv2:requestedPrivileges>
<ms_asmv2:requestedExecutionLevel level="requireAdministrator" uiAccess="false">
</ms_asmv2:requestedExecutionLevel>
</ms_asmv2:requestedPrivileges>
</ms_asmv2:security>
</ms_asmv2:trustInfo>
</assembly>
|
|
|
|
|
Visual Studio C++ provides facility for using ActiveX control in VC6.0 as well as in VC2010. I tried NTGraph3D activeX Control in VC6.0. It is working perfectly.
I tried the same in VC 2010. So for Visual Studio 2010, NTGraph3D ActiveX Control is not working.
So can anyone help me to solve this problem. Is there any change in properties ?
|
|
|
|
|
|
Hi,
How to get a ip address from system name and how to get a system name from ip address. below see my requirement.
input: 127.0.0.1
output: comp01
input: comp01
output: 127.0.0.1
Thanks
modified 23-Nov-12 4:54am.
|
|
|
|
|
|
Here is how to get ip address from system name:
|
|
|
|
|
Hi,
i need some help to solve this problem after create of worker thread.
When i create a worker thread i receive this error message:
Windows has triggered a breakpoint in myprog.exe.
This may be due to a corruption of the heap, which indicates a bug in myprog.exe or any of the DLLs it has loaded.
This is the code snippet:
CWinThread* cmythr= AfxBeginThread(controlfunc,params, THREAD_PRIORITY_HIGHEST, 0,CREATE_SUSPENDED,0);
if(NULL != cmythr)
{
cmythr->ResumeThread();
}
but after maybe 10 seconds i receive this error message:
and the debugger show in this code in the file thrdcore.cpp:
DWORD nResult = 0;
if (pThread->m_pfnThreadProc != NULL)
{
nResult = (*pThread->m_pfnThreadProc)(pThread->m_pThreadParams);
ASSERT_VALID(pThread);
}
A thing what make me confuse is that i cant find this position with memory allocation, i do nothing like this in this Function?
No parameter is NULL, what i'm doing wrong?
Any help is welcome
Thanks
bosfan
|
|
|
|
|
Answer these two questions.
1) Provide the prototype of your function controlfunc>
2) What do you pass as params?
|
|
|
|
|
It's impossible to guess what may be wrong with the information you provided. You should use your debugger to set some breakpoints in your code, and check the actual values of the various parameters at the time of the failure. You can also use the stacktrace to see which functions have been called recently.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Hi,
thanks for reply i try to solve this in this way.
best regards
bosfan
|
|
|
|
|
Could be wrong here but I think you have to call a Macro just after the thread enters in order to set it up properly, google it, it is well known. (Had this years ago, and havent done any user mode for ages. )
|
|
|
|
|
Try enabling the "page heap" for your application. It can be a little painful but it often finds the cause of problems like yours.
Steve
|
|
|
|