Thinking Different




레지스트리 등록 함수

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function OnBegin()                 
begin
    RegDBSetDefaultRoot( HKEY_CLASSES_ROOT );  
    RegDBSetKeyValueEx( 
       ".sec"
        ""
        REGDB_STRING, 
        "secfile.sec"
        -1 
    );
     
       RegDBSetKeyValueEx( 
       "secfile.sec\\DefaultIcon"
        ""
        REGDB_STRING, 
        TARGETDIR ^ "resdll.dll,0"
        -1 
    );                                                        
end;




레지스트리 삭제 사용자 함수

1
2
3
4
5
6
7
8
9
10
prototype OnDeleteReg();     // 사용자 함수로 작성해서 맨위에 헤더 밑에 추가 해줘야 된다
function OnDeleteReg()
begin
RegDBSetDefaultRoot( HKEY_CLASSES_ROOT );  
    RegDBDeleteKey(".sec");
    RegDBDeleteKey("secfile.sec\\DefaultIcon");
    RegDBDeleteKey("secfile.sec");
    
    SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL);
end;