U
G
N
X
5
.
0
**
** Example.h
**
** Description:
** Example header file.
**
*****************************************************************************/
static void PrintErrorMessage( int errorCode );
Example.cpp 文件内容如下:
//////////////////////////////////////////////////////////////////////////////
//
// Example.cpp
//
// Description:
// Contains Unigraphics entry points for the application.
//
//////////////////////////////////////////////////////////////////////////////
// Include files
#include <uf.h>
#include <uf_exit.h>
#include <uf_ui.h>
#if ! defined ( __hp9000s800 ) && ! defined ( __sgi ) && ! defined ( __sun )
# include <strstream>
using std::ostrstream;
using std::endl;
using std::ends;
#else
# include <strstream.h>
#endif
#include <iostream.h>
#include "Example.h"
//----------------------------------------------------------------------------
// Activation Methods
//----------------------------------------------------------------------------
// Explicit Activation
// This entry point is used to activate the application explicitly, asin
// "File->Execute UG/Open->User Function..."
extern "C" DllExport void ufusr( char *parm, int *returnCode, int rlen )
{
/* Initialize the API environment */
int errorCode = UF_initialize();
if ( 0 == errorCode )
{
/* TODO: Add your application code here */