|
Do you suggest an hammer?
TerminateProcess in fact is quite effective and rude on killing processes.
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.
[my articles]
|
|
|
|
|
Some years ago I decided to make an antivirus so I said I need to TerminateProcess and TerminateThread,SuspendThread,ResumeThread,.. and started but for some processes when I used of TerminateProcess it kill each process immediatly but I got repeated runtime errors or about TerminateThread you can use of this function for kill some threads of a process but it produces serious errors.
|
|
|
|
|
The hammer is the alternative to TerminateProcess : you can't expect the virus terminating gracefully whenever you ask it. BTW, you don't need TerminateThread stuff.
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.
[my articles]
|
|
|
|
|
TerminateThread was an example not for this object.
|
|
|
|
|
TerminateThread is usually bad. TermintateProcess is almost always bad. On the other hand viruses deserve hammers and TerminateProcess is your software hammer.
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.
[my articles]
modified on Friday, February 01, 2008 9:38:34 AM
|
|
|
|
|
Yeah thats right.
|
|
|
|
|
Hi friends ...
I have one doubt regarding my analysis ..
how to convert HTML data XML how its possible !!!
is there any protocals are needed to this convertion ..
plz suggest me!!
Thanks
mathan raj
|
|
|
|
|
Choosing the right forum maybe a start.
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.
[my articles]
|
|
|
|
|
I believe HtmlTidy[^] can do that.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
dear all
any problem occurred when the following errers happened?
: error C2057: expected constant expression
thanks
Li Zhiyuan
5/10/2006
|
|
|
|
|
Well, the error message is clear enough no ? It says that somewhere the compiler expects a constant variable but you didn't provide it.
And without any piece of code, it is impossible to tell more.
|
|
|
|
|
hi;
most likely you have declared an array without indicating its size
e.g long m_lStudents[];
if thats the case then give it size;
|
|
|
|
|
Is this question related to your previous question?
|
|
|
|
|
no, this is what i just studied for dynamic multiple array...the code is here....
nt n,m;
double c[n][m] = NULL;
double * a[] = NULL;
double * b[] = NULL;
cin >> n;
cin>>m;
b[] = new double[m];
a[] = new double[n];
for (int i=0; i>>n; i++)
{
a[i] =(double) rand()/RAND_MAX;
}
for (int j=0; j<m; j++)<br="" mode="hold">{
a[j] =(double) rand()/RAND_MAX;
}
for (int k=0;k<m;k++)>
for (int kk=0;kk<n;kk++)>
{
if (k==0)
c[k][kk] = a[k];
else
c[k][kk] = b[kk];
}
cout <<"\n";
delete [] a;
a = NULL;
}
this is what i created a 2 D dynamic array...but the problem is there...how to create a 2D dynamic array?
thanks
Li Zhiyuan
5/10/2006
|
|
|
|
|
li zhiyuan wrote: how to create a 2D dynamic array?
Simple answer... You can't. Which is why you're getting an error.
Longer answer... You cheat. Create a one dimensional dynamic array. But make it an array of double * s, then create those arrays.
typedef double *pdouble;
pdouble *c = new pdouble [N];
for (n = 0; n < N; n++)
c [n] = new double [m];
.... ; do your processing code
for (n = 0; n < N; n++)
delete [] c [n];
delete [] c;
Notice I'm using delete [] instead of delete . The [] means it will call the destructor for each member of the array(s). For simple types like double and double *, it makes no difference. But it makes no harm, and is a good habit to get into. Then you can make arrays of classes/structs that *could* have destructors, and you'll be thankful for your good habits.
I hope that helped,
Iain.
ps, In addition, please use the <pre> / </pre> keywords in your posts. And longer variables. They're hard to read now, and you're going to hate yourself in two years time.
|
|
|
|
|
thanks a lot friend, could you provide me with complete code creating 2 D dynamic array? thanks again
Li Zhiyuan
|
|
|
|
|
I already did provide you with complete code for creating a 2d array, and then destroying it.
Look at the post you replied to.
|
|
|
|
|
Please remove your blinders.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
can anybody tell me how to fetch the value of a column in a particular row in the list control when i click anywhere on the row.
i tried out this way
TCHAR pszText[_MAX_PATH]
LVITEM lvi={0};
lvi.mask=LVIF_Text;
lvi.pszText=pszText
lvi.cchTextMax=_MAX_PATH
lvi.iItem=0;
lvi.iItem=xc;
listctrl.sendMessage(Lvm_GETITEM,(WPARAM)0,(LPARAM)(LPLVITEM)&lvi)
but by using this code i am only able to fetch the first column value where as i want to fetch either the second or third column value.
thanks in advance
|
|
|
|
|
|
Hi all,
I have write a small server application using C++. Now I want to automated this. Say I want to start the server at 12.00p.m.
So I try to write a .Net service. But it is really new stuff for me. So from where I start this. I got this idea from the Visual Studio .Net 2003, creating new project dialog box searching.
I appreciate your help all the time...
Eranga
|
|
|
|
|
It seems StretchBlt() function stretches big size images fit to destination rect of smaller, but it shows small images as such if destination rect is bigger than source rect. How to stretch the small images to fit in big control? Is there any property for the DC for this?
Best Regards,
Suman
|
|
|
|
|
It should stretch it if you destination width/height are larger than the source width/height, you just have to make sure your destination dc (hdcDest) is created with the right dimensions. Can you post your code?
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
plz tell how can play .dat files with the use of MCIWnd?
|
|
|
|
|
For play .dat files you can use of DirectX.did you can play other formats like avi,mpeg or no?
|
|
|
|