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 / MakeCube Function

Author
Message
valleyman86
17
Years of Service
User Offline
Joined: 15th Dec 2006
Location:
Posted: 28th Dec 2006 13:54
//"Make Cube" This does not work.
DBPROCOMMAND void MyMakeCube(int objectNumber, float size)
{
MAKECUBE MakeCube = (MAKECUBE)GetProcAddress(g_pGlob->g_Basic3D, "?MakeCube@@YAXHM@Z");
MakeCube(objectNumber, size);
}

This does not work correctly for some strange reason. When I run it in dbpro it crashes. This method was working for every other command such as sync. What is causing this anyone know? Ive tried it with globstruct and with calling the dll. Ive also tried MakeBox function but it did the same thing.

My string table looks like this:
MYMAKECUBE%LF%?MyMakeCube@@YAXHM@Z

The function name looks like this:
?MakeCube@@YAXHM@Z

The function looks like this undecorated:
void MakeCube(int,float)

//"Sync" This works.
DBPROCOMMAND void MySync()
{
SYNC Sync = (SYNC)GetProcAddress(coreDLL, "?Sync@@YAXXZ");
Sync();
}
EddieB
20
Years of Service
User Offline
Joined: 29th Sep 2004
Location: United Kingdom
Posted: 29th Dec 2006 00:34
I THINK you need to call another 3D function in your dbpro test application... I havent used dbpro in a long time, so just add any 3D function in your test app then call your test function. It should work.
valleyman86
17
Years of Service
User Offline
Joined: 15th Dec 2006
Location:
Posted: 29th Dec 2006 02:38
perfect! Thanks. Any reason why this happens. Is there a way to fix it so that I don't have to call anything before hand. Maybe some function in the dll?
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd Jan 2007 20:40
DBPro only includes the DLLs that it knows it needs when you compile. So it includes DLLs that you use commands from, and DLLs that it is told to load by other DLLs - you can do this too.

Here's an example from the last addition to my plug-in collection - it allows you to load a DBO object from a memory bank (another one of my plug-ins), so it relies on that, plus the Basic3D plug-in:



The first function returns the number of DLLs that are required, and the second returns the names of those DLLs in turn when called.

Login to post a reply

Server time is: 2024-11-22 17:16:51
Your offset time is: 2024-11-22 17:16:51