You can do this through midi Yoke without any problem as this is a multiclient driver. I used to make internal midi connections on my PC with Hubi’s Midi Loopback Device, but I’m sure you could use Midi-ox or so in between as well.
Maybe you can connect even directly to your souncard’s driver with both programs if this driver is multiclient.