This function gets a list of all the keys in a Design Notes file.
FileHandlenoteHandle,char*keyBufArray[64],intkeyArrayMaxLen
noteHandle argument is the file handle that OpenNotesFile() returns.
keyBufArray[64] argument is the buffer array where the keys are stored.
keyArrayMaxLen argument is the integer that GetNotesKeyCount(noteHandle) returns, indicating the maximum number of items in the key buffer array.
A Boolean value: true indicates the operation is successful; false otherwise. The keyBufArray argument receives the key names.
The following code prints the key names and values of all the keys in the Design Notes file that are associated with the welcome.html file:
typedef char[64] InfoKey;
FileHandle noteHandle = OpenNotesFile("file:///c|/sites/avocado8/¬
iwjs/welcome.html");
if (noteHandle > 0){
int keyCount = GetNotesKeyCount(noteHandle);
if (keyCount <= 0)
return;
InfoKey* keys = new InfoKey[keyCount];
BOOL succeeded = GetNotesKeys(noteHandle, keys, keyCount);
if (succeeded){
for (int i=0; i < keyCount; i++){
printf("Key is: %s\n", keys[i]);
printf("Value is: %s\n\n", GetNote(noteHandle, keys[i]);
}
}
delete []keys;
}
CloseNotesFile(noteHandle);
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/dreamweaver/8/apiref/04_des22.htm