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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT,XPRIO autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,9302958eecfda77,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-08 07:41:39 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!news.gtei.net!newsfeed.cwix.com!nsnmpen1-lo.nuria.telefonica-data.net!nsnmrro1-lo.nuria.telefonica-data.net!nsnmrro2-lo.nuria.telefonica-data.net!not-for-mail From: "Antonio L�pez" Newsgroups: comp.lang.ada Subject: Binding to functions having reference parameter Date: Wed, 8 May 2002 16:40:25 +0200 Organization: Telefonica Data Espagna Message-ID: NNTP-Posting-Host: 195.76.14.164 X-Trace: nsnmrro2-gest.nuria.telefonica-data.net 1020868857 22528 195.76.14.164 (8 May 2002 14:40:57 GMT) X-Complaints-To: usenet@nsnmrro2-gest.nuria.telefonica-data.net NNTP-Posting-Date: Wed, 8 May 2002 14:40:57 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Xref: archiver1.google.com comp.lang.ada:23723 Date: 2002-05-08T16:40:25+02:00 List-Id: I am doing a binding to a Dll Using Win32 binding and I have a problem with functions having reference parameters (an C array). �How must I declare those parameters? (ada functions doesn't allow out parameters) One example: Dll fucntion is declared as : _API_EXTERN AiInt16 _API_DLL_FUNC ApiCmdBite (AiUInt8 bModule, AiUInt8 biu, AiUInt8 sc, AiUInt8 bite_status[]); And I declare: subtype UCHAR is Interfaces.C.unsigned_char; type UCHAR_Array2 is array (0 .. 1) of aliased UCHAR; function ApiCmdBite ( bModule : My_Win32.UCHAR; biu : My_Win32.UCHAR; sc : My_Win32.UCHAR; bite_status : My_Win32.UCHAR_Array2 ) return My_Win32.SHORT; However I get a warning: "bite_status" is never assigned a value, calling the fucntion. Obvius It needs to be done otherwise! Could you enlight me please? I have tried to pass the parameter as bite_status : Interfaces.C.unsigned_char'Address but I get the error: attribute "Address" may not be used in a subtype mark I should be able to use for example: 'bite_status(0) := 1;' or 'if (bite_status(1) == 2)'