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.

DarkBASIC Professional Discussion / Call DLL command and 3rd Pty DLLs... query

Author
Message
Duffer
22
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 11th Mar 2004 21:40
1. If I write a .dll in another language like PB but cant figure out how to insert the stringtable for each function in the .dll can I still use Call DLL to use that particular .dll?

2. Assuming a function was called MyFunc(string,integer,float) in PB and I turned it through cdecl into a .dll what would Call DLL command actually look like to call that function?

3. And what would Call Dll look like with that function if it was to return a string?, an integer? or float?

could/would someone actually show what the Call Dll would look like for that particular function in each instance>?

would help me a lot in getting my head around the Call Dll command...

thanks
Duffer
22
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 11th Mar 2004 21:44
anyone?
Mussi
22
Years of Service
User Offline
Joined: 27th Jan 2003
Location: Netherlands
Posted: 11th Mar 2004 21:45
1. yes you can, it's discribed in the DBP help files how to do that.
2. dunno what you mean
3. float# = call dll(dllnum,functionthingiethatyouhavevelookedupinyourdllwithwordpad$)
string$ = call dll(dllnum,functionthingiethatyouhavevelookedupinyourdllwithwordpad$)
4. dunno what you mean



Specs: AMD Athlon 1800, 256 DDRRam 266mhz, 80GB HD 7200rmp U133, Geforce 4 Ti4400 128mb
Duffer
22
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 12th Mar 2004 00:52
Mussi,

Thanks. However using PB and then making a .dll you cant find the proper stringtable - is it enough to find the correct reference to the function in wordpad (not as long as a full stringtable for the function)?
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 12th Mar 2004 13:42
Quote: "3. And what would Call Dll look like with that function if it was to return a string?, an integer? or float?"


appropriate_variable=Call DLL(dllnumber,"FunctionName",Parameter1,Parameter2 etc.)

Beware of floats though! - For some reason DBPro does not use the standard C-type floats. You have to cast the float to a DWORD before returning it.

BlueGUI:Windows UI Plugin - All the power of the windows interface in your DBPro games. - Plus URL download, win dialogs.
Over 140 new commands

Login to post a reply

Server time is: 2025-05-27 20:36:26
Your offset time is: 2025-05-27 20:36:26