MCPcopy Index your code
hub / github.com/CCob/BOF.NET / createVariantString

Function createVariantString

bofs/bofnet_execute.cpp:197–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195}
196
197VARIANT 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
216ICorRuntimeHost* loadCLR(bool v4){
217

Callers 2

goFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected