The ebservice method does not need to be modified, but uses an Asynchronous Method During the call. In this way, the speed will be faster in the loop.
Original method:
Using magweb.com. china_sms.www.mainservices SMS = new using magweb.com. china_sms.www.mainservices (); // instantiate an object
String ssendres = SMS. masssend (); // call the method directly
Now you can change the asynchronous call Method to the following:
Using magweb.com. china_sms.www.mainservices SMS = new using magweb.com. china_sms.www.mainservices (); // The same instantiation object
SMS. beginmasssend (New asynccallback (mysms), SMS); // use the method starting with begin to pass in a method (my name is mysms)
// Implement real calls and results in this method!
Public static void mysms (iasyncresult IAR)
{
Using magweb.com. china_sms.www.mainservices SMS = (using magweb.com. china_sms.www.mainservices) IAR. asyncstate;
String ssendres = SMS. endmasssend (IAR );
}