|
Hi,
We can not kill the system processes (eg. System, Services.exe etc) trhu Terminateproc API, am I right??? Also for System processes we dont get handle when we try to get it from 'openprocess' API...
do let me know..
Thanks
Supriya Tonape
|
|
|
|
|
Why don't you just shutdown Windows, instead of try to kill it's vital processes?
|
|
|
|
|
I wanted to terminate the process thru my appln, so cant shutdown windows
seems, didnt get my prob, by Ur way after restarting PC again those SYSTEM processes wud get started...hope U got that
thanks
Supriya Tonape
|
|
|
|
|
Supriya Tonape wrote: We can not kill the system processes (eg. System, Services.exe etc) trhu Terminateproc API, am I right??? Also for System processes we dont get handle when we try to get it from 'openprocess' API...
Yeah you can kill the these process, but for killing that process you should be havinf SYSTEM priviledge.. Only services running in your computer can run on this priviledge.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Thanks Alok, Even if U have those privileges(me not very sure abt this privileges) U cant kill SYSTEM processes since they are necessary n if U will kill it manually from TASK Manager Ur PC wud get rebooted.
But anyways, I got the solution, like GetLastError() returns me "E_ACCESSDENIED" error and thats OK wid my appln
thanks
Supriya Tonape
|
|
|
|
|
Supriya Tonape wrote: Even if U have those privileges(me not very sure abt this privileges) U cant kill SYSTEM processes since they are necessary
Yeap you can kill them... because I myself have done that.....
Supriya Tonape wrote: since they are necessary n if U will kill it manually from TASK Manager Ur PC wud get rebooted.
When i killed that application ... My system get unstable, not rebooted and after some time as precaution measure Windows have restarted these process with new PID.
check this site.. i hope it still working http://www.securenm.com that application is using similiar concept
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Supriya Tonape wrote: Even if U have those privileges(me not very sure abt this privileges) U cant kill SYSTEM processes since they are necessary
AFAIK, I myself created Service that can kill these process.... secondly at that time my system don't get rebooted but it get unstable.. and Windows Reexecute this process to make system stable....
Check out that software at http://www.securenm.com, i am not sure that site is still up
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
It might be, By the way I was talking abt SYSTEM PROCESS n not service if U see my last mail.
thanks n regards
Supriya Tonape
|
|
|
|
|
Supriya Tonape wrote: It might be, By the way I was talking abt SYSTEM PROCESS n not service if U see my last mail.
Calm Down MADAME, sorry if I sound rude.. have you ever heard about SERVICES...? if not let me explain them, they are normal exe but with speacial features, they don't need any user account to run it, i.e. it runs under SYSTEM ACCOUNT, ever before you login your PC (yeap)...
So I hope you got my point, I just want to provide you information, MADAME.. Just a community service....
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Thanks.wud like to reply U my view points but no time.Anyways bye
regrads
Supriya Tonape
|
|
|
|
|
Hi Everybody,
1.What are relocatable dlls exactly?
2.Under what condition one had to use them?
3.How they differ from standard Windows DLL
Thanks
Abhi Lahare
|
|
|
|
|
Hi there,
1) a DLL normally contains information about where the OSLoader has to map it into the Adress space of an application. If the space is already occupied the system needs to relocate the handle of the Library so it can execute properly.
2) actually you don't have to use them, cuase the system does it for you
3) this depends on the Dll, but normally they should differ that much
|
|
|
|
|
Me again,
maybe you want to download and install Sysinternals Process Explorer. It has a view for the modules loaded by an application and you will be able to observe relocated dll's as well.
|
|
|
|
|
hi,
i am facing some problem ,while retriving the resource from dll. That dll is a "esource only dll". Here is the code,what i am using.
HMODULE hmod;
HRSRC hr;
/*here testdll.dll is the dll created for testing purpose and it has bitmap1.bmp resource*/
hmod=::LoadLibrary("testdll.dll");
hr=::Findresource(hr,"bitmap1.bmp",RT_BITMAP);
if(hr==NULL)
MessageBox("This is not working");
else
MessageBox("This is Working");
This is code i have written ,but when ever i run,i get only "This is not working" messagbox. This is means we unable to get the resource from dll.
Can you suggest me, possible solution
regards,
Ram
Spend Every Minute for Success
|
|
|
|
|
sory, its just a little mistake
in above code ,i have done little mistake. The actual code what i am using is..
HMODULE hmod;
HRSRC hr;
hmod=::LoadLibrary("testdll.dll");
hr=::FindResource(hmod,"bitmap1.bmp",RT_BITMAP);
if(hr==NULL)
MessageBox("This is not working");
else
MessageBox("This is Working");
This is code i have written ,but when ever i run,i get only "This is not working" messagbox. This is means we unable to get the resource from dll.
Can you suggest me, possible solution
Spend Every Minute for Success
|
|
|
|
|
You cannot reference the resource by its name ("bitmap1.bmp"). You have to pass its resource identifier to FindResource. Refer to your resource.h, to find out which identifier was assigned to it and use this call:
hr = ::FindResource ( hmod, MAKEINTRESOURCE(%YOUR_IDENTIFIER_HERE%), RT_BITMAP );
|
|
|
|
|
kotiramkoteswararao wrote: Can you suggest me, possible solution
here this link will help :-
http://www.codeproject.com/cpp/UpdateResource.asp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
When i create a modeless dialog, which pops a modal dialog then, the application will crash when i end the application with these dialogs stay opened.
-- modified at 0:01 Tuesday 20th December, 2005
|
|
|
|
|
How can you close your application when a modal dialog is open? Or is your application crashing when you close it when the modeless dialog stay open?
To use modeless dialog in application make a modeless dialog pointer as a member of your mainframe class. Here is the sample code for using modeless dialog box
class CModeless: public CDialog
{
// Construction
UINT m_nID;
CWnd* m_pParent;
public:
CModeless(CWnd* pParent = NULL): CDialog(CModeless::IDD, pParent)//standard constructor
{
m_nID=CModeless::IDD;
m_pParent=pParent;
}
BOOL Create()
{
return CDialog::Create(m_nID,m_pParent);
}
// Dialog Data
//{{AFX_DATA(COptionDllDlg)
enum { IDD = IDD_DIALOG_MODELESS };
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(COptionDllDlg)
protected:
virtual void PostNcDestroy();
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(COptionDllDlg)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
afx_msg void OnDestroy();
afx_msg void OnClose();
};
void CModeless::OnDestroy()
{
((CMainFrame *) AfxGetMainWnd())->ModelessDlgDone();
CDialog::OnDestroy();
}
void CModeless::OnClose()
{
((CMainFrame *) AfxGetMainWnd())->ModelessDlgDone();
CDialog::OnClose();
}
void CModeless::PostNcDestroy()
{
delete this;
((CMainFrame *) AfxGetMainWnd())->ModelessDlgDone();
// CDialog::PostNcDestroy();
}
And In mainframe class add the following members
CModeless *m_pModelessDlg;
CModeless *ShowModelessDlg();
void ModelessDlgDone();
initialize m_pModelessDlg to NULL in the constructor
CMainFrame::CMainFrame():m_pModelessDlg(NULL)
{
...
}
CModeless *CMainFrame::ShowModelessDlg()
{
if (m_pScaleDlg==NULL)
{
m_pModelessDlg=new CModeless(this);
m_pModelessDlg->Create();
m_pModelessDlg->ShowWindow(SW_SHOW);
}
else
{
m_pModelessDlg->ShowWindow(SW_SHOW);
}
return m_pModelessDlg;
}
void CMainFrame::ModelessDlgDone()
{
m_pModelessDlg=NULL;
EnableWindow();
}
CMainFrame::~CMainFrame()
{
if (m_pModelessDlg)
{
m_pModelessDlg->DestroyWindow();
m_pModelessDlg=NULL;
}
}
|
|
|
|
|
Iam working on a module whose functionality is to connect UPS (Uninterupted Power Supply) to PCS USing WIndows MAnagement Instrumentation . Can U please Suggest How To Proceed With This .
abhi
|
|
|
|
|
I am working with embedded systems but i dont know
if there is any special service provided by windos
to manage a UPS .
But we have done such things with the help of Parallel
port.
If u get such information do put it up on the Codeproject
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
hello,
i write a control of word,and want to control the print of the word doc,and i learn can capture the beforeprint event of the word app object,but i do not know how to do it in visual c++,who can help me?
thanks.
|
|
|
|
|
|
Hi everybody
I have an instance of the IWebBrowser2 interface implemented by the internet explorer, and i need to know, how i can enable the block popups function.
|
|
|
|
|
Try this...
http://www.codeproject.com/tools/OxFF.asp[^]
Happy christmas friends. May the Love of My Lord and Saviour Jesus bring forth Joy and Happiness into your life too.
<marquee direction="up" height="30" scrolldelay="1" step="1" scrollamount="1" hspace="0" vspace="0">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|