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
common.h
Package: shell.rar [view]
Upload User: xhy777
Upload Date: 2007-02-14
Package Size: 24088k
Code Size: 2k
Category:
Windows Kernel
Development Platform:
Visual C++
- #ifndef __common_h
- #define __common_h
- /*-----------------------------------------------------------------------------
- / Exit macros for macro
- / - these assume that a label "exit_gracefully:" prefixes the prolog
- / to your function
- /----------------------------------------------------------------------------*/
- #if !DSUI_DEBUG
- #define ExitGracefully(hr, result, text)
- { hr = result; goto exit_gracefully; }
- #define FailGracefully(hr, text)
- { if ( FAILED(hr) ) { goto exit_gracefully; } }
- #else
- #define ExitGracefully(hr, result, text)
- { OutputDebugString(TEXT(text)); hr = result; goto exit_gracefully; }
- #define FailGracefully(hr, text)
- { if ( FAILED(hr) ) { OutputDebugString(TEXT(text)); goto exit_gracefully; } }
- #endif
- /*-----------------------------------------------------------------------------
- / Interface helper macros
- /----------------------------------------------------------------------------*/
- #define DoRelease(pInterface)
- { if ( pInterface ) { pInterface->Release(); pInterface = NULL; } }
- /*-----------------------------------------------------------------------------
- / String helper macros
- /----------------------------------------------------------------------------*/
- #define StringByteCopy(pDest, iOffset, sz)
- { memcpy(&(((LPBYTE)pDest)[iOffset]), sz, StringByteSize(sz)); }
- #define StringByteSize(sz)
- ((lstrlen(sz)+1)*sizeof(TCHAR))
- /*-----------------------------------------------------------------------------
- / Other helpful macros
- /----------------------------------------------------------------------------*/
- #define ByteOffset(base, offset)
- (((LPBYTE)base)+offset)
- #ifndef ARRAYSIZE
- #define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0]))
- #endif
- #endif