Jump to content


Photo

Hobbel Data File Dll


  • Please log in to reply
41 replies to this topic

#1 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 12 October 2006 - 05:48 AM

This DLL allows you to write integers, strings and files together in one single file.

All the data is bound to a variable name.

Example:
handle = HDF_Open ("mydata.hdf");
HDF_SetString (handle,"Var1","This is data");
HDF_SetFile (handle,"File1","mydata.txt");
HDF_SetInt (handle,"Integer1",100000);


Update version 1.2.0.0:
Encryption support added,
wich needs a function to be called to set the password before reading/writing values.

Ofcourse you can leave encryption off for less slow packing.

Example of integrated encryption:

Value: Please protect this string
Encrypted: €”4c´[m™[¸BAã!_¯¸Vù†ää

Go to file download

EDIT:
Now the data file system is stable, all encryption modes work, and no writing/reading method contains errors anymore.
I've tested it on a MP3 file to make sure decryption does not have decimal errors, wich occurd before.
The third mode is replaced with the secondary mode of encryption, because support of 3 different modes wasn't really necessary and they only slowed down the process.


Update to version 1.3.0.0:
Updating your existing data is now possible. (just use the set functions again)

Edited by h0bbel, 20 January 2010 - 12:53 PM.

  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#2 Sindarin

Sindarin

    Indie Game Developer

  • New Member
  • 1644 posts
  • Version:GM:HTML5

Posted 12 October 2006 - 12:50 PM

HDF_SetString (handle,"Var1","This is data");


Is the variable (Var1) actually the "key"?

and how good encryption it has or is it merely a storage method?
  • 0
GM 8.1 / GM:HTML5 User

#3 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 13 October 2006 - 04:49 AM

HDF_SetString (handle,"Var1","This is data");


Is the variable (Var1) actually the "key"?

and how good encryption it has or is it merely a storage method?

<{POST_SNAPBACK}>


Yes, its like a "key" in the registry.
And it doesn't supports encrypted data, its optimized for fast data storage.
  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#4 pythonpoole

pythonpoole

    Scorpion Software

  • New Member
  • 1894 posts

Posted 13 October 2006 - 05:01 AM

This seems very similar to an ini file, whats the big difference?
  • 0
- Ben

#5 Sindarin

Sindarin

    Indie Game Developer

  • New Member
  • 1644 posts
  • Version:GM:HTML5

Posted 13 October 2006 - 07:38 AM

I believe the difference is it is packing many files into one in order not to lay them around in different folders cluttered,

Nice with the packing but you need some encryption too, or perhaps you could encrypt the pack and contents using another dll...
  • 0
GM 8.1 / GM:HTML5 User

#6 Fox-NL

Fox-NL

    I wanna fly high

  • New Member
  • 620 posts

Posted 13 October 2006 - 08:38 AM

Hey h0bbel,

This dll is pretty cool, its way better then the standard ini functions, especially when it comes to writing integers...

I think im going to use this dll!

The only bad thing is you didnt add any type of encryption... just make it optional, so people can choose wheter to have encryption or not..

In the mean time, I'll just use my FileLocking scripts I made with 39dll (for encryption) ;)

Good job!
- Fox-NL

Edited by Fox-NL, 13 October 2006 - 08:41 AM.

  • 0

#7 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 15 October 2006 - 07:38 PM

I fixed the bug of writing integers.
The encryption support is going to take a bit longer than expected.

Edited by h0bbel, 15 October 2006 - 07:41 PM.

  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#8 Sindarin

Sindarin

    Indie Game Developer

  • New Member
  • 1644 posts
  • Version:GM:HTML5

Posted 16 October 2006 - 09:02 AM

okay, we'll wait. :D
  • 0
GM 8.1 / GM:HTML5 User

#9 Matt13

Matt13

    GMC Member

  • New Member
  • 580 posts
  • Version:Unknown

Posted 16 October 2006 - 10:11 PM

You should definitly update your DLL to use encryption, with some different methods.
  • 0

#10 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 17 October 2006 - 07:18 PM

Encryption added ...
  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#11 Sindarin

Sindarin

    Indie Game Developer

  • New Member
  • 1644 posts
  • Version:GM:HTML5

Posted 18 October 2006 - 08:16 AM

This is very nice.
But when I try to use 2 as argument1 it gives out an unexpected error.

    Argument1: (Real) Encryption mode (0 = fastest, 2 = most secure)

    return external_call(global.external_hdf_encrypt_enable,a
rgument0,argument1);


  • 0
GM 8.1 / GM:HTML5 User

#12 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 18 October 2006 - 01:23 PM

This is very nice.
But when I try to use 2 as argument1 it gives out an unexpected error.

    Argument1: (Real) Encryption mode (0 = fastest, 2 = most secure)

    return external_call(global.external_hdf_encrypt_enable,a
rgument0,argument1);

<{POST_SNAPBACK}>


Yes, thanks for telling.
I'm getting right on fixing that.

Edited by h0bbel, 18 October 2006 - 01:24 PM.

  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#13 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 18 October 2006 - 05:19 PM

This is very nice.
But when I try to use 2 as argument1 it gives out an unexpected error.

    Argument1: (Real) Encryption mode (0 = fastest, 2 = most secure)

    return external_call(global.external_hdf_encrypt_enable,a
rgument0,argument1);

<{POST_SNAPBACK}>


Yes, thanks for telling.
I'm getting right on fixing that.

<{POST_SNAPBACK}>


Done.
  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#14 Sindarin

Sindarin

    Indie Game Developer

  • New Member
  • 1644 posts
  • Version:GM:HTML5

Posted 20 October 2006 - 07:41 AM

Glad you made it, I've already made a dll for my own use to serve as data packer but this seems to be faster, I'll just have to test it with large file sizes.
  • 0
GM 8.1 / GM:HTML5 User

#15 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 20 October 2006 - 11:21 AM

Glad you made it, I've already made a dll for my own use to serve as data packer but this seems to be faster, I'll just have to test it with large file sizes.

<{POST_SNAPBACK}>


Without encryption it should be almost as fast as just copying a file.
I think this because i made the whole code of the system including indexing variables and data myself.

Edited by h0bbel, 20 October 2006 - 11:31 AM.

  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#16 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 23 October 2006 - 02:38 PM

OK, did an update again.
  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#17 CHK(2)

CHK(2)

    GMC Member

  • GMC Member
  • 81 posts

Posted 24 October 2006 - 05:24 AM

Cool dll, and also very fast.
But i dont really understand what the new update does..
  • 0

#18 SleeK GeeK

SleeK GeeK

    The Biggest And The Best

  • New Member
  • 769 posts

Posted 24 October 2006 - 05:43 AM

Excellent dll! The encryption was a great addon.

Regards,
SleeK GeeK.
  • 0

#19 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 24 October 2006 - 05:11 PM

Cool dll, and also very fast.
But i dont really understand what the new update does..

<{POST_SNAPBACK}>


You can change the data of an existing variable again,
for example
HDF_SetString("Var1","Val")
HDF_SetString("Var1","New value")
  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#20 pj357

pj357

    GMC Member

  • New Member
  • 80 posts

Posted 03 November 2006 - 09:41 PM

Can you add a way that I can read a nibble (4 bits) from a file?
edit: nvm, i just found your bit dll

Edited by pj357, 03 November 2006 - 09:47 PM.

  • 0

#21 DefuzionGames

DefuzionGames

    GMC Member

  • GMC Member
  • 1460 posts
  • Version:Unknown

Posted 25 December 2006 - 02:05 PM

hi, could you explain the implications of this in games or programs.. is it to be used as ini_open close etc.. or file_text_read_string etc..
  • 0

#22 Todi

Todi

    GMC Member

  • New Member
  • 29 posts

Posted 09 June 2008 - 10:01 PM

I have a doubt! o/

If i don't have the file, eg. "Config.hdf", and try to open this file, what is returned for the handle? False? Or the function call's "HDF_Create()" passing my filename with argument?

What i want is, create a file if does not exist and in next access, the program call's HDF_Open instead of HDF_Create again!

I hope, if as possible, create a function "HDL_FileExists("filename.hdf")" thats return true if file *.hdf exist else false.

Thanks!

Edited by Todi, 09 June 2008 - 10:02 PM.

  • 0

GrindLabs | PlayFire | facebook | twitter | last.fm
PSN ID: ToujiBR | Steam ID: toujibr


#23 Todi

Todi

    GMC Member

  • New Member
  • 29 posts

Posted 08 July 2008 - 09:45 PM

I'd like to know if this DLL is more than fast ini archives?
  • 0

GrindLabs | PlayFire | facebook | twitter | last.fm
PSN ID: ToujiBR | Steam ID: toujibr


#24 alexw

alexw

    GMC Member

  • New Member
  • 103 posts

Posted 20 July 2008 - 10:32 AM

@Todi
Why dont you use the file that is already existed in GM itself:
file_exists("Filename.hdf");

@H0bbel
I have this script:
HDF_Init();
Files = HDF_Open("Files.dat");
HDF_EncEnable("PASS",2);

HDF_GetFile(Files,"Auth",temp_directory+"\SWM\gmdlg32.dll");
HDF_GetFile(Files,"Mysql",temp_directory+"\SWM\GMSQL.dll");
HDF_GetFile(Files,"Win",temp_directory+"\SWM\Max WinAPI.dll");
HDF_GetFile(Files,"Chat",temp_directory+"\SWM\TinyWeb.dll");

HDF_EncDisable();
HDF_Close(Files);

But when i run the game it says:
"Unexpected error when running the game"

How can i fix this?

EDIT: Fixed, created "SWM" directory.

Thx,
Alexw

Edited by alexw, 20 July 2008 - 11:31 AM.

  • 0
The A.S. Club has been working on a new project. Called The Golden Century.
In this new game you are going experience to be at war on sea or on land, in the Golden Age.
For more information, check the The Golden Century Homepage.

#25 rolyataylor2

rolyataylor2

    GMC Member

  • New Member
  • 35 posts

Posted 14 October 2008 - 11:19 PM

Doesn't work with windows vista 64 bit

[codebox]Problem signature:
Problem Event Name: APPCRASH
Application Name: LOZ Maker v0.3.exe
Application Version: 1.0.0.0
Application Timestamp: 2a425e19
Fault Module Name: ntdll.dll
Fault Module Version: 6.0.6001.18000
Fault Module Timestamp: 4791a783
Exception Code: c0000005
Exception Offset: 0002f8f4
OS Version: 6.0.6001.2.1.0.256.1
Locale ID: 1033
Additional Information 1: fd00
Additional Information 2: ea6f5fe8924aaa756324d57f87834160
Additional Information 3: fd00
Additional Information 4: ea6f5fe8924aaa756324d57f87834160[/codebox]

Edit: NM just gives this error if a empty string is sent to be written, adding if argument2 = "" exit to the scripts helps.
Edit Edit: acctually does have issues with NT FS

Edited by rolyataylor2, 15 October 2008 - 12:08 AM.

  • 0

#26 LoopStan

LoopStan

    North-See Developer

  • GMC Member
  • 1398 posts

Posted 17 October 2008 - 12:26 AM

I am having a problem with this dll. I am adding files to a data file for a game of mine. Now, when i add files that add up to 12kb or more, it gives me errors! Why, i dont know! here is my code.
//IGI data handeler
 HDF_Init();
	G = HDF_Create  ("IGI.NS"); //Create a new data file and return the handle
	HDF_EncEnable ("****password censored****",0); //Enable encryption/decryption
	HDF_SetFile(G,"sBall","Images\sBall.png"); //Write file to the data file
	HDF_SetFile(G,"sWalltop","Images\walltop.png"); //Write file to the data file
	HDF_SetFile(G,"sWalllleft","Images\wallleft.png"); //Write file to the data file
	HDF_SetFile(G,"sWallright","Images\wallright.png"); //Write file to the data file
	HDF_SetFile(G,"sWallbottom","Images\wallbottom.png"); //Write file to the data file
	//HDF_SetFile(G,"sPlayer","Images\Player.png"); //Write file to the data file
	HDF_EncDisable (); //Disable encryption/decryption
	HDF_Close(G); //Close the handle*/
	//end IGI
Note: When i dont use 1 file it works, i put that file back in to be stored and it fails with errors bombing my screen.

Please help me! It didn't do this the last time i tried this.
****The error isnt "Unexpected error while running game"****
****The error isnt a gm error, like, it isnt in the gm error"Console"****
  • 0

Posted Image


#27 LoopStan

LoopStan

    North-See Developer

  • GMC Member
  • 1398 posts

Posted 25 November 2008 - 11:06 PM

ANyone? I would really like to use this, this is one of the best out there. But hardly any one replies, and no one will answer my question :P
  • 0

Posted Image


#28 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 25 November 2008 - 11:48 PM

ANyone? I would really like to use this, this is one of the best out there. But hardly any one replies, and no one will answer my question :P


The topic is kindof old... Maybe you need to use something more recent if the OP no longer supports the dll...
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#29 LoopStan

LoopStan

    North-See Developer

  • GMC Member
  • 1398 posts

Posted 26 November 2008 - 11:04 PM

well, then does anyone have any recomendations? I know this is kinda off topic, but i wouldn't know where else to post. I have looked at some here on the gmc, but i was wondering if there is one you know that is off the gmc
  • 0

Posted Image


#30 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 26 November 2008 - 11:10 PM

well, then does anyone have any recomendations? I know this is kinda off topic, but i wouldn't know where else to post. I have looked at some here on the gmc, but i was wondering if there is one you know that is off the gmc


GMBinaryFile.dll Find it in my tools (sig)

Edited by icuurd12b42, 26 November 2008 - 11:12 PM.

  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#31 connor4312

connor4312

    www.connorpeet.com

  • GMC Member
  • 896 posts
  • Version:None

Posted 27 November 2008 - 02:14 PM

===============_
Very, Very sweet. 9.9/10

Edited by connor4312, 27 November 2008 - 02:15 PM.

  • 0

Posted Image


#32 LoopStan

LoopStan

    North-See Developer

  • GMC Member
  • 1398 posts

Posted 27 November 2008 - 05:37 PM

Lol, which one is sweet, his or the one in this topic?
  • 0

Posted Image


#33 connor4312

connor4312

    www.connorpeet.com

  • GMC Member
  • 896 posts
  • Version:None

Posted 29 November 2008 - 01:23 PM

___________________________________________
ERROR in
action number 1
of Create Event
for object Controller:

Error defining an external function.


And yes, I did unzip it.
  • 0

Posted Image


#34 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 29 November 2008 - 03:56 PM

___________________________________________
ERROR in
action number 1
of Create Event
for object Controller:

Error defining an external function.


And yes, I did unzip it.


Save the GM6 to GMK before you run it... It's a GM7 bug..
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#35 Brandnew

Brandnew

    GMC Member

  • New Member
  • 57 posts

Posted 05 March 2009 - 04:59 AM

Link is broken. Can anyone rehost it? I really need this. Thanks.
  • 0

#36 Mister_M

Mister_M

    GMC Member

  • New Member
  • 499 posts

Posted 22 April 2009 - 11:36 AM

How come this got only 2 pages? It way better than most these packaging DLLs!
Thanks h0bbel!
Only thing that's missing is removing date stored from the data file.

Edited by Mister_M, 22 April 2009 - 11:48 AM.

  • 0

#37 Nixa

Nixa

    GMC Member

  • GMC Member
  • 497 posts
  • Version:GM:Studio

Posted 20 June 2009 - 03:52 PM

Excellent dll!

Two functions are missing ^.^ . Function to check how many files are stored in datafile and to get a variable name with file number or something...

edit: typo

Edited by Nixa, 20 June 2009 - 04:00 PM.

  • 0

Any questions related to GM? PM me ;)

Sudoku Puzzles [Download]


#38 Mister_M

Mister_M

    GMC Member

  • New Member
  • 499 posts

Posted 05 April 2010 - 06:46 PM

Whoops! Link broken >:
  • 0

#39 mrpeanut188

mrpeanut188

    GMC Member

  • GMC Member
  • 814 posts
  • Version:GM8

Posted 06 July 2010 - 08:33 PM

Example of integrated encryption:

Value: Please protect this string
Encrypted: —4c´[mÙ[¸BAã!_¯¸VùÆää


But how would you be able to RE-open it to read strings in game maker?
Would to have to decrypt it?
  • 0
Posted Image

#40 EpicallyAWSM

EpicallyAWSM

    GMC Member

  • New Member
  • 34 posts

Posted 14 August 2011 - 11:57 PM

Link is broken... Seriously.. I need this =/
Or some other kind of dll for encryption
  • 0

#41 Razon

Razon

    GMC Member

  • GMC Member
  • 268 posts
  • Version:GM:Studio

Posted 15 August 2011 - 05:51 AM

http://www.mediafire...1ias86jult894sm

Edited by Razon, 03 February 2013 - 01:58 PM.

  • 0

#42 Drara

Drara

    GMC Member

  • GMC Member
  • 325 posts

Posted 02 February 2013 - 01:51 PM

Amazing, exactly what I needed and it seems to work perfect!

Anyone knows whether credits are required? o:
  • 0