Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

523
Visualizações
How to handle talking to VB6 ActiveX dll that has OCX dependencies from a .NET WPF application

I have a VB6 ActiveX dll that has a dependency on ComDlg32.ocx. This ActiveX dll is called from a .NET application. The ActiveX dll has a public interface that has 1 method, which opens a form, which opens an Open File dialog (from ComDlg32.ocx). The .NET application has a button which will call this ActiveX dll method.

This all works when the ComDlg32.ocx and the ActiveX dll are both registered (via regsvr32), but I need to get this to work using RegFree COM, at least for the dependencies of the ActiveX dll. I have made a manifest file for this ActiveX dll but it doesn't seem to be getting read. ProcMon had no reference to the manifest file and sxstrace gave me no info (literally a blank text file when I parsed the etl file).

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
    <assemblyIdentity name="DeployArchitectureTest" version="1.0.0.0" type="win32" processorArchitecture="x86"/>
    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
        <security>
            <requestedPrivileges>
                <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
            </requestedPrivileges>
        </security>
    </trustInfo>
    <file name="COMDLG32.OCX">
        <typelib tlbid="{F9043C88-F6F2-101A-A3C9-08002B2F49FB}" version="1.2" flags="control,hasdiskimage" helpdir="" />
        <comClass clsid="{F9043C85-F6F2-101A-A3C9-08002B2F49FB}" tlbid="{F9043C88-F6F2-101A-A3C9-08002B2F49FB}" progid="MSComDlg.CommonDialog.1" threadingModel="Apartment" miscStatus="" miscStatusContent="recomposeonresize,onlyiconic,cantlinkinside,insideout,activatewhenvisible,invisibleatruntime,setclientsitefirst">
            <progid>MSComDlg.CommonDialog</progid>
        </comClass>
    </file>
</assembly>

I have tried an external manifest for the dll as well as embedding the manifest but still no luck. I must be missing something but all the information I can find talks about how to create a manifest file for an exe but no info about how to handle an ActiveX dll that has its own dependencies.

If anyone has any information then I would really appreciate it.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

After some more research and being pointed in the right direction by @SimonMourier and @HansPassant, I managed to get this working.

I thought that a dll manifest would have been possible if I was using the resource ID #2 as @HansPassant mentioned, but I wasn't able to get it to work that way. No matter what I did, the dll manifest never seemed to be read.

I did however find that including all of the manifest data from what was the dll manifest into the exe manifest and making sure the exe had no embedded manifest allowed RegFree COM to work as expected. I was finding that Visual Studio was building my .NET exe with an embedded manifest, even though there was an app.manifest file as part of the project. I had to set the COM dll as 'isolated=true' in order for the manifest to be built as external.

So thank you both @SimonMourier and @HansPassant, both of your comments led me down the right path to figure it out.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda