A COM exception

Hi,

I call functin that send a SMS to this number.

Dispatch.call(SMSObj,"SendSMS","Hello From Java","0526662010");

then, I check if it was send by this method (result = 0) -- > it was not send :)

int result = Dispatch.call(SMSObj,"ResponseCode").toInt();

I get this error if I calling this method ResponseCode, if I not call here, I don't get error, but it is not send... :

Exception occurred during event dispatching:

com.jacob.com.ComFailException: A COM exception has been encountered:

At Invoke of: ResponseCode

Description: An unknown COM error has occured.

at com.jacob.com.Dispatch.invokev(Native Method)

at com.jacob.com.Dispatch.call(Dispatch.java)

[871 byte] By [yael800a] at [2007-11-26 17:21:46]
# 1
that sucks. I hope you get it sorted out
georgemca at 2007-7-8 23:49:45 > top of Java-index,Java Essentials,Java Programming...
# 2

Maybe I don't call in right wat to this method?

SendSMS get as string: text, phon as text

ActiveXComponent ax = new ActiveXComponent("SMSCom.SMSSender");

Dispatch SMSObj = (Dispatch) ax.getObject();

//// sets the SMSObj Username string attribute

Dispatch.put(SMSObj, "Username", "I99999FIHT");

//// sets the SMSObj Password string attribute

Dispatch.put(SMSObj, "Password", "666666032");

//// sets the SMSObj Source integer attribute

Dispatch.put(SMSObj, "Source", new Integer(0526666661));

Dispatch.call(SMSObj,"SendSMS", "Hello From Java", "0546666010");

yael800a at 2007-7-8 23:49:45 > top of Java-index,Java Essentials,Java Programming...