171 |
} |
} |
172 |
|
|
173 |
memset( &deficon, 0, sizeof deficon ); |
memset( &deficon, 0, sizeof deficon ); |
174 |
_snprintf( deficon, sizeof deficon - 1, "%s\\DefaultIcon", extname ); |
_snprintf( deficon, DIM (deficon) - 1, "%s\\DefaultIcon", extname ); |
175 |
memset( &defexec, 0, sizeof defexec ); |
memset( &defexec, 0, sizeof defexec ); |
176 |
_snprintf( defexec, sizeof defexec - 1, "%s\\shell\\open\\command", extname ); |
_snprintf( defexec, DIM (defexec) - 1, "%s\\shell\\open\\command", extname ); |
177 |
memset( &p_exefile, 0, sizeof p_exefile ); |
memset( &p_exefile, 0, sizeof p_exefile ); |
178 |
_snprintf( p_exefile, sizeof p_exefile - 1, "%s %%1", exefile ); |
_snprintf( p_exefile, DIM (p_exefile) - 1, "%s %%1", exefile ); |
179 |
|
|
180 |
rc = RegCreateKey( HKEY_CLASSES_ROOT, deficon, ® ); |
rc = RegCreateKey( HKEY_CLASSES_ROOT, deficon, ® ); |
181 |
if( rc_ok( rc ) ) |
if( rc_ok( rc ) ) |
207 |
char icon[MAX_PATH+1] = {0}; |
char icon[MAX_PATH+1] = {0}; |
208 |
char prog[MAX_PATH+1] = {0}; |
char prog[MAX_PATH+1] = {0}; |
209 |
|
|
210 |
if (!GetModuleFileName (glob_hinst, prog, sizeof (prog)-1)) |
if (!GetModuleFileName (glob_hinst, prog, DIM (prog)-1)) |
211 |
return WPTERR_REGISTRY; |
return WPTERR_REGISTRY; |
212 |
_snprintf (icon, sizeof (icon) -1, "%s,%d", prog, gfile->nicon); |
_snprintf (icon, DIM (icon) -1, "%s,%d", prog, gfile->nicon); |
213 |
return create_file_type (prog, gfile->ext, gfile->descr, icon); |
return create_file_type (prog, gfile->ext, gfile->descr, icon); |
214 |
} |
} |
215 |
|
|