Click here to Skip to main content
15,895,011 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionIsolating mathematical functions from an input string [modified] Pin
J)ker20-Oct-07 15:57
J)ker20-Oct-07 15:57 
AnswerRe: Isolating mathematical functions from an input string Pin
Christian Graus20-Oct-07 16:57
protectorChristian Graus20-Oct-07 16:57 
AnswerRe: Isolating mathematical functions from an input string Pin
KEL322-Oct-07 22:20
KEL322-Oct-07 22:20 
QuestionHow to make a dll re-entrant? Pin
henk21cm20-Oct-07 10:12
henk21cm20-Oct-07 10:12 
AnswerRe: How to make a dll re-entrant? Pin
Abdellatif_El_Khlifi20-Oct-07 11:18
Abdellatif_El_Khlifi20-Oct-07 11:18 
AnswerRe: How to make a dll re-entrant? Pin
Mark Salsbery20-Oct-07 12:55
Mark Salsbery20-Oct-07 12:55 
AnswerRe: How to make a dll re-entrant? Pin
karle20-Oct-07 21:39
karle20-Oct-07 21:39 
GeneralRe: How to make a dll re-entrant? Pin
henk21cm20-Oct-07 23:05
henk21cm20-Oct-07 23:05 
Thanks folks,

A proposed solution is:

karle wrote:
BOOL WINAPI DllMain(


This is -apart from the name of the argument hinstDLL- exactly the same as the intiation code in this dll.

Maybe some more detailed description of what is happening.

The dll is called by a web application written in Delphi. The main task of the dll is to read a file and to store the data within this file in both a global struct and a pointer to double. Delphi can access and change this data by means of functions in this dll.

When several users simultaneously access each of them their own files, the data is overwritten by each consecutive 'read' call, so user 1 sees the data of user 2. Since this is unwanted behaviour, the work around was to add three functions:

Islocked(); Lock(); and Unlock();

Before trying to read or access data, the Delphi application checks whether IsLocked(); is false and then Locks the dll. After processing your data, the
Delphi application Unlocks the dll.

Not pretty, however it works. I was wondering whether there is a more elegant solution?



Regards,
Henk

21 cm: the universal wavelength of neutral hydrogen
AnswerRe: How to make a dll re-entrant? Pin
knockNrod2-Sep-10 3:10
knockNrod2-Sep-10 3:10 
Questionfunction name Pin
mauree20-Oct-07 10:11
mauree20-Oct-07 10:11 
AnswerRe: function name Pin
Nemanja Trifunovic20-Oct-07 13:00
Nemanja Trifunovic20-Oct-07 13:00 
GeneralRe: function name Pin
mauree20-Oct-07 13:14
mauree20-Oct-07 13:14 
GeneralRe: function name Pin
Nemanja Trifunovic21-Oct-07 2:40
Nemanja Trifunovic21-Oct-07 2:40 
AnswerRe: function name Pin
Nelek21-Oct-07 20:34
protectorNelek21-Oct-07 20:34 
QuestionCScrollSizes problem: [modified] Pin
Hakan Bulut20-Oct-07 8:45
Hakan Bulut20-Oct-07 8:45 
AnswerRe: CScrollSizes problem: Pin
Nelek21-Oct-07 20:36
protectorNelek21-Oct-07 20:36 
GeneralRe: CScrollSizes problem: Pin
Hakan Bulut21-Oct-07 23:35
Hakan Bulut21-Oct-07 23:35 
GeneralRe: CScrollSizes problem: Pin
Nelek22-Oct-07 4:37
protectorNelek22-Oct-07 4:37 
GeneralRe: CScrollSizes problem: [modified] Pin
Hakan Bulut22-Oct-07 22:00
Hakan Bulut22-Oct-07 22:00 
GeneralRe: CScrollSizes problem: Pin
Nelek29-Oct-07 21:40
protectorNelek29-Oct-07 21:40 
QuestionAbout network status check on local host Pin
Angelfirefox_20-Oct-07 8:10
Angelfirefox_20-Oct-07 8:10 
AnswerRe: About network status check on local host Pin
Hamid_RT20-Oct-07 19:33
Hamid_RT20-Oct-07 19:33 
Questionwhat do u meen by ....... Pin
NawabSahil20-Oct-07 7:03
NawabSahil20-Oct-07 7:03 
AnswerRe: what do u meen by ....... Pin
Steve Echols20-Oct-07 9:24
Steve Echols20-Oct-07 9:24 
AnswerRe: what do u meen by ....... Pin
Rick York20-Oct-07 19:11
mveRick York20-Oct-07 19:11 

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.