资源简介
ug二次开发与数据库应用_基础与典型范例
代码片段和文件信息
//////////////////////////////////////////////////////////////////////////////
//
// Welcome To UG.cpp
//
// Description:
// Contains Unigraphics entry points for the application.
//
//////////////////////////////////////////////////////////////////////////////
// Include files
#include
#include
#include
#if ! defined ( __hp9000s800 ) && ! defined ( __sgi ) && ! defined ( __sun )
# include
using std::ostrstream;
using std::endl;
using std::ends;
#else
# include
#endif
#include
#include “Welcome To UG.h“
//----------------------------------------------------------------------------
// Activation Methods
//----------------------------------------------------------------------------
// Explicit Activation
// This entry point is used to activate the application explicitly as in
// “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 */
uc1601(“Welcome To UG!“1);
/* Terminate the API environment */
errorCode = UF_terminate();
}
/* Print out any error messages */
PrintErrorMessage( errorCode );
}
//----------------------------------------------------------------------------
// Utilities
//----------------------------------------------------------------------------
// Unload Handler
// This function specifies when to unload your application from Unigraphics.
// If your application registers a callback (from a Menuscript item or a
// User Defined object for example) this function MUST return
// “UF_UNLOAD_UG_TERMINATE“.
extern “C“ int ufusr_ask_unload( void )
{
return( UF_UNLOAD_UG_TERMINATE );
}
/* PrintErrorMessage
**
** Prints error messages to standard error and the Unigraphics status
** line. */
static void PrintErrorMessage( int errorCode )
{
if ( 0 != errorCode )
{
/* Retrieve the associated error message */
char message[133];
UF_get_fail_message( errorCode message );
/* Print out the message */
UF_UI_set_status( message );
// Construct a buffer to hold the text.
ostrstream error_message;
// Initialize the buffer with the required text.
error_message << endl
<< “Error:“ << endl
<< message
<< endl << endl << ends;
// Write the message to standard error
cerr << error_message.str();
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 123904 2007-08-07 22:47 data\1\Welcome To UG\Debug\vc60.idb
文件 167936 2007-08-07 22:47 data\1\Welcome To UG\Debug\vc60.pdb
文件 98361 2007-08-07 22:47 data\1\Welcome To UG\Debug\Welcome To UG.dll
文件 689 2007-08-07 22:47 data\1\Welcome To UG\Debug\Welcome To UG.exp
文件 83212 2007-08-07 22:47 data\1\Welcome To UG\Debug\Welcome To UG.ilk
文件 2230 2007-08-07 22:47 data\1\Welcome To UG\Debug\Welcome To UG.lib
文件 41191 2007-08-07 22:47 data\1\Welcome To UG\Debug\Welcome To UG.obj
文件 3106200 2007-08-07 22:47 data\1\Welcome To UG\Debug\Welcome To UG.pch
文件 123904 2007-08-07 22:47 data\1\Welcome To UG\Debug\Welcome To UG.pdb
文件 41984 2007-08-07 22:54 data\1\Welcome To UG\Release\vc60.idb
文件 20480 2007-08-07 22:54 data\1\Welcome To UG\Release\Welcome To UG.dll
文件 691 2007-08-07 22:54 data\1\Welcome To UG\Release\Welcome To UG.exp
文件 2230 2007-08-07 22:54 data\1\Welcome To UG\Release\Welcome To UG.lib
文件 10674 2007-08-07 22:54 data\1\Welcome To UG\Release\Welcome To UG.obj
文件 3095964 2007-08-07 22:54 data\1\Welcome To UG\Release\Welcome To UG.pch
文件 2770 2007-08-07 22:47 data\1\Welcome To UG\Welcome To UG.cpp
文件 4188 2007-08-07 22:56 data\1\Welcome To UG\Welcome To UG.dsp
文件 551 2007-08-07 22:39 data\1\Welcome To UG\Welcome To UG.dsw
文件 292 2007-08-07 22:39 data\1\Welcome To UG\Welcome To UG.h
文件 41984 2007-10-21 00:53 data\1\Welcome To UG\Welcome To UG.ncb
文件 48640 2007-10-21 00:53 data\1\Welcome To UG\Welcome To UG.opt
文件 1392 2007-08-07 22:54 data\1\Welcome To UG\Welcome To UG.plg
文件 2656 2007-08-05 00:13 data\2\DIALOG_DEMO\application\dialog_exp.dlg
文件 94261 2007-08-05 00:54 data\2\DIALOG_DEMO\DIALOG_DEMO\Debug\DIALOG_DEMO.dll
文件 797 2007-08-05 00:35 data\2\DIALOG_DEMO\DIALOG_DEMO\Debug\DIALOG_DEMO.exp
文件 55544 2007-08-05 00:54 data\2\DIALOG_DEMO\DIALOG_DEMO\Debug\DIALOG_DEMO.ilk
文件 2374 2007-08-05 00:35 data\2\DIALOG_DEMO\DIALOG_DEMO\Debug\DIALOG_DEMO.lib
文件 953980 2007-08-05 00:45 data\2\DIALOG_DEMO\DIALOG_DEMO\Debug\DIALOG_DEMO.pch
文件 173056 2007-08-05 00:54 data\2\DIALOG_DEMO\DIALOG_DEMO\Debug\DIALOG_DEMO.pdb
文件 2656 2007-08-05 00:13 data\2\DIALOG_DEMO\DIALOG_DEMO\Debug\dialog_exp.dlg
............此处省略871个文件信息
评论
共有 条评论