MCPcopy Create free account
hub / github.com/CommE2E/comm / StrToGuid

Function StrToGuid

desktop/addons/windows-pushnotifications/NodeRtUtils.cpp:379–398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

377 }
378
379 bool StrToGuid(Local<Value> value, LPCLSID guid)
380 {
381 if (value.IsEmpty() || !value->IsString())
382 {
383 return false;
384 }
385
386 v8::String::Value stringVal(v8::Isolate::GetCurrent(), value);
387 std::wstring guidStr(L"{");
388 guidStr += StringToWchar(stringVal);
389 guidStr += L"}";
390
391 HRESULT hr = CLSIDFromString(guidStr.c_str(), guid);
392 if (FAILED(hr))
393 {
394 return false;
395 }
396
397 return true;
398 }
399
400 bool IsGuid(Local<Value> value)
401 {

Callers 2

IsGuidFunction · 0.85
GuidFromJsFunction · 0.85

Calls 1

StringToWcharFunction · 0.85

Tested by

no test coverage detected