Hi, Miguel -
I didn't want to leave my promise to help you hanging over the weekend.
I've attached three small zip files:
- PBNI API Callbacks PB.zip is a PB test app that uses the PBNI extension, n_pbni_api_callbacks.pbx.
- PBNI.zip contains the PBNI source code files. I place this folder in my Visual Studio development folder at the same level as the VS project/solution folder. In this way I have a single development copy of the PBNI source files that can be easily attached to this and other PBNI projects I might be working on.
- PBNI_API_Callbacks VS.zip is the Visual Studio development folder that contains the VS solution (.sln) file and related source code files.
I have the VS project configured to produce the DLL with the .pbx extension, even though this is not necessary (as Roland has indicated).
This PBNI example was created as a way to obtain the hMonitor (Windows handle to a monitor) values for every monitor in use on a PC. The technique prescribed to accomplish this is by using a callback function, which PB does not support. There are other ways you can obtain the handles to all monitors, but utilizing a callback function is a much simpler approach.
The PBNI example also contains functions for peeking into a PB structure from within PBNI. This was something I was interested in learning about recently. These functions illustrate how to access PB function argument values that are passed into a PBNI method, so that is why I selected this PBNI example to give to you.
John