home *** CD-ROM | disk | FTP | other *** search
- /* ---------------------------------------------------------
- - PATCHIT.C -
- - Patcht die englische Meldung "This program requires -
- - Microsoft-Windows" in eine entsprechende deutsche -
- - Mitteilung. (c) 1991 Ulrich Schmitz & toolbox -
- ----------------------------------------------------------*/
- #include<stdio.h>
- #include<process.h>
-
- void main(argc,argv)
- char **argv;
- {
- FILE *datei;
-
- if (argv[1] != NULL)
- {
- datei = fopen( argv[1], "r+" );
- if ( datei == NULL )
- {
- printf("Datei \"%s\" existiert nicht!\n", argv[1]);
- fclose(datei);
- exit(1);
- }
- fseek( datei, 0x203, 0 );
- if (fgetc(datei) == 'T')
- {
- printf("%s wird gepatcht!\n", argv[1]);
- fseek( datei, 0x203, 0 );
- fputs
- ("Programm benötigt Microsoft Windows 3.0!",datei);
- fputc( 0x0A, datei);
- fclose( datei );
- }
- else
- {
- printf("Unbekannter Programmkopf, kein Patch ");
- printf("vorgenommen!\n");
- fclose(datei);
- exit(1);
- }
- }
- else
- {
- printf("\nDen Dateinamen des Windows-Programms als");
- printf(" Parameter angeben!\n");
- }
-
- }
- /*----------------------------------------------------------
- - Ende von PATCHIT.C */
-