|
Yes , it got complied......thanks a lot and a lot...... now i could move further..
|
|
|
|
|
I am glad I was of help.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
yes dear... I looked ur profile ..you have a cute n nice n charming baby!! God bless her
|
|
|
|
|
|
Hi
I would like get LoginNames of all users in My Domain.
I could get the list of all user names in my domain using IADS and IDirectorySearch using the article
[^]
Can any body suggest me relevant approach or provide me any links for solving this?
Thanks
Satya
Today is a gift, that's why it is called the present.
|
|
|
|
|
Have you tried NetUserEnum() or NetQueryDisplayInformation() ?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
|
Should I need to delete the thread pointer here
void starttherad()
{
th=AfxBeginThread (StartThread, _param)
}
void stopthread()
{
delete th; // Should I need to delete ?
}
|
|
|
|
|
ptr_Electron wrote: void stopthread()
{
delete th; // Should I need to delete ?
}
No.
Regards,
Sandip.
|
|
|
|
|
Nope. By default the CWinThread m_bAutoDelete data member is TRUE , and the pointer is deleted when the thread terminates (see [^]).
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]
|
|
|
|
|
Hi,
initialize the "m_bAutoDelete" data member for your needs.
If you set this member to TRUE, you doesn't need delete the pointer.
Greetings
|
|
|
|
|
As the others already have said: no, you don't.
At least not in the context you provided.
But...
It's considered good practice to make sure all threads have finished before closing an application. By waiting on the thread handle you make sure the thread has finished. To be able to wait on the thread handle with e.g. ::WaitForSingleObject() , the thread handle must be valid. If the CWinThread object has its m_bAutoDelete member set to TRUE the thread handle will be closed when the thread exit its controlling function and the CWinThread object is destroyed.
If you want to avoid this situation you should create the thread suspended and set the m_bAutoDelete memeber to FALSE before resuming thread execution with a call to CWinThread::ResumeThread().
In this case you have to delete the CWinThread object yourself by calling delete after you've waited on the thread handle CWinThread::m_hThread .
Read more here[^].
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Hi!
I've to call a function from my implementation file. It has two versions in the header file. These are:
Version1:
osg::Switch* GetSwitch(const std::string& name);
const osg::Switch* GetSwitch(const std::string& name) const;
I'm calling this function in my .cpp file as follows:
const std::string SwitchName = SignalNode->getName();
osg::Switch* SignalSwitch = dynamic_cast<osg::Switch*>(NodeCollector::GetSwitch(SwitchName));
It shows error C2668 as shown below:
Macro definition of min detected - undefining
.\testAI.cpp(105) : error C2668: 'dtCore::NodeCollector::GetSwitch' : ambiguous call to overloaded function
C:\Program Files\Delta3D_REL-2.0.0\inc\dtCore/nodecollector.h(177): could be 'osg::Switch *dtCore::NodeCollector::GetSwitch(const std::string &)'
|
|
|
|
|
why are you making the dynamic_cast ?
remove it, the error will go away.
|
|
|
|
|
Hi!
No. The error persits even if I removed dynamic_cast also. What to do?
|
|
|
|
|
Your methods are static??
Why are you calling methods using class..
Regards,
Sandip.
modified on Wednesday, September 24, 2008 7:17 AM
|
|
|
|
|
No. It's non-static only.
|
|
|
|
|
Read My previous post again.
Why are you calling non static method using class???
Does it help??
Regards,
Sandip.
|
|
|
|
|
as someone stated (to whom no didn't answer - shame on you) : why are you calling GetSwitch() from the class rather than from an instance of the NodeCollector class ?
you said the function was not static, so why do you do something like NodeCollector::GetSwitch(SwitchName) instead of something like node.GetSwitch(SwitchName) or nodePtr->GetSwitch(SwitchName) ?
|
|
|
|
|
Hi toxcct,
Method seems to be static
No he is calling them using class
Regards,
Sandip.
modified on Wednesday, September 24, 2008 7:18 AM
|
|
|
|
|
I am bit confused is there any difference between two methods.
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
don't you see the constness of the second definition ?!
|
|
|
|
|
Mahesh Kulkarni wrote: any difference between two methods.
Difference is const
Regards,
Sandip.
|
|
|
|
|
The compiler can't decide whether you want the const or non-const function invoked. Saying you want the non-const explicitly should do the trick.
const std::string SwitchName = SignalNode->getName();
osg::Switch* SignalSwitch = dynamic_cast<osg::switch*>((osg::Switch*) NodeCollector::GetSwitch(SwitchName));
Hope it works.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|