Click here to Skip to main content
14,114,975 members

C / C++ / MFC

 
GeneralRe: error: expected unqualified-id before numeric constant Pin
Richard MacCutchan23-Apr-18 6:42
protectorRichard MacCutchan23-Apr-18 6:42 
GeneralRe: error: expected unqualified-id before numeric constant Pin
Vaclav_23-Apr-18 8:11
memberVaclav_23-Apr-18 8:11 
GeneralRe: error: expected unqualified-id before numeric constant Pin
Vaclav_23-Apr-18 13:36
memberVaclav_23-Apr-18 13:36 
GeneralRe: error: expected unqualified-id before numeric constant Pin
Richard MacCutchan23-Apr-18 21:05
protectorRichard MacCutchan23-Apr-18 21:05 
GeneralRe: error: expected unqualified-id before numeric constant Pin
Vaclav_25-Apr-18 3:42
memberVaclav_25-Apr-18 3:42 
GeneralRe: error: expected unqualified-id before numeric constant Pin
Richard MacCutchan25-Apr-18 4:59
protectorRichard MacCutchan25-Apr-18 4:59 
QuestionObtaining a COM pointer in a C # ActiveX control inside an MFC ActiveX control Pin
SoulToMind20-Apr-18 20:48
memberSoulToMind20-Apr-18 20:48 
QuestionError when printing Pin
Erich Ruth20-Apr-18 5:51
memberErich Ruth20-Apr-18 5:51 
I have a small program. I compile the executable. If I find the executable
and double click on it, everything works fine. I can print, print preview; all is
well.

If within visual studio I hit the green triangle to run the executable and then I
try to print or print preview, I get an error in this code:

inline void* CThreadSlotData::GetThreadValue(int nSlot)
{
EnterCriticalSection(&m_sect);
ASSERT(nSlot != 0 && nSlot < m_nMax);
ASSERT(m_pSlotData != NULL);
ASSERT(m_pSlotData[nSlot].dwFlags & SLOT_USED);
ASSERT(m_tlsIndex != (DWORD)-1);
if( nSlot <= 0 || nSlot >= m_nMax ) // check for retail builds.
{
LeaveCriticalSection(&m_sect);
return NULL;
}

CThreadData* pData = (CThreadData*)TlsGetValue(m_tlsIndex);
if (pData == NULL || nSlot >= pData->nCount)
{
LeaveCriticalSection(&m_sect);
return NULL;
}
void* pRetVal = pData->pData[nSlot];
LeaveCriticalSection(&m_sect);
return pRetVal;
}

It breaks at LeaveCriticalSection(). Im really perplexed as to why this error has arisen
and what to do to get it to go away. If you have any insight, please let me know.
Rant[REPOST] Error when printing Pin
Richard Deeming20-Apr-18 6:01
mveRichard Deeming20-Apr-18 6:01 
GeneralRe: [REPOST] Error when printing Pin
Victor Nijegorodov20-Apr-18 6:48
memberVictor Nijegorodov20-Apr-18 6:48 
QuestionRe: Error when printing Pin
David Crow20-Apr-18 6:12
memberDavid Crow20-Apr-18 6:12 
AnswerRe: Error when printing Pin
Erich Ruth20-Apr-18 7:49
memberErich Ruth20-Apr-18 7:49 
AnswerRe: Error when printing Pin
Randor 20-Apr-18 20:26
professional Randor 20-Apr-18 20:26 
QuestionHow to use constructor list passing an array Pin
Vaclav_20-Apr-18 5:45
memberVaclav_20-Apr-18 5:45 
AnswerRe: How to use constructor list passing an array Pin
Victor Nijegorodov20-Apr-18 6:45
memberVictor Nijegorodov20-Apr-18 6:45 
GeneralRe: How to use constructor list passing an array Pin
Vaclav_20-Apr-18 8:45
memberVaclav_20-Apr-18 8:45 
GeneralRe: How to use constructor list passing an array Pin
Victor Nijegorodov20-Apr-18 11:13
memberVictor Nijegorodov20-Apr-18 11:13 
GeneralRe: How to use constructor list passing an array Pin
Vaclav_20-Apr-18 11:25
memberVaclav_20-Apr-18 11:25 
Questionlinking issue Pin
tasumisra16-Apr-18 6:51
membertasumisra16-Apr-18 6:51 
AnswerRe: linking issue Pin
Victor Nijegorodov16-Apr-18 21:39
memberVictor Nijegorodov16-Apr-18 21:39 
AnswerRe: linking issue Pin
Richard MacCutchan17-Apr-18 0:33
protectorRichard MacCutchan17-Apr-18 0:33 
QuestionHow to write more that ONE data byte into ioctl file? Pin
Vaclav_11-Apr-18 14:47
memberVaclav_11-Apr-18 14:47 
AnswerRe: How to write more that ONE data byte into ioctl file? Pin
Richard MacCutchan11-Apr-18 21:26
protectorRichard MacCutchan11-Apr-18 21:26 
AnswerRe: How to write more that ONE data byte into ioctl file? Pin
Victor Nijegorodov11-Apr-18 22:06
memberVictor Nijegorodov11-Apr-18 22:06 
AnswerRe: How to write more that ONE data byte into ioctl file? Pin
Jochen Arndt11-Apr-18 22:18
mveJochen Arndt11-Apr-18 22:18 

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.


Advertise | Privacy | Cookies | Terms of Service
Web01 | 2.8.190518.1 | Last Updated 20 May 2019
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid