philoserf (philoserf) wrote,
philoserf
philoserf

Have I Ever Mentioned How Much I Love COM

 

Oh, and it is someone else's code too. Many years old.

 

VARIANT variableName;
VariantInit(&variableName);
V_BSTR(&variableName) = SysAllocString(L"SomeString");
V_VT(&variableName) = VT_BSTR;
hr = pUser->Put(CComBSTR("AnotherString"), variableName);
VariantClear(&variableName);

if (FAILED(hr) == TRUE) {
  ThrowADSIError(hr, "Error setting password status.");
}

Subscribe

  • Moved

    I have moved to WordPress at http://philoserf.com/

  • Selection Problem

    I'm finally reading Leo Babauta's The Power of Less. I have read, or have on the list to read, many productivity books. It is a fascination of…

  • Down

    Over tired and lost, not accomplishing what I want, not accomplishing what I need. Difficulty thinking, planning, organizing. Over-extended, in work,…

  • Post a new comment

    Error

    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments