					ѶӿڵDllװʹ˵

//****************
//*汾1.0.1
//****************

汾1.0.1£
   1޸˷Ͷ⣻
   2޸˲ִ֧ǽ⣻
   3NOKIA ͼƬ ͹ܡ
   4Ⱥܡ
ʹã
      Connect(); 
         |
      SendText();
         |
      Colse();  
 ͡Բرա緢Ϳг5ӣ˻ԶرӡԼ
        
 ע⣺
     1ͷǽ֧֧֡ socks v.4,socks v.5rfc 1929 .rfc1928,
 ʹûʱܻ⣬÷û֤ڵ
 ʱûguest档
     2粻ʹô벻ҪsetProxy4() setProxy5()
     3ʱıС350ÿʹΡ
     4ͼƬʽnokia׼ʽʮַhttp://www.forum.nokia.com          
 
 ֧֣ 0755-2352056 ,  jacee@airwap.com.cn ;webmaster@airwap.com.cn


һװ˵

	window 9x,NTϵͳУʹRegsvr32DllSendSms.dllעᵽϵͳС
	磺
		C:\windows\system\regsvr32 c:\Path\DllSendSms.dll
Dllӿڷ˵
	
		
		Send(String SendMobile,String RecieveMobile,String Content,String userName,String password,String userId)
			ã
				͵Ѷ˷ԶӷԶϿ
				
			
				SendMobile
					ַͣ͡
					ãߵֻ
					ȣ11ֽ
				RecieveMobile
					ַͣ͡
					ãߵֻ
					ȣ11ֽ
				Content
					ַͣ
					ã͵
					ȣ700ֽ
				userName
					ַͣ
					ãҵû
					ȣ16ֽ
				password
					ַͣ
					ãҵû
					ȣ16ֽ
				userId
					ַͣ
					ãҵûš
					ȣ16ֽ
			
			ֵ
				ͣɹ͵ƶ
			
			*˷ҵûýӿ,һѶͶѶʹô˷

		Connect(String chkUserName,String chkPassword,String chkUserId)
			ã
				ͶѶ֮ǰӷSendTextSendRingSendPicture֮ǰáSendô˷
			
				chkUserName
					ַͣ
					ãҵû
					ȣ16ֽ
				chkPassword
					ַͣ
					ãҵû
					ȣ16ֽ
				chkUserId
					ַͣ
					ãҵûš
					ȣ16ֽ

			ֵ
				ͣӷɹ

		SendText(String SendMobile,String RecieveMobiles,String Content)
			ã
				͵Ⱥ350֣70ֽԶȡÿ70һϢ
				
			
				SendMobile
					ַͣ͡
					ãߵֻ
					ȣ11ֽ
				RecieveMobiles
					ַͣ͡
					ãߵֻ루ȺɸֻһַмԶŷֿ255ֻ룩
					ȣ11ֽ
				Content
					ַͣ
					ã͵
					ȣ700ֽ
			
			ֵ
				ͣɹƶΪtrueΪfalse;
		
			**ʹô˷Ͷ
		
		SendRing(String SendMobile,String RecieveMobiles,String Content)
			ã
				ֻĿǰ֧ŵֻ
				
			
				SendMobile
					ַͣ͡
					ãߵֻ
					ȣ11ֽ
				RecieveMobiles
					ַͣ͡
					ãߵֻ루ȺɸֻһַмԶŷֿ255ֻ룩
					ȣ11ֽ
				Content
					ַͣ
					ãݣʽ...
					ȣ700ֽ
			
			ֵ
				ͣɹƶΪtrueΪfalse;

		SendPicture(String SendMobile,String RecieveMobiles,String Content)
			ã
				ֻͼƬĿǰ֧ŵֻͼƬ

			
				SendMobile
					ַͣ͡
					ãߵֻ
					ȣ11ֽ
				RecieveMobiles
					ַͣ͡
					ãߵֻ루ȺɸֻһַмԶŷֿ255ֻ룩
					ȣ11ֽ
				Content
					ַͣ
					ãͼƬݣʽ
					ȣ700ֽ
			
			ֵ
				ͣɹƶΪtrueΪfalse;
		
	ע⣺ ʹôȵ·
		  	
		
		setProxy4(String ip,int port,String username,String passwd)
			ã
				ô/ǽSocket4ô˷Connect֮ǰ

			
				ip
					ַͣ͡
					ã/ǽipַ
					ȣ15ֽ
				port
					ͣ
					ã/ǽtcp˿
					ȣ5ֽ
				username
					ַͣ
					ã/ǽû
					ȣ20ֽ
				password
					ַͣ
					ã/ǽ
					ȣ20ֽ
					
			ֵ
				ûзֵ

		setProxy5(String ip,int port,String username,String passwd)
			ã
				ô/ǽSocket5ô˷Connect֮ǰ

			
				ip
					ַͣ͡
					ã/ǽipַ
					ȣ15ֽ
				port
					ͣ
					ã/ǽtcp˿
					ȣ5ֽ
				username
					ַͣ
					ã/ǽû
					ȣ20ֽ
				password
					ַͣ
					ã/ǽ
					ȣ20ֽ
					
			ֵ
				ûзֵ



