word TokenDefineToken(
dword tokenChars, /* four token characters */
ManufacturerID manufacturerID, /* manufacturer ID for token */
optr monikerList, /* optr of moniker list */
TokenFlags flags); /* token flags */
This routine adds a new token and moniker list to the token database. If the token already exists in the token DB, the old will be replaced with the new. This routine must only be called by a thread that can lock the block in which the passed moniker or moniker list resides. This routine must be passed the following parameters:
tokenChars
manufacturerID
monikerList
flags
TokenFlags
indicating the relocation status of the moniker list.Warnings: This routine may legally move locked LMem blocks (token database items), thereby invalidating all pointers to token database items.
Include: token.h
Boolean TokenGetTokenInfo(
dword tokenChars, /* four characters of token */
ManufacturerID manufacturerID, /* manufacturer ID of token */
TokenFlags * flags); /* returned token flags */
This routine returns information about a specified token. Pass it the following:
tokenChars
manufacturerID
flags
This routine returns a non-zero value if the token was found in the token database. It returns zero if the token was not found.
Include: token.h
dword TokenListTokens(
TokenRangeFlags tokenRangeFlags,
word headerSize,
ManufacturerID manufacturerID));
This routine lists all the tokens in the token database. It allocates a new block on the global heap and writes in it an array of
GeodeToken
structures. This routine returns the actual tokens, not the token groups.
The returned dword consists of two values: The high word represents the number of tokens in the returned block and may be extracted with the macro
TokenListTokensCountFromDWord()
. The low word represents the handle of the newly-allocated block and can be extracted with the macro
TokenListTokensHandleFromDWord()
.
Include: token.h
word TokenListTokensCountFromDWord(d);
dword d;
This macro extracts the number of tokens from the value returned by
TokenListTokens()
.
word TokenListTokensHandleFromDWord(d);
dword d;
This routine extracts the MemHandle from the value returned by
TokenListTokens()
.
Boolean TokenLoadMonikerBlock(
dword tokenChars, /* four characters of token */
ManufacturerID manufacturerID, /* manufacturer ID of token */
DisplayType displayType, /* type of display for token */
VisMonikerSearchFlags searchFlags, /* flags for finding token */
word * blockSize, /* returned block size */
MemHandle * blockHandle); /* returned block handle */
This routine loads a specified token's moniker, allocating a new global memory block for the moniker. The returned Boolean will be
false
if the moniker was found,
true
otherwise. Information about the moniker is returned in the values pointed to by
blockSize
(the size of the newly allocated block) and
blockHandle
(the handle of the new block). If the moniker is not found, both return pointers will be NULL and no block will be allocated.
Pass this routine the following:
tokenChars
manufacturerID
displayType
DisplayType
indicating the size of the display (used to indicate small-screen devices, primarily).
searchFlags
VisMonikerSearchFlags
indicating what type of moniker is being requested.
blockSize
blockHandleInclude: token.h
GEOS SDK TechDocs
|
|
TocNameArrayFind() ...
|
TokenLoadMonikerBuffer() ...