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.

Dark GDK / What is the deal with dbCallDll and dbLoadDll

Author
Message
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 27th Nov 2007 03:04
These functions totally do not work.


I want to port this code to work with the now free GDK.






Thank you.
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 27th Nov 2007 03:10 Edited at: 27th Nov 2007 03:10
http://forum.thegamecreators.com/?m=forum_view&t=118603&b=22

My DBP plugins page is now hosted [href]here[/href]
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 27th Nov 2007 03:19
Thanks for the quick response but, I already did a search and found that. Anyways, Ian M. posted this code.



unfortunatly this also does not work this line in specific.

Hello = (HelloFnPtr)GetProcAddress("Hello");

the compiler gives me this error

1>c:\documents and settings\david\my documents\visual studio 2008\projects\dbpvsgdk\dbpvsgdk\main.cpp(30) : error C2440: '=' : cannot convert from 'int' to 'HelloFnPtr'
1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>c:\documents and settings\david\my documents\visual studio 2008\projects\dbpvsgdk\dbpvsgdk\main.cpp(30) : error C2146: syntax error : missing ';' before identifier 'GetProcAddress'
1>c:\documents and settings\david\my documents\visual studio 2008\projects\dbpvsgdk\dbpvsgdk\main.cpp(30) : error C2660: 'GetProcAddress' : function does not take 1 arguments
1>Build log was saved at "file://c:\Documents and Settings\David\My Documents\Visual Studio 2008\Projects\DbpVsGDK\DbpVsGDK\Debug\BuildLog.htm"
1>DbpVsGDK - 3 error(s), 0 warning(s)

I am not a c++ expert but I can figure it out. Anyways, if I can just figure this out, then I'll be able to move to the next part. LOL.
Para _Charlie
18
Years of Service
User Offline
Joined: 31st May 2006
Location: Wisconsin
Posted: 27th Nov 2007 05:37
It appears your trying to convert a string in the address of hello to an int and the compiler is saying "nope" cant do that.

DBP 6.3 DX 9.0c
3.2Gig Proc, 2Gigs Ram, SATA HD, Gigabyte MB, 6800GT Vid
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 27th Nov 2007 06:44
well if anyone can show me how to this is done it would be greatly appreciated.

I would only like to use the gdk for the graphics. And not stuff like this. Thank you.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Nov 2007 15:44
GetProcAddress requires you to use the HANDLE (HMODULE?) value from a DLL loaded via LoadLibrary as the first argument

GetProcAddress("Hello") --- becomes --- GetProcAddress(MyDLL, "Hello")

Utility plugins collection and
http://www.matrix1.demon.co.uk for older plug-ins and example code
Deagle
19
Years of Service
User Offline
Joined: 28th Aug 2005
Location: Finland
Posted: 7th Dec 2007 15:21
david w, you cant just use the commands like this:

No need to load any dll's.

Deagle aka D-Eagle

Login to post a reply

Server time is: 2024-09-29 05:19:31
Your offset time is: 2024-09-29 05:19:31