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 / Calling SYNC from TPC dll???

Author
Message
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 10th Dec 2006 03:22
Anyone know how to do this? I've called other DBpro commands from TPC dll's that I've worked on, but SYNC is in the DBproCore.dll so it works a little bit different. Anyone??

WOLF

EZrotate! TextureMax! Enhanced Animations! (coming soon....) 3D Character Maker! (coming soon....)
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 10th Dec 2006 08:38
Yeah, iirc you can call it from your own TPC.

Intel Core 2 Duo E6400, 512MB DDR2 667MHz, ATi Radeon X1900 XT 256MB PCI-E, Windows Vista Business / XP Professional SP2
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 10th Dec 2006 14:21
WOLF,

You should still be able to load the DLL from your TPC using LoadLibrary as DBProCore will be loaded from the EXE like all other DLLs used by the EXE.

Create a typedef function pointer:

typedef void (*FP_DBSYNC)( void );

HMODULE hDLL;
FP_DBSYNC fpSync;

hDLL = LoadLibrary( "DBProCore.DLL" );
if( hDLL ) {
fpSync = (FP_DBSYNC)GetProcAddress( hDLL, "@@ Mangled name for DB's Sync command" );
} else {
// Error, do nothing
return;
}


and calling it is done in the usual way..

(*dbSync)();

Paul.

Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 10th Dec 2006 16:03 Edited at: 10th Dec 2006 16:20
Thanks Paul! I'll be sure to try that. I used a slightly different method for calling other DBpro commands, but if it works then GREAT!


edit:

I just tried it and it worked GREAT!
Thanks again

EZrotate! TextureMax! Enhanced Animations! (coming soon....) 3D Character Maker! (coming soon....)
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 10th Dec 2006 20:55
No problem

Paul.

Login to post a reply

Server time is: 2024-06-28 03:31:57
Your offset time is: 2024-06-28 03:31:57