Microsoft.Windows.ActCtx on Windows Xp

后端 未结 2 1384
难免孤独
难免孤独 2021-01-03 10:24

These days I\'m very much busy on developing an activex/com application. Some of our customers are working under heavily restricted windows environments. So i decided to mak

相关标签:
2条回答
  • 2021-01-03 10:42

    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>
    
    0 讨论(0)
  • 2021-01-03 10:56

    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?

    0 讨论(0)
提交回复
热议问题