I have game data (like the players name) stored in the registry, (Put there from the game launcher made outside of blitz) Now how do I retrieve the information from the registry? I see no registry command in the command library.
Registry
Blitz3D Forums/Blitz3D Programming/Registry anyone?
If blitz3d cant do it... Is there a DLL for it?
common some one gimmy some luvin!
If blitz3d cant do it... Is there a DLL for it?
common some one gimmy some luvin!
We have userlibs these days and with windows api nothing is impossible....
try playing around with this
i didn feel like writing teh blitz code just remember that lpbData,lpcbData and phkResult are pointers to a memory buffer so use banks and peekbyte those banks....
if you wanted i could create a dll that could write/read/delete regkeys
try playing around with this
.lib "advapi32.dll" RegOpenKeyEx%(hKey%,lpszSubKey$,dwReserved%,samDesired%,phkResult):"RegOpenKeyExA" RegQueryValueEx%(hKey%,lpszValueName$,lpdwReserved%,lpdwType%,lpbData,lpcbData):"RegQueryValueExA"
i didn feel like writing teh blitz code just remember that lpbData,lpcbData and phkResult are pointers to a memory buffer so use banks and peekbyte those banks....
if you wanted i could create a dll that could write/read/delete regkeys
Im having a hard time figuering out what each of those variables are, Could you rewrite that code with example values placed in?
thx
thx
darklordz I wub you
*Bump*
Could you explain it a little better?
thx
*Bump*
Could you explain it a little better?
thx
Why do you have such data in the registry?
hey, eBusiness, i tried downloading your racing game from your new site... 1.15kb/sec? lol.. kinda slowish my man :)
On topic: don't store stuff like that in the registry, unless it's for registration purposes.
Tracer
On topic: don't store stuff like that in the registry, unless it's for registration purposes.
Tracer
Dear GOD,
Im pleased to hear from you so soon. I have heard that you're having trouble with the registry stuff and solving the hunger problems in third world countries. I will try and help you as soon as possible. Im kinda busy right now but im sure i'll get to it tomorrow.
Kind Regards,
darklordz
Im pleased to hear from you so soon. I have heard that you're having trouble with the registry stuff and solving the hunger problems in third world countries. I will try and help you as soon as possible. Im kinda busy right now but im sure i'll get to it tomorrow.
Kind Regards,
darklordz
Yeah I agre with darklordz for once.
I would use a DLL for this registry stuff if you're using Blitz3D. Here's a simple sample on how to do that in Delphi:
I haven't tested this code yet, but it should work. If you have delphi, use that code. If you have VB, use some other code. Blitz3D cannot write to the registry by itself.
Uses ...registry; ... Function WriteToRegistry(key,value,newvalue:string) var reg: Tregistry; begin reg := Tregistry.Create; reg.RootKey := HKEY_LOCAL_MACHINEL; //Or any other root reg.OpenKey := key; reg.WriteString(value,newvalue) reg.Destroy; end;
I haven't tested this code yet, but it should work. If you have delphi, use that code. If you have VB, use some other code. Blitz3D cannot write to the registry by itself.
@ChrML & Rest
Dll & UserLib Comming up. As i said i would post some code soon but i started off making a dll and i put in a whole bunch of functions not just registry will post very soon.....
Dll & UserLib Comming up. As i said i would post some code soon but i started off making a dll and i put in a whole bunch of functions not just registry will post very soon.....
I wub you darklorz