The only change I made was to switch it from using the static C runtime (since I'm using VS2022 and don't have the new CRT DLLs on the machine I was testing on):
No other changes were needed. I left the workaround code in to avoid complicating things. That should only be removed after confirming the original code works, in case removing it is what breaks things.
Looking at your code, you're passing an ASCII string while my code is passing UTF-16 with a BOM. Jon mentioned he has just made some changes so that ASCII/UTF-8 should work better here without needing a BOM, but I don't know if that is what's causing your issue, or something else.
Some detail on what is actually working and failing would be helpful here, as otherwise I'm having to guess with no idea if the DLL is even loading on your system.
Have you checked which functions (if any) are being called?
If I attach the debugger and set a breakpoint in the first line of DVP_LoadText() and deselect and re-select the zpatch, I can walk through it and everything seems to be working as intended.
The only other thing that I forgot to mention before is that I'm running Windows 11, as you can see with the rounded corners of the windows in the screenshots.
If you noticed anything wrong in the steps I took, please let me know
My fault. It turns out it only worked for me because I was using a version with Jon's recent changes in. I went back to the beta from Sunday and it no longer worked. I didn't think those were needed for the old code to work, but it looks like they are.
So things should work again once we release the next beta version.
I'm also posting a zip with the source, a compiled DLL (VS2022, static CRT), and the test file all in one place to avoid having to search the thread for the different parts:
Quick update about this: I added an update to the plugin in GitHub, if someone ever stumble about this thread and wants a working plugin example.
@Leo, I checked the file you attached, and it still includes the Kludge fix for Opus 12.6. The plugin works without it.
I thought it would be good to mention it, since it writes to an area of the memory that it shouldn't.