ʹ˵
	DllSendSms.dllע֮Ϳʹó
	1VB˵
		ڹУDllSendSms
		

		'*****ҵû******
		Dim isSend as Boolean
		Set Dsms=CreateObject(DllSendSms.DllSendSms)
		'д
		'Dsms.setProxy4("ip",port,"û","")
		Dsms.Connect
		isSend=Dsms.SendText "ֻ""ֻ","͵"
		if isSend=true then
			MsgBox "ͳɹ"
		else
			MsgBox "ʧ"
		end if
		Dsms.Close



	2ASP˵
		DllSendSms.dllע֮󣬼ɵ
		

		'*****ҵû******
		Dim isSend
		Set Dsms=Server.CreateObject("DllSendSms.DllSendSms")
		Dsms.Connect
		isSend=Dsms.SendText("ֻ""ֻ","͵")
		if isSend=true then
			Response.write "ͳɹ"
		else
			Response.write "ʧ"
		end if
		Dsms.Close
		set Dsms=nothing

	
	3Visual J++˵
		DllSendSms.dllע֮ڹУAdd COM Wrapper,DllSendSms
		
		
		import dllsendsms.DllSendSms;
		
		public class Dtest{
			public static void main(String args[]){
				boolean isSend=false;
				DllSendSms dsend=new DllSendSms();
				/*
				*д
				dsend.setProxy4("ip",port,"username","password");
				
				dsend.setProxy5("ip",port,"username","password");
				*/
				if(dsend.Connect()){
					isSend=dsend.SendText("ֻ""ֻ","͵");
					if(isSend){
						System.out.println("ͳɹ");
					}
					else{
						System.out.println("ʧ");
					}
				}
				else{
					System.out.println("ʧ");
				}
			}
		}


       4C++builder ˵
       		 1regsvr32 עDllSendSms.dll.
 	        Variant  v;
       try{
          v=(Variant)CreateComObject(ProgIDToClassID("DllSendSms.DllSendSms"));
          }catch(Exception  &e)
          {
            Application-> ShowException(&e);
            ShowMessage(e.Message);
           }

      WideString  a,b,c,d,e,f;
      a="";
	  b="";
      c="";
      d="";
      e ="";
      f="";
      try{

      if(  v.OleFunction( "Send",a,b,c,d,e,f)) 
       ShowMessage("OK");
     else
       ShowMessage("error");
     }catch(Exception  &e1)
    {
     Application-> ShowException(&e1);
     ShowMessage(e1.Message);
     }    
     
       5VC++ ˵
       	    1regsvr32 עDllSendSms.dll.
 	    2#import "DllSendSms.dll" raw_interfaces_only,raw_native_types,no_namespace,named_guids
 		BOOL AddArgumentBstr(DISPPARAMS& dispparams,BSTR strValue,short index)
		{
		 dispparams.rgvarg[index].vt = VT_BSTR;
		 dispparams.rgvarg[index].bstrVal = strValue;
		 return TRUE;
		}
 
		HRESULT hr;
		DllSendSms_DispatchPtr pSend(CLSID_DllSendSms);
		hr=CoInitialize(NULL);
		if(hr!=S_OK)
		{    if(hr==S_FALSE)
				MessageBox( "лѾԻ!", "warning", 0);  
		}
		DISPID dispid;
                DISPPARAMS dispparams;
		VARIANT vResult;
		dispparams.cArgs = 6;
		dispparams.cNamedArgs = 0;
		dispparams.rgdispidNamedArgs = NULL;
		dispparams.rgvarg = new VARIANTARG[6];
		WCHAR* szFunc = L"Send";
		hr = pSend->GetIDsOfNames (IID_NULL,&szFunc,1,LOCALE_SYSTEM_DEFAULT,&dispid);
		CComBSTR id = "13923714558";
		CComBSTR pwd = "13923714558";
		CComBSTR name = "ͳɹ";
		CComBSTR content = "û";
		CComBSTR destaddr = "";
		CComBSTR orgaddr = "ID";
		// 
		AddArgumentBstr(dispparams,id,5);
		AddArgumentBstr(dispparams,pwd,4);
		AddArgumentBstr(dispparams,name,3);
		AddArgumentBstr(dispparams,content,2);
		AddArgumentBstr(dispparams,destaddr,1);
		AddArgumentBstr(dispparams,orgaddr,0);
		hr = pSend->Invoke
		(dispid,IID_NULL,LOCALE_USER_DEFAULT,DISPATCH_METHOD,&dispparams,
		&vResult,NULL,NULL);
		if (vResult.boolVal  )
			MessageBox("ͳɹ!","ok",0);
		else
	        MessageBox("ʧ!","Warning",0); 
		delete []dispparams.rgvarg ;
		CoUninitialize();
     
