instance
| Platform: | WINDOWS (other platforms always just yield 0) |
| Definition: | atom a = instance() |
| Description: | Return a handle to the current program. |
| pwa/p2js: | Always yields 0 (as per Linux). |
| Comments: | This handle value can be passed to various Windows routines
to get information about the current program that is running,
i.e. your program. Each time a user starts up your program,
a different instance will be created.
In C, this is the first parameter to WinMain(). On Linux, instance() always returns 0 (aka NULL). |
| Implementation: | via :%opInstance in builtins\VM\pInstance.e (an autoinclude). |
| See Also: | Calling C Functions |