🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #975

Re: Assertion Error while sending email

#975
From: JLoz
Date: Tue, 31 Jul 2007 17:38
132 lines
5072 bytes
I also forgot to mention that when I first tried to compile my new 
application I had a lot of errors which disappeared by adding two end 
comments "*/" to the wsnwlink.h file at lines 154, and 156.

After doing that I could compile the app but it does not work.

I am desperate here.  I had develop a test app to make sure I could send 
emails with indy 10 and BCB5, and not that I want to add that code to my 
project it does not work and I am at a halt.

Any help is highly appreciated.

Thanks,

JLoz

"JLoz" <jfsierra@excite.com> wrote in message 
news:46ae4529$1@newsgroups.borland.com...
>I compiled Indy 10.1.6 for BCB5 some time ago and got it to send emails 
>witouth problems.
>
> I have two development machines, so I copied all the bpl, lib and hpp 
> files and installed indy in the other one.
>
> In the previous application I put all the indy components in a data module 
> and I copied this in another application to which I wanted to add the 
> option of sending automated emails.
>
> Now I get the folliwing error.
>
> Assertion failed:
> (C:\ProgramFiles\Borland\CBuilder5\Components\Indy10\Lib\System\IdGlobal.pas,
>  line 2528)
>
> There is a function in that line for my IdGlobal.pas file, which is:
>
> function IndyLength(const ABuffer: String; const ALength: Integer = -1; 
> const AIndex: Integer = 1): Integer;
> begin
>  Assert(AIndex >= 1);            <<<<------------------  Line 2528
>  if ALength < 0 then begin
>    Result := Length(ABuffer)-AIndex+1;
>  end else begin
>    Result := Min(Length(ABuffer)-AIndex+1, ALength);
>  end;
> end;
>
> I do not understand why this works on one application and does not on 
> another one.
>
> This type of problem was reported by Markus Donath on 5/23/07, and it 
> looks we both had similar problems compiling this as my compiler crashes 
> doing the IdZLib.pas file.
>
> I compiled Indy by modifying FULLC6.bat and I had to generate a header 
> file containing the some extructures not included in BCB5.  The file looks 
> as follows:
>
> ---------------------------------------------------------------------------------------
> #ifndef __IDMISSINGSTRUCTS_FORBCB5_H__
> #define __IDMISSINGSTRUCTS_FORBCB5_H__
>
> //***********************************************************
> //       THIS WAS ADDED IN ORDER TO USE INDYSOCKETS 10 AS
> //       THESE STRUCTURES ARE NOT INCLUDED IN BCB5
> //
> //***********************************************************
>
> #define _SS_MAXSIZE 128                  // Maximum size.
> #define _SS_ALIGNSIZE (sizeof(__int64))  // Desired alignment.
>
> /*
> * Definitions used for sockaddr_storage structure paddings design.
> */
> #define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof (short))
> #define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof (short) + _SS_PAD1SIZE + 
> _SS_ALIGNSIZE))
>
>
> typedef struct sockaddr_storage {
>  short ss_family;
>  char __ss_pad1[_SS_PAD1SIZE];
>  __int64 __ss_align;
>  char __ss_pad2[_SS_PAD2SIZE];
> } SOCKADDR_STORAGE,  *PSOCKADDR_STORAGE;
>
> typedef struct _WSAMSG {
>  LPSOCKADDR name;
>  INT namelen;
>  LPWSABUF lpBuffers;
>  DWORD dwBufferCount;
>  WSABUF Control;
>  DWORD dwFlags;
> } WSAMSG,  *PWSAMSG,  *LPWSAMSG;
>
> typedef struct _WSACMSGHDR {
>  SIZE_T  cmsg_len;
>  INT  cmsg_level;
>  INT  cmsg_type;
> } WSACMSGHDR, *PWSACMSGHDR;
>
> typedef WSACMSGHDR CMSGHDR, *PCMSGHDR;
>
> typedef struct in6_addr {
>  union {
>    u_char Byte[16];
>    u_short Word[8];
>  } u;
> } IN6_ADDR,  *PIN6_ADDR,  FAR *LPIN6_ADDR;
>
> typedef struct ipv6_mreq {
>  struct in6_addr ipv6mr_multiaddr;
>  unsigned int ipv6mr_interface;
> } IPV6_MREQ,  *PIPV6_MREQ;
>
>
> #endif
> ---------------------------------------------------------------------------------------
>
>
> After doing that Indy worked fine in the test application I wrote to send 
> emails.
>
> Is this a known bug?  Does anyone has had this problem? if so, what is the 
> workaround?
>
> Thanks beforehand
>
>
> JLoz
>
> 
Technical Details
Message-ID: <46af7382@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <46ae4529$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,da4e10289ba23828
X-Google-Attributes: gid11508e,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "JLoz" <jfsierra@excite.com>
From: "JLoz" <jfsierra@excite.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <46ae4529$1@newsgroups.borland.com>
Subject: Re: Assertion Error while sending email
Date: Tue, 31 Jul 2007 13:38:11 -0400
Lines: 134
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 63.163.143.187
Message-ID: <46af7382@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1185903490 63.163.143.187 (31 Jul 2007 10:38:10 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail