Click here to Skip to main content
15,900,714 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Error while executing program Pin
SzyKam14-Sep-06 12:38
SzyKam14-Sep-06 12:38 
GeneralRe: Error while executing program Pin
Wes Aday14-Sep-06 16:31
professionalWes Aday14-Sep-06 16:31 
AnswerRe: Error while executing program Pin
Christian Graus14-Sep-06 13:51
protectorChristian Graus14-Sep-06 13:51 
GeneralRe: Error while executing program Pin
SzyKam14-Sep-06 23:08
SzyKam14-Sep-06 23:08 
QuestionWaiting on a handle that's closed before signaling Pin
Federico Milano14-Sep-06 8:33
Federico Milano14-Sep-06 8:33 
AnswerRe: Waiting on a handle that's closed before signaling Pin
Joe Woodbury14-Sep-06 9:05
professionalJoe Woodbury14-Sep-06 9:05 
AnswerRe: Waiting on a handle that's closed before signaling Pin
Steve S14-Sep-06 22:59
Steve S14-Sep-06 22:59 
QuestionA strange debug error Pin
Waldermort14-Sep-06 8:21
Waldermort14-Sep-06 8:21 
This one is a first for me.

"The value of ESP was not properly saved across a function call"

It's happening on a timer callback function I have placed in a base class, and it only occurs when I declare the non-static member as virtual. Here is the code
void *CSpecialFx::thisPtr;

CSpecialFx::CSpecialFx()
{
	thisPtr = this;
	uTimerId = SetTimer(0,0,30,(TIMERPROC)StaticProc);
}

CSpecialFx::~CSpecialFx()
{
	KillTimer(0,uTimerId);
}

VOID CALLBACK CSpecialFx::TimerProc(HWND hwnd,UINT uMsg,UINT_PTR idEvent,DWORD dwTime)
{
	static int i = 0;
	i++;
}

VOID CALLBACK CSpecialFx::StaticProc(HWND hwnd,UINT uMsg,UINT_PTR idEvent,DWORD dwTime)
{
	CSpecialFx *tmp = (CSpecialFx*)thisPtr;
	tmp->TimerProc(hwnd,uMsg,idEvent,dwTime);
}

The code runs for a few seconds, but it never steps into the virtual callback. The error also goes on to mention the calling conventions being a probable cause. What did I miss?
AnswerRe: A strange debug error Pin
PJ Arends14-Sep-06 8:31
professionalPJ Arends14-Sep-06 8:31 
GeneralRe: A strange debug error Pin
Waldermort14-Sep-06 8:35
Waldermort14-Sep-06 8:35 
GeneralRe: A strange debug error Pin
Waldermort14-Sep-06 8:50
Waldermort14-Sep-06 8:50 
GeneralRe: A strange debug error Pin
PJ Arends14-Sep-06 9:03
professionalPJ Arends14-Sep-06 9:03 
GeneralRe: A strange debug error Pin
Waldermort14-Sep-06 9:11
Waldermort14-Sep-06 9:11 
GeneralRe: A strange debug error Pin
Zac Howland14-Sep-06 9:36
Zac Howland14-Sep-06 9:36 
QuestionRe: A strange debug error Pin
David Crow14-Sep-06 8:50
David Crow14-Sep-06 8:50 
QuestionAdding a childwindow to an application other than my own Pin
beeejay14-Sep-06 7:48
beeejay14-Sep-06 7:48 
AnswerRe: Adding a childwindow to an application other than my own Pin
Hamid_RT15-Sep-06 7:20
Hamid_RT15-Sep-06 7:20 
QuestionATL Control Pin
Demian Panello14-Sep-06 6:21
Demian Panello14-Sep-06 6:21 
QuestionFormat Issue On Console Output From Text File !!! New To C++ Pin
Mark_Murphy14-Sep-06 6:20
Mark_Murphy14-Sep-06 6:20 
AnswerRe: Format Issue On Console Output From Text File !!! New To C++ Pin
Zac Howland14-Sep-06 7:41
Zac Howland14-Sep-06 7:41 
GeneralRe: Format Issue On Console Output From Text File !!! New To C++ Pin
Mark_Murphy14-Sep-06 8:24
Mark_Murphy14-Sep-06 8:24 
GeneralRe: Format Issue On Console Output From Text File !!! New To C++ Pin
Zac Howland14-Sep-06 9:05
Zac Howland14-Sep-06 9:05 
AnswerRe: Format Issue On Console Output From Text File !!! New To C++ Pin
Eric Dahlvang14-Sep-06 8:20
Eric Dahlvang14-Sep-06 8:20 
GeneralRe: Format Issue On Console Output From Text File !!! New To C++ Pin
Mark_Murphy14-Sep-06 8:29
Mark_Murphy14-Sep-06 8:29 
GeneralRe: Format Issue On Console Output From Text File !!! New To C++ Pin
Mark_Murphy14-Sep-06 9:09
Mark_Murphy14-Sep-06 9:09 

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.