By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,949 Members | 1,077 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,949 IT Pros & Developers. It's quick & easy.

How do I pass a memory pointer between DLLs?

P: n/a
I am working with very limited memory so I thought I would allocate
all the memory I would need in my top level DLL and then pass a
pointer to the other DLLs so they could use the same allocated memory.
It crashes the application. From primitive debugging I find that the
pointer gets Nulled when I pass it. System status shows that the
memory is still allocated but the pointer is not being passed
properly. How do I fix this?

Adieu,
Derek

Aug 10 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Me
On Thu, 09 Aug 2007 20:08:25 -0700, Noone wrote:
I am working with very limited memory so I thought I would allocate all
the memory I would need in my top level DLL and then pass a pointer to
the other DLLs so they could use the same allocated memory. It crashes
the application. From primitive debugging I find that the pointer gets
Nulled when I pass it. System status shows that the memory is still
allocated but the pointer is not being passed properly. How do I fix
this?

Adieu,
Derek

I rarely ever write this because I think some of the regulars go overboard
in how often they say "OT"...but, ask in a windows forum where you'll get
a real answer because your question is platform specific and has
absolutely nothing to do with C++.

Aug 10 '07 #2

P: n/a
On Aug 9, 9:24 pm, Me <no...@all.comwrote:
On Thu, 09 Aug 2007 20:08:25 -0700, Noone wrote:
I am working with very limited memory so I thought I would allocate all
the memory I would need in my top level DLL and then pass a pointer to
the other DLLs so they could use the same allocated memory. It crashes
the application. From primitive debugging I find that the pointer gets
Nulled when I pass it. System status shows that the memory is still
allocated but the pointer is not being passed properly. How do I fix
this?
Adieu,
Derek

I rarely ever write this because I think some of the regulars go overboard
in how often they say "OT"...but, ask in a windows forum where you'll get
a real answer because your question is platform specific and has
absolutely nothing to do with C++.
Sorry about that. Thanks. I don't know what "OT" means so I'm glad you
didn't write it.

Aug 10 '07 #3

P: n/a
soxmax wrote:
I am working with very limited memory so I thought I would allocate
all the memory I would need in my top level DLL and then pass a
pointer to the other DLLs so they could use the same allocated memory.
It crashes the application. From primitive debugging I find that the
pointer gets Nulled when I pass it. System status shows that the
memory is still allocated but the pointer is not being passed
properly. How do I fix this?
When you say "i would allocate", what does the code look like ?

When you say "pass a pointer to other DLL's" what does that code look like ?

DLL or not, it should not be an issue.
Aug 10 '07 #4

P: n/a
soxmax wrote:
On Aug 9, 9:24 pm, Me <no...@all.comwrote:
>On Thu, 09 Aug 2007 20:08:25 -0700, Noone wrote:
I rarely ever write this because I think some of the regulars go overboard
in how often they say "OT"...but, ask in a windows forum where you'll get
a real answer because your question is platform specific and has
absolutely nothing to do with C++.

Sorry about that. Thanks. I don't know what "OT" means so I'm glad you
didn't write it.
"OT" means "Off Topic".

And even though you were off topic this time, please ask C++ language
related (not platform related) question here. You might want to lurk a
while and read the FAQ (http://www.parashift.com/c++-faq-lite) to get a
feeling for how things work here.

In general, if the answer to the question would be not applicable in
another language, and it would be the same regardless of
platform/compiler (e.g. the same on Windows and Linux) then you're on
topic here.

If your answer would be the same regardless of language (e.g. C++ or C#
or VB), or not applicable to some platform (e.g. DLLs are Windows only),
then you're probably off-topic here.

A good list of potential newsgroups can be found in FAQ 5.9 (follow the
URL above).
Aug 10 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.