Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
bufbase.cpp
Package: shell.rar [view]
Upload User: xhy777
Upload Date: 2007-02-14
Package Size: 24088k
Code Size: 1k
Category:
Windows Kernel
Development Platform:
Visual C++
- /*****************************************************************/
- /** Microsoft Windows for Workgroups **/
- /** Copyright (C) Microsoft Corp., 1991-1992 **/
- /*****************************************************************/
- /* BUFBASE.CPP -- Implementation of BUFFER_BASE class.
- *
- * History:
- * 03/24/93 gregj Created base class
- *
- */
- #include "npcommon.h"
- #include "buffer.h"
- // The following code would be nice in OOP fashion, but since the
- // derived class's virtuals aren't available until after the derived
- // class's constructor is done, this Alloc() call will not go anywhere.
- // Therefore each derived class must stick the if statement in its
- // constructor.
- #if 0
- BUFFER_BASE::BUFFER_BASE( UINT cbInitial /* =0 */ )
- : _cb( 0 ) // buffer not allocated yet
- {
- if (cbInitial)
- Resize( cbInitial );
- }
- #endif
- BOOL BUFFER_BASE::Resize( UINT cbNew )
- {
- BOOL fSuccess;
- if (QuerySize() == 0)
- fSuccess = Alloc( cbNew );
- else {
- fSuccess = Realloc( cbNew );
- }
- if (fSuccess)
- _cb = cbNew;
- return fSuccess;
- }