Sack Library Documentation
ContentsIndexReferenceHome
PreviousUpNext
sack::app::registry::RegisterAndCreateGlobal Function
C++
IMPORT_METHOD void CPROC RegisterAndCreateGlobal(POINTER * ppGlobal, PTRSZVAL global_size, CTEXTSTR name);
#define SimpleRegisterAndCreateGlobal( name ) RegisterAndCreateGlobal( (POINTER*)&name, sizeof( *name ), WIDE(#name) )
Parameters 
Description 
POINTER * ppGlobal 
address of the pointer to global memory
PTRSZVAL global_size 
size of the global area to create 
CTEXTSTR name 
name of the pointer to global type to create.
text string to register this created global as. 

attempts to use dynamic linking functions to resolve passed global name if that fails, then a type is registered for this global, and an instance created, so that that instance may be reloaded again, otherwise the data in the main application is used... actually we should deprecate the dynamic loading part, and just register the type. 

 

SimpleRegisterAndCreateGlobal Simply registers the type as a global variable type. Allows creation of the global space later. 

typedef struct {
   int data;
} my_global;
my_global *global;
   
PRELOAD( Init )
{
    SimpleRegisterAndCreateGlobal( global );
}
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.
Copyright (c) 2000+. All rights reserved.
What do you think about this topic? Send feedback!