30 Nov
2010
30 Nov
'10
4:15 a.m.
Peter Urbanec <winehq.org(a)urbanec.net> writes:
+static BOOL load_funcs(void *handle) +{ +#define LOAD_FUNCPTR(f) if((p##f = (void*)wine_dlsym(handle, #f, NULL, 0)) == NULL) \ + { ERR("Can not find " #f "\n"); return FALSE; } else { TRACE("Loaded function " #f "\n"); }; + + /* Platform API */ + LOAD_FUNCPTR(clGetPlatformIDs) + LOAD_FUNCPTR(clGetPlatformInfo) + + /* Device APIs */ + LOAD_FUNCPTR(clGetDeviceIDs) + LOAD_FUNCPTR(clGetDeviceInfo)
Why are you loading everything dynamically instead of simply linking to it? -- Alexandre Julliard julliard(a)winehq.org