What is the best way to integrate an MFC-component in a .Net application?
The MFC-component I want to use resides in an mfc-dll and consists of many c++ classes with big usage of the MFC-classes. I tried so far to use IJW with MC++ wrapper classes but the application crashes all the time in some new and I don't want to use PInvoke because then I loose the object oriented design. How about converting the MFC-component into a COM object? Can I use the MFC-component this way in a .Net application?
U should be able to make it working through IJW. whats the erro u are getting? Though converting to COM is a possible alternative, as far as workload is concerned IJW is best. Performancewise also IJW is better than Com interop according to msdn.
I get lots of crashes related to new operators. Each time I allocated with new a CDC object, it might crash. I have the feeling that during the new operation there might be a conflict between the managed and unmanaged heap. Do you have any idea what i could do in this case?
the error is:
error C3363: 'void ClientRequestReceived(System::IAsyncResult __gc *)' : cannot create a delegate handler for 'System::AsyncCallback' from a non-member function or a member of an unmanaged class
how do i fix this error?
Thanx in advance
Upon my end shall i begin?
Forsaking all i've fallen for..
i rise to meet the END!!
% is for tracking references to CLI object
& is for passing native heap objects
If I use % and pass a native object, what is the compiled behavior? In other words given the following trivial example, does the code for x and y end up being the same, or does x box the passed value and then unbox it?
void Test(int% x, int& y)
int x = 0;
int y = 1;
// A bunch of stuff happens
// A bunch more stuff happens
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
i am infront of you with another doubt. We are using cin and cout in C++. Whether these are class or object.
if they are object how can we use them without declaring that it belongs to this class. Thanks for u in advance.
As i am a beginer in C++ i met with a confusion. I would like to know where the actual defention of library function is present. For eg: the defention of strlen(). Is it present in string.h. Or just the declaration only present in the string.h. please clrify my doubts.