Click here to Skip to main content
16,005,120 members
Home / Discussions / C#
   

C#

 
GeneralRe: proxy pass https question Pin
steven shingler29-Jun-04 6:58
steven shingler29-Jun-04 6:58 
GeneralRe: proxy pass https question Pin
Heath Stewart29-Jun-04 8:45
protectorHeath Stewart29-Jun-04 8:45 
GeneralEvent Order Processing Problem Pin
Gazy26-Jun-04 5:48
Gazy26-Jun-04 5:48 
GeneralRe: Event Order Processing Problem Pin
Heath Stewart26-Jun-04 14:37
protectorHeath Stewart26-Jun-04 14:37 
Generalproblem with threads Pin
Ravikumar_mv26-Jun-04 3:47
Ravikumar_mv26-Jun-04 3:47 
GeneralRe: problem with threads Pin
Stefan Troschuetz26-Jun-04 12:27
Stefan Troschuetz26-Jun-04 12:27 
GeneralRe: problem with threads Pin
Ravikumar_mv27-Jun-04 18:19
Ravikumar_mv27-Jun-04 18:19 
GeneralASerial Communication Pin
ahmed mohamed abdelhameed26-Jun-04 0:14
ahmed mohamed abdelhameed26-Jun-04 0:14 
I want to break the API function (waitcommevent)
where I'm waiting data which i expect to receive.
the waitcommevent function is operating in a thread.
after a specific time if there's no data comes i make
thread.abort() methode to exit the thread.
but the waitcommevent is still hanging up the com
so when i try to close the com i can't.
so first I want to break the waitcommevent but i can't.


th1 = new Thread(new ThreadStart (loop));
timer1.Enabled = true ;
th1.Start() ;


void loop ()
{
while (true)
{
err = WaitCommEvent (handle,this.evPtr,IntPtr.Zero);
if (err==false)
{
error = Marshal.GetLastWin32Error() ;
if (error == ERROR_IO_PENDING) MessageBox.Show("ERROR_IO_PENDING"); else MessageBox.Show(error.ToString()) ;
}
else
{
this.getMask = (uint) Marshal.ReadInt32(this.evPtr);
if ( (getMask&1) == 1 )
{
err = ReadFile(handle,byt,1,out h,IntPtr.Zero) ;
MessageBox.Show(error.ToString());
MessageBox.Show("first byte:"+byt[0].ToString());
MessageBox.Show("Second byte:"+byt[1].ToString());
}
}
}
}

private void timer1_Tick(object sender, System.EventArgs e)
{
bool error = CancelIo(handle) ;
MessageBox.Show("Cancel is :"+error.ToString());
th1.Abort();
error = CloseHandle(handle) ;
MessageBox.Show("Handle closed is :"+error.ToString()) ;
}
Generalaxwebbrowser Pin
fatidarya25-Jun-04 19:27
fatidarya25-Jun-04 19:27 
GeneralRe: axwebbrowser Pin
Heath Stewart26-Jun-04 14:25
protectorHeath Stewart26-Jun-04 14:25 
GeneralRe: axwebbrowser Pin
fatidarya26-Jun-04 20:59
fatidarya26-Jun-04 20:59 
GeneralRe: axwebbrowser Pin
Heath Stewart27-Jun-04 5:48
protectorHeath Stewart27-Jun-04 5:48 
Generalopendialog Pin
fatidarya25-Jun-04 18:56
fatidarya25-Jun-04 18:56 
GeneralRe: opendialog Pin
Stefan Troschuetz26-Jun-04 12:32
Stefan Troschuetz26-Jun-04 12:32 
GeneralRe: font of selected text of textbox Pin
leppie25-Jun-04 21:52
leppie25-Jun-04 21:52 
GeneralRe: font of selected text of textbox Pin
Anonymous25-Jun-04 22:20
Anonymous25-Jun-04 22:20 
GeneralRe: font of selected text of textbox Pin
fatidarya25-Jun-04 22:32
fatidarya25-Jun-04 22:32 
GeneralRe: font of selected text of textbox Pin
Dave Kreskowiak26-Jun-04 17:56
mveDave Kreskowiak26-Jun-04 17:56 
Generalosql.exe Pin
devvvy25-Jun-04 18:41
devvvy25-Jun-04 18:41 
GeneralRe: osql.exe Pin
Heath Stewart26-Jun-04 14:19
protectorHeath Stewart26-Jun-04 14:19 
GeneralRe: osql.exe Pin
Anonymous26-Jun-04 14:41
Anonymous26-Jun-04 14:41 
Generalchange data in C++ dll by C# program Pin
ting66825-Jun-04 17:13
ting66825-Jun-04 17:13 
GeneralRe: change data in C++ dll by C# program Pin
Heath Stewart26-Jun-04 14:13
protectorHeath Stewart26-Jun-04 14:13 
GeneralRe: change data in C++ dll by C# program Pin
ting6687-Jul-04 4:19
ting6687-Jul-04 4:19 
GeneralRe: change data in C++ dll by C# program Pin
Heath Stewart7-Jul-04 4:31
protectorHeath Stewart7-Jul-04 4:31 

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.