Click here to Skip to main content
15,884,473 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: error C2228: left of '.m_FindNoPlat' must have class/struct/union type ???? Pin
David Crow13-Mar-08 16:23
David Crow13-Mar-08 16:23 
Generalstatic_cast and reinterpret_cast Pin
LCI13-Mar-08 12:06
LCI13-Mar-08 12:06 
GeneralRe: static_cast and reinterpret_cast Pin
Mark Salsbery13-Mar-08 13:29
Mark Salsbery13-Mar-08 13:29 
GeneralRe: static_cast and reinterpret_cast Pin
Peter Weyzen13-Mar-08 13:57
Peter Weyzen13-Mar-08 13:57 
GeneralRe: static_cast and reinterpret_cast Pin
Eytukan13-Mar-08 16:11
Eytukan13-Mar-08 16:11 
GeneralRe: static_cast and reinterpret_cast Pin
LCI14-Mar-08 2:32
LCI14-Mar-08 2:32 
QuestionRe: static_cast and reinterpret_cast Pin
Rajkumar R14-Mar-08 3:02
Rajkumar R14-Mar-08 3:02 
GeneralRe: static_cast and reinterpret_cast Pin
LCI14-Mar-08 5:05
LCI14-Mar-08 5:05 
Here is what i have:
The app freezes in Class B which is a dll. I know that there is something
wrong with the parameter that the thread is receiving in that dll, but i cannot figure it out.

ClassA
{
CWinThread* pThreadA[3] = {NULL};
CClassA::BeginAllThreads()
{
CClassC* pApp = reinterpret_cast<cclassc*>(AfxGetApp());

if (NULL == pThreadA[i])
{
pThreadA[i] = AfxBeginThread(ThreadGetOne,
(LPVOID)pApp->m_arrPtr[i],
THREAD_PRIORITY_NORMAL,
0,
CREATE_SUSPENDED,
NULL);
pThreadA[i]->m_AutoDelete = FALSE;
pThreadA[i]->ResumeThread();

pApp->arrPtr[i]->StartThread();
}

}
void ThreadGetOne(LPVOID pVoid)
{

CClassB* pPointer = (CClassB*)pVoid
while (TRUE)
{
pPointer->Readport();
}

}


}
//This is a .dll
ClassB
{

void CClassB::StartThread()
{
_beginthread(MYBThread, 0, LPVOID(this));
}

void MYBThread(void* pVoid)
{
CClassB* pPointer = static_cast<cclassb*>(pVoid);
while (pPointer->IsOn()) //HERE IS WHERE THE APP Freezes
{
//do something

}
_endthread();

}

}

ClassC
{

CClassB* m_arrPtr[3];




}
GeneralRe: static_cast and reinterpret_cast Pin
Rajkumar R15-Mar-08 18:59
Rajkumar R15-Mar-08 18:59 
GeneralRe: static_cast and reinterpret_cast Pin
LCI17-Mar-08 2:09
LCI17-Mar-08 2:09 
QuestionRe: static_cast and reinterpret_cast Pin
Rajkumar R17-Mar-08 4:17
Rajkumar R17-Mar-08 4:17 
GeneralRe: static_cast and reinterpret_cast Pin
LCI17-Mar-08 4:30
LCI17-Mar-08 4:30 
QuestionIdentify 32 bit binary or 64 bit binary Pin
tingu13-Mar-08 9:03
tingu13-Mar-08 9:03 
GeneralRe: Identify 32 bit binary or 64 bit binary Pin
led mike13-Mar-08 9:15
led mike13-Mar-08 9:15 
GeneralRe: Identify 32 bit binary or 64 bit binary Pin
ThatsAlok13-Mar-08 19:56
ThatsAlok13-Mar-08 19:56 
GeneralRe: Identify 32 bit binary or 64 bit binary Pin
led mike14-Mar-08 6:44
led mike14-Mar-08 6:44 
GeneralRe: Identify 32 bit binary or 64 bit binary Pin
Mark Salsbery13-Mar-08 9:16
Mark Salsbery13-Mar-08 9:16 
GeneralRe: Identify 32 bit binary or 64 bit binary Pin
led mike13-Mar-08 10:21
led mike13-Mar-08 10:21 
GeneralRe: Identify 32 bit binary or 64 bit binary Pin
Mark Salsbery13-Mar-08 10:39
Mark Salsbery13-Mar-08 10:39 
GeneralRe: Identify 32 bit binary or 64 bit binary [modified] Pin
Randor 13-Mar-08 10:25
professional Randor 13-Mar-08 10:25 
GeneralRe: Identify 32 bit binary or 64 bit binary Pin
led mike13-Mar-08 10:33
led mike13-Mar-08 10:33 
GeneralRe: Identify 32 bit binary or 64 bit binary Pin
Randor 13-Mar-08 10:38
professional Randor 13-Mar-08 10:38 
GeneralRe: Identify 32 bit binary or 64 bit binary Pin
ThatsAlok13-Mar-08 19:58
ThatsAlok13-Mar-08 19:58 
GeneralRe: Identify 32 bit binary or 64 bit binary Pin
Rajkumar R14-Mar-08 3:05
Rajkumar R14-Mar-08 3:05 
GeneralRe: Identify 32 bit binary or 64 bit binary Pin
tingu13-Mar-08 11:14
tingu13-Mar-08 11:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.