• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 972
  • Last Modified:

How to pass VARIANT to function thats an UINT32

How would I pass a VARIANT thats an UINT to a function?  This is what I have so far.

VARIANT v;
UINT nPerm = 0;

v.vt = VT_UINT;
v.puintVal = &nPerm;
                  
prop->PutValue(&v);

help! :)
0
jploettner
Asked:
jploettner
1 Solution
 
drichardsCommented:
No, it would probably look like this:

    v.vt = VT_UINT;
    v.uintVal = nPerm;

If you're trying to pass a pointer (not likely), it should look like this:

    v.vt = VT_UINT | VT_BYREF;
    v.puintVal = &nPerm;

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now