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 / Want an example of the call GetDriveTypeA from kernel32.dll

Author
Message
IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 14th Jan 2003 16:31
Want an example of the call GetDriveTypeA from the windows system dll file kernel32.dll and how I can use this in DBPro as function for checking if the game is running from the GAME CD or NOT
Just an easy tutorial would help me.. so I know how to do in the future with this and other dll calls from kernel32.dll
------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------
IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 14th Jan 2003 16:35
I know is't more simplier to write my own dll file for this and other calls in c++ and then use them in DBPro as the example but I want to know anyway

------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------
Hubdule
22
Years of Service
User Offline
Joined: 3rd Sep 2002
Location: Gundelsheim
Posted: 14th Jan 2003 17:07
Nothing easier than that



IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 14th Jan 2003 17:15
There is one thong wrong in the code snippet

The new one..


------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------
IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 14th Jan 2003 17:16
haven't tested it yet but I'm pretty sure that should have made some error *lol*

------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------
IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 14th Jan 2003 17:21
Sorry I said I posted the snippet without the error but I didn't now I did =) Sorry for all my posts..



------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------
Hubdule
22
Years of Service
User Offline
Joined: 3rd Sep 2002
Location: Gundelsheim
Posted: 14th Jan 2003 19:25
btw. the example works ! I never release examples if I haven't testet them ... you don't need to write "kernel32.dll" because it's built in like the user32 or the gdi ... therefore you don't need .dll at the end.

IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 14th Jan 2003 20:14
Okaj.. but the example above jusr freezes when I'm trying it in db pro 1.0 + patch 3.1... whats wrong??

------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------
IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 14th Jan 2003 23:49
That above code only works in debug mode, and not in the builded version? Why so? Could it be becuase I have the version 3.1 patch or the updated ide things?

------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------
Hubdule
22
Years of Service
User Offline
Joined: 3rd Sep 2002
Location: Gundelsheim
Posted: 15th Jan 2003 00:01
This source was tested in DBPro + P3.1 and also the demo version with no problems ...

IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 15th Jan 2003 01:18
There's something strange... sometimes it works now and sometimes it don't.. even with the code snippet above without anychange it works sometime or just in the dubug mode... ohh well... maybe I should do a fresh install of XP again..

------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------

Login to post a reply

Server time is: 2025-05-17 00:06:16
Your offset time is: 2025-05-17 00:06:16