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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b70e24be869672e6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-22 17:59:13 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.mathworks.com!wn14feed!worldnet.att.net!attbi_feed3!attbi_feed4!attbi.com!attbi_s04.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: function from dll References: X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 67.161.24.134 X-Complaints-To: abuse@comcast.net X-Trace: attbi_s04 1074823152 67.161.24.134 (Fri, 23 Jan 2004 01:59:12 GMT) NNTP-Posting-Date: Fri, 23 Jan 2004 01:59:12 GMT Organization: Comcast Online Date: Fri, 23 Jan 2004 01:59:12 GMT Xref: archiver1.google.com comp.lang.ada:4688 Date: 2004-01-23T01:59:12+00:00 List-Id: > well how to use the Win32.Windef.FARPROC handle ? The relevant Claw routine has the spec and comments: function Get_Proc_Address (DLL_Object: in DLL_Type; Sub_Name: in String) return Claw.Any_Subprogram_Access_Type; -- -- Get the address of the subprogram named Sub_Name in the -- already-loaded DLL, indicated by the DLL_Object. Sub_Name -- is the full subprogram name as exported from the DLL, with -- exactly the same case and spelling. -- -- Raises: -- Not_Valid_Error if DLL_Object was not previously initialized -- using Load. -- Windows_Error if Windows returns an error. -- -- Note: The user will need to do an Unchecked_Conversion of the -- returned value into an access-to-subprogram variable with -- the appropriate convention, parameters, and result in order -- to actually call the DLL function from Ada. The returned -- value is useful only for a parameterless procedure. --