Click here to Skip to main content
15,888,351 members
Home / Discussions / C#
   

C#

 
GeneralRe: Anonymous functions ? Pin
Mohammad Dayyan14-Jul-08 2:49
Mohammad Dayyan14-Jul-08 2:49 
GeneralRe: Anonymous functions ? Pin
Vimalsoft(Pty) Ltd14-Jul-08 2:53
professionalVimalsoft(Pty) Ltd14-Jul-08 2:53 
QuestionUserControl Pin
nelsonpaixao13-Jul-08 13:25
nelsonpaixao13-Jul-08 13:25 
QuestionInsert image to mysql using c# Pin
SHINOJK13-Jul-08 12:33
SHINOJK13-Jul-08 12:33 
AnswerRe: Insert image to mysql using c# Pin
Vimalsoft(Pty) Ltd13-Jul-08 15:31
professionalVimalsoft(Pty) Ltd13-Jul-08 15:31 
Questionhow to change icon size on the desktop? Pin
isso8713-Jul-08 9:29
isso8713-Jul-08 9:29 
AnswerRe: how to change icon size on the desktop? Pin
DaveyM6913-Jul-08 14:29
professionalDaveyM6913-Jul-08 14:29 
QuestionHandling COM object with an infinite loop Pin
Vitaly Belman13-Jul-08 9:25
Vitaly Belman13-Jul-08 9:25 
I am writing a code to test a COM object and one of its functions has an infinite loop.
Basically my code should run this COM object function in a different thread, give it some time to finish but if it doesn't, terminate it.

However, I encountered the following problems:
1) Thread.Abort wouldn't abort the thread because you can't use .NET Thread.Abort to abort unmanaged code.
2) AppDomain.Unload wouldn't do anything because it tries to abort all the threads.
3) I tried using Marashal.ReleaseComObject and it resulted with:
"An attempt has been made to free an RCW that is in use. The RCW is in use on the active thread or another thread. Attempting to free an in-use RCW can cause corruption or data loss."

By now the only current options I see is either using somehow the original Windows API to abort the thread or create a process especially to test the function. Both methods seem like a lot of overkill for what I'm trying to do.

Anyone has any ideas?

Suspicious | :suss: Vitaly Belman Suspicious | :suss:

AnswerRe: Handling COM object with an infinite loop Pin
Alan Balkany14-Jul-08 4:49
Alan Balkany14-Jul-08 4:49 
AnswerRe: Handling COM object with an infinite loop Pin
Frank Horn14-Jul-08 9:28
Frank Horn14-Jul-08 9:28 
QuestionPassing mouse events over to the parent Pin
-Dy13-Jul-08 8:27
-Dy13-Jul-08 8:27 
AnswerRe: Passing mouse events over to the parent Pin
Luc Pattyn13-Jul-08 9:09
sitebuilderLuc Pattyn13-Jul-08 9:09 
GeneralRe: Passing mouse events over to the parent Pin
-Dy13-Jul-08 11:00
-Dy13-Jul-08 11:00 
GeneralRe: Passing mouse events over to the parent Pin
Frank Horn14-Jul-08 9:39
Frank Horn14-Jul-08 9:39 
QuestionC# vs Java Exception messages Pin
DwR13-Jul-08 5:40
DwR13-Jul-08 5:40 
AnswerRe: C# vs Java Exception messages Pin
Scott Dorman13-Jul-08 6:24
professionalScott Dorman13-Jul-08 6:24 
AnswerRe: C# vs Java Exception messages Pin
Vimalsoft(Pty) Ltd13-Jul-08 15:34
professionalVimalsoft(Pty) Ltd13-Jul-08 15:34 
QuestionGet information about serval given keys is pressed? Pin
panyl13-Jul-08 2:09
panyl13-Jul-08 2:09 
AnswerRe: Get information about serval given keys is pressed? Pin
Guffa13-Jul-08 9:16
Guffa13-Jul-08 9:16 
GeneralRe: Get information about serval given keys is pressed? Pin
panyl13-Jul-08 17:34
panyl13-Jul-08 17:34 
GeneralRe: Get information about serval given keys is pressed? Pin
Luc Pattyn13-Jul-08 18:19
sitebuilderLuc Pattyn13-Jul-08 18:19 
QuestionComboBox Driven DataView FIlter Building Pin
Jammer13-Jul-08 0:54
Jammer13-Jul-08 0:54 
Questionhow to select specific row in DataGrid Pin
Metik13-Jul-08 0:05
Metik13-Jul-08 0:05 
AnswerRe: how to select specific row in DataGrid Pin
panyl13-Jul-08 2:26
panyl13-Jul-08 2:26 
AnswerRe: how to select specific row in DataGrid Pin
Vimalsoft(Pty) Ltd14-Jul-08 5:10
professionalVimalsoft(Pty) Ltd14-Jul-08 5:10 

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.