Skip to main content

IsSourceInternal

Function IsSourceInternal(const aSourceNum : integer) : boolean;

Example

procedure ScriptEvent(var Value: variant);
begin
Value := IsSourceInternal(1); // True: App
end;

Usage

IsSourceInternal returns true only for Velox's internal App source number 1.

Parameters and result

ItemTypeDescription
aSourceNuminteger, constSource number to classify.
ResultbooleanTrue only when aSourceNum = 1; otherwise False.

Behaviour and security boundary

  • A False result means only “not the App constant”; it does not prove that the value is a valid external source.
  • Zero, negative and future/unknown source numbers all return False.
  • The source number is metadata, not authentication. Do not grant trust merely because a value equals 1 unless the surrounding Velox flow has established and protected that value.
  • Use GetSourceCode and test for Null if validity as one of the current four source constants matters.
  • IsSourcePartner is the exact complement and consequently returns True for invalid numbers.

Additional Technical Info

IsSourceInternal reports whether a numeric source is exactly Velox source 1 (App). Every other integer returns False, including all recognized external sources and invalid values.

Source classification

ValueCanonical sourceResult
1AppTrue
2EDIFalse
3WebFalse
4APIFalse
any other integerinvalid/unknownFalse

Implementation

The imported function is one exact expression: Result := (aSourceNum = 1). It does not call GetSourceCode, inspect request/session state or consult configuration.

Side effects, errors and performance

The function is pure, constant-time and performs no I/O. Every integer has a defined Boolean result.

Related entries

Created 2026-07-15