09.07.2015 Views

VideoSMS/Client Application Programming Interface ... - MCTel

VideoSMS/Client Application Programming Interface ... - MCTel

VideoSMS/Client Application Programming Interface ... - MCTel

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ExamplesExample 9–1 (Cont.)Visual Basic SMS send examplePrivate Sub Form_Load()’ To fill in with the user account information’’Compte.Text = "my account"’MotDePasse.Text = "my password"End Sub9.2 Linux C SMS Send program exampleThis C program sends a SMS and allows to check in real time its successfultransmission.Example 9–2C SMS Send sample progral/*Sample C program demonstrating SMS MCTEL APINote: this file must be linked with smsApi-linux.a object file*/#include "smsApi.h"#include #include //------------------------------------------------------------------------#define COMPANYID "My_CompanyId"#define COMPANYPWD "My_CompanyPwd"#define USERID "My_UserId"#define USERPWD "My_UserPwd"//------------------------------------------------------------------------smsRet ConnectToSMSServer(char* AppName,smsConnID* ConnId,char* CompanyId,char* CompanyPwd,char* UserId,char* UserPwd,smsUInt32* NbCredits)/*Open a connection to the SMS Gateway and authenticate user using ’UserId’and ’UserPwd’If ’CompanyId’ and ’CompanyPwd’ are !=0, they will be used for authentication’AppName’ is the name of the calling application (freeform).Returns the status sent by the server.*/{return Res;}//------------------------------------------------------------------------int main(int argc, char *argv[]) {Example 9–2 Cont’d on next page9–8

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!