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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,41ccc2330807735c,start X-Google-Attributes: gid103376,public From: "Marin D. Condic" Subject: Help with calling gethostbyname in Win32-winsock binding Date: 2000/08/04 Message-ID: <398B43E9.C5EE7187@acm.org>#1/1 X-Deja-AN: 654591583 Content-Transfer-Encoding: 7bit Organization: Quadrus Corporation X-Sender: "Marin D. Condic" (Unverified) X-Server-Date: 4 Aug 2000 22:30:27 GMT Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-08-04T22:30:27+00:00 List-Id: I'm trying to use the Win32-winsock interface provided with the GNAT compiler to get the dotted quad(s) for the machine I'm running on. The binding provides the following call: function gethostbyname( name: Win32.PCSTR) return PHOSTENT; where: type PHOSTENT is access all HOSTENT; type HOSTENT is record h_name : Win32.PSTR; h_aliases : PPCHAR; h_addrtype : Win32.SHORT; h_length : Win32.SHORT; h_addr_list: PPCHAR; end record; type PPCHAR is access all Win32.PSTR; What I'm having a hard time figuring out is how to actually call this thing. The confusion lies with the multitude of data types here, in particular the PPCHAR type which is supposed to be, as far as I can figure, a pointer to a list of pointers to strings. Has anybody used this before? Could someone possibly post a code segment that shows how to declare appropriate parameters and access them? Thanks. MDC -- ====================================================================== Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/ Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m Visit my web site at: http://www.mcondic.com/ "Nothing in the world is more dangerous than sincere ignorance and conscientious stupidity." -- Martin Luther King, Jr ======================================================================