Giter Site home page Giter Site logo

function cannot be called. about node-activex HOT 3 OPEN

GoodZivi avatar GoodZivi commented on July 28, 2024
function cannot be called.

from node-activex.

Comments (3)

GoodZivi avatar GoodZivi commented on July 28, 2024 1

Hi,durs.
According to the question I search.I think I have found the reason.
Before Ole4.0,External programs can directly call methods in OCX. After Ole4.0, every time a method in a control is called, the system will automatically check whether it is allowed to be called, that is, run 'COleControl. IsInvokeAllowed (DISPID)'

This method checks whether the control is properly initialized or loaded through a persistent storage interface. If one of the two conditions is met, it returns TRUE, otherwise it returns FALSE.

When using controls in MFC, many details, such as initialization, are filtered out, so that most users will not encounter this problem.

But when I call the function in node, it return false.

The solution is to overwrite this method again
like this:
'''
BOOL CMyNameCtrl::IsInvokeAllowed (DISPID)
{

  return TRUE;

}
'''
This work is difficult for me, because the ocx file is provided by another corporation.Finally, I changed my approach to solving this matter without node.

from node-activex.

durs avatar durs commented on July 28, 2024

That's right, but weird, Catastrophic Failure (Error 0x8000FFFF) occurs when calling DispInvoke with dispid=1

from node-activex.

minkee-lee avatar minkee-lee commented on July 28, 2024

Dear @GoodZivi,
I got the same issue and your research gave me an understanding. Thank you.
But this is still problem for me. So did you find the another solution ? Then could you share how to?
Thank you.

from node-activex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.