🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #5302

Re: Help with SAFEARRAY

#5302
From: LarryJ
Date: Fri, 16 Sep 2005 00:46
61 lines
2761 bytes
Thank you for that link to the Microsoft web site. I am still having trouble 
setting up this prototype of this function on BCB6.0 and declaring the 
arrays and passing the arrays through the function. Below is more 
information about this function can anyone figure out how to call this 
GetSymbols( ) function? The code be low is for Visual C.



BOOL GetSymbols( CStringArray &_symbols, CArray< long, long > &_wordenIDs );


 HRESULT GetSymbols(LPSAFEARRAY* Symbols/*[in,out]*/,
                       LPSAFEARRAY* WordenNumbers/*[in,out]*/);

HRESULT _cTC2000::GetSymbols(LPSAFEARRAY* Symbols/*[in,out]*/,
                             LPSAFEARRAY* WordenNumbers/*[in,out]*/)
{
  TAutoArgs<2> _args;
  _args[ 1]= Symbols /*[VT_SAFEARRAY:1]*/;
  _args[ 2]=WordenNumbers /*[VT_SAFEARRAY:1]*/;
  return OleFunction(DISPID(1610809355), _args);
}


BOOL _cTC2000::GetSymbols( CStringArray &_symbols, CArray< long, long > 
&_wordenIDs )
{
 BOOL result = FALSE;
 SAFEARRAY *pArray, *pLongArray;

 _symbols.RemoveAll();
 _wordenIDs.RemoveAll();
 pArray = AllocateArray( VT_BSTR );
 pLongArray = AllocateArray( VT_I4 );
 result = GetSymbols( &pArray, &pLongArray ) == 0;
 if ( result )
  {
  Convert( _symbols, pArray );
  Convert( _wordenIDs, pLongArray );
  }

 SafeArrayDestroy( pArray );
 SafeArrayDestroy( pLongArray );
 return result;

}





"Boba" <Boba@somewhere.world> wrote in message 
news:4329da90$1@newsgroups.borland.com...
> "LarryJ" <LarryJ33@ev1.net> wrote in message
> news:4329d38a@newsgroups.borland.com...
>> ... but SAFEARRAY is not listed in my Win32 API bible.
>> ...
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/automat
> /htm/chap7_9ntx.asp
>
> 
Technical Details
Message-ID: <432a15a0@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <4329d38a@newsgroups.borland.com> <4329da90$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,d0eb3921b71e7751
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "LarryJ" <LarryJ33@ev1.net>
From: "LarryJ" <LarryJ33@ev1.net>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <4329d38a@newsgroups.borland.com> <4329da90$1@newsgroups.borland.com>
Subject: Re: Help with SAFEARRAY
Date: Thu, 15 Sep 2005 19:46:42 -0500
Lines: 63
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 216.40.234.83
Message-ID: <432a15a0@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1126831520 216.40.234.83 (15 Sep 2005 17:45:20 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail