Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7920171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:06:58+00:00 2026-06-03T16:06:58+00:00

I am trying to call Javascript from my ActiveX (ATL C++) dll. From the

  • 0

I am trying to call Javascript from my ActiveX (ATL C++) dll. From the research I have done you should connection points.

Added to my idl file

[
uuid(BDBFA5F9-B2CB-43b1-A414-CB6E3B15C6C2),
("Event interface for Test")
]
_ITestEvents
    {
    properties:
    methods:
    [id(1), helpstring("method Cancel")] void Cancel([in] char* x, [in] char* y);
    };

Added to my class .h file

class ATL_NO_VTABLE CTest :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CTest, &CLSID_Test>,
public IConnectionPointContainerImpl<CTest>,
public CProxy_ITestEvents<CTest>,
public IObjectWithSiteImpl<CTest>,
public IObjectSafetyImpl<CTest,INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACESAFE_FOR_UNTRUSTED_DATA>,
public IProvideClassInfo2Impl<&CLSID_Test, &__uuidof(_ITestEvents), &LIBID_Test3Lib>,
public IDispatchImpl<ITest, &IID_ITest, &LIBID_Test3Lib, /*wMajor =*/ 1, /*wMinor =*/ 0>
    {
    public:


    BEGIN_COM_MAP(Clnaxprt)
    COM_INTERFACE_ENTRY_IMPL(IConnectionPointContainer)
    COM_INTERFACE_ENTRY(Ilnaxprt)
    COM_INTERFACE_ENTRY(IDispatch)
    COM_INTERFACE_ENTRY(IConnectionPointContainer)
    COM_INTERFACE_ENTRY(IObjectWithSite)
        COM_INTERFACE_ENTRY(IObjectSafety)
        COM_INTERFACE_ENTRY(IProvideClassInfo)
        COM_INTERFACE_ENTRY(IProvideClassInfo2)
    END_COM_MAP()

    BEGIN_CONNECTION_POINT_MAP(Clnaxprt)
        CONNECTION_POINT_ENTRY(__uuidof(_ITestEvents))
    END_CONNECTION_POINT_MAP()

In visual studio “implemented a new connection point” which generated code in the _ITestEvents_CP.h that was created with a method name Fire_Cancel( char * x, char * y). And that is where I am stuck. I have tried to call the Fire_Cancel and when debugging the generated code there are no connections and thus no Invoking from IDispatch. What do I do to create a connection?

Still not sure how the javascript works yet but want to get this part understood before I move to that.
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T16:06:59+00:00Added an answer on June 3, 2026 at 4:06 pm

    The HTML and Javascript in my case were wrong. If your using the notation “id::function_name” make sure it is afterthe object tag. If the notation is “for=id event=cancel” then it can be located before/after

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to call a WebMethod from JavaScript. So far I have: The
I have a javascript function from where I am trying to call the serverside
im trying to call a bean from a javascript, using a h:commandLink. i have
I am trying to call my Javascript method from my java in GWT below
I am trying to call my function named isUrgencyTypeValid from my javascript code but
I am trying to call javascript method from an Applet using netscapte.java.JSObject . in
I'm trying to call a Flash function from javascript passing complex data types as
I am trying to call the browse() method of the FileReference class from JavaScript
I am trying to call a JavaScript function from an onclick trigger. HTML section:
I'm having problems trying to call a Javascript function from an enqueued javascript file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.