Device message reader dll

taximania

Well-Known Member
Licensed User
Longtime User
It can read all, 'Message Stores', on your device. MMS, SMS, Email accounts etc.
This is work in progress, not the lib, that works :sign0060:
The 'How to use', explanation needs working on. So here's a start.

Copy the 4 files in the attached zipfile to a New folder on your device.
Run the .sbp file on your device.
You should get this screen.
Select the Message store you want from combobox1. Top left.
Click one of the buttons top right.
I = Inbox
S = SentItems
O = Outbox
D = DeletedItems
Then wait . . . .

Once you get the 'Read' msgbox.
Select the msg num you want to see using combobox2,
left of 'Read' button. Then press 'Read' button.

smsshot.bmp


The zip will be added soon. :) Hopefully tonight.
Happy New Year everyone :)
 

Attachments

  • MsgLib.zip
    24.7 KB · Views: 24
Last edited:

taximania

Well-Known Member
Licensed User
Longtime User
I hate help files. Hope this covers things :)


Sub Globals
'Declare the global variables here.
End Sub

Sub App_Start
Form1.Show
Sip=False
sms.New1
Msgbox(sms.About,"MsgLib")
For a = 0 To sms.NumOfStores-1 'For each number of device message stores 0-?
sms.SetStoreNum=a 'Set the store number 0-?
combobox1.Add(sms.GetStoresName) 'Get the store name and populate combobox1
Next
combobox1.SelectedIndex=0 'Reset combobox1 index
End Sub

Sub ComboBox1_SelectionChanged(Index, Value) 'Set's desired store number. eg 2=SMS on my device
sms.SetStoreNum=index
store=value 'Save store name for further use
End Sub

Sub Button1_Click
a=sms.GetNumInboxItems 'Returns the number of Inbox messages
If a = 0 Then Return 'If empty, return
combobox2.Clear 'Reset combobox2
label2.Text="Reading ."
For b = 0 To a -1
combobox2.Add(b) 'Add number values for each message to combobox2
Next
combobox2.SelectedIndex=0 'Start at '0'
sms.LoadInboxMsg 'Load all Inbox messages to memory
label2.Text=a & " Read."
Msgbox("Read",store) 'Done
End Sub

Sub Button3_Click 'As sub above but reads Sent Items
a=sms.GetNumSentItems
If a = 0 Then Return
combobox2.Clear
label2.Text="Reading ."
For b = 0 To a -1
combobox2.Add(b)
Next
combobox2.SelectedIndex=0
sms.LoadSentMsg
label2.Text=a & " Read."
Msgbox("Read",store)
End Sub

Sub Button4_Click 'As sub above but reads Outbox Items
a=sms.GetNumOutboxItems
If a = 0 Then Return
combobox2.Clear
label2.Text="Reading ."
For b = 0 To a -1
combobox2.Add(b)
Next
combobox2.SelectedIndex=0
sms.LoadOutboxMsg
label2.Text=a & " Read."
Msgbox("Read",store)
'msgbox()
End Sub

Sub Button5_Click 'As sub above but reads Deleted Items
a=sms.GetNumDeletedItems
If a = 0 Then Return
combobox2.Clear
label2.Text="Reading ."
For b = 0 To a -1
combobox2.Add(b)
Next
combobox2.SelectedIndex=0
sms.LoadDeletedMsg
label2.Text=a & " Read."
Msgbox("Read",store)
'msgbox()
End Sub

Sub Button2_Click
sms.SetMsgNum=combobox2.SelectedIndex 'Select the message number
textbox1.Text=sms.GetMsgSubject 'Gets the message subject, for email. Or SMS Body
label3.Text=sms.GetMsgSenderName '
label4.Text=sms.GetMsgSenderAddress '
label5.Text=Time(sms.GetMsgDate) 'In Ticks
label6.Text=Date(sms.GetMsgDate) 'In Ticks
label7.Text=sms.GetMsgBody 'Same as GetMsgSubject for SMS. Or Body for email
End Sub
 

taximania

Well-Known Member
Licensed User
Longtime User
After a post by Agraham in my 'Chit Chat' post, 'C# Question'
I've made a few alterations to my lib.

And found a couple of bugs.
1: I can't seem to cure :(
2: GetMsgBody, was actually returning GetMsgSubject :sign0137:
My typo.
On correction of it, GetMsgBody now throws an Invalid thingy.

Win Mo 5-6 uses MIME for message Body's.
A Basic4ppc string won't accept this and throws up ;)

I've looked, but haven't found a solution.

Some Text missing :)
 

winjiadh

Active Member
Licensed User
Longtime User
I'll try to run in my HD2

I'll try to run in my HD2
It's something wrong
 

Discorez

Member
Licensed User
Longtime User
taximania,
Is it possible in the dynamic library MsgLib.dll add methods with the help of which we can delete sms out of folders, add sms to folders and replace them to others, for instance from the incoming to deleted and so on?
 
Top