Click here to Skip to main content
13,044,115 members (122,486 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Good morning everyone..

i'm working with c#4.0 And Brics cad.. to generate the drawings in bricscad. i got that ..but my problem is.. display the drawing in c# window form only with out opening the brics cad..
->i got that option in visual c++ , but i'm not understanding that code..
-> anybody please help me to solve this problem in c# coding

Posted 24-Jan-13 17:26pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

There are no such thing as a miracle: if you need some C++ code to be used, you will need to learn some C++, enough to understand it, or have someone to do this part of work.

You can re-use C++ code and bind it to your .NET application, but please don't think that you can do it without understanding. Maybe it will require deeper understanding of C++ than most of pure-C++ developers have, because many of them don't understand many internals, but all interop problems requires you to understand them.

You will need this knowledge to use P/Invoke.

If you need to learn P/Invoke, start from here:[^],[^].

This CodeProject can also be useful: Essential P/Invoke[^].

The hardness of solution will depend on complexity of C++ interfaces. It can range from very easy to most tricky.

One alternative to P/Invoke is to use C++/CLI mixed-mode (managed+unmanaged) project. This project could build a DLL required by the global hooks, but it can contain some managed wrapper CLI code, so, from the standpoint of your .NET application, you can use it as a regular .NET assembly, that is, reference it. Please see:[^],[^],[^],[^].

But note that this way will require you to learn both C++ and C++/CLI, yet another language. Ready to do some work? :-)


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 24 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100