none
CreateObject fails - 32-bit interop problems on 64bit Windows Server2008 RRS feed

  • Question

  • Hi!

    First I'll try to give you as much information as possible:

    I have installed some parts of 32-bit Microsoft Office together with Acrobat 9 in order to support OCR-functionality for PDF-files. This works great on my 64-bit XP and on my VirtualBox Image running 32-bit Microsoft Windows 2008. What I'd like to be able to do is to create an instance of a class (PdfToText) from within VBScript and in order to do that I've created a .Net wrapper class:

    namespace

     

    PdfToText
    {
    [
    ClassInterface(ClassInterfaceType.AutoDual)]
    [
    ComVisible(true)]
    public class PdfToText

    [

    ComVisible(true)]
    public object COMconvert(object p_objPdfPath, object p_objTempFolderPath)
    {
    return (object)convert((string)p_objPdfPath, (string)p_objTempFolderPath);
    }
    .........

    I used the following command to register the wrapper: regasm PdfToText.dll /codebase. Furthermore I've put the following dll-s in the same folder as the wrapper: Interop.Acrobat.dll, Interop.MODI.dll. Now, as I mentioned earlier, this has worked flawlessly two platforms earlier but, unfortunately, not on the system where I need this to work:-( I checked in the registry and it seems to be fine although I should not try to make the impression that I'm a "registry expert":-) The error I receive from my VBScript code is: Error number 429, ActiveX component can't create object. The code I use to instantiate the object is: SET o = CREATEOBJECT("PdfToText.PdfToText"). The progid is present in a number of places in the registry and points to the correct dll.

    I really, really hope that somebody out there is able to point me in the right direction...

    Cheers,

    /Peter

    Wednesday, May 5, 2010 1:43 PM

Answers

  • If you have it working on one x64 machine and not working on another x64 machine, run your app with ProcMon on both and compare file/registry accesses on each machine ... that could give you a clue.

    -Karel

    • Marked as answer by SamAgain Thursday, May 13, 2010 9:49 AM
    Thursday, May 6, 2010 9:39 AM
    Moderator

All replies

  • If you have it working on one x64 machine and not working on another x64 machine, run your app with ProcMon on both and compare file/registry accesses on each machine ... that could give you a clue.

    -Karel

    • Marked as answer by SamAgain Thursday, May 13, 2010 9:49 AM
    Thursday, May 6, 2010 9:39 AM
    Moderator
  • We temporarily mark a reply, please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Please mark the right answer at right time.
    Thanks,
    Sam
    Thursday, May 13, 2010 9:49 AM