Click here to Skip to main content
15,910,009 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionWhich type of file is : .ocx ? Pin
16-Oct-01 22:59
suss16-Oct-01 22:59 
AnswerRe: Which type of file is : .ocx ? Pin
Jon Hulatt17-Oct-01 1:10
Jon Hulatt17-Oct-01 1:10 
QuestionHow to get global caret position in screen? Pin
tfElep16-Oct-01 21:49
tfElep16-Oct-01 21:49 
AnswerRe: How to get global caret position in screen? Pin
Tomasz Sowinski17-Oct-01 0:40
Tomasz Sowinski17-Oct-01 0:40 
GeneralShared network resources Pin
Daniel Visan16-Oct-01 21:20
Daniel Visan16-Oct-01 21:20 
GeneralRe: Shared network resources Pin
Andres Manggini17-Oct-01 5:46
Andres Manggini17-Oct-01 5:46 
GeneralRe: Shared network resources Pin
Andres Manggini17-Oct-01 5:54
Andres Manggini17-Oct-01 5:54 
GeneralSharing a data segment in a DLL Pin
Mr.Freeze16-Oct-01 18:51
Mr.Freeze16-Oct-01 18:51 
Hi,

I wrote a small dll which should be the link between two application (allow communication between them). Each application can use the dll, but the data is not shared. I had a look at the article "How to share a data segment in a DLL" by Phil McGahan to implement a shared data segment.
Unfortunately this didn't work. Also the compiler always says:

LINK : warning LNK4039: section "SHARED" specified with /SECTION option does not exist

My dll looks basically like this:

#pragma data_seg("SHARED")
int counter;
#pragma data_seg()
#pragma comment(linker, "/section:SHARED,RWS")
extern "C" __declspec(dllexport) void test()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
counter++;
CString tmp;
tmp.Format("Counter=%i",counter);
AfxMessageBox(tmp,MB_OK|MB_ICONSTOP|MB_APPLMODAL);
}

What am I doing wrong Confused | :confused: Confused | :confused:
Can someone help Confused | :confused: Confused | :confused:
Thanks Smile | :) Smile | :)
GeneralRe: Sharing a data segment in a DLL Pin
Michael Dunn16-Oct-01 19:47
sitebuilderMichael Dunn16-Oct-01 19:47 
GeneralRe: Sharing a data segment in a DLL Pin
Mr.Freeze16-Oct-01 20:29
Mr.Freeze16-Oct-01 20:29 
GeneralDetecting List View Header Click in Dialog Pin
16-Oct-01 16:54
suss16-Oct-01 16:54 
GeneralRe: Detecting List View Header Click in Dialog Pin
Michael Dunn16-Oct-01 17:25
sitebuilderMichael Dunn16-Oct-01 17:25 
GeneralCreating Property ... Pin
Hadi Rezaee16-Oct-01 12:35
Hadi Rezaee16-Oct-01 12:35 
GeneralDLL in ATL . small question ! Pin
mimi16-Oct-01 11:48
mimi16-Oct-01 11:48 
GeneralRe: DLL in ATL . small question ! Pin
Christian Graus17-Oct-01 11:22
protectorChristian Graus17-Oct-01 11:22 
GeneralCStrings Pin
Chris Klecker16-Oct-01 10:25
Chris Klecker16-Oct-01 10:25 
GeneralRe: CStrings Pin
Ravi Bhavnani16-Oct-01 10:30
professionalRavi Bhavnani16-Oct-01 10:30 
GeneralRe: CStrings Pin
Jamie Nordmeyer16-Oct-01 11:15
Jamie Nordmeyer16-Oct-01 11:15 
GeneralRe: CStrings Pin
Nish Nishant16-Oct-01 22:08
sitebuilderNish Nishant16-Oct-01 22:08 
GeneralRe: CStrings Pin
#realJSOP17-Oct-01 0:26
professional#realJSOP17-Oct-01 0:26 
GeneralMaking things pretty by returning BSTR's (ATLCOM) Pin
Tim Rymer16-Oct-01 10:02
Tim Rymer16-Oct-01 10:02 
GeneralRe: Making things pretty by returning BSTR's (ATLCOM) Pin
Carlos Antollini16-Oct-01 10:27
Carlos Antollini16-Oct-01 10:27 
GeneralRe: Making things pretty by returning BSTR's (ATLCOM) Pin
Tim Rymer16-Oct-01 10:48
Tim Rymer16-Oct-01 10:48 
GeneralRe: Making things pretty by returning BSTR's (ATLCOM) Pin
Carlos Antollini16-Oct-01 10:59
Carlos Antollini16-Oct-01 10:59 
GeneralRe: Making things pretty by returning BSTR's (ATLCOM) Pin
Tim Rymer16-Oct-01 11:25
Tim Rymer16-Oct-01 11:25 

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.