Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / MemBlock crash

Author
Message
Zerk
18
Years of Service
User Offline
Joined: 13th May 2006
Location: Orbiting Jupiter
Posted: 26th Jun 2006 03:06
I'm tyring to create a memblock in my DLL. When I do so, the pointer to the g_pGlob->g_Memblocks is empty which means the DBP program has not compiled in the memblock dll and has no instance to it?

If I add:

Make memblock 1,1

to my DBP code, then it works as the pointer is there so I can use it in my DLL. What am I missing?



I am putting myself to the fullest possible use, which is all I think that any conscious entity can ever hope to do. ~Hal-9000
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 26th Jun 2006 15:23
Nothing.

You need to make sure that the required DLLs are included in the compile process by DBPro by using a command from the DLL.

For free Plug-ins and source code http://www.matrix1.demon.co.uk
Zerk
18
Years of Service
User Offline
Joined: 13th May 2006
Location: Orbiting Jupiter
Posted: 26th Jun 2006 15:41 Edited at: 26th Jun 2006 15:46
Ok. I have a command in my DLL called DBPMakeMemBlock(). When I call it, it crashes because g_pGlob->g_Memblocks is 0x00000000.

So is this what you mean by calling a command from the DLL? It is what is causing the crash.

I am putting myself to the fullest possible use, which is all I think that any conscious entity can ever hope to do. ~Hal-9000
Zerk
18
Years of Service
User Offline
Joined: 13th May 2006
Location: Orbiting Jupiter
Posted: 27th Jun 2006 18:27
Anybody?

I am putting myself to the fullest possible use, which is all I think that any conscious entity can ever hope to do. ~Hal-9000
Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 27th Jun 2006 22:32
Hm...perhaps he means like what sparky's collision dll and stuff like that does,include a memblock command in your dbp code. Just something simple like if memblock exist(1) then a# = 1. I'm not sure if thats what he means,but it may be.

all ben needs is his band,his guitar,and his computer
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 28th Jun 2006 00:19
Yes.

It's the compiler that decides which DLLs are included with your EXE, so including a memblock command within your DBPro code will include the memblock DLL. You don't even have to run the command to do this:



For free Plug-ins and source code http://www.matrix1.demon.co.uk
Zerk
18
Years of Service
User Offline
Joined: 13th May 2006
Location: Orbiting Jupiter
Posted: 28th Jun 2006 00:48
AH. Ok thats what I was doing. But it seems that other instances are there without having to use them so I thought maybe it was a problem elsewhere.

I was hoping for a way around it so that if someone else uses my DLL, they may never figure out why it crashes.

I guess I'll have to just do a check if the memblock instance is NULL then pop up a message.

I am putting myself to the fullest possible use, which is all I think that any conscious entity can ever hope to do. ~Hal-9000

Login to post a reply

Server time is: 2024-11-22 06:02:56
Your offset time is: 2024-11-22 06:02:56