C#Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
When you create a .NET assembly, you can set a checkbox to have the assembly registered for COM interop. This will allow you to access it from any language that can call COM. (C can can't it? Been a long time since I touched C or C++.)
Go to the Configuration Properties -> Build page of your project properties. Look for "Register for COM Interop".
Does this make it possible to say declare a Form within the c app and then show it if it is declare in a C# dll.
Well, yes and no. It depends. Look at the links above. What you're actuallty doing is making COM components from your C# classes and these COM components can be called by your C code. It looks more difficult then it actually is. If the websites above don't help, drop me a line (beq02817 at yahoo.com) and I'll see if I can send you a small example.
Again, I'm sorry for the late reply.
When you compile the C# code, you need to enable the option to "register for COM interop" which sets up the assembly for COM registration. Then you can call .NET methods on the assembly from any COM interface.