OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Brian Muth (bmuthSTRAIGHTTHROUGH.COM)
Date: Wed Feb 20 2002 - 11:46:54 CST

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

    Mark, just so you don't have to transmit the array in both directions,
    it is usually better that the called method allocate the array for you.

    If your client is VB or VBScript, it is customary to use a safearray,
    and package it in a single variant that is returned.

    For C++ clients you don't need to be oleautomation compliant and that is
    a different matter.

    >
    > Given a function that looks like this:
    >
    > HRESULT MyServer::GetSomeData(DWORD dwNumItems, VARIANT * ppvData);
    >
    > ...where dwNumItems is the number of VARIANTS in the array pointed to
    by
    > ppvData, ie, the caller allocates the array for the data to be
    returned.
    >
    > Question:
    > Should the server initialize the each of the VARIANTs in the array by
    > calling VariantInit?
    >
    >

    ----------------------------------------------------------------
    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