Results 1 to 3 of 3

Thread: ActiveX Component DLL Issue

  1. #1
    Trevster344 is offline VB.NET Forum Newbie
    .NET Framework
    .NET 4.0
    Join Date
    Mar 2011
    Location
    Austin, Tx
    Posts
    8
    Reputation
    0

    Exclamation ActiveX Component DLL Issue

    At work there is a activeX component dll that has dozens of very many important calls for security purposes. Whenever I add a reference to the dll CrossDll.DLL the wrapper is created and the object CrossDll.Primary is accessible but instancing the object blows up the program and gives me the error:

    Unable to cast COM object of type 'System.__ComObject' to interface type 'CrossDll.Primary'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{B859230C-ADD6-43B2-BB10-D02357BB42C4}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

    I tried declaring an object and instantiating it with the CreateObject("CrossDll.Primary") which worked but any calls into the dll that might cause it to make it's own calls to another dll lead to chaos.

    I've double checked with the author of the library and it is a valid activex com dll. Is there something I need to do in my application to make it work? I'm using it in an asp.net application. Also is there something the author needs to do when compiling the dll? Does anyone have any experience with this?

  2. #2
    Herman is offline VB.NET Forum Idol
    .NET Framework
    .NET 4.0
    Join Date
    Oct 2011
    Location
    Montreal, QC, CA
    Posts
    866
    Reputation
    1213
    Could you elaborate and say which library it is? You are kind of pointing at an invisible haystack and asking us to find the invisible needle here.

  3. #3
    Trevster344 is offline VB.NET Forum Newbie
    .NET Framework
    .NET 4.0
    Join Date
    Mar 2011
    Location
    Austin, Tx
    Posts
    8
    Reputation
    0
    Quote Originally Posted by Herman View Post
    Could you elaborate and say which library it is? You are kind of pointing at an invisible haystack and asking us to find the invisible needle here.
    The library is a library developed by a contracted author but it was written in vb6 as a com dll. Despite the fact, i was unable to reference the dll after registering it, and access it. I was able to declare an object and use the create object method to initialize the object in the dll. Turns out there is a problem with using ByRef in vb6 to .net conversion so the best bet is to remove byrefs, add some extra code. So far my code is working. In other words I've found a work around. Sorry if I was not specific. My questions were really just looking for more answers to using vb6 com dll's in a .net application.

Bookmarks

Posting Permissions

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