use proper (?) calling conventions for DPI