From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a6b:8b58:: with SMTP id n85-v6mr22227258iod.138.1537258769496; Tue, 18 Sep 2018 01:19:29 -0700 (PDT) X-Received: by 2002:a9d:6515:: with SMTP id i21-v6mr223764otl.0.1537258769216; Tue, 18 Sep 2018 01:19:29 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.166.215.MISMATCH!x188-v6no34656ite.0!news-out.google.com!z5-v6ni76ite.0!nntp.google.com!x81-v6no35003ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 18 Sep 2018 01:19:28 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=176.59.35.141; posting-account=-CxkpgoAAAC4sQudwZebWnArsZbT2lvS NNTP-Posting-Host: 176.59.35.141 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <01166054-3971-4df6-8af4-f9fc4d8a30c4@googlegroups.com> Subject: Re: Interface To C Struct That Includes An Array From: rakusu_klein@fastmail.jp Injection-Date: Tue, 18 Sep 2018 08:19:29 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:54358 Date: 2018-09-18T01:19:28-07:00 List-Id: Probably you pass a link to the whole record somewhere where expected only = a link to the data field. The other explanation of binary garbage in the st= ring is that you get somwhere a raw uncutted data, because the aiGetMateria= lString cuts the 32-bit prefix and corrects the length in aiString field by= itself. =D0=BF=D0=BE=D0=BD=D0=B5=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D0=B8=D0=BA, 17 =D1= =81=D0=B5=D0=BD=D1=82=D1=8F=D0=B1=D1=80=D1=8F 2018 =D0=B3., 15:01:43 UTC+3 = =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C ro= g...@iinet.net.au =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB: > pragma Convention (C_Pass_By_Copy, API_String); It doesn't seems to be a good idea for me to copy a kilobyte of data on eve= ry call. > The returned Assimp_Path is Length: 16, Data: B000phoenix.pcx0000 > in which B is a series of four small zeros inside a rectangle. > I haven't been able to find a syntactical explanation for the four small = zeros inside a rectangle. As I can remember, this icon stays for nonprintable characters. > function API_Get_Material_Texture (aMaterial : access API_Material_= Tex; > Tex_Type : AI_Texture_Type; > Index : Interfaces.C.unsigne= d; > Path : access Assimp_Types.= API_String :=3D null; > Mapping : access AI_Texture_Ma= pping :=3D null; > UV_Index : access Interfaces.C.= unsigned :=3D null; > Blend : access Interfaces.C.= C_float :=3D null; > Op : access AI_Texture_Op= :=3D null; > Map_Mode : access AI_Texture_Ma= p_Mode :=3D null) > return Assimp_Types.API_Return; I also notice, that you forget the last argument "unsigned int * flags".