The Stand-alone Application

This stand-alone application, which consists of a call to a single function, forms the basis of our distributed application. The function, HelloProc, is defined in its own source file so that it can be compiled and linked with either a stand-alone application or a distributed application.

/* file hellop.c */
#include <stdio.h>
void HelloProc(unsigned char * pszString)
{
    printf("%s\n", pszString);
}
 
/* file: hello.c, a stand-alone application */
#include "hellop.c"
void main(void)
{
    unsigned Char * pszString = "Hello, World";
    HelloProc(pszString);
}