Question:
Can I pass the address of a PowerBuilder function as an argument to an external function located in a dll? The dll documentation shows that it expects the address of an error function of the form “void my_function(void *ptr)” as a parameter.
Answer:
You cannot do this directly in PowerBuilder.
The way around it is to write a C wrapper for the API call, and then make your call to your wrapper DLL in PowerBuilder. The wrapper then calls the API passing the function pointer to itself. Then you can use the C wrapper to pass back any errors or notifications to PowerBuilder.
Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.























