CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Variables & WMI

Threaded View

  1. #3
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,637

    Re: Variables & WMI

    I'm not really up on the code he's using, but it seems that the code here probably contributes.

    VARIANT vtProp;
    ...
    QueryResult = vtProp.bstrVal;
    ...
    VariantClear(&vtProp);
    ...
    return QueryResult;

    Looks more like he's returning a pointer to a variant that's getting cleared then going out of scope.
    Last edited by GCDEF; September 5th, 2012 at 11:26 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured