Using RTX Code Snippets in Visual Studio

RTX provides a collection of code snippets that can be inserted where you need them in your code.

The following snippets are available:

Snippet Name Syntax Inserted
RtCreateProcessRTXSnippet
BOOL RtCreateProcess(
    LPCTSTR lpApplicationName,
    LPTSTR lpCommandLine,
    LPSECURITY_ATTRIBUTES lpProcessAttributes,
    LPSECURITY_ATTRIBUTES lpThreadAttributes,
    BOOL bInheritHandles,
    DWORD dwCreationFlags,
    LPVOID lpEnvironment,
    LPCTSTR lpCurrentDirectory,
    LPSTARTUPINFO lpStartupInfo,
    LPPROCESS_INFORMATION lpProcessInformation
);

NOTE:  The pathname to the application must be contained within quotation marks.

CreateThreadRTXSnippet
HANDLE CreateThread(
    LPSECURITY_ATTRIBUTES lpThreadAttributes,
    DWORD StackSize,
    LPTHREAD_START_ROUTINE lpStartAddress,
    LPVOID lpParameter,
    DWORD dwCreationFlags,
    LPDWORD lpThreadId
);
RtCreateTimerRTXSnippet
HANDLE RtCreateTimer(
    PSECURITY_ATTRIBUTES pThreadAttributes,
    ULONG StackSize,
    VOID (RTFCNDCL *Routine) (PVOID context),
    PVOID Context,
    ULONG Priority,
    CLOCK Clock
);
RtAttachInterruptRTXSnippet
HANDLE RtAttachInterrupt(
    PATTACH_INTERRUPT_PARAMETERS Parameters
);

To insert a code snippet:

  1. To insert a snippet in your code, begin typing. When you enter a recognized prefix, such as Rt, the shortcut menu appears.
  2. Navigate to the snippet you want, select it, and press the Tab or Enter key. The syntax for the selected snippet is inserted.
  3. Code that can be changed appears highlighted in yellow. Press the Tab key to jump between highlighted code segments. Press the Enter key when you are finished editing.
IntervalZero.com | Support | Give Feedback