The Hexeditor project - Printable Version +- QB64 Phoenix Edition (https://staging.qb64phoenix.com) +-- Forum: QB64 Rising (https://staging.qb64phoenix.com/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://staging.qb64phoenix.com/forumdisplay.php?fid=3) +---- Forum: Utilities (https://staging.qb64phoenix.com/forumdisplay.php?fid=8) +---- Thread: The Hexeditor project (/showthread.php?tid=805) |
The Hexeditor project - eoredson - 08-24-2022 The Hexeditor project. This update represents the final editing of the hex editor. Program name: Hex Editor for DOS & Windows Public Domain BASIC Source Code 2023. Author name: Written by Erik Jon Oredson at eoredson@gmail.com Program purpose: This utility allows fast editing of bytes in a file. Two windows allow for editing and scrolling through hex values and ascii values. Hexxit82.zip for VBdos Hexed8rO.zip for QB64 RE: The Hexeditor project - BDS107 - 08-29-2022 I get a C++ error while compiling: In file included from qbx.cpp:2185: ..\\temp\\main.txt: In function 'void SUB_MENU(qbs*, qbs*, qbs*, qbs*, qbs*)': ..\\temp\\main.txt:38620:102: error: cast from 'HANDLE' {aka 'void*'} to 'int' loses precision [-fpermissive] *__UOFFSET_HFIND=( int32 )CreateFile((char*)(_SUB_MENU_STRING_G)->chr, 384 ,NULL,NULL, 1 ,NULL,NULL); ^ compilation terminated due to -Wfatal-errors. RE: The Hexeditor project - SpriggsySpriggs - 08-29-2022 I also am receiving this error. You should be declaring your external functions with "Declare CustomType Library" when they use data types such as offset. Line 359 is the start of your declare block for some of your functions. You need to change "Declare Library" to "Declare CustomType Library". Even then, I'm not entirely a fan of your declarations as a whole but the program will build after this simple change. RE: The Hexeditor project - aurel - 08-29-2022 ouff i never figured what was a real purpose of hex-editors i am too stupid for hex numbers RE: The Hexeditor project - eoredson - 08-30-2022 I have tested Hexedit in QB64 PE under Win10 and have not encountered any library errors. Maybe your Linux Wine is not parsing them correctly. I also edited Declare Library To Declare CustomType Library without errors. Maybe replace CreateFile with CreateFileA Erik. RE: The Hexeditor project - SpriggsySpriggs - 08-31-2022 (08-30-2022, 02:11 AM)eoredson Wrote: I have tested Hexedit in QB64 PE under Win10 and have not encountered any library errors. I wasn't using Linux Wine and I don't think BDS107 was either. I was using Windows 11 with QB64pe. The errors we were receiving were not within the IDE but during compile time. But, as a rule, you should use "Declare CustomType Library" when one of your arguments or your function return is of type OFFSET. You can also just declare the DLL that contains the "CreateFileA" function. RE: The Hexeditor project - eoredson - 02-08-2023 Hi, The most recent QB64 version of HexEditor now adds: Code: (Select All) v8.0a r9.0a updates 12/30/2022: RE: The Hexeditor project - mnrvovrfc - 02-08-2023 @aurel this program could come in handy although it's not an everyday tool. An example program used to be offered in the Wiki which patched one of the files QB64 used for compilation, so that it didn't dump "stdout" and "stderr" special files. This was needed especially for QB64-created executable programs that had to be run from CD-ROM or DVD-ROM. But this was a long time ago, like until v0.92 of QB64. Another example was a patch needed to a binary configuration file for a music plug-in so it stopped misbehaving when it received a setting from the modulation wheel of the musical keyboard. Without that patch, the plug-in was intolerable in my favorite music-creation program. There is a program in fact offered for Linux which does this type of thing, and is recommended used when more than a few bytes are needed modified inside a binary file. It gets complicated with "diff" files: https://en.wikipedia.org/wiki/Patch_%28Unix%29 https://www.man7.org/linux/man-pages/man1/patch.1.html RE: The Hexeditor project - bplus - 02-08-2023 I recall they were handy for .COM files back in 80's. Code: (Select All) s$ = "I recall they were handy for .COM files back in 80's." + Chr$(13) + Chr$(10) Oh maybe I am thinking of byte editors. RE: The Hexeditor project - eoredson - 04-18-2023 Hi, the newest version of Hexedit now contains: Code: (Select All) v8.0a rD.0a updates 04/16/2023: the file is attached here: |