Click here to Skip to main content
15,867,851 members

Comments by Indivara (Top 200 by date)

Indivara 16-Dec-12 23:03pm View    
Posting job offers here is inappropriate. Please delete this.
Indivara 24-May-12 8:41am View    
You've got the wrong impression, there was no disrespect whatsoever. I was merely stating the fact that your comment didn't answer what I asked. Thanks for taking the time and trouble. I assumed you intended to post the following code

void function()
{
flag = 1; // this is global
while (flag); // this waits for another thread to clear it

// do something here
}

In my case, it is GetModuleHandle's behavior that I was not sure about.
Indivara 24-May-12 5:35am View    
Yes, of course, this is *inside* the DLL, so it doesn't get called in the first place unless the DLL itself is loaded.
Indivara 24-May-12 5:34am View    
Your code misses the point. (BTW global_variable's value is undefined on entry, so it may or may not enter the loop in the first place. I suppose you meant to initialize it before the loop?)

The code I posted has a potential infinite loop, and I was not clear on what MSDN doesn't say...
Indivara 23-May-12 18:56pm View    
You mean if two threads call it simultaneously, only one will succeed?