- 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
DYNOUTP.C
Package: MSDN_VC98.zip [view]
Upload User: bangxh
Upload Date: 2007-01-31
Package Size: 42235k
Code Size: 1k
Category:
Windows Develop
Development Platform:
Visual C++
- /******************************************************************************
- * This is a part of the Microsoft Source Code Samples.
- * Copyright (C) 1995-1997 Microsoft Corporation.
- * All rights reserved.
- * This source code is only intended as a supplement to
- * Microsoft Development Tools and/or WinHelp documentation.
- * See these sources for detailed information regarding the
- * Microsoft samples programs.
- ******************************************************************************/
- //
- // Sample code to show server-side
- // memory allocation for an [out] parameter
- //
- //
- #include <assert.h>
- #include "stdio.h"
- #include "string.h"
- #include "dynout.h"
- short GrabChunk(long *lSize, unsigned char **ppData)
- {
- int cbChunk = rand() % 10000; // how much memory to grab
- int cChar = 33 + rand()%30; // what to fill it with
- printf("GrabChunk() allocating %d bytes of '%c'n",cbChunk,cChar);
- *lSize = (long)cbChunk;
- *ppData = midl_user_allocate(cbChunk);
- memset(*ppData,cChar,cbChunk);
- return 0;
- }