I had the same issue and could clear the error somehow. SimWriteMessage fails when there's no date information in the SMSMESSAGE structure.
Try by filling a valid date information into it.
Best Regards
Sreekanth