Gunique GUID Resolution Tool

This article is part of a backup. It was originally posted on Sunday, May 9. 2004.

When developing or reversing engineering software and websites, or when dealing with ActiveX, COM, OLE or other Windows internals in general, one often faces so called GUIDs. Most of the time it is not clear what exactly a given GUID represents. Gunique is a small freeware tool that is able to translate GUIDs to human readable names and vice versa.

Download

Name: Gunique
Version: 1.0.0 Build 9
Download: gunique.zip (286kB)

Note: By using Gunique you agree to the disclaimer at the bottom of this file.

Screenshot

Gunique Screenshot

Contents

Application (2 Files):

  • /gunique.exe – Gunique application
  • /readme.txt – this file

Installation

Just copy the two files into a folder of your choice. No additional steps required.

Known Bugs and Issues

There are no known bugs.

FAQ

Q: What is a GUID?
A: The term GUID is short for Global Unique Identifier, a 128-bit (16 bytes) integer value that can be used to identify any sort of components, such as hardware and software. Whenever you need to uniquely identify something, GUIDs are your best friend.
Q: How are GUIDs used in Microsoft Windows?
A: In the Windows OS, GUIDs are used in a number of different ways. Their main purpose is to identify certain parts of software, specifically COM classes (CLSID) and interfaces (IID), but also type libraries (libUUID), drivers, device classes, network connections and users.
Q: How are GUIDs generated?
A: There are many different ways to create GUIDs, but usually there’s an algorithm to combine various unique settings, such as the MAC address of your network adapter, the IP address of your computer, the current time or a random number. This algorithm guarantees that it’s very unlikely to generate two GUIDs with the same value.
Q: Which GUIDs can be translated into human readable names?
A: Translation is limited to the information saved in the system registry. Therefore only GUIDs for registered software components can be converted. This includes the software components mentioned in the previous question.
Q: What is the Running Object Table (ROT)?
A: The ROT is a Windows internal table that holds a list of currently registered and running COM objects on your machine.
Q: Are wildcards supported in the search window?
A: Yes, currently supported wildcards are ‘*’ to match any number of characters, and ‘?’ to match any single character. Wildcards cannot be used when searching for GUIDs though.
Q: Where can I learn more about COM, GUIDs and the ROT?
A: Do a search on MSDN
Q: Where can I get the latest version of Gunique?
A: http://www.gerke-preussner.de

Disclaimer

Copyright (c) 2004 headcrash industries. All rights reserved.

This software is provided “as is”, without warranty of any kind, expressed or implied. In no event shall the author or its contributors be held liable for any direct, indirect, incidental, special or consequential damages arising out of the use of or inability to use this software.

Redistribution of Gunique in any form, including but not limited to websites, CDROM and printed media, is strictly prohibited and requires the explicit permission of the author.

TekEx Texture Extraction Tool for Mechwarrior 4

This article is part of a backup. It was originally posted on Sunday, May 9. 2004.

In 2002 the MekTek Development team released a utility called Hudpatch 3 that allows for patching selected data files (such as textures) within .mw4 content packages of the popular computer game Mechwarrior 4. Its main purpose is to replace certain elements of the head-up display (HUD) in order to enhance the game experience.

The Hudpatch utility itself uses a certain unpublished archive format containing the files to be patched (so called .tek files). In order to add your own modifications to patches provided by MekTek (e.g. BlackKnight and Vengeance map grid patches) or by other developers (e.g. the Energy HUD by Insomniax) it is necessary to be able to extract the files from the patch. TekEx is a tool to open and unpack .tek patch archives.

Download

Name: TekEx
Version: 1.1.0 Build 2
Download: tekex.zip (240kB)

Note: By using TekEx you agree to the disclaimer at the bottom of this file.

Screenshot

TekEx Screenshot

Contents

Application (2 Files):

  • /tekex.exe – TekEx application
  • /readme.txt – this file

Installation

Just copy the two files into a folder of your choice. No additional steps required.

Bugs and Known Issues

There are no known bugs.

FAQ

