Click here to Skip to main content
15,901,505 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: where can i find win98 source code ??? Pin
Wes Aday8-Oct-04 3:49
professionalWes Aday8-Oct-04 3:49 
AnswerRe: where can i find win98 source code ??? Pin
Robert A. T. Káldy8-Oct-04 3:58
Robert A. T. Káldy8-Oct-04 3:58 
AnswerRe: where can i find win98 source code ??? Pin
Ryan Binns8-Oct-04 4:35
Ryan Binns8-Oct-04 4:35 
AnswerRe: where can i find win98 source code ??? Pin
Ravi Bhavnani8-Oct-04 15:29
professionalRavi Bhavnani8-Oct-04 15:29 
QuestionHow to handle/manage dangling references of DLL Pin
prakash_bhurke8-Oct-04 3:08
prakash_bhurke8-Oct-04 3:08 
AnswerRe: How to handle/manage dangling references of DLL Pin
digwizfox8-Oct-04 7:32
digwizfox8-Oct-04 7:32 
GeneralRe: How to handle/manage dangling references of DLL Pin
prakash_bhurke8-Oct-04 18:52
prakash_bhurke8-Oct-04 18:52 
GeneralRe: How to handle/manage dangling references of DLL Pin
digwizfox12-Oct-04 6:56
digwizfox12-Oct-04 6:56 
The concept of what you are doing is fine. I'm a little perplexed. I can't find anything on "segmentation fault" in the MSDN library. Here are some tips in case you haven't thought to try this.

I assume dp_dll is a pointer to a data structure or object. I assume you are using visual studio to setup your projects and Dlls. We do something very similar in our application here at work. We have one main MFC application which contains the GUI and many DLLs that contain some other levels of functionality. one of our Dlls, we call CommonDll and this is where set setup any global pointers that need to be available to all. So common utility functions are exported, the same way you have done so. Of course there are other interface functions that allow other Dlls to get a copy of the pointer. If your app is multithreaded, don't forget to use a CriticalSection or mutex to prevent threads from getting the pointer while it is being initialized.

First, check your project properties. Ensure that C/C++ / Code Generation / Struct member alignment is the same for all of your projects. We ran into major run time problems with this.

What kind of DLL have you setup? We seem to be able to do what you are doing (initialize a global pointer with an exported func within a Dll), very easily with an MFC extension Dll. Regular Dlls are different and have some special requirements for setting up your functions. You're function appears to be setup for an extension Dll so hopefully that is how you have set up your Dll. If not, recreate the Dll project as an MFC extension dll. By default, my visual studio .net selects regular dll and then I have to specifically remember to change this while walking through the project creation wizard.

There is plenty of documentation on dlls within the MSDN library if you need more to read. Just search on regular dll or extension dll.

Hope some of that points you in the right direction.
GeneralStandBy Computer Pin
Rajesh_K_Sharma8-Oct-04 0:50
Rajesh_K_Sharma8-Oct-04 0:50 
GeneralRe: StandBy Computer Pin
Blake Miller8-Oct-04 5:03
Blake Miller8-Oct-04 5:03 
QuestionHow to handle Mouse movements on Status Area Icon that i created using Shell_NotifyIcon Pin
Seejoy Jose8-Oct-04 0:44
Seejoy Jose8-Oct-04 0:44 
AnswerRe: How to handle Mouse movements on Status Area Icon that i created using Shell_NotifyIcon Pin
Sujan Christo8-Oct-04 1:02
Sujan Christo8-Oct-04 1:02 
QuestionDebug 'Attach to Process' failing why? Pin
rdhamija8-Oct-04 0:06
rdhamija8-Oct-04 0:06 
AnswerRe: Debug 'Attach to Process' failing why? Pin
Blake Miller8-Oct-04 5:06
Blake Miller8-Oct-04 5:06 
GeneralHelp needed with font Pin
Azghar Hussain7-Oct-04 23:57
professionalAzghar Hussain7-Oct-04 23:57 
GeneralNontype class template partial specialisation Pin
J.B.7-Oct-04 23:56
J.B.7-Oct-04 23:56 
GeneralRe: Nontype class template partial specialisation Pin
Joaquín M López Muñoz8-Oct-04 0:52
Joaquín M López Muñoz8-Oct-04 0:52 
GeneralRe: Nontype class template partial specialisation Pin
J.B.8-Oct-04 1:03
J.B.8-Oct-04 1:03 
GeneralRe: Nontype class template partial specialisation Pin
Joaquín M López Muñoz8-Oct-04 2:17
Joaquín M López Muñoz8-Oct-04 2:17 
GeneralSending SMS to any Mobile thru Visual C++ code Pin
Junnybol7-Oct-04 23:37
Junnybol7-Oct-04 23:37 
GeneralRe: Sending SMS to any Mobile thru Visual C++ code Pin
Robert A. T. Káldy8-Oct-04 3:42
Robert A. T. Káldy8-Oct-04 3:42 
GeneralRe: Sending SMS to any Mobile thru Visual C++ code Pin
Junnybol8-Oct-04 4:30
Junnybol8-Oct-04 4:30 
GeneralRe: Sending SMS to any Mobile thru Visual C++ code Pin
Robert A. T. Káldy11-Oct-04 11:49
Robert A. T. Káldy11-Oct-04 11:49 
GeneralRe: Sending SMS to any Mobile thru Visual C++ code Pin
Joaquín M López Muñoz8-Oct-04 4:01
Joaquín M López Muñoz8-Oct-04 4:01 
GeneralNeed quick help w/ saving data from ListControl Pin
opt767-Oct-04 22:48
opt767-Oct-04 22:48 

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.