Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

cutesiham

COM ATL programming

This topic is 5660 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi i have a problem in my COM ATL Programming. (I m writing OCX file for VB) can i have a function return multiple value? Let say i have function named CalcVariance(a,avg,var) which takes in 3 arguments and it is supposed to return the value of avg and var. so in the idl file, i wrote [id(19), helpstring("method CalcVariance")] HRESULT CalcVariance([in]vObjFeatures vFeature, [out]double* pAvg,[out]double* pVar); Hence, did i declare the right thing? in Vb i call using this way: Dim nAvg,nVar as double VsBlobObject1.FeatureVariance i, nAvg, nVar But the VB code couldn''t execute the function as it gave me "Type Mismatch" error code. so can anyone teach me how to write this function.... from damian

Share this post


Link to post
Share on other sites
Advertisement
The IDL definition you posted is for a method called CalcVariance. The VB code you posted calls FeatureVariance. Typo?

[edited by - Solo on January 18, 2003 5:30:03 PM]

Share this post


Link to post
Share on other sites
Ouuuppps...sorry..it is typo mistake.

It should be
in Vb i call using this way:
Dim nAvg,nVar as double
VsBlobObject1.CalcVariance i, nAvg, nVar


thanks

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!