Does anyone have any advice, tips, C++ source for creating simple PBNI examples they are willing to share with the community?
The "pbadd" non-visual object example in the PowerBuilder Native Interface Programmers Guide and Reference publication compiles with multiple errors as it is listed and the Visual Studio wizards supplied in the PB SDK are woefully out of date (the most current wizard is for Visual Studio 2005 and do not work in Visual Studio Community 2017). With corrections to the example code, I'm able to get a clean compile of the pbadd example source and produce a DLL, then rename the extension to .PBX - But I get an error ("The string returned by function "GetDescription" has a syntax error.") when attempting to Import the extension into a PBL.
The PBNI publication states there are examples in the Appeon web site and supplies the URL (which is a valid URL), but a search from that page for anything relevant to PBNI turns up nothing. Ditto for a search in the PowerBuilder section of CodeXchange. I'm stymied.
Many thanks in advance!
C2556 'LPCSTR PBX_GetDescription(void)': overloaded function differs only by return type from 'LPCTSTR PBX_GetDescription(void)
C2371 'PBX_GetDescription': redefinition; different basic types
I'm going to examine the WinsockPBNI example you have posted on your site. Thanks for making this available!!!
Have you made any changes to the PBNI SDK header (.h) files? What tool/version are you using to compile the C++?
The snippet above is from an ANSI example. The Winsock example is Unicode. You don't have to use Unicode in the C++ project, the strings that pass between PB code and C++ code are converted automatically.
My Visual C++ / Visual Studio skills are rudimentary at this point.
It appears the PBNI documentation has not been updated in a LONG time, save for changing all SAP references Appeon.