-1.#QNAN is a quiet (non-signaling) Not a Number value, which is what The ni-DMM instrument driver returns to indicate
that it could not take the required measurement. NaN, +Inf, and -Inf values often cause overflow or other exceptions when used in floating point operations. In your case, you're trying to measure resistance across an open circuit, which is theoretically infinite. You can test the value before trying to use it by passing it to the niDmm_IsOverRange function.