sword _fetchDataIntoLongintVariable(ORACLE_SQL_CURSOR *cursor, PA_Variable variable, unsigned int pos) { if(cursor->rowsFetched) { int intValue = 0; if(cursor->indicators.at(pos) != -1) { OCINumberToInt(cursor->errhp, &cursor->numbers.at(pos), sizeof(int), OCI_NUMBER_SIGNED, &intValue); PA_SetLongintVariable(&variable, intValue); }else{ setLongintVariableValueNull(variable); } PA_SetPointerValue(&cursor->pointers.at(pos), variable); } return cursor->rowsFetched; }
void processWindowMessage(LONG_PTR source, LONG_PTR hwnd, WPARAM wParam, LPARAM lParam) { char procVar[30] = ST_TRAYNOTIFICATION; LONG_PTR procNbr = 0; PA_Variable fourDVar; BOOL bFuncReturn; bFuncReturn = SetForegroundWindow(windowHandles.fourDhWnd); switch (source) { case TRAY_ICON_FUNCTION : if( ( PA_Get4DVersion() & 0x0000FFFF ) < 0x00001100 ) { // REB #17503 8/8/08 in v11 we can no longer call PA_GetVariable from this subclass. // Instead of setting the ST_TRAYNOTIFICATION variable, we will just do a call // back to the monitoring process in 4D on double clicks. strcpy(procVar, ST_TRAYNOTIFICATION); fourDVar = PA_GetVariable(procVar); if (PA_GetVariableKind(fourDVar) == eVK_Longint) { PA_SetLongintVariable(&fourDVar, lParam); PA_SetVariable(procVar, fourDVar, 1); findIconID( &startPtr, (LONG_PTR)wParam, &procNbr); // find icon id and get process number PA_UpdateProcessVariable(procNbr); } } else { if((lParam==515)|(lParam==518)) { findIconID( &startPtr, (LONG_PTR)wParam, &procNbr); // find icon id and get process number PA_UpdateProcessVariable(procNbr); }; }; break; case RESPECT_TOOL_BAR_FUNCTION : // REB #16207 1/7/09 In v11 we can no longer call PA_GetVariable from this subclass. // Unfortunately we won't be able to support use of <>TB_NOTIFICATION anymore. if( ( PA_Get4DVersion() & 0x0000FFFF ) < 0x00001100 ) { strcpy(procVar, TB_NOTIFICATION); fourDVar = PA_GetVariable(procVar); if (PA_GetVariableKind(fourDVar) == eVK_ArrayLongint) { if (PA_GetArrayNbElements(fourDVar) == 4) { if (toolBarRestrictions.leftProcessNbr > 0) { PA_SetLongintInArray(fourDVar, 1, hwnd); PA_SetVariable(procVar, fourDVar, 0); PA_UpdateProcessVariable(toolBarRestrictions.leftProcessNbr); } if (toolBarRestrictions.topProcessNbr > 0) { PA_SetLongintInArray(fourDVar, 2, hwnd); PA_SetVariable(procVar, fourDVar, 0); PA_UpdateProcessVariable(toolBarRestrictions.topProcessNbr); } if (toolBarRestrictions.rightProcessNbr > 0) { PA_SetLongintInArray(fourDVar, 3, hwnd); PA_SetVariable(procVar, fourDVar, 0); PA_UpdateProcessVariable(toolBarRestrictions.rightProcessNbr); } if (toolBarRestrictions.bottomProcessNbr > 0) { PA_SetLongintInArray(fourDVar, 4, hwnd); PA_SetVariable(procVar, fourDVar, 0); PA_UpdateProcessVariable(toolBarRestrictions.bottomProcessNbr); } } } } else { // REB 3/29/10 #22878 Since we can't update the TB_NOTIFICATION array, just do a call to the toolbar processes. if (toolBarRestrictions.leftProcessNbr > 0) { PA_UpdateProcessVariable(toolBarRestrictions.leftProcessNbr); } if (toolBarRestrictions.topProcessNbr > 0) { PA_UpdateProcessVariable(toolBarRestrictions.topProcessNbr); } if (toolBarRestrictions.rightProcessNbr > 0) { PA_UpdateProcessVariable(toolBarRestrictions.rightProcessNbr); } if (toolBarRestrictions.bottomProcessNbr > 0) { PA_UpdateProcessVariable(toolBarRestrictions.bottomProcessNbr); } } break; } }