Creating blocks, adding, deleting items
I'm trying to create a structure, a block in zIRON, and add / delete items in it.
Here is how HeXHub wants the structures to look;
plugins.txt
LPVOID GetConfigurationStringsTable(void);
If this function is exported, it should return the pointer to a table of pointers to configurable items, last item in this table must be -1 (0xFFFFFFFF).
A configurable item begins with a byte specifying its index (must be 1-based), followed by a NULL-terminated string with first word as configuration parameter accepted by !set followed by a description of that parameter. After the NULL terminator follows a list of structures as follows:
5) string:
typedef struct _string_str{
BYTE struct_id; // for strings this is 115
DWORD data_ptr; // pointer to data
WORD string_size; // size of string
} string_str;
6) definition terminator:
typedef struct _term_str{
BYTE struct_id; // if this is last structure in chain, this is -1
} term_str;
Last structure in chain must be 6). The plugin must preserve the configuration information between 2 calls of GetConfigurationStringsTable.
My plugin requires 2 blocks, number 5 and 6.
Here is my current construction;
block tConfStr {
Byte iID;
DWord iPointer;
Word iSize;
}
block tConfTerm {
Byte iID;
}
block tConfTable {
tConfStr iStr;
tConfTerm iTerm;
}
Is this the correct way to build a block of blocks? Also, how do I add new items and delete old items?
[url=http://www.te-home.net/]Team Elite[/url] | [url=http://www.te-home.net/?do=work&id=ziron]zIRON[/url]