Q: Can TekEx create new .tek patch archives to be used with Hudpatch?
A: No. Hudpatch itself already has the capability to create new .tek files. Please read the Hudpatch manual for more information!
Q: I found a certain .tek patch online – how can I add my own modifications?
A: Use TekEx to extract the data files from the .tek archive. Modify the extracted files as you like (e.g. change bitmap graphics in your favorite paint program) and create a new .tek archive from the modified files using the Hudpatch utility.
Q: Where can I get the latest version of TekEx?
A: http://www.gerke-preussner.de

Disclaimer

Copyright (c) 2004 headcrash industries. All rights reserved.

This software is provided “as is”, without warranty of any kind, expressed or implied. In no event shall the author or its contributors be held liable for any direct, indirect, incidental, special or consequential damages arising out of the use of or inability to use this software.

Redistribution of TekEx in any form, including but not limited to websites, CDROM and printed media, is strictly prohibited and requires the explicit permission of the author.

InfoZIP UnZip Wrapper for Delphi

This article is part of a backup. It was originally posted on Monday, March 15. 2004.

Many of todays applications require the capability of extracting certain files from a ZIP archive, either onto the disk or into memory. A perfect solution is the UnZip DLL from the InfoZIP project because it offers few API functions to solve just this task without the hassle of dealing with file streams, ZIP formats and compression in general. Unfortunately, this great library is barely documented, thus hard to use in Delphi projects.

Therefore I decided to write a small Delphi wrapper that provides all required data types and functions along with detailed documentation in order to give you direct access to the UnZip API. Since I completed this project in a single afternoon, it may not be free of errors. Feel free to contact me if you find any bugs, make any changes, add new functionality, or have any general suggestions I may incorporate into this version.

Download

Name: InfoZIP UnZip Wrapper for Delphi
Version: 1.0.0 Build 2
Download: delphiunzip.zip (334kB)

Note: By using the contents of the InfoZIP UnZip Wrapper for Delphi, in parts or as a whole, you agree to the disclaimer at the bottom of this file.

Contents

Wrapper (2 files):

  • /Unzip.pas – DLL Wrapper for Delphi
  • /readme.txt – this file

Demo (10 files):

  • /demo/FormMain.dfm -DFM file for main window
  • /demo/FormVersion.dfm -DFM file for version window
  • /demo/FormMain.pas – Pascal source code for main window
  • /demo/FormVersion.pas – Pascal source code for version window
  • /demo/unzip32.dll – InfoZIP UnZip DLL, Version 5.5.0
  • /demo/main.cfg – Configuration file for demo project
  • /demo/main.dpr – Project file for demo project
  • /demo/main.exe – Precompiled executable
  • /demo/main.res – Ressource file for the demo
  • /demo/testdata.zip – Sample ZIP archive used by the demo

Installation

Wrapper only:

Copy the file Unzip.pas into a folder of your choice and add that folder to the library path in the environment options of Delphi or to the directory paths of your project’s settings, or copy the file directly into the source code folder of your project.

Demo application:

Copy all files into a folder of your choice. Open the file main.dpr to view the source code in Delphi, or start main.exe to launch the demo.

Known Bugs and Issues

The demos for Wiz_SetOpts() and Wiz_Unzip() are currently not working, thus disabled. This might be fixed in a future release of this distribution. There are no known bugs in the UnZip DLL wrapper.

FAQ

Q: Which versions of Borland Delphi are supported?
A: The wrapper was developed in Delphi 7, but should work with all other versions of Borland Delphi too.
A: How can I add Unzip functionalities to my application?
Q: Simply add ‘Unzip’ to the uses clause. All DLL functions will be statically linked into your program.
A: Is it possible to dynamically link the DLL using LoadLibrary()?
Q: Yes, add dyn_unzip32 to the conditional defines in your project configuration. This will disable static linking and provide ready to use prototypes for the API functions which can then be bound using GetProcAddress().
A: How can I create new ZIPs or add new files to an existing archive?
Q: Not at all. As the name implies, unzip32.dll can be used to unpack only.
A: How can I extract a certain file from a ZIP archive?
Q: Using the Wiz_SingleEntryUnzip() function. See the included demo application for working sample code.
A: How can I extract a certain file into memory, without saving it on disk?
Q: Using the Wiz_UnzipToMemory() function. See the included demo application for working sample code.
A: How can I convert the return values of API functions into readable text?
Q: The wrapper provides Wiz_ErrorToStr() for this purpose.
A: Why can’t I compile using object methods as callback functions?
Q: Procedure pointers and pointers to methods of an instance object are incompatible. While procedure pointers can be used by the UnZip API, object methods can not. For further information search the Delphi help file for “Procedural types”.
A: Where can I get the latest version of unzip32.dll?
Q: http://www.info-zip.org/pub/infozip/UnZip.html
A: Where can i get the latest version of Unzip.pas?
Q: http://www.gerke-preussner.de

