|
GetResourceSize | |
Size = GetResourceSize(Index) | |
Parameters: Index = The Index of the resource in the internal resource buffer |
|
Returns: Size = The Size (in bytes) of the resource |
|
The GetResourceSize function returns the size of a file that's been bound to the program executable at compile time using the #AddResource directive. To query the resource the we give the GetResourceSize function the index of the resource in the internal resource buffer array. You can locate a bound resource by using FindResourceIndex and it's filename. GetResourceSize is useful as it allows a program to read and manipulate the data directly from the memory rather than disc ( ie. decompression, decryption etc). So the bound resource is hidden from the users of your program, meaning you don't need to include the file externally with the final game/application. FACTS: * GetResourceSize will return 0 if the resource doesn't exist. * Resources can be an alternative to using DATA statements. * For more information about resource binding see the #AddResource directive. |
|
Example Source: Download This Example
|
Related Info: | #AddResource | Data | FindResourceIndex | GetResourcePtr | PeekByte | PeekInt : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |