Article # 174, added by Geoworks, historical record
| first | previous | index | next | last |

MailboxGetVMFile() usage when sending SMS message



When building an SMS message to send out, you'll use
MailboxGetVMFile() to build a VM file to hold the SMS message.
The first parameter to MailboxGetVMFile() is the # of blocks to
attach to the VMFile. (These blocks hold the body of the message.)

Since SMS msgs are short (160 chars), one need only attach 1 block
to the VM file, so pass 1 as the first parameter:

        MailboxGetVMFile(1, &vmStatus);

You may have seen some examples of MailboxGetVMFile() usage where
0 is passed as the first parameter. Passing 0 means "use the default
value [of blocks to attach to the VM file]," where the default is
VMS_DEFAULT_NUM_BLOCKS, which = 64. This is more than is necessary for
an SMS message, and takes up space in the VMFileHeader.

So if you're creating an SMS message, only attach 1 block to the VM file.