Disclaimer

Copyright (c) 2004 headcrash industries. All rights reserved.

This software is provided “as is,” without warranty of any kind, expressed or implied. In no event shall the author or its contributors be held liable for any direct, indirect, incidental, special or consequential damages arising out of the use of or inability to use this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

  1. 1. Redistributions of source code must retain the original copyright notices in the source code file header.
  2. 2. Redistributions of source code and compiled executables must reproduce the above copyright notice, disclaimer, and this list of conditions in
    documentation and/or other materials provided with the distribution.

unzip32.dll is Copyright (c) 1990-2003 Info-ZIP. All rights reserved. Please visit the InfoZIP website for licensing, downloads and further information about UnZip.

Restoring Shared Folder Permissions on Windows Home Server

With every reboot, Windows Home Server (WHS) automatically resets the permissions for all shared folders in the shared directory. If you are using one or more of the shared folders to host files for other services that require customized access for users other than the Home Server accounts, those services will likely stop functioning properly after a server restart. Common examples include web servers, such as IIS or Apache spitting out Access Denied messages, or FTP servers returning read or write errors.

Solution

One way to get around this issue is to setup a scheduled task in Windows that runs a batch file to restore the file permissions at system startup. The example batch file below restores read access for the Authenticated Users user group on a folder called Http, which is used as the root for an IIS web server and takes advantage of WHS folder duplication.

  1. echo y| cacls d:\shares\Http /E /T /G "NT AUTHORITY\Authenticated Users":R

Remarks

Obviously, this approach is limited in that you have to multiply the above command line for each folder and user, but it works very well if only a few permissions need to be restored, such as in the example use case above. Note that the /T parameter applies the permission change to all files in all sub-directories as well. The /E parameter ensures that the user is adding to instead of replacing existing permissions, so that shared folder permissions configured through the Windows Home Server Console remain unaffected. Please refer to the help on cacls for additional permission options on the folder’s access control list.

Quick and Dirty Backup Script for MySQL on Windows

The following batch file is a simple backup script for MySQL. It exports all databases into a temporary SQL dump file and compresses it using 7Zip into a file with the current date as its name. It also automatically deletes backups that are older than 30 days.

Here is how to get started:

  1. Copy the batch file to a directory of your choice
    i.e. C:/Program Files/Scripts
  2. Place 7z.exe into the same directory or add it to the PATH environment variable
  3. Replace the placeholders YOUR_BACKUP_PATH and YOUR_ROOT_PASSWORD
  4. Add a scheduled task in Windows to run the batch file once a day

Feel free to modify the script to use a different packer tool or different output file names.

  1. @ECHO OFF
  2.  
  3. set backuppath="YOUR_BACKUP_PATH"
  4. set password="YOUR_ROOT_PASSWORD"
  5. set daystokeep=30
  6.  
  7. REM get current date in YYYYMMDD format
  8. for /F "tokens=1-4 delims=/ " %%I in ('date /t') do set curdate=%%L%%J%%K
  9.  
  10. REM export database into temporary file
  11. mysqldump -u root -p%password% –all-databases > %backuppath%\backup.sql
  12.  
  13. REM compress and delete temporary file
  14. start "Compressing Backup…" /min /wait 7z.exe a -bd -y -tzip -mx9 "%backuppath%\%curdate%.zip" "%backuppath%\backup.sql"
  15. del %backuppath%\backup.sql
  16.  
  17. REM delete older backups
  18. forfiles /P %backuppath% /S /M *.zip /D -%daystokeep% /C "cmd /C del /Q @PATH"