Who have code read file *.prc help me!
I want to write program read file *.prc but I don't know struct file !
only read file *.prc

Dani AI

Generated

.prc is not a single, well-defined format. is correct that the extension can mean different things; attached a sample named "Sniffer.prc", and the first step is to identify which PRC variant it actually is (Palm PDB/PRC, Mobipocket/MOBI e-book, a device-specific binary, a custom container, etc.). A reliable workflow is: detect format by signature, inspect the file header in hex, then pick a parser or library for that specific format rather than guessing.

Practical identification steps (in order):

  • Use a magic-type detector (the file command or libmagic) or run a strings pass to look for ASCII markers such as "BOOKMOBI", "MOBI", "SQLite format 3", or readable names that suggest a Palm database.
  • Open the file in a hex viewer. Palm PDB/PRC files normally start with a fixed-length name field and then a record-offset table; Mobipocket PRC/MOBI files contain a MOBI header block with readable tags.
  • If the header is an executable/bytecode blob (no clear metadata), the file may be an application binary and needs a different approach (emulator/disassembler).

A small C helper to inspect the first part of any binary (dump hex + ASCII) — compile and run this on the attached file to get visible clues:

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char **argv) {
    if (argc < 2) { fprintf(stderr, "usage: hexview file\n"); return 1; }
    FILE *f = fopen(argv[1], "rb");
    if (!f) { perror("fopen"); return 2; }
    unsigned char buf[16];
    size_t off = 0, n;
    while ((n = fread(buf, 1, sizeof(buf), f)) > 0) {
        printf("%08zx  ", off);
        for (size_t i = 0; i < 16; i++) {
            if (i < n) printf("%02x ", buf[i]); else printf("   ");
        }
        printf(" ");
        for (size_t i = 0; i < n; i++) putchar((buf[i] >= 32 && buf[i] <= 126) ? buf[i] : '.');
        putchar('\\n');
        off += n;
    }
    fclose(f);
    return 0;
}

Once the format is identified, use an existing parser instead of reimplementing: for Palm PDB/PRC look for PDB/PRC parsers (pilot-link/libpdb), for MOBI use MOBI libraries or converters, and for custom formats either find vendor docs or reverse-engineer the layout from the header and record offsets. Note: some PRC/MOBI files are DRM-protected or are compiled code; reading them may require special tools and may have legal/ethical restrictions.

Recommended Answers

All 2 Replies

1. Whenever you post a question please make sure you add as much information as possible. I did not know what on earth are PRC files.
2. Try googling you query on PRC file format.
3. I googled it myself and found that PRC files stand for more than 1 thing, thus the importance of [1].

Please update with as much information as possible and we would love to help :)

Sorry ! my english verry bad !
It is file :

Thank You reply !

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.