NXVmDestroy

Terminates a known virtual machine.

Library:LibC
Classification:NKS
Service:NKS Virtual Machine

Syntax

  #include <nks/vm.h>
   
  int NXVmDestroy (
     NXVmId_t   id);
  

Parameters

id

(IN) Specifies the virtual machine or application to terminate.

Return Values

If successful, returns 0; otherwise, returns a nonzero error code:

Decimal

Hex

Constant

Description

69

0x45

NX_EPERM

The caller has insufficient rights to destroy the specified virtual machine.

77

0x4D

NX_ESRCH

The id parameter does not reference a known virtual machine.

Remarks

NXVmDestroy marks the specified virtual machine (and application running in it) for destruction. The actual destruction can occur sometime in the future, but it is not guaranteed.

The id parameter is the identity created from NXVmSpawn. It is not the same as an NLMâ„¢ handle. Only the creator can legally terminate a virtual machine.

If the targeted application cooperates badly, termination might occur badly or not at all. However, the fact that the identity of the target cannot be known without its cooperation limits perniciousness.

See Also