| 195 | } |
| 196 | |
| 197 | VARIANT createVariantString(const char* str){ |
| 198 | |
| 199 | BOF_LOCAL(msvcrt, calloc); |
| 200 | BOF_LOCAL(OleAut32, SysAllocString); |
| 201 | BOF_LOCAL(msvcrt, free); |
| 202 | BOF_LOCAL(msvcrt, strlen); |
| 203 | |
| 204 | int wideLen = (strlen(str) * 2) + 2; |
| 205 | wchar_t* strW = (wchar_t*)calloc(1, wideLen); |
| 206 | toWideChar((char*)str, strW, wideLen); |
| 207 | |
| 208 | VARIANT result; |
| 209 | result.vt = VT_BSTR; |
| 210 | result.bstrVal = SysAllocString(strW); |
| 211 | |
| 212 | free(strW); |
| 213 | return result; |
| 214 | } |
| 215 | |
| 216 | ICorRuntimeHost* loadCLR(bool v4){ |
| 217 |
no outgoing calls
no test coverage detected