|
I see applications that like your question that monitor computer
but how to hide your program from TaskManager it's show in this program
(I think you can write this program but it's difficult.)
|
|
|
|
|
|
|
MSDN says:
_beginthreadex resembles the Win32CreateThread API more closely than does _beginthread. _beginthreadex differs from _beginthread in the following ways:
_beginthreadex has three additional parameters: initflag, security, threadaddr. The new thread can be created in a suspended state, with a specified security (Windows NT only), and can be accessed using thrdaddr, which is the thread identifier.
The routine at start_address passed to _beginthreadex must use the __stdcall calling convention and must return a thread exit code.
_beginthreadex returns 0 on failure, rather than –1.
A thread created with _beginthreadex is terminated by a call to _endthreadex
|
|
|
|
|
Prefer _beginthread or _beginthreadex over CreateThread . The former perform some thread specific C-Runtime-Library initialization. Calling CreateThread can cause problems if you use a C-Runtime-Library function which requires this initialization.
Steve
|
|
|
|
|
Do any one know about Virtual Constructors ?
I heared about it some where but am not at all clear about the fact. If any one knows it please say abt the same ..
Rinu Raj
|
|
|
|
|
http://public.research.att.com/~bs/bs_faq2.html
Search for
Why don't we have virtual constructors?
|
|
|
|
|
C++ does not allow constructors to be virtual. The term "Virtual Constructors" refers to virtual methods of a factory classes that creates other classes. An example:
class CFactoryBase
{
public:
virtual CWorkerBase* Create() = 0;
};
class CFactory_Microsoft : public CFactoryBase
{
public:
virtual CWorkerBase* Create()
{
return new CWorkerBase_Mircrosoft();
}
};
class CFactory_Borland : public CFactoryBase
{
public:
virtual CWorkerBase* Create()
{
return new CWorkerBase_Borland();
}
};
In this context the Create methods are sometimes called virtual constructors.
Steve
|
|
|
|
|
Ironic - The one correct answer gets a 1 vote. Well don't take my word for it: see "The C++ Programming Language", Special Edition by Bjarne Stroustrup, Section 12.4.4 on page 323.
Steve
|
|
|
|
|
Perhaps fishing for an answer which pleases?
Steve
|
|
|
|
|
dunno
|
|
|
|
|
You are SO right Stephen, in both of your posts.
Virtual Constructors is a design pattern AKA "Factory Method" that also can be read about in the famous book "Design Patterns" written by GoF (Gamma, Helm, Johnson and Vlissides), which has been the "design pattern bible" for more than 10 years.
As an example: every time you create a COM object you use a factory AKA Virtual Constructor.
Common knowledge?
Strange votings again, reminds me of my post two weeks ago in The Lounge[^]
I'll put it up as much as I can...
--
Rog
It's suppose to be hard, otherwise anybody could do it!
|
|
|
|
|
|
Thank u
this is the answer i was looking for
|
|
|
|
|
I think the voter'd have wanted to give a top '1' vote. just like Rank 1.
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
Did you hear it as one of the question when being interviewed?
S o h a i l K a d i w a l a
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Nice question
- NS -
|
|
|
|
|
I tried to compile the below code get the error...
class a
{
virtual a()
{
}
};
error C2633: 'a' : 'inline' is the only legal storage class for constructors
- NS -
|
|
|
|
|
NS17 wrote:
error C2633: 'a' : 'inline' is the only legal storage class for constructors
Because the constructor cannot be virtual.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Rinu_Raj wrote: Do any one know about Virtual Constructors ?
See here.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hi All
I want to run my program while Booting the system by inserting the program name in the registry key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
Here in BootExecute am giving value
autocheck autochk *copyTest
here copyTest is a batch file which consists of a single command
copy C:\Test1.txt D:\Test1.txt
but after restarting the system I donot see file copied.
Please tell me that how to run copyTest batch file while booting
Please reply.
Thanks
|
|
|
|
|
rajeevktripathi wrote: I want to run my program while Booting the system by inserting the program name in the registry key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
Why are you not putting it here:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
hi friends in MICROSOFT interview i have faced a question why abstract base class is needed? with out any instantiation what is its use ?
I tried to answer for it like its for design perspective,what r the behaviours
(virtual functions)specified in the Abstractbase class can be elaborated in the derived classes...like that the main purpose is its used as interface....
like that ,But he is not satisfied with my answer.
So Any of u can make my answer value added ?
krishna
|
|
|
|
|
It is usefull for polymorphism to provide a uniform way to manage different objects. They all have the same 'interface' but provide different behavior which are coded it the derived classes.
|
|
|
|
|
I doubt that, what is necessity of pure virtual functions?
- NS -
|
|
|
|