C++ equivalent of "Convert Mouse Location To World Space"

Just wanna know if this is Kosher or if I am doing something really wonky here.