Boolean TokenLoadTokenChunk(
dword tokenChars, /* four characters of token */
ManufacturerID manufacturerID, /* manufacturer ID of token */
MemHandle lmemBlock, /* handle of block for chunk */
word * chunkSize, /* returned size of new chunk */
ChunkHandle * chunkHandle); /* returned chunk handle */
This routine loads the specified token's
TokenEntry
structure into a newly-allocated chunk. The returned error flag will be
true
if the token could not be found,
false
otherwise.
Pass this routine the following:
tokenChars
manufacturerID
lmemBlock
chunksize
chunkHandleWarnings: This routine can move chunks in the passed block, thereby invalidating pointers to any chunk in the block.
Include: token.h
void * TokenLockTokenMoniker(
TokenMonikerInfo tokenMonikerInfo); /* The DB group and item numbers
* as returned by TokenLookupMoniker() */
This routine locks a token's moniker so it may be drawn; it returns a pointer to the locked chunk containing the moniker information. Pass it the structure returned by
TokenLookupMoniker()
.
Be Sure To: Unlock the moniker with
TokenUnlockTokenMoniker()
after you have finished drawing it.
Include: token.h
Boolean TokenLookupMoniker(
dword tokenChars, /* four characters of token */
ManufacturerID manufacturerID, /* manufacturer ID of token */
DisplayType displayType, /* display type of token */
VisMonikerSearchFlags searchFlags, /* flags for finding token */
TokenMonikerInfo * tokenMonikerInfo); /* DB group and item of token */
This routine finds and retrieves a pointer to the specific moniker for the specified token, given also the token's display type and other attributes. Pass 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.
tokenDBItem
TokenMonikerInfo
structure, in which the token's group and item numbers will be returned.
The return value is an error flag: it will be
true
if the item could not be found in the token database,
false
otherwise.
Include: token.h
word TokenOpenLocalTokenDB()
This routine opens the local token database. It returns zero on success, and a
VMStatus
error code on failure.
Include: token.h
Boolean TokenRemoveToken(
dword tokenChars, /* four characters of token */
ManufacturerID manufacturerID, /* manufacturer ID of token */
This routine removes the specified token and its moniker list from the token database. It returns an error flag: if the token could not be found, the returned flag is
true
; otherwise it is
false
. Pass the following:
tokenChars
manufacturerIDInclude: token.h
void TokenUnlockTokenMoniker(
void * moniker);
This routine unlocks a moniker that had been locked with
TokenLockTokenMoniker()
. Pass a pointer to the locked moniker, as returned by the locking routine.
Include: token.h
word TypeFromFormatID(id);
ClipboardItemFormatID id;
This macro extracts the word-sized format ID (of type
ClipboardItemFormat
) from a
ClipboardFormatID
argument.
GEOS SDK TechDocs
|
|
TokenLoadMonikerBuffer() ...
|
UserAllocObjBlock ...