|
how can i generate a file of my program after a specific time mean i keep do use my program but in the back after suppose 2 min its automatically creat file
|
|
|
|
|
Wouldn't you just use SetTimer and then either provide a pointer to the callback function or just handle WM_TIMER messages in the main window function?
|
|
|
|
|
In addition to SetTimer() , check out CreateTimerQueueTimer() .
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
I want to know how to convert a process handle to the process id.
is it possible?
|
|
|
|
|
Do you need to GetProcessId ?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
GetProcessId, i do need it someone has told me about it , but in the msdn
i can't find any document of this api,why? can this api be used in xp?
|
|
|
|
|
|
in msdn oct 2001 ,this function is not documented.why?
|
|
|
|
|
Um, er, ah, Just to hazard a guess -
Minimum supported client is WinXP SP1.
XP SP1 was released on Sep 9 2002, not quite sure how it would make it into the MSDN that was released 11 months prior.
Well, that's my uneducated take on it anyway...
The thing I'm curious about, is why you would want to know how to (a)hide your program from the task-manager programs list and (b) how to get a processId.
Me wonders if you aren't producing a piece of malware?
modified on Sunday, May 3, 2009 9:39 AM
|
|
|
|
|
i am not producing a malware.I work on a office lan control app.I don't want the employee to stop my client part.so i need these technics.
thank you to your help.
|
|
|
|
|
tyr2000 wrote: office lan control app
Well, that sounds like malware to me
|
|
|
|
|
I am using templates for a class for the first time and I cannot figure out what I am doing wrong.
Any help would be greatly appreciated.
This code will generate LNK2019 Unresolved External
AssocArray<Vector3> myArray;
Class Definition
template <class TValue>
class AssocArray
{
public:
AssocArray();
AssocArray(int size, int resizeBy);
int GetCount() { return m_nItems; }
void SetNewSize(int size, bool copy = true);
void IncreaseSize(int size, bool copy = true);
TValue operator [](int i);
TValue operator [](string s);
private:
int m_nItems;
int m_nMaxItems;
int m_nResizeBy;
KeyValuePair<string, TValue>* m_array;
};
Class Constructor
template <class TValue>
AssocArray<TValue>::AssocArray()
{
m_nItems = 0;
m_nMaxItems = 2;
m_nResizeBy = 2;
m_array = new KeyValuePair[2];
}
modified on Sunday, May 3, 2009 5:28 AM
|
|
|
|
|
What's the exact error that is displayed on Output window???
|
|
|
|
|
Error 1 error LNK2019: unresolved external symbol "public: __thiscall AssocArray<class Vector3>::AssocArray<class Vector3>(void)" (??0?$AssocArray@VVector3@@@@QAE@XZ) referenced in function "public: void __thiscall EngineRoot::InitializeLater(void)" (?InitializeLater@EngineRoot@@QAEXXZ) EngineRoot.obj
Error 2 fatal error LNK1120: 1 unresolved externals
modified on Sunday, May 3, 2009 9:39 PM
|
|
|
|
|
Is the constructor in the same file as the class definition? (Hint: it isn't.)
(If you're wondering why it doesn't give you a compilation error, it's because the compiler doesn't know if you have a class template specialization defined somewhere.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Constructor and all member functions are in a separate file to the definition.
There is no template specialization in the code.
|
|
|
|
|
That's my point; put everything into one file. By their nature, template classes are nothing but definition.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Thank you, that has solved the problem
|
|
|
|
|
Help,is anyone who can tell me how can I change the height of the item in the list control????
|
|
|
|
|
See here[^].
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Sure.
Do a search and find some code that implements a custom list control. Look through the source
until you find code that alters the height of each item. Copy this code and apply appropriately.
Something else you may consider: LPNMCUSTOMDRAW & WM_NOTIFY
|
|
|
|
|
For example, I post a request that read n bytes from a file,
then what its completion condition?
Is it like this:
if the file is larger than n bytes, it won't complete until n bytes is read, and if the are less than n bytes to read, it will complete as soon as the end of file is reached.
|
|
|
|
|
followait wrote:
Is it like this:
if the file is larger than n bytes, it won't complete until n bytes is read, and if the are less than n bytes to read, it will complete as soon as the end of file is reached.
Yes, that sounds correct. The read request could also be subject to cancelation of pending asynchronous I/O operations if FILE_FLAG_OVERLAPPED.
Additional Info:
Inside I/O Completion Ports[^]
I/O Completion Ports[^]
ReadFile Function[^]
Best Wishes,
-David Delaune
|
|
|
|
|
Hi,
I am having problem with creating CTabCtrl. I derived my class MyCTabCtrl from CTabCtrl.
In the view I am trying to dynamicaly create the control of MyCTabCtrl but always fails.
MyCTabCtrl* tab;
tab = new MyCTabCtrl();
tab->Create(TCS_TABS|WS_VISIBLE|WS_CHILD,CRect(10,10,100,100),this,12345);
When I define tab as CTabCtrl it creates fine. The default constructor of my class calls the base CTabCtrl constructor
MyCTabCtrl::MyCTabCtrl():CTabCtrl()
{
}
Thank you for your help, Tomas
|
|
|
|
|
How does it fail? Create returns FALSE? Check GetLastError, what does it give you?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|