Using wRTOS Code Snippets in Visual Studio
wRTOS 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 |
|---|---|
| RtCreateProcesswRTOSSnippet | 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. |
| CreateThreadwRTOSSnippet | HANDLE CreateThread( LPSECURITY_ATTRIBUTES lpThreadAttributes, DWORD StackSize, LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId ); |
| RtCreateTimerwRTOSSnippet | HANDLE RtCreateTimer( PSECURITY_ATTRIBUTES pThreadAttributes, ULONG StackSize, VOID (RTFCNDCL *Routine) (PVOID context), PVOID Context, ULONG Priority, CLOCK Clock ); |
| RtAttachInterruptwRTOSSnippet | HANDLE RtAttachInterrupt(
PATTACH_INTERRUPT_PARAMETERS Parameters
);
|
To insert a code snippet:
- Place your cursor where you want to insert the code snippet.
- Right-click and select Insert Snippet (or use Ctrl+K).
- Select the MaxRT wRTOS snippet folder, select the snippet you want to insert, and press the Tab or Enter key.
The syntax for the selected snippet is inserted. 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.
Related topics:
- Supported Visual Studio Versions
- Supported .NET Versions
- Setting up Visual Studio for wRTOS Templates
- Using the wRTOS Application Template
- Using the wRTOS RTDLL Template
- Compiler and Linker Options
- Building a 32-bit User Space Application
- Visual Studio C Runtime Support
- Creating a Managed Code Application