Click here to Skip to main content
15,889,116 members
Home / Discussions / C#
   

C#

 
GeneralRe: active directory - DirectoryEntry Pin
Ista26-Aug-03 16:50
Ista26-Aug-03 16:50 
GeneralRe: active directory - DirectoryEntry Pin
devvvy26-Aug-03 17:55
devvvy26-Aug-03 17:55 
GeneralRe: active directory - DirectoryEntry Pin
Ista26-Aug-03 18:00
Ista26-Aug-03 18:00 
GeneralHere's a reference from MSDN Pin
devvvy26-Aug-03 16:25
devvvy26-Aug-03 16:25 
GeneralCalling a C++ function from c# Pin
Entelecheia26-Aug-03 6:59
Entelecheia26-Aug-03 6:59 
GeneralRe: Calling a C++ function from c# Pin
leppie26-Aug-03 7:05
leppie26-Aug-03 7:05 
GeneralRe: Calling a C++ function from c# Pin
Entelecheia26-Aug-03 7:15
Entelecheia26-Aug-03 7:15 
Generaljust expose your C code as managed C++ lib, then Add Reference Pin
devvvy26-Aug-03 7:33
devvvy26-Aug-03 7:33 
just expose your C code as managed C++ lib, then Add Reference. i think if you know what you're doing, it's like a hour's work. If your c++ code is managed code, just compile the "managed c++ class library". If not, just cut and paste your c++ code into a managed c++ class library - then compile and get your dll/assembly. After that, you have two options:
1. shared dll (you need to install assembly into GAC - perhaps forget it for now)
2. private dll (That's what you will do, for now)

With option 2, just do this:
1. Project menu
2. Add Reference
3. Browse (select your dll/assembly)

Then, just use it in your c# code:

using namespace XXXXX;
...
...
MyCPlusPlusClass obj = new MyCPlusPlusClass();
...

Just in case you get confused... in your managed class library (which compiles to dll):

namespace XXXXX
{
public class MyCPlusPlusClass //REMEMBER "public"
{
//your stuff
};

}

I don't think you need interop. YOu didnt develop a COM/ATL-server. For newbies, what I described is easiest and it's more efficient (by passing layers of framework code). But, if you wish to explore:
subject: RCW (Runtime callable Wrapper) - Interop
teach yrself C++/VC.net in 24 hours book (publisher: Sams)

good_luck

norm
GeneralRe: just expose your C code as managed C++ lib, then Add Reference Pin
Nemanja Trifunovic26-Aug-03 8:11
Nemanja Trifunovic26-Aug-03 8:11 
GeneralRe: Calling a C++ function from c# Pin
Nemanja Trifunovic26-Aug-03 11:50
Nemanja Trifunovic26-Aug-03 11:50 
GeneralRe: Calling a C++ function from c# Pin
Christian Graus26-Aug-03 16:13
protectorChristian Graus26-Aug-03 16:13 
GeneralRe: Calling a C++ function from c# Pin
Bo Hunter26-Aug-03 13:31
Bo Hunter26-Aug-03 13:31 
GeneralC# configurationfile Pin
User 53137826-Aug-03 6:30
User 53137826-Aug-03 6:30 
GeneralRe: C# configurationfile Pin
scadaguy26-Aug-03 8:32
scadaguy26-Aug-03 8:32 
GeneralRe: C# configurationfile Pin
User 53137826-Aug-03 8:43
User 53137826-Aug-03 8:43 
GeneralHiding close buttons, min and max in MDI CHild Pin
Ista26-Aug-03 4:41
Ista26-Aug-03 4:41 
GeneralRe: Hiding close buttons, min and max in MDI CHild Pin
Donald_a26-Aug-03 5:52
Donald_a26-Aug-03 5:52 
GeneralRe: Hiding close buttons, min and max in MDI CHild Pin
Ista26-Aug-03 6:44
Ista26-Aug-03 6:44 
GeneralThreadPool misbehaving Pin
TheFLC26-Aug-03 4:12
TheFLC26-Aug-03 4:12 
GeneralRe: ThreadPool misbehaving Pin
MeisterBiber26-Aug-03 6:45
MeisterBiber26-Aug-03 6:45 
GeneralRe: ThreadPool misbehaving Pin
Daniel Turini26-Aug-03 7:07
Daniel Turini26-Aug-03 7:07 
GeneralRe: ThreadPool misbehaving Pin
TheFLC26-Aug-03 7:13
TheFLC26-Aug-03 7:13 
QuestionHTML in C# ?? Pin
yyf26-Aug-03 3:13
yyf26-Aug-03 3:13 
GeneralEmail attachment on Outlook express Pin
Velichko Sarev26-Aug-03 3:02
Velichko Sarev26-Aug-03 3:02 
GeneralSilly bug in Left-to-Right Menu Pin
Hovik Melkomian26-Aug-03 2:29
Hovik Melkomian26-Aug-03 2:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.