Results 1 to 3 of 3

Thread: Help accessing COM Object

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2001
    Posts
    152

    Help accessing COM Object

    I have a COM Object that I was talking to with no problem in ASP. Here is the old code.

    Set idnObj = Server.CreateObject("XCodeCOM.XCode.1")

    I am not in the process of converting to .NET and I cannot seem to call it at all... Here is what I am trying.

    <%@ Import Namespace="XCODECOMLib" %>

    Dim idnObj As XCODECOMLib.XCode
    idnObj = new XCODECOMLib.XCode

    With this, I always get the same errors within the debug:

    error BC30466: Namespace or type 'XCODECOMLib' for the Imports 'XCODECOMLib' cannot be found

    and

    error BC30002: Type 'XCODECOMLib.XCode' is not defined.

    But the lib is there so it must be a syntax thing.

    Any help is apprecaited.

  2. #2
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724
    Have you added a reference to the COM library? (References in Project Explorer)

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2001
    Posts
    152
    Yes, definitely.

    The Library name is XCODECOMLib.
    The Class is listed as XCode

    Here are some function details from wihin Object Browser...

    Code:
    Function Xcode_ToASCII(pvarLabel, pvarInputEncoding)
        Member of XCODECOMLib.XCode
        method Xcode_ToASCII
    I guess I am just not understanding why it works so much differently in ASP.Net than ASP. Shouldn't the loading work in very much the same way?

    Thanks.

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