Notices

Windows Mobile 2003 Questions and Answers regarding Windows Mobile 2003.

Reply
 
LinkBack Thread Tools
Old 04-03-07, 05:10 AM   #1 (permalink)
mohs_cool
Guest
 
Posts: n/a
Aximsitex50icon using this.invoke in wm2003

hi ,
i am working in WM2003 . in that i am not finding any option to stop the thread . in my case , the issue is as follows:
1. i am showing some animation in main thread .
2. i am fetching the information from network in another thread .
3. at the same time i am having a softkey ,when i press that softkey the network fetching should be stopped and return to the main menu.
but its not happening so .
my code is as follows :

public delegate byte[] httpRequest();

public event httpRequest ht ;

puzzlefetching = new Thread(new ThreadStart(docancel));
puzzlefetching.Start();

public void docancel()
{
httpRequest ht = null;
ht += new httpRequest(dorequestHttp);
byte[] data = null;
try
{

data = (byte[])this.Invoke(ht);
}
catch (WebException w)
{



}

}

public byte[] dorequestHttp()
{
String url = uRl;
byte[] dat = null;

Uri uri = new Uri(url);
request = (HttpWebRequest)WebRequest.Create(uri);
request.Method = "GET";

response = (HttpWebResponse)request.GetResponse();
Stream dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
int length = (int)response.ContentLength;
dat = new byte[length];
dataStream.Read(dat, 0, length);
reader.Close();
dataStream.Close();
response.Close();





}
but the above code is showing arguement exception during runtime

At the same time i am running a animation in main thread using forms timer
  Reply With Quote
Sponsor Ads
Reply

Tags
thisinvoke, wm2003

Sponsor Ads

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mortscript help needed - invoke apps at scheduled time daily zhaoyun Water Fountain 1 08-11-06 10:45 AM
update from WM2003 US to WM2003 french tscda34 X5 Forums 0 11-08-05 02:52 AM
Invoke Start Menu From A Program Launcher CurtisMinBC Windows Mobile 2003 6 11-06-05 02:42 PM
WM2003 alarm bug fixed in WM2003 SE? krypticide Windows Mobile 2003 1 04-26-05 11:18 PM
Wm2003 aggiecreeddude PDA/AXIM Newbies 1 07-27-03 02:43 AM


All times are GMT -5. The time now is 11:32 PM.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Copyright © 2003-09 LeckMedia, LLC