Click here to Skip to main content
15,900,378 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Event driven, blocking Pipe for MFC? Pin
Mark Salsbery28-Dec-08 12:49
Mark Salsbery28-Dec-08 12:49 
GeneralRe: Event driven, blocking Pipe for MFC? Pin
Richard Andrew x6428-Dec-08 18:55
professionalRichard Andrew x6428-Dec-08 18:55 
GeneralRe: Event driven, blocking Pipe for MFC? Pin
nobaq29-Dec-08 1:51
nobaq29-Dec-08 1:51 
QuestionVisual Studio 2008 dll creation Pin
Fred Andres28-Dec-08 9:34
Fred Andres28-Dec-08 9:34 
QuestionRe: Visual Studio 2008 dll creation Pin
CPallini28-Dec-08 10:20
mveCPallini28-Dec-08 10:20 
AnswerRe: Visual Studio 2008 dll creation Pin
Fred Andres28-Dec-08 10:30
Fred Andres28-Dec-08 10:30 
GeneralRe: Visual Studio 2008 dll creation Pin
CPallini28-Dec-08 10:40
mveCPallini28-Dec-08 10:40 
QuestionSimple IPC / Functioncall in different address space Pin
nobaq28-Dec-08 7:01
nobaq28-Dec-08 7:01 
Hello,

I'm writing on a database application where the data is stored as HTML code (incl. images, JavaScripts and StyleSheets) in an SQlite database. The data is displayed in an MFC application with CHtmlView.

I can't use dynamic document writing via OnBeforeNavigate2 because I need my images and scripts to be stored in the database too. So I have written a very simple "Asynchronous Pluggable Protocol" for this. I need to register this handler (a DLL) globally with regsvr32.

But now I do not want to split my application logic into the exe and the DLL; instead, I want the whole application logic to reside in the MFC exe. Including the load procedure for a specific HTML page/images from the database.

So my idea is: In my app, I navigate with CHtmlView to myapp://<pageid>. Then my protocol handler is called. This DLL now requests the actual data from the running MFC application. The MFC app in turn loads the specific data from the SQLite database and passes the data back to the DLL.

The big question now is: What is the simplest method (IPC) to request data (up to a few MB) from a running application?

A great thing would be if the DLL could just call a defined function from the running exe like:

void getContent(int pageID, char *buffer, int *len);


or better:

void GetContent(char *url, char *buffer, int *len);


But I guess this is not easy. So I rely in IPC. But IPC is a very complex topic; I have no experience with it in Windows. Additionally, synchronization is a complicated issue too.

How would you solve this problem?

Is there a simple method that fits to my description?

WM_COPYDATA would be possible but unfortunately the Pluggable Protocol does not have a message queue. And I also need to pass the URL to the application when requesting a specified content.

Thank you for any hints!

Niki
AnswerRe: Simple IPC / Functioncall in different address space Pin
Code-o-mat28-Dec-08 10:57
Code-o-mat28-Dec-08 10:57 
GeneralRe: Simple IPC / Functioncall in different address space Pin
nobaq28-Dec-08 11:38
nobaq28-Dec-08 11:38 
GeneralRe: Simple IPC / Functioncall in different address space Pin
Richard Andrew x6428-Dec-08 11:43
professionalRichard Andrew x6428-Dec-08 11:43 
GeneralRe: Simple IPC / Functioncall in different address space Pin
nobaq29-Dec-08 1:49
nobaq29-Dec-08 1:49 
Questionquestion about templates and iterators Pin
Green Fuze28-Dec-08 6:30
Green Fuze28-Dec-08 6:30 
AnswerRe: question about templates and iterators Pin
Stuart Dootson29-Dec-08 14:15
professionalStuart Dootson29-Dec-08 14:15 
QuestionHow to declare a global array of string inside of a IF Pin
Dark_eye28-Dec-08 6:04
Dark_eye28-Dec-08 6:04 
AnswerRe: How to declare a global array of string inside of a IF Pin
CPallini28-Dec-08 6:21
mveCPallini28-Dec-08 6:21 
GeneralRe: How to declare a global array of string inside of a IF Pin
Dark_eye28-Dec-08 19:22
Dark_eye28-Dec-08 19:22 
QuestionHow to get the main module of any process? Pin
kcynic28-Dec-08 3:56
kcynic28-Dec-08 3:56 
AnswerRe: How to get the main module of any process? Pin
Mark Salsbery28-Dec-08 4:40
Mark Salsbery28-Dec-08 4:40 
AnswerRe: How to get the main module of any process? [modified] Pin
kcynic28-Dec-08 15:37
kcynic28-Dec-08 15:37 
AnswerRe: How to get the main module of any process? Pin
Code-o-mat28-Dec-08 4:42
Code-o-mat28-Dec-08 4:42 
GeneralRe: How to get the main module of any process? Pin
kcynic28-Dec-08 15:41
kcynic28-Dec-08 15:41 
GeneralRe: How to get the main module of any process? Pin
Code-o-mat28-Dec-08 21:59
Code-o-mat28-Dec-08 21:59 
AnswerRe: How to get the main module of any process? Pin
Hamid_RT28-Dec-08 5:21
Hamid_RT28-Dec-08 5:21 
GeneralRe: How to get the main module of any process? Pin
kcynic28-Dec-08 15:44
kcynic28-Dec-08 15:44 

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.