根据部分Ex接口的返回值,然后在所有坐标里找出距离指定坐标最近的那个坐标.
| 146 | |
| 147 | // 根据部分Ex接口的返回值,然后在所有坐标里找出距离指定坐标最近的那个坐标. |
| 148 | STDMETHODIMP OpAutomation::FindNearestPos(BSTR all_pos, LONG type, LONG x, LONG y, BSTR *retstr) { |
| 149 | std::wstring s; |
| 150 | obj.FindNearestPos(all_pos, type, x, y, s); |
| 151 | CComBSTR newbstr; |
| 152 | auto hr = newbstr.Append(s.data()); |
| 153 | hr = newbstr.CopyTo(retstr); |
| 154 | return S_OK; |
| 155 | } |
| 156 | |
| 157 | STDMETHODIMP OpAutomation::EnumWindow(LONGLONG parent, BSTR title, BSTR class_name, LONG filter, BSTR *retstr) { |
| 158 | wstring s; |
no test coverage detected