I have an application that requires certain functions (for example "midiInGetDevCaps()") to be patched because Wine's implementation does not return the values expected by the application:
int patched_midiInGetDevCaps(int dev, MIDIINCAPS *caps, int len)
{
int result = original_midiInGetDevCaps(dev, caps, len);
if(...) /* Check if the data must be patched */
{
caps->wPid = ... /* Patch the data */
...
}
return result;
}
What is the best way to perform such kind of patches?
It may be easiest to just modify wine and build it yourself. It may be possible to "shim" some dll that only modifies certain calls but that seems... I don't know really.
That's assuming that the program you're trying to run is broken somehow. If it's wine that's doing something wrong you would probably want to file a bug.