COMMON.H
资源名称:MSDN_VC98.zip [点击查看]
上传用户:bangxh
上传日期:2007-01-31
资源大小:42235k
文件大小:2k
源码类别:
Windows编程
开发平台:
Visual C++
- /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
- /* Copyright Microsoft Corp. 1992-1996 */
- /* Remote Machine strout sample */
- /* */
- /* FILE : common.h */
- /* */
- /* PURPOSE : Definitions used in the program */
- /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
- #ifndef __COMMON_STROUT__ // If this file has be included before
- #define __COMMON_STROUT__ // Don't include it again
- #include <windows.h> // The CommandLineToArgvW is defined here
- #include <stdio.h>
- #include <stdlib.h>
- #include <tchar.h> // Included to support UNICODE/ANSI
- // Return values from the program to the OS
- #define EXECUTION_FAILED -1
- #define EXECUTION_OK 0
- // Exception handler macro
- #define DO_EXCEPTION 1 // Execute the exception block
- // Macro for printing out error message and exit the program if an
- // error occured
- #define EXIT_IF_FAIL(x, string){
- ((x) != RPC_S_OK)?_tprintf(TEXT("%s returned with error: %dn"),
- TEXT(string), (x)),exit(x):0;}
- // Common type definition and defines used in the program
- #define PROTOCOL_SEQUENCE TEXT("ncacn_np")
- #define END_POINT TEXT("\pipe\strout_sample")
- #define IGNORE_CHAR TEXT('=')
- #define NULL_CHAR TEXT(' ')
- #endif // ifndef __COMMON_STROUT__