Code:
#include "ProToolkit.h"
#include "ProObjects.h"
#include "ProCore.h"#include "stdio.h"
#include "stdlib.h"
#include "iostream.h"
extern void main( char argc, char *argv[] )
{
ProProcessHandle p_handle;
ProError err;
ProBoolean random;
cout << "trying to connect to pro/e wildfire..." << endl;
err = ProEngineerConnect( "",NULL,NULL,"",PRO_B_TRUE, 100, &random, &p_handle );
if ( !err == PRO_TK_NO_ERROR )
cout << "failure! something must have gone wrong" << endl;
else
cout << "success!" << endl;
cout << "terminating..." << endl;
err = ProEngineerStatusGet( );
if ( !err == PRO_TK_NO_ERROR )
return;
err = ProEngineerDisconnect( &p_handle, 20 );
}