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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Translate the entire conversation x

CREO Toolkit applications compatibility with C++/CLI code

IB_10798296
4-Participant

CREO Toolkit applications compatibility with C++/CLI code

Hello,

I have created a small C++/CLI library which make calls to a C# DLL, this library works fine if I call it from any other C++ project, but it does not work if I call it from my Toolkit application (based on Creo Toolkit 10.0.6.0).

The application compiles and links fine, but it fails to start from the Auxiliary Applications menu:

 

IB_10798296_1-1753721625063.png

 

Checking that trailfile info, I only can see these lines related to my app not saying any clue about the possible root cause error:

 

IB_10798296_2-1753722263526.png

 

What I'm thinking is that Creo doesn't support Toolkit apps involved with C++/CLI code, but I would like to confirm that, do some of you have experience this?

 

Thanks.

 

 

 

 

 

 

 

ACCEPTED SOLUTION

Accepted Solutions
RPN
17-Peridot
17-Peridot
(To:IB_10798296)

Make sure that dependent libraries can be loaded, for this you may have to adjust the path variable. You can do this in the psf file. As far I know there are no limitations.

View solution in original post

6 REPLIES 6

IB_10798296
4-Participant
(To:VladimirN)

Thanks Vladimir, the second post had the solution. I implemented some other suggestions described there like:

  • Change to the same character set as the caller application (I had assigned a different one)
  • Change to the same CRT (this wasn't possible since the dll needs to support /CLR and this option is not compatible with the CRT defined for the caller application)

But what it really worked was to include the location of the dll in the PATH variable, I did that modifying the psf file.

RPN
17-Peridot
17-Peridot
(To:IB_10798296)

Make sure that dependent libraries can be loaded, for this you may have to adjust the path variable. You can do this in the psf file. As far I know there are no limitations.

IB_10798296
4-Participant
(To:RPN)

Thanks, this resolved the issue! I did exactly what you mentioned. My problem was that I was considering the libraries would be found implicitly if those are located in same directory of the caller application.

syalagudri
14-Alexandrite
(To:IB_10798296)

You should create toolkit using VB API in C# itself ?  In this case no need to call from C++ -> C#.

 

Also not sure name mangling happens on C# as well, You can check this also.

 

Hey Syalagudri, my situation is that I'm updating an already existing application which is done in pure C++, that is why I'm creating a C++/CLI wrapper to communicate the current C++ app with the C# library.

 

Thanks!

Announcements

Top Tags