Click here to Skip to main content
15,905,427 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: GetForegroundWindow() Pin
fd012900228-Jan-08 13:51
fd012900228-Jan-08 13:51 
Generaltest Pin
Member 462175228-Jan-08 7:44
Member 462175228-Jan-08 7:44 
GeneralRe: test Pin
CPallini28-Jan-08 7:56
mveCPallini28-Jan-08 7:56 
GeneralRe: test Pin
Hamid_RT28-Jan-08 19:16
Hamid_RT28-Jan-08 19:16 
GeneralGDI+ NOISE problem Pin
followait28-Jan-08 5:32
followait28-Jan-08 5:32 
GeneralRe: GDI+ NOISE problem Pin
Iain Clarke, Warrior Programmer28-Jan-08 5:34
Iain Clarke, Warrior Programmer28-Jan-08 5:34 
GeneralRe: GDI+ NOISE problem Pin
followait28-Jan-08 5:46
followait28-Jan-08 5:46 
GeneralQuestion regarding exported C++ symbols/objects Pin
Lea Hayes28-Jan-08 4:24
Lea Hayes28-Jan-08 4:24 
Hi all!

I am working on a application which is performance intensive. The bulk of the application is spread across several shared DLL modules for reusability. I have used C++ for the benefits of OOP, and the system is functioning well.

I am designing a scripting system to facilitate future expansion with cross-platform support. I have a basic scripting engine working. Scripts are able to link to and call C-style functions from dll modules. I am finding the need to use class within the scripting system, and have found several ways for which I can have a script link to a DLL module and use classes.

The key two constraints here are:
- performance, there are many small methods which will be called upon extremely frequently and so it is very important to minimize overhead here at all other costs.
- Cross-platform compatability at build time only, scripts will be cross-platform compatible already.


Idea #1 - Allocate and release objects from within the DLL using exported C functions. Add additional exported C functions for each class method, and convert all class methods into simple inline wrappers.
Problem: This may cause double function calls when interacting with class objects

Idea #2 - Somehow devise an approach which can link to exported C++ functions where the 'this' value could somehow be provided.
Problem: It is very important that this is compatible with other compilers, unfortunately (as far as I can tell) there is no standard for this.

Link functionality could be specialised for each platform (i.e. Windows, UNIX) simply by using seperate implementation files. Sadly, the same cannot be said for different compilers as there are many different compilers, and there is no way that I could support all of them.


It would be great to hear your ideas and experiences with similar situations. Is there a better way which I haven't yet found?

Many thanks!
Lea Hayes
GeneralSmart Card Service Problem Pin
Federico Milano28-Jan-08 2:28
Federico Milano28-Jan-08 2:28 
GeneralRe: Smart Card Service Problem Pin
Maxwell Chen28-Jan-08 3:25
Maxwell Chen28-Jan-08 3:25 
GeneralRe: Smart Card Service Problem Pin
Federico Milano28-Jan-08 3:39
Federico Milano28-Jan-08 3:39 
GeneralRe: Smart Card Service Problem Pin
Maxwell Chen28-Jan-08 4:13
Maxwell Chen28-Jan-08 4:13 
GeneralLinker Error 2005 Pin
quastman28-Jan-08 1:29
quastman28-Jan-08 1:29 
QuestionRe: Linker Error 2005 Pin
CPallini28-Jan-08 1:50
mveCPallini28-Jan-08 1:50 
GeneralRe: Linker Error 2005 Pin
quastman28-Jan-08 2:19
quastman28-Jan-08 2:19 
GeneralRe: Linker Error 2005 Pin
CPallini28-Jan-08 2:32
mveCPallini28-Jan-08 2:32 
GeneralRe: Linker Error 2005 Pin
quastman28-Jan-08 3:10
quastman28-Jan-08 3:10 
GeneralOUT Of MEMORY exception handling. Pin
Le@rner28-Jan-08 1:10
Le@rner28-Jan-08 1:10 
QuestionRe: OUT Of MEMORY exception handling. Pin
CPallini28-Jan-08 1:54
mveCPallini28-Jan-08 1:54 
GeneralRe: OUT Of MEMORY exception handling. Pin
Iain Clarke, Warrior Programmer28-Jan-08 2:29
Iain Clarke, Warrior Programmer28-Jan-08 2:29 
GeneralRe: OUT Of MEMORY exception handling. Pin
CPallini28-Jan-08 2:44
mveCPallini28-Jan-08 2:44 
Generalread document file Pin
Paulraj G27-Jan-08 23:53
Paulraj G27-Jan-08 23:53 
GeneralRe: read document file Pin
Iain Clarke, Warrior Programmer28-Jan-08 0:12
Iain Clarke, Warrior Programmer28-Jan-08 0:12 
GeneralRe: read document file Pin
Paulraj G28-Jan-08 0:32
Paulraj G28-Jan-08 0:32 
GeneralRe: read document file Pin
Iain Clarke, Warrior Programmer28-Jan-08 0:41
Iain Clarke, Warrior Programmer28-Jan-08 0:41 

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.