Code/Build Hello World

For the purposes of this exercise, the program instance you create will:

  • Register itself to the Linxter ISB
  • Retrieve its configuration settings
  • Activate itself
  • Create a communication channel request to itself and automatically accept it
  • Send a message (to itself)
  • Receive a message back from the ISB
  1. You will need to download and install the Linxter SDK before you can begin this section. You will also need to download the Hello World solution.
  2. Open Visual Studio.
  3. Open your Hello World solution. Be sure to have your Solution Explorer view open (View – Solution Explorer)
  4. Add a New Item as illustrated below.
  5. In the item dialog, add the “Linxter Integration” template as illustrated below.
  6. This will start the Linxter Integration template Wizard. Enter your Web Manager username and password, and click the “Login” button to move to the second part of the Wizard.
  7. Select your Hello World program and click “Finish”.
  8. The Linxter Integration template wizard has taken care of all the Linxter SDK integration steps for you. It has added the Linxter dll, its encrypted datastore, and embedded your Company, Developer and Progam IDs.
  9. After completing the integration, open the Program.cs file and replace the ActivityId string value with the Activity ID assigned to your program when you registered it to the ISB.

  10. You are now ready to run your Hello World program. Running the program will open a console window. You may terminate the console application at anytime by hitting ENTER.

    Sending and Receiving Messages

    Scheduled sending and receiving are automatically enabled when instances of your program are running. All of the timing code for the scheduled sending and receiving is taken care of for you within the SDK. The settings for these events can be dynamically updated through Web Manager. Sending and receving messages is asynchronous and non-blocking to your program. This means your program instance can keep on doing what it is doing and not worry about getting hung while processing a send or receive operation.

    Optional: In your code, you can also send and receive on-demand using the SendNow() and ReceiveNow() method calls.

  11. When your program instance receives a message back from the ISB, it will display the message that was sent to it (found within the Program.cs file).
  12. That’s it! You have now created your first Linxter enabled program, and sent and received a message over a secure, reliable, dynamic communication channel.
  13. When you run your program again, it will be faster because it does not need to register itself onto the Linxter ISB and retrieve its settings.

You can have Hello World send multiple messages to itself. However, if you want to experiment with message sending and retrieval speed, check out our open source Visual Basic Performance Tester console app.