122 |
regist_inst_winpt (int with_ext, int * created) |
regist_inst_winpt (int with_ext, int * created) |
123 |
{ |
{ |
124 |
HKEY reg; |
HKEY reg; |
125 |
char * p = NULL; |
char *p = NULL; |
126 |
|
char modpath[MAX_PATH+1]; |
127 |
int rc, i, id, n = 0; |
int rc, i, id, n = 0; |
128 |
|
|
129 |
if( created ) |
if( created ) |
186 |
RegCloseKey( reg ); |
RegCloseKey( reg ); |
187 |
if( n ) |
if( n ) |
188 |
set_reg_entry( HKEY_CURRENT_USER, WINPT_REG, "Extensions", "1" ); |
set_reg_entry( HKEY_CURRENT_USER, WINPT_REG, "Extensions", "1" ); |
189 |
|
if ((n=GetModuleFileName (NULL, modpath, MAX_PATH-1)) > 0) { |
190 |
|
while (n-- > 0) { |
191 |
|
if (modpath[n] == '\\') { |
192 |
|
modpath[n] = 0; |
193 |
|
break; |
194 |
|
} |
195 |
|
} |
196 |
|
set_reg_entry (HKEY_CURRENT_USER, WINPT_REG, |
197 |
|
"Install Directory", modpath); |
198 |
|
} |
199 |
|
|
200 |
return 0; |
return 0; |
201 |
} /* regist_inst_winpt */ |
} |
202 |
|
|
203 |
|
|
204 |
/* Create a new filetype in the W32 registry. |
/* Create a new filetype in the W32 registry. |