Can anyone tell me why i reach the breakpoint on the int dummy = 1 row?
I had thought that it would be impossible (thats why I put the critical section stuff there, without it my app crashes)
I had thought that it would be impossible (thats why I put the critical section stuff there, without it my app crashes)
Code:
[color=white]//I do this line in OnInitApp[/color]
[color=white]::InitializeCriticalSection( &g_closedoc_lock );[/color]
[color=white]// This is done in another procedure[/color]
[color=white]::EnterCriticalSection(&g_closedoc_lock);[/color]
[color=white]static int iInCloseCount = 0;[/color]
[color=white]if(iInCloseCount > 0)[/color]
[color=white] int dummy = 1; // I reach a breakpoint here... [/color]
[color=white]iInCloseCount++;[/color]
[color=white]// Some other stuff is done here, but the lock or the static isn't[/color]
[color=white]// accessed in any other place in the app...[/color]
[color=white]iInCloseCount--;[/color]
[color=white]::LeaveCriticalSection(&g_closedoc_lock);[/color]