Click here to Skip to main content
16,012,198 members
Home / Discussions / C#
   

C#

 
GeneralRe: GDI+ drawing onto picturebox Pin
Heath Stewart20-Oct-04 9:51
protectorHeath Stewart20-Oct-04 9:51 
Generalderivation question Pin
3Dizard20-Oct-04 5:33
3Dizard20-Oct-04 5:33 
GeneralRe: derivation question Pin
Heath Stewart20-Oct-04 6:32
protectorHeath Stewart20-Oct-04 6:32 
GeneralRe: derivation question Pin
J4amieC20-Oct-04 22:41
J4amieC20-Oct-04 22:41 
GeneralRe: derivation question Pin
Heath Stewart21-Oct-04 6:27
protectorHeath Stewart21-Oct-04 6:27 
GeneralC# COM Interop Pin
koch.david20-Oct-04 5:03
koch.david20-Oct-04 5:03 
GeneralRe: C# COM Interop Pin
Heath Stewart20-Oct-04 5:50
protectorHeath Stewart20-Oct-04 5:50 
GeneralRe: C# COM Interop Pin
koch.david21-Oct-04 1:27
koch.david21-Oct-04 1:27 
At first: Tanks for this Information,

The COM-Server is a STA Server but I can use only one Apartment at the same time, because the Server needs very mutch Performance.
So the problem is not to start a new Thread. (The invoke command is very nice) At the moment I sent the next command in a other Tread too, but it starts like this:

SentCommand wrapper=new SentCommand(Thread.CurrentThread,myobject);<br />
ThreadStart ts=new ThreadStart(wrapper.SentNewCommand);<br />
Thread SecondThread = new Thread(ts);<br />
SecondThread.Start();


The real Problem is the speed of the second Thread. When I start the second Thread from the Callback-Tread both Thread exist at the same Time. So if the Second Thread is too fast and sent the new command before the Callback-tread is closed -> it crashes. So I think its not important if the Second-Thread is a new one or a existing GUI-Tread (Control).

I tried to synchronise this 2 Treads like this:

if (CallbackThread != null) <br />
{<br />
        if (CallbackThread.IsAlive)<br />
	{<br />
		CallbackThread.Abort();<br />
		//SinkThread.Suspend();<br />
		//SinkThread.Join();<br />
	}<br />
}


but it doesn’t work.
GeneralRe: C# COM Interop Pin
Heath Stewart21-Oct-04 6:18
protectorHeath Stewart21-Oct-04 6:18 
GeneralTAPI Pin
rpussewela20-Oct-04 2:45
rpussewela20-Oct-04 2:45 
GeneralRe: TAPI Pin
Dave Kreskowiak20-Oct-04 2:54
mveDave Kreskowiak20-Oct-04 2:54 
GeneralMDI closing a child form Pin
Jonckheere20-Oct-04 1:50
Jonckheere20-Oct-04 1:50 
GeneralRe: MDI closing a child form Pin
benjymous20-Oct-04 3:05
benjymous20-Oct-04 3:05 
GeneralRe: MDI closing a child form Pin
Jonckheere20-Oct-04 3:24
Jonckheere20-Oct-04 3:24 
GeneralRe: MDI closing a child form Pin
benjymous20-Oct-04 3:42
benjymous20-Oct-04 3:42 
GeneralRe: MDI closing a child form Pin
Jonckheere21-Oct-04 3:47
Jonckheere21-Oct-04 3:47 
GeneralRe: MDI closing a child form Pin
Luis Alonso Ramos21-Oct-04 9:08
Luis Alonso Ramos21-Oct-04 9:08 
Generalbackground application Pin
ppp00120-Oct-04 1:31
ppp00120-Oct-04 1:31 
GeneralRe: background application Pin
manivannan.p20-Oct-04 4:42
manivannan.p20-Oct-04 4:42 
GeneralSending Message to all clients Pin
Zapss20-Oct-04 1:23
Zapss20-Oct-04 1:23 
GeneralRe: Sending Message to all clients Pin
Heath Stewart20-Oct-04 6:27
protectorHeath Stewart20-Oct-04 6:27 
GeneralRe: Sending Message to all clients Pin
Zapss20-Oct-04 20:25
Zapss20-Oct-04 20:25 
Generalenabling log4net Pin
samithas20-Oct-04 0:56
samithas20-Oct-04 0:56 
GeneralRe: enabling log4net Pin
Steve Maier20-Oct-04 4:54
professionalSteve Maier20-Oct-04 4:54 
GeneralRe: enabling log4net Pin
samithas21-Oct-04 17:08
samithas21-Oct-04 17:08 

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.