where sName is the name of parameter (as BSTR), varValue is the value (as
VARIANT), nDirection is 0 (paramMode value) and nType is 0 too (serverType
The IDL for the Add method is (present in OIP9.TLB):
HRESULT _stdcall Add(
[in] BSTR Name,
[in] VARIANT initval,
[in] int IOtype,
[in, optional] short varType,
[in, optional] BSTR objectname);
As you see, varType and objectname parameters are optional, notwithstanding, if
I don't use them when calling Add method, compiler sends an error. Since those
parameters aren't VARIANT, I cannot call the method using &vtMissing, so I pass
varType explicitly as a determined value, and objectname as _T("").
So, the questions are:
- Can you know what means 0x800403b8 error?
- If the error is produced by the calling of parameters, how can I call that
method without passing the optional parameters?
This object (OraParametersPtr) is part of the Oracle Objects for OLE, and the
error isn't an Oracle error, since an exception occur. If it were an Oracle
error, an HRESULT code will be returned by the Add method.