Exemplo n.º 1
0
int main(int argc, char **argv) {
	if (argc != 3) {
		fprintf(stderr, "Usage: %s <NE file> <output directory>\n",
				argv[0]);
		return 1;
	}
	outDir = argv[2];
	readFile = fopen(argv[1], "rb");
	// XXX: 0x250 offset is currently hardcoded, should be reading the real
	// windows header offset...
	fseek(readFile, 0x250 + 0x24, SEEK_SET);
	fread(&segmentOffset, 2, 1, readFile);
	segmentOffset += 0x250;
	fseek(readFile, segmentOffset, SEEK_SET);
	u16 alignShift;
	fread(&alignShift, 2, 1, readFile);
	sizeShift = 1 << alignShift;

	TYPEINFO *t;
	while (1) {
		t = readTypeInfo();
		if (t->rtTypeID == 0)
			break;
		dumpTypeInfo(t);
		free(t->rtNameInfo);
		free(t);
	}
	free(t->rtNameInfo);
	free(t);
}
Exemplo n.º 2
0
void setRtlFormat(IPropertyTree & properties, IOutputMetaData * meta)
{
    if (meta && meta->queryTypeInfo())
    {
        MemoryBuffer out;
        if (dumpTypeInfo(out, meta->querySerializedDiskMeta()->queryTypeInfo()))
            properties.setPropBin("_rtlType", out.length(), out.toByteArray());
    }
}