Training
×

Deviations from NTX

There are two major differences between the Win32 and the CLR environments:
- pointers: Win32 heavily uses pointers, CLR does not support pointers
- exceptions: Win32 has some support, CLR uses them extensively
Because of CLR pointer limitations, some NTX functions are not (directly) available in INtimeDotNet or just have no use.
 
Exception handling example in C:
NTXHANDLE hObject;
hObject = ntxCreateRtMailbox(hLocation, NTX_DATA_MAILBOX);
if (NTX_BAD_NTXHANDLE == hObject) {
  status = ntxGetLastRtError();
  // further exception handling
}
// use hObject
 
The same in Visual Basic:
Dim hObject As UInt32
Try
  hObject = ntxCreateRtMailbox(hLocation, NTX_DATA_MAILBOX) Catch exc As INtimeException
  status = exc.status
  ' further exception handling
End Try
' use hObject