在98里面有个wininit.ini 文件可以供我们删除或更改程序自身?在2000和XP里面,要怎样实现???

解决方案 »

  1.   

    2k和xp都把要执行的操作集中导注册表里边去了。尽量避免.ini文件的操作。所以你有没有发现wk和xp的注册表比98大了很多。
      

  2.   

    其实ini是16位windows里采用的,不过为了兼容,我们还是可以访问
    GetPrivateProfileInt --- Retrieves an integer associated with a key in the specified section of an initialization file. 
    GetPrivateProfileSection --- Retrieves all the keys and values for the specified section of an initialization file. 
    GetPrivateProfileSectionNames --- Retrieves the names of all sections in an initialization file. 
    GetPrivateProfileString --- Retrieves a string from the specified section in an initialization file. 
    GetPrivateProfileStruct --- Retrieves the data associated with a key in the specified section of an initialization file. 
    GetProfileInt --- Retrieves an integer from a key in the specified section of the Win.ini file. 
    GetProfileSection --- Retrieves all the keys and values for the specified section of the Win.ini file. 
    GetProfileString --- Retrieves the string associated with a key in the specified section of the Win.ini file. 
    WritePrivateProfileSection --- Replaces the keys and values for the specified section in an initialization file. 
    WritePrivateProfileString --- Copies a string into the specified section of an initialization file. 
    WritePrivateProfileStruct --- Copies data into a key in the specified section of an initialization file. 
    WriteProfileSection --- Replaces the contents of the specified section in the Win.ini file with specified keys and values. 
    WriteProfileString --- Copies a string into the specified section of the Win.ini file.