Home > Software engineering >  VC2012 for card reader are encapsulated into ocx for web call do
VC2012 for card reader are encapsulated into ocx for web call do

Time:09-23

Want to use VC2012 encapsulate a ocx, put the card reader are encapsulated inside, to call web,
Who can give me a package ocx and web call simple code, or give a useful links, you thank you thank you!!!

CodePudding user response:

VC2012 using standard methods to do a ocx is ok

As for how a web page calling ocx baidu a lot

CodePudding user response:

LONG CActiveXDemoCtrl: : AddFun (LONG Add1, LONG Add2)
{
AFX_MANAGE_STATE (AfxGetStaticModuleState ());

//TODO: add in this scheduling handler code

Return Add1 + Add2;
}




BSTR CActiveXDemoCtrl: : HelloWord (void)
{
AFX_MANAGE_STATE (AfxGetAppModuleState ());

Cstrings strResult;

//TODO: add in this scheduling handler code
StrResult="Hello Word";

Return strResult. AllocSysString ();
}

According to the standard method has written the code above, ocx files are generated, also use regsvr32 registered a success, but the web calls, prompt "SCRIPT438: object does not support" HelloWord "attribute or method"
Now I don't know how to solve

CodePudding user response:




<script type="text/javascript" language="javascript" & gt;

The function show () {

Var ocx=document. GetElementById (" TestOcx_new ");
Var a=TestOcx_new. HelloWord ();
alert(a);

}

</script>




Every "that CFC032F2 ade - 93-57 b0-4 f6f3e5bd ae - 4877"

The codebase="C:/Windows/SysWOW64/ActiveXDemo. Ocx"



Var ocx=document. GetElementById (" TestOcx_new ");

Var a=TestOcx_new. HelloWord ();
alert(a);







Web page code is written so that

CodePudding user response:

To give advice or comments for your guidance
  • Related