Click here to Skip to main content
15,902,939 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: security problem in asp.net Pin
Colin Angus Mackay10-Apr-09 2:48
Colin Angus Mackay10-Apr-09 2:48 
Questionhello Pin
mohamedmrc9-Apr-09 10:02
mohamedmrc9-Apr-09 10:02 
AnswerRe: hello Pin
Eddy Vluggen9-Apr-09 10:47
professionalEddy Vluggen9-Apr-09 10:47 
AnswerRe: hello Pin
led mike9-Apr-09 10:56
led mike9-Apr-09 10:56 
GeneralRe: hello Pin
Pete O'Hanlon12-Apr-09 11:03
mvePete O'Hanlon12-Apr-09 11:03 
QuestionSafe thread termination in unmanaged code Pin
supercat99-Apr-09 8:06
supercat99-Apr-09 8:06 
AnswerRe: Safe thread termination in unmanaged code Pin
led mike9-Apr-09 9:10
led mike9-Apr-09 9:10 
GeneralRe: Safe thread termination in unmanaged code Pin
supercat99-Apr-09 9:44
supercat99-Apr-09 9:44 
Hi again, welcome to CodeProject. Let me just warn you that many of the regular members here will tend to flame on people who are obviously not reading the documentation.

It states that it is a dangerous function that should only be used in extreme cases. I can certainly appreciate that many bad things can happen if it is done on managed code or code which uses the Windows API. My situation is a bit different from the usual one, though, and I was wondering whether anyone had done anything similar.

I'm writing code for a microcontroller with a few kbytes of RAM and a few dozen kbytes of code. For testing purposes, I would like to be able to run the code on a Windows machine, replacing the physical I/O routines with calls to wrapper functions which would call back into managed code that would simulate the I/O in question. If every call to a wrapper function checks for a "terminate, please" flag, then any loop which calls any of the wrapper functions will exit once the flag in question is set, but there's no guarantee of when that will actually take place. If something goes wrong in the target system code, such callbacks might never take place.

Since the target application shouldn't get stuck in such a loop, it probably wouldn't be the end of the world to require that someone use ctrl-alt-del and kill the non-responsive application, but that would seem more dangerous than having the application terminate the stuck thread, especially since the application might be doing things on other threads that should not be blindly terminated.
GeneralRe: Safe thread termination in unmanaged code Pin
led mike9-Apr-09 10:55
led mike9-Apr-09 10:55 
GeneralRe: Safe thread termination in unmanaged code Pin
supercat99-Apr-09 11:43
supercat99-Apr-09 11:43 
GeneralRe: Safe thread termination in unmanaged code Pin
Luc 64801110-Apr-09 2:57
Luc 64801110-Apr-09 2:57 
GeneralRe: Safe thread termination in unmanaged code Pin
led mike10-Apr-09 5:37
led mike10-Apr-09 5:37 
Questionam i a programmer or not [modified] Pin
rilm9-Apr-09 7:48
rilm9-Apr-09 7:48 
AnswerRe: am i a programmer or not Pin
Paulo Zemek9-Apr-09 8:19
Paulo Zemek9-Apr-09 8:19 
GeneralRe: am i a programmer or not Pin
led mike9-Apr-09 8:41
led mike9-Apr-09 8:41 
GeneralRe: am i a programmer or not Pin
dojohansen15-Apr-09 1:40
dojohansen15-Apr-09 1:40 
GeneralRe: am i a programmer or not Pin
led mike15-Apr-09 11:49
led mike15-Apr-09 11:49 
GeneralRe: am i a programmer or not Pin
dojohansen16-Apr-09 0:44
dojohansen16-Apr-09 0:44 
GeneralRe: am i a programmer or not Pin
led mike16-Apr-09 5:18
led mike16-Apr-09 5:18 
GeneralRe: am i a programmer or not Pin
dojohansen16-Apr-09 5:29
dojohansen16-Apr-09 5:29 
GeneralRe: am i a programmer or not Pin
led mike16-Apr-09 7:30
led mike16-Apr-09 7:30 
AnswerRe: am i a programmer or not Pin
led mike9-Apr-09 8:43
led mike9-Apr-09 8:43 
GeneralRe: am i a programmer or not Pin
rilm11-Apr-09 11:22
rilm11-Apr-09 11:22 
AnswerRe: am i a programmer or not Pin
Eddy Vluggen9-Apr-09 10:03
professionalEddy Vluggen9-Apr-09 10:03 
AnswerRe: am i a programmer or not Pin
Anubhava Dimri10-Apr-09 23:24
Anubhava Dimri10-Apr-09 23:24 

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.