Sending SMS help needed.

Sending SMS help needed.

Postby Horizon » Fri Nov 20, 2009 1:56 pm

Hi,

I have a MobilusSMS.dll that is supported from my local sms company. I have registered it to my windows using regsvr32 mobilussms.dll. The message is said that It is registered successfully.

I have a ASP code.
Code: Select all  Expand view
Sub SendSMS()
    Set objSMS = Server.CreateObject("MobilusSMS.Gateway")
    objSMS.addtosmsbasket "Message 1","05334924505"
    objSMS.addtosmsbasket "Message 2","05334924505"
    strDonus = objSMS.sendsms("test-mb1000","4574","","")
    response.write strDonus
    objSMS.clearsmsbasket
    Set objSMS = Nothing
End Sub
 


I try to write like this.

Code: Select all  Expand view
MSgInfo("I am going to Send SMS")
TRY
    objSMS := CREATEOBJECT( "MobilusSMS.Gateway" )
    objSMS:addtosmsbasket("Message 1","05334924505")
    objSMS:addtosmsbasket("Message 2","05334924505")
    strDonus := objSMS.sendsms("test-mb1000","4574","","")
    MSgInfo(strDonus)
    objSMS.clearsmsbasket()
    objSMS := Nil
CATCH oError
  MsgInfo( "Could not send SMS" + ";"  + ;
         "Error: " + TRANSFORM(oError:GenCode, NIL) + ";" + ;
         "SubC: " + TRANSFORM(oError:SubCode, NIL) + ";" + ;
         "OSCode: " + TRANSFORM(oError:OsCode, NIL) + ";" + ;
         "SubSystem: " + TRANSFORM(oError:SubSystem, NIL) + ";" + ;
         "Message: " + oError:Description )
END
oError:=NIL
 


When I try to compile it gives an error.
Code: Select all  Expand view
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6633)
Copyright 1999-2009, http://www.xharbour.org http://www.harbour-project.org/
Generating object output to 'objw\EPosta.obj'...
objw\EPosta.c(23): fatal error: Could not find include file "OBJSMS.xns".


Type: C >>>Couldn't build: EPosta.obj<<<


How Can I solve this? Thanks in advance.
Last edited by Horizon on Tue Nov 24, 2009 2:32 pm, edited 1 time in total.
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: Sendig SMS help needed.

Postby Enrico Maria Giordano » Fri Nov 20, 2009 8:13 pm

Horizon wrote:objw\EPosta.c(23): fatal error: Could not find include file "OBJSMS.xns".


You are trying to include a non-existent file OBJSMS.xns.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Sendig SMS help needed.

Postby Horizon » Sat Nov 21, 2009 8:31 am

Hi Enrico,

There is not any line including this file. If I remove objSMS related file, There is not any error.

I think, When the xHB creating c file, It decide and include it. There is not any line prg and ppo files. But the c file as below.

Code: Select all  Expand view
#include "OBJSMS.xns"
extern HB_NS_OBJSMS OBJSMS;
/* Skipped DEFERRED call to: 'DIVERTCONSTRUCTORCALL' */
HB_FUNC_EXTERN( GETPROCADD );
HB_FUNC_EXTERN( TACTIVEX );
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: Sendig SMS help needed.

Postby Enrico Maria Giordano » Sat Nov 21, 2009 10:53 am

xHarbour can't invent an include file. Please double check your source code.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Sendig SMS help needed.

Postby Horizon » Tue Nov 24, 2009 12:48 pm

Hi,

This is the sample of my problem. Could any one compile it?

Thanks,

Code: Select all  Expand view
#include "FiveWin.ch"

static oWnd

//----------------------------------------------------------------------------//
 
function Main()

   local oBar

   DEFINE WINDOW oWnd TITLE "Sending SMS from FiveWin"

   DEFINE BUTTONBAR oBar _3D OF oWnd

   DEFINE BUTTON OF oBar ACTION SendSMS() TOOLTIP "Send SMS"

   SET MESSAGE OF oWnd TO "Ready" NOINSET DATE TIME KEYBOARD

   ACTIVATE WINDOW oWnd

return nil

//----------------------------------------------------------------------------//

function SendSMS()

    MSgInfo("I am going to Send SMS")
    TRY
        objSMS := CREATEOBJECT( "MobilusSMS.Gateway" )
        objSMS:addtosmsbasket("Message 1","05334924505")
        objSMS:addtosmsbasket("Message 2","05334924505")
        strDonus := objSMS.sendsms("test-mb1000","4574","","")
        MSgInfo(strDonus)
        objSMS.clearsmsbasket()
        objSMS := Nil
    CATCH oError
      MsgInfo( "Could not send SMS" + ";"  + ;
             "Error: " + TRANSFORM(oError:GenCode, NIL) + ";" + ;
             "SubC: " + TRANSFORM(oError:SubCode, NIL) + ";" + ;
             "OSCode: " + TRANSFORM(oError:OsCode, NIL) + ";" + ;
             "SubSystem: " + TRANSFORM(oError:SubSystem, NIL) + ";" + ;
             "Message: " + oError:Description )
    END
    oError:=NIL


return nil

//----------------------------------------------------------------------------//

procedure AppSys  // Xbase++ requirement

return

//----------------------------------------------------------------------------//
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: Sendig SMS help needed.

Postby James Bott » Tue Nov 24, 2009 2:22 pm

Hakan,

I did a compile of your sample program and I also get the

#include "OBJSMS.xns"

in the C file. I cannot find this in xharbour\include. I couldn't find in in Google either. Perhaps you need to post on the Harbour forum.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Sendig SMS help needed.

Postby Horizon » Tue Nov 24, 2009 2:31 pm

Thank you James.

If you replace objSMS to diffrent one for example oAAA, It try to include the "oAAA.xns"
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: Sending SMS help needed.

Postby James Bott » Tue Nov 24, 2009 2:41 pm

Hakan,

This is definately a xHarbour issue, and it looks like it may be a bug. Perhaps the code hasn't been completed.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Sendig SMS help needed.

Postby Enrico Maria Giordano » Tue Nov 24, 2009 6:28 pm

Horizon wrote:
Code: Select all  Expand view
strDonus := objSMS.sendsms("test-mb1000","4574","","")


Code: Select all  Expand view
strDonus := objSMS:sendsms("test-mb1000","4574","","")


Horizon wrote:
Code: Select all  Expand view
objSMS.clearsmsbasket()


Code: Select all  Expand view
objSMS:clearsmsbasket()


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Sending SMS help needed.

Postby Horizon » Tue Nov 24, 2009 9:57 pm

:oops:

You are right. I have replaced them and I can compile the code. Thanks.
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 84 guests