|
I've run out of ideas trying to track this problem down.
I've created a template class and have a private member variable called m_MSGList.
typedef CTypedPtrList<CPtrList, MSG*> tplMSG;
template <class T> class CD : public CWinThread
{
.
.
.
private:
tplMSG m_MSGList;
}
--------------------------------
When this line of code executes:
m_MSGList.AddTail(pmsg);
I get:
ASSERT_VALID fails with illegal vtable pointer.
--------------------------------
help.
|
|
|
|
|
Found the problem. Right above m_MSGList i declared an array. in the constructor i overwrote the array.
I knew something like that was going on. It just took a coffe break and a fresh start to figure it out.
|
|
|
|
|
Hi
I have an application containing server and client.It is older version and I converted into new version.But one .lib file is missing.The link error I got is
LINK : fatal error LNK1104: cannot open file "D:\pathi\RTDesk\RTdesk\RTdesk\RemoteDesktopViewer_server\debug\zipdbg.lib"
How can I fix this problem and execute the server and client?
Please help me.
Regards
Pathi
Pathi
|
|
|
|
|
The only solution is the obvious one, add the library that is missing.
|
|
|
|
|
But I dont have that library.I got this application from my
friend who got it from net.When I opened it asked for whether to convert it to new version of developer studio and I pressed "ok".When I compiled no problems but getting the error while building.Do I need to change any project seettings or what are the options to remove the error?
Thank you.
Pathi
|
|
|
|
|
Try contacting the author.
|
|
|
|
|
Hi,
I´m trying to show one ActiveX that contains an IPicture that shows an Enhanced metafile...
This don´t works if I have it embedded in Ms Word, any idea why is this ? Does IPicture Render don´t work, when it´s in design mode ? ( DT_METAFILE), I have had even problems with the normal mode
Please help, Thanks !
Braulio
|
|
|
|
|
I've just upgraded from VC++5 on one system to VC++6 on a different system.
Moving a 3-project workspace was painless except that the IDE won't now
remember what files were open & automatically re-open them when I next
restart VisualStudio or re-open the workspace.
I've checked Tools/Options/Workspace tab, and have both "reload last
workspace at startup" and "reload documents when opening workspace" checked,
but only the first of these has any effect.
Any ideas?
|
|
|
|
|
try delete/move all not necessary binaries
(means all opt ncb and similars, except sources, dsp, dsw)
and try again
t!
|
|
|
|
|
I am searching for a way to do a one-to-many data broadcast on internet, but since most routers have digestion problems with UDP broadcast i am looking for alternative. I have encountered multicast, but i dont know how covered is internet with multicast enabled routers...
Does someone know for any alternative? Central server is not an option.
|
|
|
|
|
Hi,
I a beginner VC++ programmer,
What are the step to folow to add a custom control to a dialog ?
thanks
|
|
|
|
|
1. If it's a ActiveX, just select and drag it to dialog
2. If you have a define class of it, add to project.
After that, use functions of this class to create control.;)
Hung Son
|
|
|
|
|
How can display a Bitmap image on FULL screen using MFC ?
Thanks
|
|
|
|
|
GetDC(NULL) will get a DC for the entire screen. You can then draw on to that DC in the normal way.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
How do you make to use derived CListCtrl (for example CListCtrEx) into CListView with CListView::GetListCtrl() call.
|
|
|
|
|
One way is to use CView instead of CListView. Derive a class from CView that has a CListCtrEx as a member variable. Create the CListCtrEx window as a child of the CView window in OnCreate (or OnInitialUpdate) in your CView derived class. Handle OnSize in your CView derived class to resize the CListCtrEx window to the client area of the CView window. Implement GetListCtrl in your CView derived class to return a reference to the CListCtrEx member.
|
|
|
|
|
When I enumerate all my network printers, I also get the Acrobat Distiller, and Microsoft Fax. Is there any way of telling the difference between actual hardware printers, and software versions? Thanks.
Jeremy Davis
http://www.astad.org
|
|
|
|
|
Hi,
I've seen others putting in a sleep statment after a call to CreateThread(). They claim that you need to wait while the thread starts. This sort of makes sense but I can't find anything to confirm this in MSDN. I was wondering what you guys have to say on this subject. Here is what I've seen others do:
thread->CreateThread();
Sleep(750);
thread->PostThreadMessage(UWM_MY_MSG, 0, (LPARAM)info);
Do you need the Sleep statment? In my program it seems to work w/o it but i don't want it to crash when its released. 750 seems like a long time to wait if do have to wait. what is the shortest time you should wait (if you do)?
|
|
|
|
|
I dont think you need the Sleep in between unless you are doing some UI stuff. If so you'd prolly wanna make sure that the window is created and on screen before trying to do fancy stuff on it. But even for that using Sleep is a stupid approach. You can set some kinda event or some other such sync object that you can WaitForSingleObject on
Nish
My miniputt high is now 29
I do not think I can improve on that
My temperament won't hold
www.busterboy.org
|
|
|
|
|
As a rule of thumb, I would use an event object to signal the thread creation at start of ThreadProc, remove the Sleep and use a WaitForSingleObject.
750 ms is too much time to spend in some ocasions. But, if the machine is at 100% CPU, with lots of processes running in a slow machine, it may not be sufficient.
Crivo
Automated Credit Assessment
|
|
|
|
|
Use waitforsingleobject or with the threadID you can Know the status of the Thread, of is is running or not....
But if CreateThread returns valid Handle is because the Thread was created....
Regards...
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Carlos' comment is the way I'd approach it as well - if it returns a valid handle the thread is up and you can post the thread message. Sleep is an extremely bad idea because it's arbitrary timing that leaves you wide open to race conditions in multithreaded apps (and debugging race conditions is less fun than you ever want to have).
If you want to wait until other processing takes place in your thread proc before you post the thread message, then you can use the other technique suggested here of setting an event in the thread proc when you're ready, and using a call of WaitForSingleObject() after your call to CreateThread().
Chistopher Duncan
Author - The Career Programmer: Guerilla Tactics for an Imperfect World (Apress)
|
|
|
|
|
The handle isn't signaled until the thread is terminated, not started.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
Tim Smith wrote:
The handle isn't signaled until the thread is terminated, not started.
Absolutely. I probably didn't word things properly - I had meant that, as Carlos mentioned, that if beginthread returned a valid handle (instead of 0) then the thread proc had started, not that you should block on the handle. In the second example I meant to indicate that you signalled an event in the thread proc (that you created via CreateEvent(), etc.) and blocked on this after creating the thread if you wanted more control.
It's early here, I clearly need more caffeine...
Chistopher Duncan
Author - The Career Programmer: Guerilla Tactics for an Imperfect World (Apress)
|
|
|
|
|
It's early here, I clearly need more caffeine...
LOL, been there, done that.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|