I'm wanting to create a simple C++ DLL in Visual Studio 2017 that contains entry points that are callable by PowerBuilder, but this has proven to be a bigger challenge than I anticipated. I've been able to create a C++ DLL project in VS, create a header for an entry point prototype and cpp source files for dllmain and for the entry point.
I get a successful build in VS and the DLL is created, but PB reports run-time error R00015 when trying to execute the DLL entry point. This entry point takes no arguments and returns void (it's simply an exercise at this point that I'm trying to get working), so the problem is not an argument datatype mismatch. I've also tried variations passing in a simple int/long by value and returning a long or a boolean, all producing the same error.
It would be extremely helpful to have a template that I know works with PB that I can build off of. Does anyone have a small example VS project/solution and C++ source code you are willing to share that I can use as a template?
John