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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ExamplesExample 9–1 (Cont.)Visual Basic SMS send exampleBegin VB.Label MsgStatusCaption = "?"Height = 255Left = 5160TabIndex = 6Top = 1680Width = 2295EndBegin VB.Label TraceCaption = "Ready"Height = 255Left = 120TabIndex = 0Top = 2880Width = 7335EndEndAttribute VB_Name = "DemoForm"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = False’=============================================================’ API SMS Demo Program’’-------------------------------------------------------------’ Author: Eric LOKHATE’ Copyright (C) 2004-2005 Monaco Telematique / MCTEL-SAM’=============================================================’’ NOTES :’ 1/ Please check the sms API is imported in VB references:’ Go to "Project | References..." mneu. Check the library’ "MCTEL smsApi" is listed amongst reference list and checked.’ If this is not the case, click on "Parse..." and select’ the smsApi.TLB file to import the library.’’ 2/ Once the library is imported, you could list all imported’ symbols using the Object Explorer (key F2 or use the’ "Display | Object Explorer" menu)’ You will find there the calling syntax for all functions.’’ 3/ At runtime the executable program will need the smsApi.dll to run:’ - IN COMPILATION MODE :’ - smsApi.dll must be stored in the same directory than the calling’ .exe executable file.’ - IN INTERPRETED MODE :’ - smsApi.dll must be stored in a directory listed in the PATH’ (e.g.:c:\windows\systeme32)’ - smsApi.tlb must be stored in the same directory than the program’ or from VBA (MSAccess) in the database directory.’’-----------------------------------------------------------------------------------’ Copy ’Src’ string (format VB) to character array ’Dest’ (format C)’ adding the ’0’ endstring’-----------------------------------------------------------------------------------Private Sub CopyVBStringToCString(ByVal Src As String, ByRef Dest() As Byte)Example 9–1 Cont’d on next page9–3

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

Saved successfully!

Ooh no, something went wrong!