Microsoft.Windows.ActCtx on Windows Xp

最后都变了- 提交于 2019-11-30 16:23:32

I figured out the problem with my manifest. I'll share it with anyone else who may have run into a similiar problem.

Please be aware that you MUST specify the progid="" property in your manifest when using this with the "Microsoft.Windows.ActCtx" interface otherwise you get ActiveX Component Can't Create Object error.

<comClass
clsid="{ED59F192-EF2E-4BCC-95EB-85A8C5C65326}"
progid="myclass.process"
threadingModel = "Apartment" />

The following manifest example should get you up and running :)

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" 
  manifestVersion="1.0">

<assemblyIdentity
   type="win32"
   name="myclass"
   version="1.0.0.0"/>

<file name = "myclass.dll">

<comClass
    clsid="{ED59F192-EF2E-4BCC-95EB-85A8C5C65326}"
    progid="myclass.process"
    threadingModel = "Apartment" />

<typelib tlbid="{7AE20C3A-48C2-42C1-A68D-A1C3EB0A2C65}"
       version="1.0" helpdir=""/>

</file>

<comInterfaceExternalProxyStub 
    name="_PROCESS" 
    iid="{187D0811-470D-44C0-B68C-C1C7F3EEFDA0}"
    proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"
    baseInterface="{00000000-0000-0000-C000-000000000046}"
    tlbid = "{7AE20C3A-48C2-42C1-A68D-A1C3EB0A2C65}" />

</assembly>

If the Microsoft.Windows.ActCtx were redistributable, there would have to be some way for it to get onto the machine and globally registered. If you had access to register this on the machine, can't you insted simply register Application.Interface? If you're dealing with a restricted environment ... well you have to deal with what's available already.

It looks like you're using the wsh script to launch your application. Why not write a stub to launch the app in native or managed code (where you will be able to use a manifest), and call that stub instead?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!