JavaScript and ATL COM return value issues

Source: Internet
Author: User

Recently made an ATL-based control, designed an interface, want to return multiple parameters, but through JavaScript but can not get the return value, originally thought is the problem of their own interface, and later found on the Internet a lot to find that the original MSDN has a clear saying:

JavaScript does not support passing parameters by reference. JavaScript would make copies of these variables and pass them by value when calling methods then take By-reference paramete Rs. Thus, you cannot get a return value via a method parameter when using JavaScript.


--------------------------------------------------------------------------------------------------------------- -----------

Interface definition

[id], helpstring ("Method Getaxisbaseinfo")]  HRESULT Getaxisbaseinfo (BSTR uuid_bstr, LONG obj_id, short index, [out] bstr* name, "Out" bstr* type, [out] double* start, [out] Double* end, [out] double* step, [out] double* substep, [out] long* precision);

Expected to return multiple parameters, in JS does not work.

JavaScript and ATL COM return value issues

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.