See the question and my original answer on StackOverflow

I don't know what is the value of parameters that must be set, but I know the types of these parameters.

First one is a int32, second is a VARIANT reference, third is a array of BSTR. VARIANTs must be initialized and cleared after use, BSTRs must be allocated (a BSTR is not a OLECHAR *) and freed after use.

So, beyond the real semantics of the method, you can call it like this:

VARIANT data;
VariantInit(&data); // undercovers, this will just zero the whole 16-bytes structure

// ... do something with data here

BSTR ver = SysAllocString(L"vaneustroev@gmail.com"); // you should check for null -> out of memory
pIiTunes->Authorize(1, &data, &ver);

// always free BSTRs and clear VARIANTS
SysFreeString(ver);
VariantClear(&data);

If you use Visual Studio, there are cool Compiler COM Support Classes that ease VARIANT and BSTR programming considerably, as you could rewrite all this like this:

_variant_t data;
_bstr_t ver = L"vaneustroev@gmail.com";
BSTR b = ver;
pIiTunes->Authorize(1, &data, &b);

Visual Studio also provides a library called ATL that has other wrappers. Using them is similar:

CComVariant data;
CComBSTR ver = L"vaneustroev@gmail.com";
BSTR b = ver;
pIiTunes->Authorize(1, &data, &b);