我正在使用 OpenHaptics 编程指南中指示的示例回调函数。但是,我得到 SystemAccessViolationException 并且无法摆脱它。这是功能:
HDCallbackCode HDCALLBACK queryButtonStateCB(void *userdata) {
HDboolean *pButtonDown = (HDboolean *) userdata;
*pButtonDown = gButtonDownOccurred;
/* We sampled the button down, so clear the flag */
gButtonDownOccurred = FALSE;
return HD_CALLBACK_DONE;
}
异常发生在以下行:*pButtonDown = gButtonDownOccurred;
有人会帮我吗?