Master Summoner
- Joined
- Nov 9, 2009
- Messages
- 579
- Reaction score
- 238
This is not a ready-to-use program this release is intended for devolopers
Hi!Ive been working on a way to implement the PK2API functions for importing into PK2's made by Drew Benton (pushedx) into C# and/or VB.net programs and finally i managed to do so! Below you will find a dll that includes those functions and a Class for VB.net or C# you can use in your projects.
Credeits:
- PK2Writer API: Drew Benton (pushedx)
- API Conversion to DLL: LemoniscooL
- VB.Net / C# Class: LemoniscooL
Features:
- Open PK2 files with any blowfish key
- Import files to the pk2
Known bugs:
- none
Available Functions:
- Initialize
Sets up GfxFileManager.DLL for PK2 operations. This function must be called first.
- Deinitialize
Cleans up GfxFileManager.DLL. This function must be called before the program exits and after Close if a PK2 file was opened.
- Open
Opens a PK2 file for writing. Use:
"169841" - For official sro, mysro
"\x32\x30\x30\x39\xC4\xEA" - for zszc, swsro
- Close
Closes an opened PK2 file. This function must be called before the program exits and before Deinitialize is called.
- ImportFile
Imports a file to the PK2.
'entryFilename' should be the full path the file should have in the PK2 (including filename).
Example:
Please note: in C# you have to escape the backslashes (that means use \\ instead of \)
Code:
PK2Writer.Initialize("D:\Silkroad\GFXFileManager.dll")
PK2Writer.Open("D:\Silkroad\Media.pk2", "169841", 6)
PK2Writer.ImportFile("\sv.t", "D:\Silkroad\Patch\sv.t")
PK2Writer.Close()
PK2Writer.Deinitialize()
Downloads:
PK2Writer.dll & Classes:
You must be registered to see links
greetz
LemoniscooL
Last edited: