Skip to main content
16-Pearl
Sep 12, 2016 12:38 PM UTC
Solved

How to create Toolkit dll application as COM Visible?

I want to refer the Toolkit dll application in my C# Project. So I want to make it COM Visible. Any Idea's


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.
TomasLounAnswer
1-Visitor
Sep 23, 2016 7:08 AM UTC

You don't need to create COM interface to use application in C#. It is better to create managed interface to .NET - An Overview of Managed/Unmanaged Code Interoperability

We already have our library with many Pro/Toolkit functions which we are using in C#

8 replies

TomasLoun1-VisitorAnswer
1-Visitor
Sep 23, 2016 7:08 AM UTC

You don't need to create COM interface to use application in C#. It is better to create managed interface to .NET - An Overview of Managed/Unmanaged Code Interoperability

We already have our library with many Pro/Toolkit functions which we are using in C#

Translate
16-Pearl
Sep 27, 2016 1:32 PM UTC

Hi Tomas,

I have tried many ways. I have created Win32 application executable file it is working fine.

But I am planning to create dll file for my C Sharp Project. Whenever I Calling my DLL in C# Project I am getting the below Error. May you help in this situation?

Error10error LNK2019: unresolved external symbol _ProEngineerConnectionStart referenced in function "public: __thiscall myClass::myClass(double,double)" (??0myClass@@QAE@NN@Z)C:\TOOLKIT DEVELOPMENT\ASYNCHRONOUS APPLICATIONS\TEST 4\AsyncTestDll\AsyncTestDll\AsyncDll\main.objAsyncDll

LOG FILE :

main.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification

     Creating library C:\TOOLKIT DEVELOPMENT\ASYNCHRONOUS APPLICATIONS\TEST 4\AsyncTest4\Debug\AsyncDll.lib and object C:\TOOLKIT DEVELOPMENT\ASYNCHRONOUS APPLICATIONS\TEST 4\AsyncTest4\Debug\AsyncDll.exp

main.obj : error LNK2019: unresolved external symbol _ProEngineerConnectIdGet referenced in function "public: __thiscall myClass::myClass(double,double)" (??0myClass@@QAE@NN@Z)

main.obj : error LNK2019: unresolved external symbol _ProEngineerConnectionStart referenced in function "public: __thiscall myClass::myClass(double,double)" (??0myClass@@QAE@NN@Z)

C:\TOOLKIT DEVELOPMENT\ASYNCHRONOUS APPLICATIONS\TEST 4\AsyncTest4\Debug\AsyncDll.dll : fatal error LNK1120: 2 unresolved externals

Translate
16-Pearl
Sep 28, 2016 7:34 AM UTC

Hi Tomas,

Finally my DLL works fine with C Sharp Application...

Translate