cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Pro/toolkit error startup of application failed

Emilie
Newbie

Pro/toolkit error startup of application failed

Hello,

I am developping a bit with Pro/Toolkit. First I did my application as spawn mode (exe) as they advice us. I have no problem with that, I compile it and register it and then it works fine in ProE 64 bits. Then I decided to do the same application but as DLL mode in order to have my application running faster but I can't get it to work :

non pb with compilation , then I register it like this :

name ProEConnectorDLL

startup dll

exec_file C:\Devel\ProEConnectorDLL\x64\Debug\ProEConnectorDLL.dll

text_dir C:\Devel\ProEConnectorDLL\text

delay_start TRUE

allow_stop TRUE

REVISION 18

end

then I launch it thanks to Tools/Auxiliary Application but when I start it I get the error message : startup_failed.JPG

Please help!

Thank you


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
Tags (1)
19 REPLIES 19

Re: Pro/toolkit error startup of application failed

Hi,

Did you check the trail file after the application run?.

Can you send what your userinitalize looks like.

Regards

Anika Kapoor

Re: Pro/toolkit error startup of application failed

Hello!

Sorry if my question seems simple but where can I find the tail file?

Here is my userinitializee :

extern "C" int user_initialize()

{

ProError err = PRO_TK_NO_ERROR;

ProMode mode = PRO_MODE_UNUSED;

err = ProModeCurrentGet(&mode);

if(err == PRO_TK_NO_ERROR)

{

if(mode == PRO_TK_BAD_CONTEXT)

{

printf("ProModeCurrentGet error in user_initialize.\n");

}

}

return(0);

}

Thank you

Re: Pro/toolkit error startup of application failed

Hello,

I don't think trail file will help a lot... Generaly there is only a line with the same message than the error dialog...

First of all, you must check if the protk.dat paths are good in Help->System Informations->Auxiliary application Information.

If everything is OK, check if all dependancies of your dll is in the same directory.

BR,

Etienne

Re: Pro/toolkit error startup of application failed

I checked the path from the protk.dat and they are good. I renamed the dat file protk_dll.dat, I guess it's not a problem.

I checked the dependencies and they are all in the same directory...

Do you have a small example project ofr example? I am using Visual Studio 2008 Express. Maybe it's something in the configuration of my project, if I could compare with a working .sln it could be very helpful

Thank you a lot!

Re: Pro/toolkit error startup of application failed

Try with filename protk.dat instead of protk_dll.dat

Re: Pro/toolkit error startup of application failed

nothing changed...

Re: Pro/toolkit error startup of application failed

Try with a basic protk.dat:

name ProEConnectorDLL

startup dll

exec_file C:\Devel\ProEConnectorDLL\x64\Debug\ProEConnectorDLL.dll

text_dir C:\Devel\ProEConnectorDLL\text

end

Check the path not in the protk.dat but in the auxilliary application information (after start fail).

My user_initialize function don't have the same prototype.

I have "extern "C" int user_initialize(int argc, char *argv[], char *version, char *build, wchar_t errbuf[80])".

Have you a "void user_terminate() {}" function ?

Re: Pro/toolkit error startup of application failed

Here is what I have in my main.cpp :

/*--------------------------------------------------------------------*\

Pro/TOOLKIT includes

\*--------------------------------------------------------------------*/

#include "ProToolkit.h"

#include "ProCore.h"

#include <ProMenu.h>

#include "ProUtil.h"

/*--------------------------------------------------------------------*\

ProEConnector includes

\*--------------------------------------------------------------------*/

extern "C" int user_initialize()

{

ProError err = PRO_TK_NO_ERROR;

ProMode mode = PRO_MODE_UNUSED;

err = ProModeCurrentGet(&mode);

if(err == PRO_TK_NO_ERROR)

{

if(mode == PRO_TK_BAD_CONTEXT)

{

printf("ProModeCurrentGet error in user_initialize.\n");

}

}

return(0);

}

extern "C" void user_terminate()

{

ProError err = PRO_TK_NO_ERROR;

err = ProViewRefit (NULL, NULL);

if(err != PRO_TK_NO_ERROR)

{

printf("error %i.\n",err);

}

else

{

printf("Terminate.\n");

}

}

void main(int argc, char *argv[])

{

ProToolkitMain (argc, argv);

return;

}

Re: Pro/toolkit error startup of application failed

Can you try removing void main function ?

Re: Pro/toolkit error startup of application failed

I just did. but still I get the same failed message.

Re: Pro/toolkit error startup of application failed

Hello Emilie,

I have testet that source code in Visual Studio 2005 with Wildfire 4.0 64-bit and it works perfect.

My settings:

Additional include path:

\ProTOOLKIT\Wildfire 4.0 M200\protoolkit\includes

\ProTOOLKIT\Wildfire 4.0 M200\protoolkit\protk_appls\includes

preprocessor:

PRO_MACHINE=36

PRO_OS=4

Lib dir:

\Wildfire 4.0 M200\protoolkit\x86e_win64\obj

lib:

protk_dllmd.lib

Greetings Lars

Re: Pro/toolkit error startup of application failed

did you try with Visual studio 2008?

Is it possible that you send me your project, please? Maybe I did something wrong in the configuration.

Re: Pro/toolkit error startup of application failed

Hello Emilie,

I think the Visual Studio 2008 Express version has no support for 64-bit programming?

Isn't it???

You want to get a 64-bit dll?

Have you installed an 64-bit ProE? Do you link your projekt to the 64-bit libs of protoolkit?

You can analyse your dll with the dependency walker (64-bit version).

Or send the dll to me.

Greetings Lars

Re: Pro/toolkit error startup of application failed

I have installed the 64 bits version of ProE and I link with the 64 bits libs of protoolkit. and the weird thing is that I don't have a problem doing an 64bits exe... But as I wanted to have better perfo I decided to do a dll and even with a very simple project I can't get it to run..

Here is my dll.

Thank you for your help

Re: Pro/toolkit error startup of application failed

I am really wondering why I have no problem generating and using an exe but it's not ok for a dll.

Do you have any clue on this?

Re: Pro/toolkit error startup of application failed

What version of PTC product are you using : WF4, WF5, ProElement5, CREO1, CREO2 ?

For WF4, you must use Visual Studio 2005.

For WF5 and PE5, you must use Visual Studio 2008.

For CREO1 & 2, you must use Visual Studio 2010.

Re: Pro/toolkit error startup of application failed

I have WF5 and I am using Visual Studio 2008 Express.

I will try with Visual Studio 2008 (not Express).

Re: Pro/toolkit error startup of application failed

I finally managed!!

I am using Visual Studio 2008 with these settings :

-include files :

proeWildfire 5.0\protoolkit\includes

proeWildfire 5.0\prodevelop\includes

- libraries files :

proeWildfire 5.0\protoolkit\x86e_win64\obj

- Runtime Library : Multithread (/MT)

- Additional Dependencies :

protk_dll.lib

wsock32.lib

mpr.lib

psapi.lib

ws2_32.lib

netapi32.lib

And this protk.dat :

NAME ProEConnectorDLL
STARTUP dll
ALLOW_STOP TRUE
DELAY_START FALSE
EXEC_FILE C:\Devel\ProEConnectorDLLPrj\x64\Release\ProEConnectorDLLPrj.dll
TEXT_DIR C:\Devel\ProEConnectorDLLPrj\Text

END

Thank you for your help guys!

Emilie

Re: Pro/toolkit error startup of application failed

Hello,

for DLLs I use

Multithreaded-DLL (/MD)

with

protk_dllmd.lib

Announcements