Pluginsaverecord

int Pluginsaverecord(t_uddsave *psave,ulong tag,ulong size,void *data);


Saves plugin-specific record to the .udd file. Call this function only from the callback ODBG2_Pluginsaveudd().

If amount of data is large and data is sparse, consider using Pluginpackedrecord() instead.
Pluginpackedrecord() and Pluginsaverecord() are interchangeable. The data returned to ODBG2_Pluginuddrecord() will be uncompressed to the original state.


Parameters:

psave
(in) Pointer to internal OllyDbg structure that identifies plugin in the .udd file. Plugin receives this pointer from ODBG2_Pluginsaveudd(). Plugin is not allowed to modify psave directly
tag
(in) Plugin-unique constant in the range 1..65535 that identifies records of given type. It is OK to save as many records with the same tag as necessary. When OllyDbg restores .udd file, it reports this tag to ODBG2_Pluginuddrecord(). To avoid collisions with other identically named plugins, I recommend to randomize tags
size
(in) Record size, bytes
data
(in) Pointer to the record


Return values:

Returns 0 on success and -1 on error


When OllyDbg restores module-related data from the .udd file, it passes records saved by plugin as a sequence of calls to ODBG2_Pluginuddrecord().

If data contains address belonging to the processed module, I recommend to save it in a relative form, as an offset from the module base. Offsets remain valid even if module (DLL) is reallocated.


See also:
PluginsODBG2_Pluginsaveudd(), ODBG2_Pluginuddrecord()Pluginpackedrecord()