Results 1 to 10 of 10

Thread: how to troubleshoot a COM issue [RSLVD]

  1. #1

    Thread Starter
    Fanatic Member kevin_sauerwald's Avatar
    Join Date
    Feb 2002
    Location
    outside Philly
    Posts
    516

    how to troubleshoot a COM issue [RSLVD]

    ok I have a project that I did for a client that was using XP.. my code referenced
    in their .tbl file to make API calls to.. all worked well... now the client just moved
    to Win 7 and my code now throws and exception on trying to make API calls..

    and I have no clue where to start figuring out what would be wrong..

    where do I start ? there a way to see what would make the COM connection
    not work.. ?
    Last edited by kevin_sauerwald; Mar 12th, 2013 at 02:48 PM.

  2. #2
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: how to troubleshoot a COM issue

    Did you register the type library on this new system ?
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  3. #3

    Thread Starter
    Fanatic Member kevin_sauerwald's Avatar
    Join Date
    Feb 2002
    Location
    outside Philly
    Posts
    516

    Re: how to troubleshoot a COM issue

    the package should have done that..

    strange thing is the other vendor wrote a very simple program that just makes an instance
    of the same object and calls the open command and it works fine.. just my code that
    does pretty much the same thing errors out.. its bizarre.. must be something very
    simple that is different..

  4. #4
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: how to troubleshoot a COM issue

    What's the error you're getting anyway ?
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  5. #5

    Thread Starter
    Fanatic Member kevin_sauerwald's Avatar
    Join Date
    Feb 2002
    Location
    outside Philly
    Posts
    516

    Re: how to troubleshoot a COM issue

    type initializer exception...

    its right a the point that the code tries to make the instance of the object..

    my DVLP guys here think that my package may not have the paths correct.. since they
    think that XP and Win 7 use different reference paths.. I'm just talking to people inside
    and outside the company to get this fixed quicky.. as you can expect.. client not too happy..

  6. #6
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: how to troubleshoot a COM issue

    COM clients don't use paths. It looks up object/interface IDs in the registry. Try re-registering the type library. Also as a point of curiosity, is the type library separate from the Dll ?
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  7. #7

    Thread Starter
    Fanatic Member kevin_sauerwald's Avatar
    Join Date
    Feb 2002
    Location
    outside Philly
    Posts
    516

    Re: how to troubleshoot a COM issue

    so the other vendor gave me a SDK and I think it just included the type library and then I think I used J-Integra to
    register it on my PC.. I just did whatever steps I needed to do back then to get this thing working and now I'm
    having a hard time recalling what I did in what order... I know now that my package references in the tlb file and
    a dll....

    I think I kinda rushed this project and didnt take the time to understand the underling technology and how it
    all worked together.. ( I normally program C++ on unix boxes). So how do I check the ID in the registry and
    then find the ID in my program to make sure they are the same ? I know how to use RegEdit a tad.. I found
    the COM class on the workstation.. but I didnt see any ID in the entry.. so I assume I looked in the wrong spot..

    and if the ID's are wrong.. why would it be wrong in Win 7 and not in XP ? maybe Win 7 gives it a new ID not
    the same as the XP one ?

  8. #8
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: how to troubleshoot a COM issue

    COM IDs don't actually change except then the COM server is recompiled. The IDs would always be the same regardless of what operating system you're on.

    Now I'm curious about something, does it work on any system with XP or just one. If you don't know then I strongly suggest you find out. The reason is that at I think we should isolate weather your problem is with how you're installing it or if its with the OS itself. It would help to narrow that down.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  9. #9

    Thread Starter
    Fanatic Member kevin_sauerwald's Avatar
    Join Date
    Feb 2002
    Location
    outside Philly
    Posts
    516

    Re: how to troubleshoot a COM issue

    ok with the help from another forum we figured it out.. just to close the loop.. here is the very simple fix I had to do..

    make my compile option to be x86.. not any cpu...

    I guess my COM object is not x64 compatible.. so I have to assume the install just tried to make it 64 since the
    PC was 64.. and when I set to x86 it must have made it run 32bit and now it works...

    strange.. but solved...

  10. #10
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: how to troubleshoot a COM issue [RSLVD]

    Aite....Glad it worked out for ya.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width