Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hello

Status
Not open for further replies.

zfq

Technical User
Jun 21, 2002
4
US
I need to know exactly how to handle optional parameters(VARIANT) in client's call function.
Thank you.
 
That can be a big question. Is there any documentation?

Generaly a default parameter is passed over by leaving it blank.

function with three parameters and they are all optional

functionName()
functionName(,param2,)
functionName(param1,param2,)
functionName(,,param3)

sometimes they require the correct datatype but empty

functionName(0,"",0)
functionName(0,0,0)

what you pass depends on what the parameters types are. Attitude is Everything
 
the optional parameter is VARIANT type.
I have checked MSDN and done as what it said.
*****************************************
VARIANT vOpt;
vOpt.vt=VT_ERROR;
vOpt.scode=(a constant, I cannot remember now);
******************************************
But, there is still a error when I run the call.
The error is "member is not found"
 
Is this an ActiveX object? Can you give me more detail on how you are setting up the use of this function in FoxPro. FoxPro does not have VATIANT data types and it looks like you are addressing a structure. Attitude is Everything
 
Are you using MSMQ? If so what version of Visual Studio and service pack. There is a bug in MSMQ that was fix in service pack 3. Attitude is Everything
 
no, I am using VC++ 6 to construct a client function,
and call the server ( objects in Solidworks).
Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top