Subversion Repositories filter_foundry

Rev

Rev 35 | Rev 85 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35 Rev 62
Line 26... Line 26...
26
 
26
 
27
Boolean doresources(HMODULE srcmod,char *dstname);
27
Boolean doresources(HMODULE srcmod,char *dstname);
28
 
28
 
29
void dbglasterror(char *func){
29
void dbglasterror(char *func){
30
        char s[0x100];
30
        char s[0x100];
-
 
31
 
31
        strcpy(s,func);
32
        strcpy(s,func);
32
        strcat(s," failed: ");
33
        strcat(s," failed: ");
33
        FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM,NULL,GetLastError(),0,s+strlen(s),0x100,NULL );
34
        FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM,NULL,GetLastError(),0,s+strlen(s),0x100,NULL );
34
        dbg(s);
35
        dbg(s);
35
}
36
}
Line 66... Line 67...
66
                if( (datarsrc = FindResource(srcmod,MAKEINTRESOURCE(16000),RT_RCDATA))
67
                if( (datarsrc = FindResource(srcmod,MAKEINTRESOURCE(16000),RT_RCDATA))
67
                        && (datah = LoadResource(srcmod,datarsrc))
68
                        && (datah = LoadResource(srcmod,datarsrc))
68
                        && (datap = LockResource(datah))
69
                        && (datap = LockResource(datah))
69
                        && (aetersrc = FindResource(srcmod,MAKEINTRESOURCE(16000),"AETE"))
70
                        && (aetersrc = FindResource(srcmod,MAKEINTRESOURCE(16000),"AETE"))
70
                        && (aeteh = LoadResource(srcmod,aetersrc))
71
                        && (aeteh = LoadResource(srcmod,aetersrc))
71
                        && (aetep = LockResource(aeteh))
72
                        && (aetep = LockResource(aeteh)) )
72
                ){
73
                {
73
                        DBG("loaded DATA, PiPL");
74
                        DBG("loaded DATA, PiPL");
74
 
75
 
75
                        PLstrcpy(title,gdata->parm.title);
76
                        PLstrcpy(title,gdata->parm.title);
76
                        if(gdata->parm.popDialog)
77
                        if(gdata->parm.popDialog)
77
                                PLstrcat(title,(StringPtr)"\003...");
78
                                PLstrcat(title,(StringPtr)"\003...");
Line 79... Line 80...
79
                        origsize = SizeofResource(srcmod,datarsrc);
80
                        origsize = SizeofResource(srcmod,datarsrc);
80
                        aetesize = SizeofResource(srcmod,aetersrc);
81
                        aetesize = SizeofResource(srcmod,aetersrc);
81
 
82
 
82
                        if( (newpipl = malloc(origsize+0x300))
83
                        if( (newpipl = malloc(origsize+0x300))
83
                         && (newaete = malloc(aetesize+0x100))
84
                         && (newaete = malloc(aetesize+0x100))
84
                         && (pparm = malloc(sizeof(PARM_T))) ){
85
                         && (pparm = malloc(sizeof(PARM_T))) )
85
 
86
                        {
86
                                /* add user-specified title and category to new PiPL */
87
                                /* add user-specified title and category to new PiPL */
87
                                memcpy(newpipl,datap,origsize);
88
                                memcpy(newpipl,datap,origsize);
88
                                /* note that Windows PiPLs have 2 byte version datum in front
89
                                /* note that Windows PiPLs have 2 byte version datum in front
89
                                   that isn't reflected in struct definition or Mac resource template: */
90
                                   that isn't reflected in struct definition or Mac resource template: */
90
 
91