|
|
Microsoft Windows NT Pre-Release 11-19-1991
/****************************************************************************
Microsoft RPC Version 1.0 Alpha
October 1991
Hello3 Example
FILE: hello3\procs.c
PURPOSE: Remote procedures; linked with server side of RPC
distributed application hello3
FUNCTIONS: HelloProc3 - displays string parameter
MIDL_user_allocate - allocates memory
MIDL_user_free - frees memory
COMMENTS:
The functions MIDL_user_allocate and MIDL_user_free are
called by the stubs whenever they need to allocate or free
memory. Functions with these names must be provided by
the programmer; this allows the programmer to determine
the memory management scheme to be used with RPC.
The hello3 program does not need to manage memory, so these
required functions simply call malloc() and free().
****************************************************************************/
#include <malloc.h> // malloc, free
#include <stdio.h> // printf
void HelloProc3(char *pszString)
{
printf("%s\n", pszString);
}
// ====================================================================
// MIDL allocate and free
// ====================================================================
void * MIDL_user_allocate(unsigned long len)
{
return malloc((short) len);
}
void MIDL_user_free(void * ptr)
{
free(ptr);
}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.