You can take a look at my PSS Revive
https://github.com/BobanSpasic/PSS-Revive/tree/mainIt uses PortMIDI on Linux/Darwin/BSD and WinMM on Windows.
The directory ext_units contains the PortMIDI interface, and in directory Units you'll find UnPortMIDI which is used under Windows to compensate for functions found in PortMIDI, but not in WinMM.
Why WinMM on Windows and not PortMIDI? - Because I didn't find any working 64-bit PortMIDI DLLs on the net.
btw. I am using MIDI just for transmitting and receiving SysEx messages, no sequencers, .mid files etc. involved.