|
![]() |
![]() |
version 2003
PA_Is4DServer → char
Parameter | Type | Description | ||||
This command does not require any parameters | ||||||
Function result | char | ← | 1 if running on 4D Server, otherwise 0 |
Description
The command
PA_Is4DServer
returns 1 if the type of 4D environment is 4D Server, otherwise it returns 0.
Testing the type of running application is useful in defining different initialization methods, testing serial numbers, etc.
Example
In the main function of the plug-in:
void PluginMain( long selector, PA_PluginParameters params )
{
switch ( selector )
{
case kInitPlugin :
InitPlugin();
break;
// ...Other selector values...
}
}
void InitPlugin()
{
if ( PA_Is4DServer() )
PrepareFor4DServer();
if ( PA_Is4DClient() )
PrepareFor4DClient();
if ( PA_Is4DMono() )
PrepareFor4DMono();
// do some special thing if it is a demo (limited) 4D version
if ( PA_IsDemoVersion() )
SetDemoMode();
}
See Also
PA_Is4DClient , PA_Is4DMono , PA_IsDemoVersion .
Error Handling
always returns 0