What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Solved] WriteString

[Solved] WriteString
Author: Message:
go2hell
New Member
*

Avatar

Posts: 13
Joined: Jul 2006
O.P. Huh?  [Solved] WriteString
Hello,

I'm trying to change the custom dateTime format according to a variable, from a DateTimeControl.

code:
var SysFormatStruct = Interop.Allocate(20);
SysFormatStruct.WriteString(0,  _dateFormat, true); //_dateFormat == "MM-dd-yyyy"    -> Line 452

when i run it i get
quote:
Error: Invalid procedure call or argument.
Line: 452. Code: -2146828283.



Any ideas what i'm doing wrong here?

Thanks.

This post was edited on 09-09-2006 at 04:33 PM by go2hell.
09-09-2006 04:05 PM
Profile PM Find Quote Report
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: [Help] WriteString
quote:
Originally posted by Scripting Documentation
Offset
[number] Index in the memory block where the string will be written. It must be between 0 and Size - (String.length * 2) - 2 if WriteUnicode is true and between 0 and Size - String.length - 1 if WriteUnicode is false.


seeing as unicode is set to true, your databloc needs to be at least 22 bytes to fit a 10 character string ((10 * 2)+2).

This post was edited on 09-09-2006 at 04:15 PM by Eljay.
09-09-2006 04:11 PM
Profile PM Find Quote Report
go2hell
New Member
*

Avatar

Posts: 13
Joined: Jul 2006
O.P. RE: [Help] WriteString
Thank you, that solved it.
09-09-2006 04:33 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On