We can break down the example into the following steps.
The two VI_NULL values following the address string are not important at this time. They specify that the session should be initialized using VISA defaults. Finally, viOpen() returns the communication channel to the device in the parameter instr. From now on, whenever you want to talk to this device, you use the instr variable to identify it. Notice that you do not use the defaultRM handle again. The main use of defaultRM is to tell the VISA driver to open communication channels to devices. You do not use this handle again until you are ready to end the program.
Notice that the program shows a second call to viClose(). When you are ready to shut down the program, or at least close down the VISA driver, you use viClose() to close the communication channel that was opened using viOpenDefaultRM().