You forgot the calling convention on your prototype, so I'm not sure this calls the function correctly. Building it as a Wine test, or making a call first that returns without crashing, would make this easier to determine.