if (FALSE) # Windows-specific example
# Start a new instance
GetNewWrd()
# grab the handle to this instance
wrd <- GetCurrWrd()
# this should be valid
IsValidHwnd(wrd)
# close the instance
wrd$quit()
# now it should be gone and the pointer invalid
if(IsValidHwnd(wrd)){
print("Ouups! Still there?")
} else {
print("GetCurrWrd: no running word instance found...")
}
Run the code above in your browser using DataLab