🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.windows.ms.programmer
3 messages
3 total messages Started by Keith Bedford Thu, 16 Apr 1992 08:49
LocalAlloc fails in Visual Basic Control-Help!
#427
Author: Keith Bedford
Date: Thu, 16 Apr 1992 08:49
25 lines
1616 bytes
Having written a Visual Basic Control using the Control Development Kit,
I get a General Protection fault calling LocalAlloc.

Does anyone know if this is a bug in the CDK, a restriction of the CDK,
a restriction in DLL's in general, or have any helpfull suggestions?

Changing the code to do GlobalAlloc makes everything work fine, but I cant
do this for real as Global memory belongs to the DLL client under whose
task it was allocated - when that client terminates the Global memory 
disappears but the DLL remains (assuming another client is using it)
and UAE's when it tries to access the global memory!

I've tried Microsoft support (in the UK) - they expressed surprise and
said they would try it and get back to me.  I'm still waiting.

Thanks in advance for any help
==============================================================================
  Keith Bedford				keith.bedford@hemel.bull.co.uk
  Bull Special Products Division
  Maxted Road  -  UK03-HM14
  Hemel Hempstead
  Herts  HP2 7DZ		Tel:	+44-442-88 4250
  England			Fax:	+44-442-88 4570
==============================================================================
Re: LocalAlloc fails in Visual Basic Control-Help!
#438
Author: Richard Hancock
Date: Thu, 16 Apr 1992 14:48
6 lines
703 bytes
/ hpopd:comp.windows.ms.programmer / keithb@hemel.bull.co.uk (Keith Bedford) /  9:49 am  Apr 16, 1992 /

>Having written a Visual Basic Control using the Control Development Kit,
>I get a General Protection fault calling LocalAlloc.

Have you initialised your local heap?
Re: LocalAlloc fails in Visual Basic Control-Help!
#440
Author: Rick Masters
Date: Thu, 16 Apr 1992 19:23
10 lines
856 bytes
>Changing the code to do GlobalAlloc makes everything work find,
>but I cant do this for real as Global memory belongs to the DLL client

You may be able to use GlobalAlloc after all. I believe
if you use the flag GMEM_DDESHARED when allocating
the memory, the memory is not freed when the calling
application exits.


Rick Masters
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads