🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #16373

Re: NetMessageBufferSend and Net Send?

#16373
From: Muhammad Momin Rashid
Date: Tue, 20 May 2003 05:25
70 lines
3095 bytes
Hi,

Thanks for helping me out.  The problem is that the message isn't going
through, I keep getting these errors (code 50, 51, 53),  Error code 53 being
the most common error.  Whereas, when I send the same message using Net Send
Command It gets delivered.  I wanted to know

1. Am I right in using NetMessageBufferSend for such purpose?
2. Are NetMessageBufferSend and Net Send command doing the same thing behind
the scene or there is difference?
3. If there is a difference, then which function should I be using if I want
to mimic Net Send?
4. Is there any other API available which ensure delivery of message in this
manner (Net Send Command), if so where I can find information on it?

I am attaching a sample from my code in case you want to see it.  But I
guess the problem has more to do with using the right function.

Regards,
Muhammad Momin Rashid.

*** Sample code ***

  LPSTR lpstrError;
  WideString wsTo;
  WideString wsFrom;
  WideString wsMessage;

  wsTo = EditTo->Text;
  wsFrom = EditFrom->Text;
  wsMessage = MemoMessage->Text;

  int iReturn = NetMessageBufferSend(wsTo, wsTo, wsFrom,
(LPBYTE)wsMessage.c_bstr(), (wsMessage.Length() + 1) * sizeof(wchar_t));

  FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL, iReturn, 0, (LPTSTR)&lpstrError, 0, NULL);

*** Sample Output from Debug Window ***

To:202.163.125.67
From:MMR
Message:Test Message

- Message Generated by: NM

Message Length:90
ErrorCode:51

*** END ***

"Remy Lebeau (TeamB)" <gambit47@yahoo.com> wrote in message
news:3ec96e41@newsgroups.borland.com...
>
> "Muhammad Momin Rashid" <momin@hotmail.com> wrote in message
> news:3ec96159@newsgroups.borland.com...
> > I keep getting Error Code 53, what does that mean?
>
> Error 53 = ERROR_BAD_NETPATH
> "The network path was not found."
>
> > While we are at it, how to convert this error code
> > into more human readable format?
>
> FormatMessage().
>
>
> Gambit
>
>
Technical Details
Message-ID: <3ec9bc47@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3ec8f4a5@newsgroups.borland.com> <3ec90aaa$1@newsgroups.borland.com> <3ec96159@newsgroups.borland.com> <3ec96e41@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,207179134b47cd96
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-05-19 22:31:15 PST
From: "Muhammad Momin Rashid" <momin@hotmail.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3ec8f4a5@newsgroups.borland.com> <3ec90aaa$1@newsgroups.borland.com> <3ec96159@newsgroups.borland.com> <3ec96e41@newsgroups.borland.com>
Subject: Re: NetMessageBufferSend and Net Send?
Date: Tue, 20 May 2003 10:25:34 +0500
Lines: 72
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 202.163.125.68
Message-ID: <3ec9bc47@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1053408327 202.163.125.68 (19 May 2003 22:25:27 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail