Re: oject returned by plugin

"brucexs-/[email protected] [power-pro]" <[email protected]> 19 Jun 2019 13:28:49 +0000
Newsgroups gmane.comp.windows.power-pro
Message-ID <[email protected]>
Just to get you started, some basics, assuming I understand what you want correctly. 

 Your plugin must register a signature with regustersig.
 Your signature should be three characters, at least one of which is less than hex 0x20.  I recommand the second character be the one that is less than 0x20..The second cannot be 0x06 but any other will do.  
 

 Error check registersig to make sure you are not conflicting with other plugins if you are using them.  I am pretty sure all the ones that I wrote use 0x as second character.  YOu can look at handles from other plugins to be use (using case function for hex translation, eg).
 

 Your plugin will return handles to powerpro and work with handles as arguments in plugin calls.
 A handles starts with your signature and then as any string of 8-bit characters, terminated by the first 0x00.
 

 You use that string to somehow manage the data structures you create.  Possibly you could keep a table mapping strings your crate (eg 8 digit numbers) to the object pointers returned by Windows.  Or you could process those object points to remove 00 bytes, eg by inserting an escape sequence, and then use that resuting string in your handle.  The class plugin does that in the remove00 function.
 

 You will need to understand how powerpro frees local variable to make sure you free the associated Windows memory for the object.
 

 I must say, I did not think anyone would be trying to write a plugin at this stage!