| 109 | } |
| 110 | |
| 111 | long FindHandle(process_t* proc, handle_id_t id, Handle** handle){ |
| 112 | if(id < 1 || id - 1 > static_cast<handle_id_t>(proc->handles.get_length())){ |
| 113 | return 1; |
| 114 | } |
| 115 | |
| 116 | *handle = &proc->handles[id - 1]; // Handle IDs start at 1 |
| 117 | |
| 118 | if(!(*handle)->ko.get()) return 2; |
| 119 | |
| 120 | return 0; |
| 121 | } |
| 122 | |
| 123 | long DestroyHandle(process_t* proc, handle_id_t id){ |
| 124 | if(id < 1 || id - 1 > static_cast<handle_id_t>(proc->handles.get_length())){ |
no test coverage detected