[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-dcom
Subject:    Templates
From:       Alan Gamboa <Alan () CCGSYSTEMS ! COM>
Date:       2001-01-31 14:38:23
[Download RAW message or body]


In my current function I have the following:

void foo()
{
        ITLTablePtr     spTable;        //smart pointer
        HRESULT hr = spTable.CreateInstance(__uuidof(TLTable) );
}

what's the proper syntax for "templatizing" the above, or is it best not to
use smart pointers?

new syntax:

void foo()
{
        ITLTablePtr     spTable;        //smart pointer
        HRESULT hr = templateCode( spTable );
}

template < ? >
HRESULT templateCode( ? )
{
        return ( spTable.CreateInstance(__uuidof(TLTable) ) );
}

any help is really appreciated

Alan Gamboa
CCG Systems, Inc.

----------------------------------------------------------------
Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
contains important info. Save time, search the archives at
http://discuss.microsoft.com/archives/index.html .
To unsubscribe, mailto:DCOM-signoff-request@DISCUSS.MICROSOFT.COM

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic