15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


CopyElements helper function

Randy Sales -- rsc@halcyon.com
Friday, September 06, 1996

Environment: MSVC 4.1, NT 3.51

I am using the CArray collection class and would like to 
override the CopyElements helper function.  But, unlike the 
other six collection class helper functions (SerializeElements, 
ConstructElements, etc.) CopyElements is not documented.  I have 
two questions:

1) Is there some reason why CopyElements is not a documented 
helper function like the other six?

2) If I do write my own, am I taking a risk since it is not a 
documented function.  I know usually the answer would be yes, 
but in this case it seems like such an obvious thing to do.

Any guidelines here would be appreciated.

Randy Sales

-- 
RS Consulting
1521 1/2 Cedar Street
Everett, WA 98201

Phone   206-259-1056
Fax     206-259-1315
email   rsc@halcyon.com



Mike Blaszczak -- mikeblas@nwlink.com
Saturday, September 07, 1996

At 09:56 AM 9/6/96 +0100, you wrote:
>Environment: MSVC 4.1, NT 3.51

>I am using the CArray collection class and would like to 
>override the CopyElements helper function.  But, unlike the 
>other six collection class helper functions (SerializeElements, 
>ConstructElements, etc.) CopyElements is not documented.  I have 
>two questions:

>2) If I do write my own, am I taking a risk since it is not a 
>documented function.  I know usually the answer would be yes, 
>but in this case it seems like such an obvious thing to do.

When you use an undocumented function, there are three possible
outcomes:

1) It's a documentation bug that the function isn't written up.  It
completely safe to use, because it's just a mistake that it isn't documented
and it probably will be documented soon.

2) The function isn't documented and it isn't documented because it is
under the implemnentation line.  The implementation may spontaneously
change with the next release of MFC.  This will cause you work ranging
from changing a parameter to rearchitecting your application, but only
if you end up using your application against that new build of MFC.

3) The function isn't documented and it isn't documented because it is
under the implementation line.  But it may turn out that the implementation
never changes because it is a static part of MFC and nothing architectural
forces a change to the function. You luck out.

It turns out that, for this case, you already know the answer: it's #1.
The documentation for Visual C++ 4.2 documents this function.

.B ekiM
http://www.nwlink.com/~mikeblas/
These words are my own. I do not speak on behalf of Microsoft.





| Вернуться в корень Архива |