58
Chapter 4: The Design Notes API
BOOL GetNote()
Description
This function gets the value of the specified key in the specified Design Notes file.
Arguments
FileHandle
noteHandle
,
const char
keyName[64]
,
char*
valueBuf
,
int
valueBufLength
•
The
noteHandle
argument is the file handle that the
OpenNotesFile()
function returns.
•
The
keyName[64]
argument is a string that contains the name of the key.
•
The
valueBuf
argument is the buffer where the value is stored.
•
The
valueBufLength
argument is the integer that
GetNoteLength(
noteHandle
,
keyName
)
returns, which indicates the maximum length of the value buffer.
Returns
A Boolean value:
true
indicates the operation is successful;
false
otherwise. The
valueBuf
argument receives
the value of the key.
Example
The following code gets the value of the
comments
key in the Design Notes file that is associated
with the welcome.html file:
FileHandle noteHandle = OpenNotesFile("file:///c|/sites/avocado8/¬
iwjs/welcome.html");
if(noteHandle > 0){
int valueLength = GetNoteLength( noteHandle, "comments");
char* valueBuffer = new char[value 1];
GetNote(noteHandle, "comments", valueBuffer, value 1);
printf("Comments: %s",valueBuffer);
CloseNotesFile(noteHandle);
}
int GetNoteLength()
Description
This function gets the length of the value that is associated with the specified key.
Arguments
FileHandle
noteHandle
,
const char
keyName[64]
•
The
noteHandle
argument is the file handle that the
OpenNotesFile()
function returns.
•
The
keyName[64]
argument is a string that contains the name of the key.
Returns
An integer that represents the length of the value.
Example
See
“BOOL GetNote()” on page 58
.
000_DW_API_Print.book Page 58 Wednesday, August 20, 2003 9:14 AM
Summary of Contents for DREAMWEAVER MX 2004
Page 1: ...Dreamweaver API Reference...
Page 24: ...24 Contents...
Page 32: ......
Page 70: ...70 Chapter 5 Fireworks Integration...
Page 76: ...76 Chapter 6 Flash Integration...
Page 116: ...116 Chapter 9 The JavaBeans API...
Page 140: ......
Page 152: ...152 Chapter 11 Application...
Page 218: ...218 Chapter 12 Workspace...
Page 248: ...248 Chapter 13 Site...
Page 292: ...292 Chapter 14 Document...
Page 378: ...378 Chapter 17 Design...
Page 430: ...430 Chapter 18 Code...
Page 486: ...486 Index...