|
Is the DLL being loaded an MFC extenbsion DLL? If so, are AfxInitExtensionModule() and AfxTermExtensionModule() being used?
danielsdl wrote:
File appcore.cpp
Line 85
does anyone know what it means?
Have you set a breakpoint on line 85 of appcore.cpp to see why the assertion is firing?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Debug -vs- Release?
Make sure the dll and the executable are compiled for the same type.
Brad Bruce
|
|
|
|
|
Thank u guys... the problem was that I declared a pointer as a member of my class inside my dll, I dont know why, it doesnt work when u have a pointer variable...
|
|
|
|
|
if i want to implement a firewall with windows apis for
processing each input/output packet please introduce me that apis (if there is)
koosha
|
|
|
|
|
|
First some details:
Our application receives a data feed over a fiber optic T1. We develop both the client and server applications that send and receive the data. Both applications are written in ANSII C++ for portability. We use Winsock when running on a Windows platform.
The problem:
Sometimes the T1 line experiences 25% loss according to the ping tool. During these times we often see our connection from client to server disconnect with an error 10054 (An existing connection was forcibly closed by the remote host.). Is there anything we can do, programatically, to avoid connection loss or to quickly recover from the connection loss?
Thanks in advance
|
|
|
|
|
Hi
is it dangerous to have many threads read one shared variable/object without using any synchronization mechanisms?
(read only)
this variable can be a static or a regular member of a class...
|
|
|
|
|
You are not changing anywhere this variable?
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
no
just a global variable that i set before i begin any threads..
after threads begin..they just need to read the variable/object.
|
|
|
|
|
And in the object, are they changing any data concurently?
Or its just read read situation?
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
a read read situation..
just in case that i change any data .. i use make synchronization inside the function that make the change.
|
|
|
|
|
Shouldn't have a problem.
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
thanks..
just wanted to make sure
|
|
|
|
|
If there is any chance that some threads might be READING the data while others are changing it EVER, then you will have trouble unless you synchorize the readers ALONG with the writers.
If the data is only written before any of your reader threads start up, you are safe.
|
|
|
|
|
I can't get Chris Maunder's grid control to work. Get this:
Linking...
GridCtrl.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall CTitleTip::~CTitleTip(void)" (??1CTitleTip@@UAE@XZ) referenced in function __unwindfunclet$??0CGridCtrl@@QAE@HHHH@Z$0
GridCtrl.obj : error LNK2019: unresolved external symbol "public: __thiscall CTitleTip::CTitleTip(void)" (??0CTitleTip@@QAE@XZ) referenced in function "public: __thiscall CGridCtrl::CGridCtrl(int,int,int,int)" (??0CGridCtrl@@QAE@HHHH@Z)
GridCtrl.obj : error LNK2019: unresolved external symbol "public: void __thiscall CTitleTip::Hide(void)" (?Hide@CTitleTip@@QAEXXZ) referenced in function "protected: void __thiscall CGridCtrl::OnHScroll(unsigned int,unsigned int,class CScrollBar *)" (?OnHScroll@CGridCtrl@@IAEXIIPAVCScrollBar@@@Z)
GridCtrl.obj : error LNK2019: unresolved external symbol "public: void __thiscall CTitleTip::Show(class CRect,char const *,int,struct tagRECT *,struct tagLOGFONTA const *,unsigned long,unsigned long)" (?Show@CTitleTip@@QAEXVCRect@@PBDHPAUtagRECT@@PBUtagLOGFONTA@@KK@Z) referenced in function "protected: void __thiscall CGridCtrl::OnMouseMove(unsigned int,class CPoint)" (?OnMouseMove@CGridCtrl@@IAEXIVCPoint@@@Z)
Debug/gc.exe : fatal error LNK1120: 4 unresolved externals
Help!!!!!!!!!1
|
|
|
|
|
Seems like a file is missing from the project
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I've used the AfxbeginThread function before with a global function, but is there a way I can use it with a member function of the object it's operating in? When I try to use it here, I get the following error message:
error C2665: 'AfxBeginThread' : none of the 2 overloads can convert parameter 1 from type 'UINT (LPVOID)'
and here is the function declaration:
UINT Parse( LPVOID pParam );
If it's broken, I probably did it
bdiamond
|
|
|
|
|
declare it as a static function
A member function has a thiscall convention, so it has an additional this parameter passed.
When you declare it static this wont be passed anymore, thus fixing your problem
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
thanks!! just what I needed!
If it's broken, I probably did it
bdiamond
|
|
|
|
|
that was what I needed, but now I get errors because I tried to call a non-static member function within the procedure,(BeginWaitCursor), but there's also other ones.
If it's broken, I probably did it
bdiamond
|
|
|
|
|
Several options:
1. Pass this into the parameter to the thread and call the functions
2. Send a message to the original window and handle them
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I got it!! What I did was pass the 'this' pointer as the LPVOID argument and cast it to a pointer of the type of my dialog class, then use that pointer to reference the controls and member variables. Thanks!!
If it's broken, I probably did it
bdiamond
|
|
|
|
|
I can #include <vector> in the header file for a class I've created, but I can't put a vector<cstring> declaration in my header file. I figured I needed the stuff from stdafx.h in my header file also, so I tried to #include that in my header file instead of the .cpp file, but I get an error telling me that there was an error looking for the precompiled header directive. How can I use vector properly in my class?
If it's broken, I probably did it
bdiamond
|
|
|
|
|
<small><b>bdiamond wrote:</b></small>
<i>ForumVisual C++
Subject:Re: vector problem
Sender:bdiamond
Date:11:19 1 Jun '04
I can #include in the header file for a class I've created, but I can't put a vector declaration in my header file</i>
?? Why not?
You can put in yourheader.h
#include <vector>
using namespace std;
class CFish
{
public:
vector<int> m_nIntVec;
};
and it works quite happly.
<small><b>bdiamond wrote:</b></small>
<i>I figured I needed the stuff from stdafx.h in my header file also</i>
No. Never include stdafx.h in a header. include stdafx.h should always be the first include in a .CPP and any other includes that follow will have stdafx.h already included.
|
|
|
|
|
I forgot the 'using' directive. thanks!!!
If it's broken, I probably did it
bdiamond
|
|
|
|