PRB: #Import Does not Include Index Parameter Error from VC5

Last reviewed: November 21, 1997
Article ID: Q173850
The information in this article applies to:
  • Collaboration Data Objects (CDO), version 1.1

SYMPTOMS

When using Microsoft Visual C++ 5.0 to import the Olemsg32.dll library, the GetItem declaration (created in the generated TLH and TLI files) in any collection-oriented object, such as Infostores or AddressLists, does not contain any index parameters; thereby, rendering these methods useless from Visual C.

RESOLUTION

The rest of the library is functional, and normally there is an alternative process to achieve the same result. For instance, you might cycle through the collection of items. However, the only direct workaround is to modify the method declarations in TLH and TLI files manually.

STATUS

Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Here's the pertinent Visual C++ 5.0 code:

    #import <olemsg32.dll> no_namespace

Here are sample declarations from generated TLI demonstrating problem:

   #pragma implementation_key(43)
   inline _variant_t InfoStores::GetItem ( ) {
       VARIANT _result;
       _com_dispatch_propget(this, 0x15, VT_VARIANT, (void*)&_result);
       return _variant_t(_result, false);
   }

-or-

   #pragma implementation_key(66)
   inline _variant_t AddressLists::GetItem ( ) {
       VARIANT _result;
       _com_dispatch_propget(this, 0x15, VT_VARIANT, (void*)&_result);
       return _variant_t(_result, false);
   }

REFERENCES

For additional information about Collaboration Data Objects versus Active Messaging, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q176916
   TITLE     : INFO: Active Messaging and Collaboration Data Objects (CDO)
Keywords          : kbcode ActMsg
Version           : WINDOWS:1.1
Platform          : WINDOWS
Issue type        : kbprb


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 21, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.