From: Felix Krause <fordprefect86@googlemail.com>
Cc: mailbox@dmitry-kazakov.de
Subject: Re: StdCall and pragma Import_Function
Date: Fri, 19 Aug 2011 12:23:49 -0700 (PDT)
Date: 2011-08-19T12:23:49-07:00 [thread overview]
Message-ID: <a9c2e23c-4d92-4104-936f-40dd559125e0@glegroupsg2000goo.googlegroups.com> (raw)
In-Reply-To: <11f8n1nxhs0hg$.16p4wm0m6u4nt.dlg@40tude.net>
From the header file:
extern CL_API_ENTRY cl_int CL_API_CALL
clGetDeviceIDs(cl_platform_id /* platform */,
cl_device_type /* device_type */,
cl_uint /* num_entries */,
cl_device_id * /* devices */,
cl_uint * /* num_devices */) CL_API_SUFFIX__VERSION_1_0;
Those macros are defined as:
#if defined(_WIN32) || defined(__CYGWIN__)
#define CL_API_ENTRY
#define CL_API_CALL __stdcall
#define CL_CALLBACK __stdcall
#else
#define CL_API_ENTRY
#define CL_API_CALL
#define CL_CALLBACK
#endif
So it indeed uses StdCall convention. The corresponding output of dumpbin is:
Version : 0
Machine : 14C (x86)
TimeDateStamp: 4E03B987 Fri Jun 24 00:09:11 2011
SizeOfData : 0000001E
DLL name : OpenCL.dll
Symbol name : _clGetDeviceIDs@24
Type : code
Name type : undecorate
Hint : 44
Name : clGetDeviceIDs
(I don't have a def file, but this shows the fully qualified name too.)
cl_device_type is the bitvector from my example, and GNAT searches for "clGetDeviceIDs@20".
next prev parent reply other threads:[~2011-08-19 19:23 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-19 16:24 StdCall and pragma Import_Function Felix Krause
2011-08-19 16:51 ` Dmitry A. Kazakov
2011-08-19 17:07 ` Felix Krause
2011-08-19 18:58 ` Dmitry A. Kazakov
2011-08-19 19:23 ` Felix Krause [this message]
2011-08-19 19:43 ` Dmitry A. Kazakov
2011-08-19 20:07 ` Felix Krause
2011-08-19 20:37 ` Dmitry A. Kazakov
2011-08-19 20:45 ` Jeffrey Carter
2011-08-21 18:25 ` Felix Krause
2011-08-20 8:04 ` Georg Bauhaus
2011-08-20 9:23 ` Dmitry A. Kazakov
2011-08-19 17:26 ` Adam Beneschan
2011-08-19 17:38 ` Felix Krause
2011-08-19 18:10 ` Jeffrey Carter
2011-08-19 18:37 ` Felix Krause
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox