Click here to Skip to main content
15,892,746 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to convert RTF to plain text ? Pin
csc18-Mar-09 20:25
csc18-Mar-09 20:25 
AnswerRe: How to convert RTF to plain text ? Pin
Stuart Dootson18-Mar-09 22:24
professionalStuart Dootson18-Mar-09 22:24 
QuestionProblem in Images display on dialog. Pin
hemlat18-Mar-09 19:10
hemlat18-Mar-09 19:10 
AnswerRe: Problem in Images display on dialog. Pin
_AnsHUMAN_ 18-Mar-09 20:21
_AnsHUMAN_ 18-Mar-09 20:21 
GeneralRe: Problem in Images display on dialog. Pin
hemlat18-Mar-09 21:07
hemlat18-Mar-09 21:07 
GeneralRe: Problem in Images display on dialog. Pin
_AnsHUMAN_ 19-Mar-09 1:23
_AnsHUMAN_ 19-Mar-09 1:23 
GeneralRe: Problem in Images display on dialog. Pin
hemlat19-Mar-09 21:06
hemlat19-Mar-09 21:06 
Questionhow to convert legacy C++ library with nested class and callback to managed code [modified] Pin
Frank_Q18-Mar-09 16:57
Frank_Q18-Mar-09 16:57 
Dear all;

Recently our organization needs to convert a 3rd party’s MFC class library into managed code for usage in .NET. In the SDK, there is a header file and a dll library.

I only have little knowledge on wrapping unmanaged code to managed code. I would much appreciate if any one could give advice on how to implement.

Below shows the code in the header file for the dll library. Inside the “MainClass”, there are nested class, callback function and nested struct.

////////////////////////////Header File///////////////////////////////////////////////////////
#pragma once

#ifdef UNMANAGEDCODE_API_EXPORTS
#define UNMANAGEDCODE_API __declspec(dllexport)
#else
#define UNMANAGEDCODE_API __declspec(dllimport)
#endif

#include <sys/timeb.h>

class UNMANAGEDCODE_API MainClass
{
public:

MainClass ();
Virtual ~MainClass ();
Virtual bool StartUp(const TCHAR* pcszConfigFileName = NULL);
class NestedClass1
{
public:
// This is the entry for call back function
virtual bool OnNestedClass1() = 0;
};
Bool SetCallback(NestedClass1* callback); typedef struct NestedSruct1
{
unsigned int unId;
__timeb64 createTime;
}NestedStruct1;
const NestedStruct1** GetData(unsigned int& unCount);
};
////////////////////////////End of Header File///////////////////////////////////////////////////////

modified on Thursday, March 19, 2009 2:05 AM

AnswerRe: how to convert legacy C++ library with nested class and callback to managed code Pin
Frank_Q19-Mar-09 16:03
Frank_Q19-Mar-09 16:03 
GeneralRe: how to convert legacy C++ library with nested class and callback to managed code Pin
David Knechtges20-Mar-09 10:07
David Knechtges20-Mar-09 10:07 
GeneralRe: how to convert legacy C++ library with nested class and callback to managed code Pin
Frank_Q21-Mar-09 5:03
Frank_Q21-Mar-09 5:03 
Questionproblem accessing member functions from LRESULT CALLBACK Function() { } Pin
abiemann18-Mar-09 15:17
abiemann18-Mar-09 15:17 
AnswerRe: problem accessing member functions from LRESULT CALLBACK Function() { } Pin
«_Superman_»18-Mar-09 16:48
professional«_Superman_»18-Mar-09 16:48 
GeneralRe: problem accessing member functions from LRESULT CALLBACK Function() { } Pin
abiemann19-Mar-09 8:18
abiemann19-Mar-09 8:18 
Questiondesign a Kohonen SOM of 15 neurons in a 3X5 rectangular grid Pin
w118sxa18-Mar-09 11:30
w118sxa18-Mar-09 11:30 
AnswerRe: design a Kohonen SOM of 15 neurons in a 3X5 rectangular grid Pin
Maximilien18-Mar-09 12:40
Maximilien18-Mar-09 12:40 
Questionpersistent pointer/memory allocation Pin
Ylno18-Mar-09 10:04
Ylno18-Mar-09 10:04 
AnswerRe: persistent pointer/memory allocation Pin
Joe Woodbury18-Mar-09 10:12
professionalJoe Woodbury18-Mar-09 10:12 
AnswerRe: persistent pointer/memory allocation Pin
Luc Pattyn18-Mar-09 13:19
sitebuilderLuc Pattyn18-Mar-09 13:19 
AnswerRe: persistent pointer/memory allocation Pin
«_Superman_»18-Mar-09 16:53
professional«_Superman_»18-Mar-09 16:53 
AnswerRe: persistent pointer/memory allocation Pin
Eytukan18-Mar-09 19:41
Eytukan18-Mar-09 19:41 
AnswerRe: persistent pointer/memory allocation Pin
abiemann19-Mar-09 8:34
abiemann19-Mar-09 8:34 
QuestionConverting win32 console app. to service ? Pin
mmayur18-Mar-09 10:01
mmayur18-Mar-09 10:01 
AnswerRe: Converting win32 console app. to service ? Pin
Jerry.Wang18-Mar-09 13:52
Jerry.Wang18-Mar-09 13:52 
QuestionSome help on interpreting this makefile for linux... Pin
leslie wu18-Mar-09 7:07
leslie wu18-Mar-09 7:07 

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.