|
I've a problem , I would like know how can I hidden my app from tal list Windows? For example: when a user to press ctr+alt+del it's not show my app in tag list? Thanks
|
|
|
|
|
Gledston Reis wrote:
...when a user to press ctr+alt+del it's not show my app in tag list?
Do you mean Task Manager's list of processes? Just out of curiosity, why would you not want your application to show up in this list?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
DavidCrow wrote:
Just out of curiosity, why would you not want your application to show up in this list?
He's writing spyware that he does not want the user to know about. If the user knows about it, the user can kill it.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
I know that. I just wanted to see if GR would admit to it.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I´m sorry because I dont answer before I was too busy;). Yeah you can show it(hidden in tag list and process list). I written a spyware and my app need stay hidden in system.
thanks!
PS:Sorry my bad english, because it´s not my natural language
|
|
|
|
|
i want to add a menu in cd rom's context menu.
using vc++.
plese help me.
very urgent.
|
|
|
|
|
Just as an example, you can add the following to a .reg file and merge it into your registry. Then from Explorer, right-click on your CD drive containing an audio CD and you'll see the newly added option.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\AudioCD\shell\calc]
@="&Calc"
[HKEY_CLASSES_ROOT\AudioCD\shell\calc\command]
@="calc.exe" For non-audio CDs, a minor change:
[HKEY_CLASSES_ROOT\Drive\shell\paint]
@="&Paint"
[HKEY_CLASSES_ROOT\Drive\shell\paint\command]
@="mspaint.exe"
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
i simply typed following in file and named it with .reg extention.and i runed it. it showed an error.
why?
what is format for registry file?
i maked entry directly in registry in following path.
[HKEY_CLASSES_ROOT\Drive\shell\paint]@="&Paint" [HKEY_CLASSES_ROOT\Drive\shell\paint\command]@="mspaint.exe
but the menu also appears when right click a drive ( for example c . i want only in cd-rom's context menu.
|
|
|
|
|
anandforu wrote:
i simply typed following in file and named it with .reg extention.and i runed it. it showed an error.
why?
what is format for registry file?
You missed the following at the top of the file:
Windows Registry Editor Version 5.00
anandforu wrote:
but the menu also appears when right click a drive ( for example c. i want only in cd-rom's context menu.
I currently do not know of a solution for this. Perhaps Michael Dunn can help.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
i want to add windows media player activex control in vc++.
how to do it?
i added the windows media player activex control.But when i calling a method in it ,an runtime error occurs.No details in that error.
please help me .very urgent.
Anand
|
|
|
|
|
I am launching off a console app (by pressing a button )using CreateProcess. I save the handle to this process and when I press the button again, I want to terminate the process if its already running and relaunch it. I put in debugging statements and indeed I get the expected correct output, but the console window is nowhere to be seen this second time around!
if(m_serverProcessInfo.hProcess)
{
TerminateProcess(m_serverProcessInfo.hProcess, 0);
if(fpLog)fprintf(fpLog, "Terminated server\n");
m_serverProcessInfo.hProcess = 0;
}
int res = StartServer();
and
int CPMA2000Dlg::StartServer()
{
int res = 0;
STARTUPINFO StartupInfo;
ZeroMemory(&StartupInfo, sizeof(StartupInfo));
StartupInfo.cb = sizeof StartupInfo ;
StartupInfo.dwFlags = STARTF_USESHOWWINDOW;
StartupInfo.wShowWindow = SW_SHOW;
if(CreateProcess( m_sPath + "fileserver.exe", NULL,
NULL,NULL,FALSE,0,NULL,
NULL,&StartupInfo,&m_serverProcessInfo))
{
if(fpLog)fprintf(fpLog, "Started server\n");
}
My logs:
Started server<br />
Terminated server<br />
Started server<br />
The first time I do see the console window (server.exe) but the second time though CreateProcess() succeeds again, I dont see the console window which disappeared at the TerminateProcess().
How shall I proceed to figure out the problem?
Thanks,
sb
|
|
|
|
|
Are you doing this in order to have a single instance of the application?
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
No. I need a fresh copy of the server each time the button is pressed.
When the button is pressed, two apps are launched: server.exe and my.exe. my.exe depends on socket info from server.exe. When my.exe ends, the user closes the my.exe window, but not the server window. Then when he presses the button again, i want the server.exe to exit and relaunch itself. I dont really want to instruct the user to close both the server.exe and my.exe before pressing the button again. BTW I just modified my app and had the main app send a socket message to the server.exe (if its still running) which tells it to exit. Then it launches it again. However once again, my server listens to and follows the instruction to exit,exits, says its restarted (logfile) but doesnt show up (and my.exe gets unhappy claiming its not running).
Thanks for looking into this,
sb
|
|
|
|
|
Have you checked the return code for the CreateProcess the second time round?
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Yes. It returns true the second time around too.
|
|
|
|
|
It may be a race condition. Try stepping through the code and ensure that the server has gone away before moving to the code to launch it again.
If this is the case and all works when you slow it down you will have to wait for the process to terminate before trying to start it again.
I hope this helps
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
I neglected to mention that when I step through theres no problem. So with your insight I did Sleep(1000) and it works. Now I nervous about whether the time is enough from computer to computer. On mine its adequate without being noticeably slow. Is there some way to be certain of this barring a statistical survey?
Thanks,
sb
|
|
|
|
|
Um, a single Sleep is not ideal for this sort of problem. As you rightly say it may not be the same on all machines.
I suggest that you send the close, wait a while then check that the process has gone away before continuing. If it hasn't wait a while again then check again. Repeat this a maximum number of times before issuing an error message saying that the server has stopped responding for instance (as it is possible that the server may not close for some reason).
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
|
Does this help Application desktop toolbars[^] ?
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
|
Um, Interseting. If I come across some other examples I will let you know. Good luck with that.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
I now how can I make a VC++ program that using Access table but I want to create a program that can save data in database mode and dont use Access by reading data from a textsource please help me.
Thank you alot
|
|
|
|
|
|
Hello,
In my project, I have to check if a particular condition is satisfied and take some action accordingly. Hence I have started a thread which continously checks for the condition as shown below:
UINT ThreadProc(LPVOID lp)
{
while(TRUE)
{
DWORD dwWaitResult = WaitForSingleObject(MonitorEvent,INFINITE);
switch (dwWaitResult)
{
case WAIT_OBJECT_0:
//do the required action and ...reset event
ResetEvent(MonitorEvent);
break;
}
}
MonitorEvent will be set in the part of the code where the required condition is met. Once the the event is fired, ThreadProc acts and does the required task and again has to wait till the event is fired again. This has to continue till application exists.
The result of the above code is that CPU time is getting consumed 100%.
Can anyone please suggest a better solution?
Thanks in anticipation of information.
madhavi.
|
|
|
|