Forum archiveIssue archiveOther usage issues

Archived discussion

C# example in .Net 2.0 environment

Other usage issuesTue, 01/24/2006 - 13:384 replies

Browse this forum
QuestionAuthor

Hi,

I'm new to OpenCascade and
try to run the C# IE example with C#.NET 2.0. Unfortunatly I get a error message "loader lock detected". Everything works fine if I run the example in VS 2003, but after upgrading the solution to VS 2005 I get this "loader lock" message.
Does anybody have experience with OpenCascade and .NET 2.0?

Discussion

4 archived replies

Posts are displayed in their archived order.

01Author

Hi,

in the meantime I found a solution. For anybody interested:
The project containing the nativ dll (OCC.cpp) defines a function DllMain as a entry point. It seems that this causes the "loader lock". As far as I understood the posts in some C# forums this used to be necessary to prevent a loader lock in .NET 1.0 and 1.1. In 2.0 You should just have to comment this function out and everything works fine.

Best regards

Björn

02Commenter-1

Hi,

Something which you may be interested in if you are looking at developing in C#, I have wrapped (but not using P/Invoke) some of the OCC API classes at a starter and would like to continue this.

Commenter-1

03Author

Hi Jonathan,

that sounds interesting. I did write a managed C++ wrapper for some OCC API, so I think You do something similar. I use OCC to impent STEP import and data exchange, so I'm not using a big part of the API at the moment, but that might change.

Regards

Björn

04Commenter-2