OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Peter Partch (peterpartch_at_PMCONSULT.COM)
Date: Thu Aug 15 2002 - 09:12:26 CDT

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    Please keep in mind that not all languages understand out-only parameters.

    VB and specifically VB script can't handle out-only...hence the use of
    [in,out] when dealing with multiple out parameters (if needing only 1 out
    param, use [out,retval])

    Peter Partch

    ----- Original Message -----
    From: "Lewis Jones" <Lewis.JonesONBASE.COM>
    To: <DCOMDISCUSS.MICROSOFT.COM>
    Sent: Thursday, August 15, 2002 5:52 AM
    Subject: Re: [DCOM] runtime error '800a000d' when attempting to call COM
    function from ASP page

    Even then, that wouldn't help for scripting

    Any [out] or [in,out] parameters must be VARIANT* for scripting to call
    them...

    [out,retval] on the other hand can be any oleautomation type... Problem is,
    you can only have one retval....

    -----Original Message-----
    From: Peter Moss [mailto:petermCISCO.COM]
    Sent: Thursday, August 15, 2002 8:53 AM
    To: DCOMDISCUSS.MICROSOFT.COM
    Subject: Re: runtime error '800a000d' when attempting to call COM
    function from ASP page

    Agreed. [in,out] are bad things when it comes to scripting languages.

    Maybe we could back up and ask the question "why do the arguments NEED to be
    [in,out]"? I am not sure of what your method is doing, but, from the code
    snippet you provided, couldn't you just declare the API as follows:

    [id(0x60030000)] boolean ProcessMessage(
                    [in] IXMLDOMDocument* InputXML,
                    [out] IXMLDOMDocument** OutputXML,
                    [out] IXMLDOMDocument** MessageXML);

    That also saves the expense of marshalling items that aren't needed.

    Would that work for you?

    -----Original Message-----
    From: Distributed COM-Based Code [mailto:DCOMDISCUSS.MICROSOFT.COM]On
    Behalf Of Daniel Bowen
    Sent: Tuesday, August 13, 2002 1:25 PM
    To: DCOMDISCUSS.MICROSOFT.COM
    Subject: Re: runtime error '800a000d' when attempting to call COM
    function from ASP page

    VBScript can handle more than just VARIANTs, it can handle oleautomation
    types.

    The problem you're having is because of [in,out].

    The short answer is change the [in, out] IXMLDOMDocument** to [in, out]
    IDispatch**.
    [in,out] is generally a bad idea though for COM objects used in scripting
    languages.

    The long answer is to read a previous post I wrote a while ago:
    http://discuss.microsoft.com/SCRIPTS/WA-MSD.EXE?A2=ind0009D&L=ATL&P=R31818&I
    =-3

    The ATL list on discuss.microsoft.com is also a good place to ask questions
    like these.

    -Daniel

    -----Original Message-----
    From: Frederic Gos [mailto:fredericGOS.DK]
    Sent: Tuesday, August 13, 2002 3:36 AM
    To: DCOMDISCUSS.MICROSOFT.COM
    Subject: Re: runtime error '800a000d' when attempting to call COM
    function from ASP page

    You will not be able to use that COM object from an ASP page.
    VBScript can basically only handle VARIANT's. For it to work, the params
    should have been VARIANTs holding IDispatch*

    You should instead create a COM obj in VB or C++ that uses this object and
    call it from an ASP page.

    cheers
    Frederic

    -----Original Message-----
    From: Keith Daly [mailto:keith_dalyHOTMAIL.COM]
    Sent: Tuesday, August 13, 2002 11:17 AM
    To: DCOMDISCUSS.MICROSOFT.COM
    Subject: runtime error '800a000d' when attempting to call COM function
    from ASP page

    Hi,

    Hope this is the correct forum for this request, I don't see a pure COM
    mailing list...

    I'm having a problem accessing a function in a COM object from VBScript in
    an ASP page. The COM object interface (I have no access to the source for
    this) is
    [id(0x60030000)] boolean ProcessMessage(
                    [in, out] IXMLDOMDocument** InputXML,
                    [in, out] IXMLDOMDocument** OutputXML,
                    [in, out] IXMLDOMDocument** MessageXML);

    The VbScript I am using is:
    Dim objQuote, outputXML, messageXML, return, inputXML
            Set objQuote = Server.CreateObject("Object.Quote")
            Set inputXML = Server.CreateObject("Microsoft.XMLDOM")
            Set outputXML = Server.CreateObject("Microsoft.XMLDOM")
            Set messageXML = Server.CreateObject("Microsoft.XMLDOM")
            Set return = objQuote.ProcessMessage(inputXML, outputXML,
    messageXML)

    I get the following error when I run the script:
    Microsoft VBScript runtime error '800a000d'
    Type mismatch: 'objQuote.ProcessMessage'

    I assume it's a problem with the type of the parameters. It may be a problem
    with my version of msxml.dll. (though having checked it out using Oleview
    and compared it against the doco for the COM object, it looks right).

    Any help with fixing this gratefully accepted
    Keith

    _________________________________________________________________
    MSN Photos is the easiest way to share and print your photos:
    http://photos.msn.com/support/worldwide.aspx

    ----------------------------------------------------------------
    Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
    contains important info. Save time, search the archives at
    http://discuss.microsoft.com/archives/index.html .
    To unsubscribe, mailto:DCOM-signoff-requestDISCUSS.MICROSOFT.COM

    ----------------------------------------------------------------
    Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
    contains important info. Save time, search the archives at
    http://discuss.microsoft.com/archives/index.html .
    To unsubscribe, mailto:DCOM-signoff-requestDISCUSS.MICROSOFT.COM

    ----------------------------------------------------------------
    Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
    contains important info. Save time, search the archives at
    http://discuss.microsoft.com/archives/index.html .
    To unsubscribe, mailto:DCOM-signoff-requestDISCUSS.MICROSOFT.COM

    ----------------------------------------------------------------
    Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
    contains important info. Save time, search the archives at
    http://discuss.microsoft.com/archives/index.html .
    To unsubscribe, mailto:DCOM-signoff-requestDISCUSS.MICROSOFT.COM

    ----------------------------------------------------------------
    Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
    contains important info. Save time, search the archives at
    http://discuss.microsoft.com/archives/index.html .
    To unsubscribe, mailto:DCOM-signoff-requestDISCUSS.MICROSOFT.COM

    ----------------------------------------------------------------
    Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
    contains important info. Save time, search the archives at
    http://discuss.microsoft.com/archives/index.html .
    To unsubscribe, mailto:DCOM-signoff-requestDISCUSS.MICROSOFT.COM