Sorry, I don't know what you mean by "API call".
On DEBUG single step it "jumps" out of the code to the accompanying module, where it demands that ptrSafe be inserted in the Declare statements, then as mentioned, after compiling, the code ceases to function (that is, no response when the Command Button the code is attached to is clicked).