Click here to Skip to main content
15,914,905 members
Home / Discussions / C#
   

C#

 
AnswerRe: NHibernate?? Pin
led mike9-Apr-08 7:30
led mike9-Apr-08 7:30 
AnswerRe: NHibernate?? [modified] Pin
Roger Alsing9-Apr-08 9:58
Roger Alsing9-Apr-08 9:58 
AnswerRe: NHibernate?? Pin
Mark Churchill9-Apr-08 21:16
Mark Churchill9-Apr-08 21:16 
AnswerRe: NHibernate?? Pin
Yitzchok Dev13-Apr-08 15:08
Yitzchok Dev13-Apr-08 15:08 
GeneralTrying to found the right control for a project Pin
HarrisonBrock9-Apr-08 6:26
HarrisonBrock9-Apr-08 6:26 
GeneralRe: Trying to found the right control for a project Pin
carbon_golem9-Apr-08 6:43
carbon_golem9-Apr-08 6:43 
GeneralByte array into Excel using C#. Pin
kurangu9-Apr-08 4:34
kurangu9-Apr-08 4:34 
GeneralRe: Byte array into Excel using C#. Pin
led mike9-Apr-08 4:40
led mike9-Apr-08 4:40 
GeneralRe: Byte array into Excel using C#. Pin
kurangu9-Apr-08 5:29
kurangu9-Apr-08 5:29 
GeneralRe: Byte array into Excel using C#. Pin
led mike9-Apr-08 5:50
led mike9-Apr-08 5:50 
GeneralRe: Byte array into Excel using C#. Pin
kurangu9-Apr-08 5:59
kurangu9-Apr-08 5:59 
GeneralRe: Byte array into Excel using C#. Pin
KaptinKrunch9-Apr-08 7:11
KaptinKrunch9-Apr-08 7:11 
GeneralRe: Byte array into Excel using C#. Pin
Anthony Mushrow9-Apr-08 7:19
professionalAnthony Mushrow9-Apr-08 7:19 
GeneralRe: Byte array into Excel using C#. Pin
Anthony Mushrow9-Apr-08 7:16
professionalAnthony Mushrow9-Apr-08 7:16 
QuestionAdd files to a Msi installer Pin
Radu_209-Apr-08 4:18
Radu_209-Apr-08 4:18 
GeneralRe: Add files to a Msi installer Pin
led mike9-Apr-08 4:42
led mike9-Apr-08 4:42 
GeneralGetting Files LastWriteTime Pin
narayanagvs9-Apr-08 3:59
narayanagvs9-Apr-08 3:59 
GeneralRe: Getting Files LastWriteTime Pin
Abhijit Jana9-Apr-08 4:52
professionalAbhijit Jana9-Apr-08 4:52 
GeneralRe: Getting Files LastWriteTime Pin
narayanagvs9-Apr-08 5:49
narayanagvs9-Apr-08 5:49 
GeneralRe: Getting Files LastWriteTime Pin
Luc Pattyn9-Apr-08 6:32
sitebuilderLuc Pattyn9-Apr-08 6:32 
GeneralRe: Getting Files LastWriteTime Pin
Dave Kreskowiak9-Apr-08 7:05
mveDave Kreskowiak9-Apr-08 7:05 
GeneralInterop c# and cpp unmanaged [modified] Pin
Tomerland9-Apr-08 3:56
Tomerland9-Apr-08 3:56 
Dear gurus,

finally I get totally crazy with interoperability of un/managed code.

I have the unmanged Cpp-Class "MyCppClass" with one simple member-function "add()". This class is not shown here. Now I build a managed wrapper class "MyCppClassWrapper".

I create an instance of this wrapper in a C#-Program and then I want to call the method "add()".



<code>
#include "MyCppClass.h"

namespace Managed {

public ref class MyCppClassWrapper {
MyCppClass *pInst;

public:
int add(int a, int b);
};
}
// implementation
int MyCppClassWrapper::add( int a, int b) {
return pInst->add(a,b);
}


</code>

If I the program starts, I get a FileNotFoundException: "The specified module could not be found. (Exception from HRESULT: 0x8007007E)"


But if I comment out "return pInst->add(a,b);" then everything works fine. It seems that I cannot call the function add() of the pInst-Pointer.

I'm totally lost

<div class="ForumMod">modified on Wednesday, April 9, 2008 10:05 AM</div>
GeneralRe: Interop c# and cpp unmanaged Pin
led mike9-Apr-08 4:45
led mike9-Apr-08 4:45 
GeneralInteger Question Pin
jchigg20009-Apr-08 3:53
jchigg20009-Apr-08 3:53 
GeneralRe: Integer Question Pin
Colin Angus Mackay9-Apr-08 3:57
Colin Angus Mackay9-Apr-08 3:57 

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.