PA_Is4DServer

4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next

version 2003


PA_Is4DServer char

ParameterTypeDescription
This command does not require any parameters
Function resultchar1 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

PA_GetLastError always returns 0


4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next