NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Compiler Error C2364

cannot initialize pointer to code-based object 'identifier'

Pointers to code-based object cannot be statically initialized.

Example

__declspec(allocate("_CODE")) int i ;
int *p = &i ;

To fix this example, rewrite the statements to initialize the pointer dynamically:

__declspec(allocate("_CODE")) int i ;
int *p ;
main() {
   p = &i ;
   .
   .
   .
}