|
I appreciate your answer. Thank you for your attention.
|
|
|
|
|
Uhm, C++ isn't supported in the kernel?
I think you mean that MFC isn't support in the kernel.
The Kernel doesn't know anything about the original source the binaries are created from.
|
|
|
|
|
No, I mean C++ isnt supported, as in supported by Microsoft if you have a problem and go to them. Of course you can run C++ derived code, you just need to be carefull about what features you use.
==============================
Nothing to say.
|
|
|
|
|
candogu wrote: I need to make a hidden or non killable system watcher
candogu wrote: will give Access is denied (For all users including Administrators)
Thus preventing any user or adminstrator from being able to control their own system.
candogu wrote: I am not a virus developer or something like that
I can see no other reason that you would want to do this.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Or, in other terms: Warning: you're going to create a virus or something like that by accident!"
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
[My articles]
|
|
|
|
|
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
U can see what u want. Yes I am lying what is gonna happen??? I am the biggest virus developer in whole world? Are u happy now?
|
|
|
|
|
It is only going to block one application from being stopped.
Of course he can have a user created whose SID is allowed to close that exe so control can be maintained.
In fact I have done this kind of thing with security SW. Certain apps and areas of the registry have access blocked, launching of aplicaitons is limited to certain users or groups, typical security stuff.
==============================
Nothing to say.
|
|
|
|
|
Yes, but I have a sneaking suspicion that you actually understand the mechanics and implications of doing something like this.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
I do. I used to work for a firm who made security products.
==============================
Nothing to say.
|
|
|
|
|
candogu wrote: Where should I start from
Given your description of what you want to do, a real good start would be to redesign your system. An "unkillable" process is a bad design to start with.
candogu wrote: I have to do this
You might have been told to do this by a client or supervisor but that does not mean that you should do it.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
When you're done with this, would you please post your experiences in debugging and unkillable process?
|
|
|
|
|
sample code on how to detect a motion in image processing
|
|
|
|
|
|
unhelpful sarcastic reply
|
|
|
|
|
Hi all,
I am trying to set the cursor for edit box to the next line:
Here is the code i am trying,
CEdit m_TestCtrl;
CString m_Test1;
void CTest::OnChangeEditTest()
{
CString str,str1;
UpdateData(TRUE);
str1 = m_Test1;
str1 += ":";
int nLength = m_TestCtrl.GetWindowTextLength();
m_TestCtrl.SetSel(nLength );
m_Test1 = str1;
UpdateData(FALSE);
}
It is appending,but the cursor is going to the first position.
Can anyone tell me where i am going wrong
Thank you
Manju
|
|
|
|
|
manju 3 wrote: It is appending,but the cursor is going to the first position. You need to send the edit control an EM_SETSEL message.
manju 3 wrote: Can anyone tell me where i am going wrong
My first course of action would be to get rid of the calls to UpdateData() . Use GetWindowText() and SetWindowText() instead.
"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
|
|
|
|
|
Hi all,
I have name of file in my string like test1.doc or test3.xls, i want to get application name by using this string.
Like for test1.doc it should give like Microsoft Word File or Microsoft Word Document how can i do this?
Thanks in adance
|
|
|
|
|
One option would be to read the registry. First find the extension:
HKCR\.doc
Then use that key's default value to read the key at:
HKCR\Word.Document.8
Read that key's default value to get Microsoft Office Word 97 - 2003 Document.
There's likely another way to do this (e.g., AssocQueryString() ), but I don't know it off the top of my head and I'm headed out the door to Lowe's.
"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
|
|
|
|
|
Hi,
We are writing software for machines which are per definition Not connected to the Internet. We are trying to implement Code Signing, but, because our clients computers are Not connected to the Internet, they have no chance of verifying Certifying Authority Signatures. So, for this purpose, we are setting ourselves up as Certifying Authority, and we present Certificate to the customer to act as Root Certificate for our services. When installing the Cert, the User gets (Rightfully) a Dire Warning, about installing such certificate, and offers a 40 digit Thumb Print in the Warning Dialog, advising to contact the issuer with that 40 digit Number.
I would rather send my customer a letter, by post, which contains this number in 8 groups of five.
At the critical Installation point, I would present a Dialog, asking for these numbers in 8 linked Edit Controls,to ask for the numbers again, to confirm that the Authority is genuine.(or Not).
The Current (XP)arrangement is that you get a 40 char string, which an end user is supposed to check with the issuer, but is most likely to Pass and Ignore, rather than painstakingly check.
Has anyone any experience of dealing with this issue.
Regards,
Bram.
Regards,
Bram.
Bram van Kampen
|
|
|
|
|
I am currently having this problem using this:
LPCSTR numStr = "128.40";
float num = 0.0;
wstringstream stream;
stream<<setprecision(2);
stream<<setiosflags(ios_base::fixed);
stream<<numStr;
stream>>num;
i am getting 128.3999 in num, this happens in 128.3, 128.2, 128.1, and any number over 128 with decimal x.1,x.2,x.3,x.4, but does not happens in numbers under 128.
I have just tested another numbers and this happens until 511.4 it gives me 511.3999 but with 512.1 it gives me 512.100001, after 512 all numbers give me that, the same behaviour maybe is repeated again later in series.
Just have tested the function atof and _tstof and both fail.
What do i am missing here, how to solve this issue??
|
|
|
|
|
This is not an issue.
It happens because of the way floating point numbers are stored in memory.
Try this example by changing the value passed to setprecision -
float num = 128.384624;
cout << setiosflags(ios_base::fixed) << setprecision(2) << num << endl;
|
|
|
|
|
use double type instead of float
|
|
|
|
|
Hi,
You ran into precission and rounding problems. This is always a problem when dealing with Floating Point Arithmatic.
The first question is , after setting
stream<<setprecision(2);
You probably typed in quite larger amounts, but I stay with your example, because it hits a fundamental problem, which is not very well understood.
you get things like '511.3999' or '512.100001' I very seldomly use streams, but I know, your setprecission(2) would have printed these as '511.39' and '512.10'
However, I can see where you are coming from. You typed in $511.40, and it appeared elsewhere as $511.39. So you started to investigate. Widened the Precission Spec, and noted that $512.10, was printed as: $ 512.100001!
The Concept of Numbers, Rational Numbers, and Real Numbers is perfect, manipulation of these numbers is always perfect, under the rules of mathematics. At the same time, there is also an Infinite number of Numbers. The Human brain can work with Concepts, and conclude that the square of the square root of 2 equals 2. Computers cannot do that naturally,(Unless if they run an Artificial Inteligence Application designed to do those things). In general, a Computer can work with a Very Large (but Finite) list of Numbers, and the question is how do we encode numbers in real life. Very Large Numbers Very Precice, is very difficult, but then again Who wants to know the US National Budget to the nearest Cent. that's where floats come in. Floats sacrifice speed and storage space for accuracy. If you want to keep account of say funds. Store it in Cents or Fractions of Cents, but essentially as an Integer value.
In other words, you Store it as Cents, but Show it as Dollars,
by sprintf(Buf,"Value \t%c %d.%04d",'$',Val/100,Val%100);
My 30 year adage is:
Storing Money as a Float is nearly always a Daft Idea.
Regards,
Bram van Kampen
|
|
|
|
|
this even happens with the C runtime library!, i use atof and i got the same problems, maybe it is true that is the way the floats are saved in memory as stated before, i even tried double numbers and that even work..
saying this, someone can recommend me a good tutorial on floating numbers manipulation?
Thanks
|
|
|
|