*** ˵
    javaʹDllSendSms.jar⣻
    ../libСֱӵãзһ
 


//****************
//*汾1.0.0
//****************

һװ˵

	window 9x,NT,2000 ϵͳУʹRegsvr32DllSendSms.dllעᵽϵͳС
	磺
		C:\windows\system\regsvr32 c:\Path\DllSendSms.dll
Dllӿڷ˵
	
		
		Send(String SendMobile,String RecieveMobile,String Content,String userName,String password,String userId)
		
			˷ҵûýӿڡ
			SendMobileΪߵֻ룬11λ
			RecieveMobileΪߵֻ룬11λ
			ContentΪ͵ݡ
			userNameΪҵûû
			passwordΪҵû롣
			userIdΪҵûıš
			вΪַ,زͣɹ͵ƶ
	

     עContent͵ݣһν鲻700ַϵͳԶհÿ70ֽȡΪһѶ

ʹ˵
	DllSendSms.dllע֮Ϳʹó
	1VB˵
		ڹУDllSendSms
		

		'*****ҵû******
		Dim isSend as Boolean
		Set Dsms=CreateObject(DllSendSms.DllSendSms)
		isSend=Dsms.Send("ֻ""ֻ","͵","ҵû","ҵû","ҵ")
		if isSend=true then
			MsgBox "ͳɹ"
		else
			MsgBox "ʧ"
		end if
	

	2ASP˵
		DllSendSms.dllע֮󣬼ɵ
		

		'*****ҵû******
		Dim isSend
		Set Dsms=Server.CreateObject(DllSendSms.DllSendSms)
		isSend=Dsms.Send("ֻ""ֻ","͵","ҵû","ҵû","ҵ")
		if isSend=true then
			Response.write "ͳɹ"
		else
			Response.write "ʧ"
		end if
		set Dsms=nothing

	
	3Visual J++˵
		DllSendSms.dllע֮ڹУAdd COM Wrapper,DllSendSms
		
		
		import dllsendsms.DllSendSms;
		
		public class Dtest{
			public static void main(String args[]){
				boolean isSend=false;
				DllSendSms dsend=new DllSendSms();
				//ҵû
				isSend=dsend.Send("ֻ""ֻ","͵","ҵû","ҵû","ҵ");
				if(isSend){
					System.out.println("ͳɹ");
				}
				else{
					System.out.println("ʧ");
				}
			}
		}


       4C++builder ˵
       		 1regsvr32 עDllSendSms.dll.
 	  Variant  v;
       try{
          v=(Variant)CreateComObject(ProgIDToClassID("DllSendSms.DllSendSms"));
          }catch(Exception  &e)
          {
            Application-> ShowException(&e);
            ShowMessage(e.Message);
           }

      WideString  a,b,c,d,e,f;
      a="";
	  b="";
      c="";
      d="";
      e ="";
      f="";
      try{

      if(  v.OleFunction( "Send",a,b,c,d,e,f)) 
       ShowMessage("OK");
     else
       ShowMessage("error");
     }catch(Exception  &e1)
    {
     Application-> ShowException(&e1);
     ShowMessage(e1.Message);
     }    

