| 1142 | } |
| 1143 | |
| 1144 | static cell_t FrameIterator_GetFunctionName(IPluginContext *pContext, const cell_t *params) |
| 1145 | { |
| 1146 | Handle_t hndl = (Handle_t)params[1]; |
| 1147 | HandleError err; |
| 1148 | SafeFrameIterator *iterator; |
| 1149 | |
| 1150 | HandleSecurity sec; |
| 1151 | sec.pIdentity = g_pCoreIdent; |
| 1152 | sec.pOwner = pContext->GetIdentity(); |
| 1153 | |
| 1154 | if ((err=handlesys->ReadHandle(hndl, g_FrameIter, &sec, (void **)&iterator)) != HandleError_None) |
| 1155 | { |
| 1156 | return pContext->ThrowNativeError("Could not read Handle %x (error %d)", hndl, err); |
| 1157 | } |
| 1158 | |
| 1159 | const char* functionName = iterator->FunctionName(); |
| 1160 | if (!functionName) |
| 1161 | { |
| 1162 | return pContext->ThrowNativeError("Iterator out of bounds. Check return value of FrameIterator.Next"); |
| 1163 | } |
| 1164 | |
| 1165 | char* buffer; |
| 1166 | pContext->LocalToString(params[2], &buffer); |
| 1167 | size_t size = static_cast<size_t>(params[3]); |
| 1168 | |
| 1169 | ke::SafeStrcpy(buffer, size, functionName); |
| 1170 | return 0; |
| 1171 | } |
| 1172 | |
| 1173 | static cell_t FrameIterator_GetFilePath(IPluginContext *pContext, const cell_t *params) |
| 1174 | { |
nothing calls this directly
no test coverage detected