|
Assuming that you installed notepad.exe as a service I would recommend opening command prompt and issuing the following command:
sc delete test
Or you can navigate to HKLM\SYSTEM\CurrentControlSet\Services and manually delete it. However taking into account the history of your prior actions, I would recommend the previous suggestion as the first course of action.
Best Wishes,
-David Delaune
|
|
|
|
|
I want to start a program as a service;
How to realize it??
Can you tell me some document about this??
Thank you very much!
|
|
|
|
|
A gentleman named Xiangyang Liu wrote a very popular article about how to start a program as a service. I suggest that you read the article and take a look at the sample source code.
Start Your Windows Programs From An NT Service[^]
Best Wishes,
-David Delaune
|
|
|
|
|
You can't just throw any old executable at the Service Control Manager and expect the SCM to do all the work to handle it as a "true" service. The executable has to contain the code to communicate back to the SCM. Notepad does not contain that stuff. I'd wager your original test program did not either ... therfore, the SCM started it but your program didn't tell the SCM that it was started, therefore the SCM reported the error that the program didn't start.
Check this article for service basics [^]
Judy
|
|
|
|
|
CachedBitmap *pCB;
void func ()
{
g(hdc);
Bitmap bm(path);
pCB=new CachedBitmap(&bm,&g);
}
...
</pre>
|
|
|
|
|
Yes, the bitmap bits are copied into the CachedBitmap object. You can test it yourself with something like:
void YourClass::OnPaint()
{
CPaintDC dc(this);
Graphics g(dc.m_hDC);
if(NULL != pCB)
{
g.DrawCachedBitmap(pCB,0,0);
}
else
{
CRect rect;
GetClientRect(&rect);
Bitmap buf(rect.Width(), rect.Height());
g.DrawImage(&buf, 0, 0);
if(NULL == pCB)
{
pCB = new CachedBitmap(&buf,&g);
}
}
}
|
|
|
|
|
|
hi
i have a dialog based application with edit box control...i know how to save the data from the edit box to a certain file.and open it again (but i need to open the dialog and press the open button and choose the file then ok).
my question is...when i double click the file .... i want
to restore the data and display it in the edit box as i save it before.ps:
i have my own file type association....that works fine..
i would appreciate any kind of help
thank u
lahom
|
|
|
|
|
Can you more explain,do you need to SetWindowText?
|
|
|
|
|
You need to get the filename from args, open the file, read the file and set text of your textbox control.
|
|
|
|
|
ok
thank u for your reply....
but pleease can u show me how to do this.
i reealy need thisthank u
|
|
|
|
|
dehseth wrote: You need to get the filename from args, open the file, read the file and set text of your textbox control.
actually i had something like that .... but couldnot understand it ....
so pleease can u bear with me and help me through this
i reealy need it
thank u in advance
|
|
|
|
|
Hi,
I think you need to set your application as default for the file type using shell extension. then u need to handle the command line argument from your application.
thanks
Nitheesh
|
|
|
|
|
Nitheesh George wrote: I think you need to set your application as default for the file type using shell extension
I had the same problem once and I got the tip to include 2 or 3 registry entries to do that, but never worked ok, I guess I didn't use the right entries . Is the shell extension the only way to get it? Or does adding registry entries while installing (with NSIS scripts) work as well? (If yes I guess I will have to inverstigate a bit more about )
Greetings.
--------
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
|
|
|
|
|
Hi,
I am not sure but changing the following reg key causes the file type .txt to associated with your own application.
HKEY_LOCAL_MACHINE\software\classes\systemFileassociation\text\shell\Open\command
thanks
Nitheesh
|
|
|
|
|
mmm, nice
I will make a test. Thank you for the hint
Greetings.
--------
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
|
|
|
|
|
i want to make a program, something simple, to get the mac from ip's over the lan and stored them somewhere
and then verify if the mac had changed, if they send me arp package, i see this trough arp -a...i want to kill this ip...
this is a project for my school.
I played around with cain and abel and i tried to understand how the program works, i noticed when i get spoofed the mac ip's are constantly changing so i thinked if i have a database with what macs are on the network ip, i can monitor the all procedure...
i know something about c++, but i never worked with lan's or created programs for lan's thats why i need help
i'm 18 years old and im at highschool, this is one of my projects...and i need to finish him until the end of the month
sorry for my bad english, i'm from Romania, i english is not my native language, i've tried to write it down correctly.
//best regards
|
|
|
|
|
i want to have a database with all the macs over the lan, and if they change their mac i dont want them to reply to them...
i think even a ***.txt is enough ...the question is how do i get the mac adress ...this is dont know...
lets say i get the mac adress, then i want to put down the ip and mac over and line
***.txt//this is how
ip1 mac adress
ip2 mac adress
.
.
.
and so on
after that i want to constantly , lets say at a interval at 1 second, to interogate the lan again and verify with the ip and mac on the list...if the mac is changed kill the arp process with that ip, if the ip is not on the list add him with his mac...
i think to make a 3rd party program...i'm really confused, it seems logic in my head... but ,for now, my limited skill in c++ is a barrier
|
|
|
|
|
Seems like a great project for school. You should start by looking at the Internet Protocol Helper functions provided by Microsoft. There is a general overview available here:
About IP Helper[^]
To address your question I would recommend having a look at the SendArp()[^] function for obtaining the MAC address for a specific IP.
Best Wishes,
-David Delaune
|
|
|
|
|
Busco programador con experiencia en aplicaciones en Visual C++ /MFC buen base teorica en programacion orientada a objetos.
Envia CV: ogutierrez@aidcns.com
Solo para Lima Peru
Saludos
Omar
|
|
|
|
|
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Which langauge is this ??
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
|
|
Spanish, I suppose.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|