Click here to Skip to main content
15,891,372 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: ShellExecute and focus lose Pin
Richard Andrew x6420-Oct-14 9:42
professionalRichard Andrew x6420-Oct-14 9:42 
GeneralRe: ShellExecute and focus lose Pin
sdancer7520-Oct-14 20:31
sdancer7520-Oct-14 20:31 
QuestionRe: ShellExecute and focus lose Pin
David Crow21-Oct-14 3:27
David Crow21-Oct-14 3:27 
AnswerRe: ShellExecute and focus lose Pin
sdancer7521-Oct-14 22:52
sdancer7521-Oct-14 22:52 
QuestionRe: ShellExecute and focus lose Pin
David Crow22-Oct-14 2:15
David Crow22-Oct-14 2:15 
AnswerRe: ShellExecute and focus lose Pin
sdancer7527-Oct-14 7:39
sdancer7527-Oct-14 7:39 
AnswerRe: ShellExecute and focus lose Pin
sdancer7529-Oct-14 22:12
sdancer7529-Oct-14 22:12 
QuestionProgram for decrypting graphic files in C. Pin
TheDefenestrator18-Oct-14 12:31
TheDefenestrator18-Oct-14 12:31 
Hello,
Quick prerequisite: I'm graphic designer and I have no idea about programing.

Long story short I want to modify some graphic files but they are encrypted. I already have the code in C for decrypting them but I have no idea how to make it into working program. Also I have no idea about C language syntax so I'm not sure if I need to modify this code so I can show the program files I need to decrypt. I would be very grateful if someone could help me with this.

C
#include <stdio.h>

int main (int argc, char **argv)
{
    FILE *inp, *outp;
    int i;
    char sig[] = "CF10", *ptr;

    if (argc != 3)
    {
        printf ("usage: decode [input] [output]\n");
        return -1;
    }
    inp = fopen (argv[1], "rb");
    if (inp == NULL)
    {
        printf ("bad input file '%s'\n", argv[1]);
        return -2;
    }
    ptr = sig;
    while (*ptr)
    {
        i = fgetc (inp);
        if (*ptr != i)
        {
            printf ("input file sig is not 'CF10'\n");
            return -2;
        }
        ptr++;
    }
    outp = fopen (argv[2], "wb");
    if (outp == NULL)
    {
        printf ("bad output file '%s'\n", argv[1]);
        return -2;
    }
    do
    {
        i = fgetc(inp);
        if (i != EOF)
            fputc (i ^ 0x8d, outp);
    } while (i != EOF);
    fclose (inp);
    fclose (outp);
    printf ("all done. bye bye\n");
    return 0;
}


modified 22-Oct-14 11:46am.

AnswerRe: Program for decrypting graphic files in C. Pin
Richard Andrew x6418-Oct-14 12:45
professionalRichard Andrew x6418-Oct-14 12:45 
GeneralRe: Program for decrypting graphic files in C. Pin
TheDefenestrator18-Oct-14 12:52
TheDefenestrator18-Oct-14 12:52 
GeneralRe: Program for decrypting graphic files in C. Pin
Richard Andrew x6418-Oct-14 12:54
professionalRichard Andrew x6418-Oct-14 12:54 
GeneralRe: Program for decrypting graphic files in C. Pin
TheDefenestrator18-Oct-14 12:58
TheDefenestrator18-Oct-14 12:58 
GeneralRe: Program for decrypting graphic files in C. Pin
TheDefenestrator18-Oct-14 13:36
TheDefenestrator18-Oct-14 13:36 
AnswerRe: Program for decrypting graphic files in C. Pin
Richard Andrew x6418-Oct-14 15:17
professionalRichard Andrew x6418-Oct-14 15:17 
GeneralRe: Program for decrypting graphic files in C. Pin
TheDefenestrator18-Oct-14 15:20
TheDefenestrator18-Oct-14 15:20 
GeneralRe: Program for decrypting graphic files in C. Pin
Richard Andrew x6418-Oct-14 15:26
professionalRichard Andrew x6418-Oct-14 15:26 
GeneralRe: Program for decrypting graphic files in C. Pin
TheDefenestrator22-Oct-14 5:46
TheDefenestrator22-Oct-14 5:46 
GeneralRe: Program for decrypting graphic files in C. Pin
Richard Andrew x6422-Oct-14 8:00
professionalRichard Andrew x6422-Oct-14 8:00 
Question#define VERSION 1.0.0 - too many decimal points Pin
Vaclav_16-Oct-14 4:12
Vaclav_16-Oct-14 4:12 
AnswerRe: #define VERSION 1.0.0 - too many decimal points Pin
Stefan_Lang16-Oct-14 4:35
Stefan_Lang16-Oct-14 4:35 
GeneralRe: #define VERSION 1.0.0 - too many decimal points Pin
PIEBALDconsult16-Oct-14 7:59
mvePIEBALDconsult16-Oct-14 7:59 
GeneralRe: #define VERSION 1.0.0 - too many decimal points Pin
CPallini16-Oct-14 9:17
mveCPallini16-Oct-14 9:17 
GeneralRe: #define VERSION 1.0.0 - too many decimal points Pin
PIEBALDconsult16-Oct-14 9:22
mvePIEBALDconsult16-Oct-14 9:22 
GeneralRe: #define VERSION 1.0.0 - too many decimal points Pin
CPallini16-Oct-14 9:45
mveCPallini16-Oct-14 9:45 
GeneralRe: #define VERSION 1.0.0 - too many decimal points Pin
Stefan_Lang17-Oct-14 3:08
Stefan_Lang17-Oct-14 3:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.