- 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
REPASP.C
Package: MSDN_VC98.zip [view]
Upload User: bangxh
Upload Date: 2007-01-31
Package Size: 42235k
Code Size: 3k
Category:
Windows Develop
Development Platform:
Visual C++
- /****************************************************************************
- Microsoft RPC Version 2.0
- Copyright Microsoft Corp. 1992, 1993, 1994- 1996
- repas Example
- FILE: repasp.c
- PURPOSE: Remote procedures that are linked with the server
- side of RPC distributed application
- FUNCTIONS: ModifyListProc() - changes the doubly-linked list
- Shutdown() - shuts down the server side
- COMMENTS: Related to repass.c
- ****************************************************************************/
- #include <stdlib.h>
- #include <stdio.h>
- #include "repass.h" // header file generated by MIDL compiler
- /****************************************************************************
- Function: ModifyMyWString
- Parameters: pStr : Pointer to pointer to UNICODE string
- Returns: none
- Purpose: Display the string passed in, modify it, and return
- Comments: This sample is meant to demonstrate a typical use of the
- represent_as attribute: The client and server have different
- local views of the data, although the IDL file describes the
- wire contract.
- ****************************************************************************/
- void ModifyMyWString(WCHAR_STRING * pStr)
- {
- wprintf(L"nModifyMyWString: received UNICODE string:n%snn", *pStr );
- wcscpy(*pStr, L"This string comes back on the wire as UNICODE");
- wprintf(L"ModifyMyWString: sending UNICODE string:n%snn", *pStr );
- }
- /****************************************************************************
- Function: ModifyMyString
- Parameters: pStr : Pointer to pointer to UNICODE string
- Returns: none
- Purpose: Display the string passed in, modify it, and return
- Comments: This sample is meant to demonstrate a typical use of the
- represent_as attribute: The client and server have different
- local views of the data, although the IDL file describes the
- wire contract.
- ****************************************************************************/
- void ModifyMyString(WCHAR_STRING * pStr)
- {
- wprintf(L"nModifyMyString: received UNICODE string:n%snn", *pStr );
- wcscpy(*pStr, L"This UNICODE string comes back on the wire as ASCII");
- wprintf(L"ModifyMyString: sending UNICODE string:n%snn", *pStr );
- }
- /****************************************************************************
- Function: Shutdown
- Parameters: none
- Returns: none
- Purpose: Make the server stop listening for client applications.
- Comments: The two NULL parameters passed to RpcServerUnregisterIf are
- a show of brute force: they tell the function to turn
- off all registered interfaces. See the RPC API function
- reference for more information about these functions.
- ****************************************************************************/
- void Shutdown(void)
- {
- RPC_STATUS status;
- printf("Calling RpcMgmtStopServerListeningn");
- status = RpcMgmtStopServerListening(NULL);
- printf("RpcMgmtStopServerListening returned: 0x%xn", status);
- if (status) {
- exit(status);
- }
- printf("Calling RpcServerUnregisterIfn");
- status = RpcServerUnregisterIf(NULL, NULL, FALSE);
- printf("RpcServerUnregisterIf returned 0x%xn", status);
- if (status) {
- exit(status);
- }
- }
- /* end file repasp.c */