Home > database >  Newbie question: about the PB application problem of Handle
Newbie question: about the PB application problem of Handle

Time:10-01

I called in the main application of the Open event PB's own function Handle (GetApplication ()), after the compiled EXE, why Open multiple applications get Handle values are the same? In my concept, Handle value should be different for each application:
If the Handle value can only be the same, the other has a way to separate the same EXE open different applications?
I am using PB6.5

CodePudding user response:

The application handle is unique to the pb, non-standard, it can only be used to distinguish different "object", rather than the different instances of the same "object", to distinguish different instances of the same application, estimated only by CreateProcess () to run the exe acquired after its process ID,

CodePudding user response:

Handle (GetApplication ()) is the PB application object Handle, should be PB's own things, the Handle of the application window also handles are two different concepts, the application is running, all objects in the system can Handle to have different values,

If you want to use the Handle value to separate the same open EXE, the application of it is only through the Handle to get the application window, or to differentiate between the different process of PID values,
  • Related