http://www.dwox.com/PBL_File_Format.txt
+--------------------------------------------------------------+
I PBL File Format 2003 - 2010 I
+--------------------------------------------------------------+
Dear PB Fans out there,
these are the results of the analysis I did, written down as
a short ASCII text description (valid thru PB5-11.5).
With this knowledge you can write your own LibraryDirectory
or Export Function for PowerBuilder PBL/PBD/DLL/EXE files.
Think about the possibility; including files via PBR assignment
and extracting them during runtime. That is a nice gimmick.
Most of the terms used are the results and presumptions of my
analysis.
Thanks to:
- Kevin Cai for Bytes 17-18 of the Node-Block
- Jeremy Lakeman for Bytes 19-20, 23-24 of the Node-Block
Regards
Arnd Schmidt May 2010
arnd.schmidt@dwox.com
+--------------------------------------------------------------+
I PBL File Format I
+--------------------------------------------------------------+
Rules and facts:
1.) A PBL is always made out of blocks of 512, except the Node
Block (NOD*), that has a size of 6 blocks, meaning 3072 Bytes.
2.) There is always one Header (HDR*) block,
followed by a free/used blocks bitmap (FRE*).
Then follows the first 'NOD*' block .
Theoretically this first 'NOD*' block might(!) point to a
parent node, but I have never seen that.
3.) Object Data (also SCC Informations) are always
stored in single forward linked/chained of 'DAT*'-Blocks.
The information about the offset and the length is stored in
the Header (HDR*).
4.) A PBD is a PBL.
5.) DLL and EXE files have a 'TRL*' at the end of the file.
This is pointing to the one and only 'HDR*'-Block.
Attention:
For signed DLLs (like PowerBuilder's signed DLLs in Version 11.5)
you have to recalculate the offset to the 'TRL*' Block.
+--------------------------------------------------------------+
I Library Header Block (512 Byte) I
+-----------+------------+-------------------------------------+
I Pos. I Type I Information I
+-----------+------------+-------------------------------------+
I 1 - 4 I Char(4) I 'HDR*' I
I 5 - 18 I String I 'PowerBuilder' + 0x00 + 0x00 I
I 19 - 22 I Char(4) I PBL Format Version? (0400/0500/0600)I
I 23 - 26 I Long I Creation/Optimization Datetime I
I 29 - ff I String I Library Comment I
I 285 - 288 I Long I Offset of first SCC data block I
I 289 - 292 I Long I Size (Net size of SCC data) I
+-----------+------------+-------------------------------------+
+--------------------------------------------------------------+
I Library Header Block - Unicode (1024 Byte) I
+-----------+------------+-------------------------------------+
I Pos. I Type I Information I
+-----------+------------+-------------------------------------+
I 1 - 4 I Char(4) I 'HDR*' I
I 5 - 32 I StringW I 'PowerBuilder' + 0x00 + 0x00 I
I 33 - 40 I CharW(4) I PBL Format Version? (0400/0500/0600)I
I 41 - 44 I Long I Creation/Optimization Datetime I
I 45 - ff I StringW I Library Comment I
I 559 - 562 I Long I Offset of first SCC data block I
I 563 - 566 I Long I Size (Net size of SCC data) I
+-----------+------------+-------------------------------------+
+--------------------------------------------------------------+
I Bitmap Block (512 Byte) I
+-----------+------------+-------------------------------------+
I Pos. I Type I Information I
+-----------+------------+-------------------------------------+
I 1 - 4 I Char(4) I 'FRE*' I
I 5 - 8 I Long I Offset of next block or 0 I
I 9 - 512 I Bit(504) I Bitmap, each Bit represents a block I
+-----------+------------+-------------------------------------+
(512 - 8) * 8 = 4032 Blocks are referenced
+--------------------------------------------------------------+
I Node Block (3072 Byte) I
+-----------+------------+-------------------------------------+
I Pos. I Type I Information I
+-----------+------------+-------------------------------------+
I 1 - 4 I Char(4) I 'NOD*' I
I 5 - 8 I Long I Offset of next (left ) block or 0 I
I 9 - 12 I Long I Offset of parent block or 0 I
I 13 - 16 I Long I Offset of next (right) block or 0 I
I 17 - 18 I Integer I Space left in block, initial = 3040 I
I 19 - 20 I Integer I Position of alphabetically I
I I I first Objectname in this block I
I 21 - 22 I Integer I Count of entries in that node I
I 23 - 24 I Integer I Position of alphabetically I
I I I last Objectname in this block I
I 33 - ff I Chunks I 'ENT*'-Chunks I
+-----------+------------+-------------------------------------+
+--------------------------------------------------------------+
I Entry Chunk (Variable Length) I
+-----------+------------+-------------------------------------+
I Pos. I Type I Information I
+-----------+------------+-------------------------------------+
I 1 - 4 I Char(4) I 'ENT*' I
I 5 - 8 I Char(4) I PBL version? (0400/0500/0600) I
I 9 - 12 I Long I Offset of first data block I
I 13 - 16 I Long I Objectsize (Net size of data) I
I 17 - 20 I Long I Unix datetime I
I 21 - 22 I Integer I Length of Comment I
I 23 - 24 I Integer I Length of Objectname I
I 25 - ff I String I Objectname I
+-----------+------------+-------------------------------------+
+--------------------------------------------------------------+
I Entry Chunk - Unicode (Variable Length) I
+-----------+------------+-------------------------------------+
I Pos. I Type I Information I
+-----------+------------+-------------------------------------+
I 1 - 4 I Char(4) I 'ENT*' I
I 5 - 12 I CharW(4) I PBL version? (0400/0500/0600) I
I 13 - 16 I Long I Offset of first data block I
I 17 - 20 I Long I Objectsize (Net size of data) I
I 21 - 24 I Long I Unix datetime I
I 25 - 26 I Integer I Length of Comment I
I 27 - 28 I Integer I Length of Objectname I
I 29 - ff I StringW I Objectname I
+-----------+------------+-------------------------------------+
+--------------------------------------------------------------+
I Data Block (512 Byte) I
+-----------+------------+-------------------------------------+
I Pos. I Type I Information I
+-----------+------------+-------------------------------------+
I 1 - 4 I Char(4) I 'DAT*' I
I 5 - 8 I Long I Offset of next data block or 0 I
I 9 - 10 I Integer I Length of data in block I
I 11 - XXX I Blob{} I Data (maximum Length is 502 I
+-----------+------------+-------------------------------------+
+--------------------------------------------------------------+
I Trailer Block (in DLL/EXE) always last block (512 Byte) I
+-----------+------------+-------------------------------------+
I Pos. I Type I Information I
+-----------+------------+-------------------------------------+
I 1 - 4 I Char(4) I 'TRL*' I
I 5 - 8 I Long I Offset of Library Header ('HDR*') I
+-----------+------------+-------------------------------------+
+--------------------------------------------------------------+
I SCC DATA I
I Structure of status information chunks I
I in DAT*-blocks (Variable Length) I
+---------+----------------------------------------------------I
I Type I Information I
+---------+----------------------------------------------------I
I String I Libraryname (the opposite!) I
I String I Objectname I
I String I Developername I
I Char(1) I Flag I
+---------+----------------------------------------------------I
+--------------------------------------------------------------+
I PB6/7 Status Flags I
+------+------+------------------------------------------------+
I Icon I Flag I Meaning I
+------+------+------------------------------------------------+
I I r I Object is registered I
I I d I Object is Checked Out (locked) I
I I s I Object (Working Copy) to be checked in I
I I u I Unknown?! After an Error occurred. I
I I I (Checked out by user <Unknown> I
I I I Could be set to 'r' with an Hex-Editor.) I
+------+------+------------------------------------------------+
+--------------------------------------------------------------+
I SCC DATA chunk I
I In newer PB Versions the DAT*-blocks content starts with the I
I ansi-encoded String 'SCC*'. I
I Objectname and Version Informations are stored as I
I 0-Byte (Word) separated strings. I
+----------+---------------------------------------------------I
I Type I Information I
+----------+------------+--------------------------------------+
I 1 - 4 I Char(4) I 'SCC*' I
I 5 - xxx I Blob I Objectname (string) followed by I
I I I Null-Byte 0x00 (Word in Unicode) I
I I I indicating the string end I
I I I Version (String) followed by I
I I I Null-Byte 0x00 (Word in Unicode) I
I I I indicating the string end I
I I I Next Objectname und Versioninfo I
I I I repeatedly until the end I
+----------+------------+--------------------------------------+
DateTimes are stored in Long format in Unix representation.
Timezone is always GMT (+/- 0:00), so the datetime has to be
converted to LocalDateTime via LocalTimeZone conversation.
In the compiled object data blocks, there are at least 2 more
datetimes, starting at byte 23 and the other one at 27!
Looks like these are the modification and regeneration date...
分享到:
相关推荐
本文将深入探讨“pbd还原pbl程序源代码”这一主题,这涉及到的是Progress 4GL编程语言的特定场景。 Progress 4GL是一种强大的业务应用程序开发语言,常用于构建数据库驱动的应用系统。在Progress开发环境中,源代码...
在Progress数据库系统中,`.pbd`(Procedure Binary Data)文件是存储编译后Progress程序的对象代码,而`.pbl`(Procedure Block Library)文件则是包含源代码的库文件。在某些情况下,开发者可能需要将`.pbd`文件反...
.pbd 文件是PowerBuilder的编译后目标文件,全称为PowerBuilder Deployment File。当PB程序被编译后,源码库中的代码会被转换成.pbd 文件,这个文件包含了运行时所需的机器码和元数据。与.pbl 文件不同,.pbd 文件...
fdw框架是一款专为PowerBuilder(PB)开发者设计的框架工具,主要针对PBL和PBD文件的操作。在本版本V1.01中,它提供了PBDMan的使用示例,帮助用户理解和掌握如何利用该框架来读取PBL和PBD文件。PBL文件是Power...
标题中的“dw2xls.pbd”和“dw2xls.pbl”是两个与数据库和数据转换相关的文件。在深入解释这两个文件之前,我们先要理解它们所处的上下文,即可能与Progress 4GL编程语言和OpenEdge开发环境有关。 1. **Progress 4...
前几天,我不小心把pb90的pbl删了,里面有好多写的新代码,还有公式,在网站找了一圈后,终于找到可以导出w窗口的软件,可是数据窗口不行,又找了一圈,终于找到导出的软件。很好用。
4. 在导入对话框中,选择“From Existing .PBD File”选项。 5. 浏览并选择需要还原的.PBD文件。 6. 完成导入后,PowerBuilder会尝试根据.PBD文件中的信息生成源代码,并将其保存到新的PBL文件中。 需要注意的是,...
《PowerBuilder 9.0 PBL文件结构解析》 在PowerBuilder(PB)开发环境中,PBL(PowerBuilder Library)文件是重要的组成部分,它存储了PB应用程序中的所有用户对象,如窗口、表单、控件、函数等。理解PBL文件的内部...
标题 "查看pbd中各种对象及其语法" 涉及的是PowerBuilder(PB)开发环境中的一个重要方面,尤其是关于PBD(PowerBuilder DataWindow)和PBL(PowerBuilder Library)文件的操作。这些文件是PowerBuilder应用程序的...
使用PBWSClient115.PBD的一个关键步骤是将其转化为PBL(PowerBuilder库)文件。这是因为.NET环境需要PBL而不是PBD来运行。要做到这一点,开发者需要创建一个新的PBL文件,如PBWSClient115.PBL,然后将PBWSClient115....
本项目“winsock.pbl开发的详细代码”提供了一种使用PowerBuilder(PB)6.0进行Socket通信的实践方法,通过具体的源代码来帮助开发者理解和构建自己的Socket应用程序。 首先,我们来看“winsock.pbl”这个文件,它...
在IT行业中,我们经常需要处理各种类型的文件,其中包括专用格式的数据库文件,如"PBL"文件。PBL文件是Progress 4GL编程语言所使用的数据库文件,它存储了应用程序的结构、数据和逻辑。当你收到一个名为“pbl文件...
描述中提到的"从pbl中批量导出源码文件"是指将PBL文件中的源代码转换成文本格式,以便于编辑、查看和版本控制。`.srd`文件是源代码的详细描述文件,`.srw`是窗口对象的源代码,`.srf`则是表单对象的源代码。批量导出...
pbl pb源代码比较 pbl pb源代码比较 pbl pb源代码比较
在压缩包的文件名称列表中,“public_exportxls.pbd”和“public_exportdw.pbd”可能是包含导出Excel功能的特定对象或函数的编译后库文件,而“public_exportxls.pbl”和“public_exportdw.pbl”则可能是相应的源...
这项研究是基于两位老师和15名学生在第一次体验基于问题的学习(PBL)时的反思。 PBL练习已集成到基于课程的地球科学领域,以满足有天赋学生的特定学习要求。 如果您对所有这些问题都给出肯定的答案,那将不是有天赋...
查看PB里面PBL里面存在的对象与其他功能.公司里面某位员工做的东西.适用于PBL很多时候,对象忘了放哪个PBL了.还有通用的数据窗口导入导出
它可能能够识别并重构PBL(PowerBuilder Library)中的函数、方法、变量和数据结构。反编译的结果可能不如原始的PowerScript那么易读,但仍然可以提供足够的信息来理解程序逻辑。 使用pbkiller时,用户通常需要指定...
PBL(PowerBuilder Library)是PB的源代码库文件格式,它存储了PB项目的各种元素,如窗口、对象、函数、事件处理等。PBL文件是PB开发的核心组成部分,通过它可以管理和组织项目中的各种源代码。 在学习和应用PB时,...