NXVmGetStringType

Returns the type of string that is being passed or returned in NKS interfaces.

Library:LibC
Classification:NKS
Service:NKS Virtual Machine

Syntax

  #include <nks/vm.h>
   
  int NXVmGetStringType (
     NXStrType_t    *type);
  

Parameters

type

(OUT) Points to the string type and returns one of the following flags:

Flag

Value

Description

NX_STR_UTF8

0x00000000

UTF-8 string

NX_STR_UNICODE

0x00000001

Unicode string

NX_STR_ASCII

0xFFFFFFFF

ASCII string

Return Values

If successful, returns 0; otherwise returns an error:

Decimal

Hex

Constant

Description

105

0x69

NX_ENOCONTEXT

The calling thread has no NKS context.

Remarks

NXVmGetStringType is informational only. It returns the effective type of the string that is currently in use by NKS for the application (or VM), as specified when the application was linked. Once the string type is set at link time, there is no way to change it.

The string type defaults to Unicode. You must perform any additional translation between Unicode and ASCII representation outside NKS.

All passed and returned NKS strings—for example, to NXFileOpen and from NXGetAttr—conform to this string type, which may or may not be the most efficient for the host platform.