What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » small mistake in C template?

small mistake in C template?
Author: Message:
Whacko
Full Member
***

Avatar

Posts: 209
Reputation: 1
40 / Male / –
Joined: Apr 2002
O.P. small mistake in C template?
Patchou... I hope you get this ;)

i found this in your  MPPluginHeader.h

code:

MPPLUGIN_RETURN_VOID DisplayToast(/*[in]*/  const char* sMessage,
                                  /*[in]*/  const char* sTitle,
                                  /*[in]*/  const char* sProgram,
                                  /*[in]*/  bool bPlaySound)
{
    char sMessageSafe[256]; sMessage[255] = '\0';



the "sMessage[255] = '\0'; " is not allowed here as its defined as const. VC++ may not have problem with it, however Borland C++ wont compile because of it.

Its NOT a big deal, it can be easily changed to char* without the const, or a little workaround:

code:

MPPLUGIN_RETURN_VOID DisplayToast(/*[in]*/  const char* sMessage,
                                  /*[in]*/  const char* sTitle,
                                  /*[in]*/  const char* sProgram,
                                  /*[in]*/  bool bPlaySound)
{
  char *workaround;
    char sMessageSafe[256];
//  sMessage[255] = '\0';
  workaround = (char*) &sMessage[255];

  *workaround = '\0';




just wanted to let you know ;) let me know what you think ;)
I code in:
C
C++
Delphi
Visual Basic
Pascal :P
05-23-2004 02:01 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
small mistake in C template? - by Whacko on 05-23-2004 at 02:01 PM
RE: small mistake in C template? - by oberststen on 05-23-2004 at 08:54 PM
RE: small mistake in C template? - by Patchou on 05-24-2004 at 03:07 AM
RE: small mistake in C template? - by Choli on 05-24-2004 at 11:06 AM


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