Write to .ini file fails - cause?

  • Hi,


    I'm using for a while succesfull API calls to read/write to .ini files.
    now i would like to manipulate a certain ini file, but it won't change the value after a SaveIniKey operation.
    question now is what could cause this behaviour?


    here's the code i use to read/write to the ini file


    As you can see, i use the same variables for reading & writing to the ini file, with the exeption of the sfName variable for writing.
    sfName could be : \\Bvwsrv01\bvw\AV\Operations\HASS\6. Profiles\1. DU8x5\DU8x5_32G_V1_00.prf


    The first Debug.Print line returns me: /X/Operations/HASS/6. Profiles/2. KDU1080_1500/Final_HASS_KDU1080_15G_V4_00.prf
    the second Debug.Print line returns me the same string, even that the variable sPrfFileName = \\Bvwsrv01\bvw\AV\Operations\HASS\6. Profiles\1. DU8x5\DU8x5_32G_V1_00.prf


    lngValid returns 0
    the file attributes Hidden & Read-only arent NOTchecked.


    here's a snipset of the ini file i want to manipulate:


    Any idea why this isn't working?
    Possible that any file attributes that prevent the file to change?


    best regards,
    Ludo

  • Re: Write to .ini file fails - cause?


    Hi,


    after some browsing on the net i found following code to return the error message string:


    the returned message is: Access is denied.


    Any one a clue why the access is denied?


    Thanks in advance.
    Ludo

  • Re: Write to .ini file fails - cause?


    sorry for the post, it seems to be that i don't have permission on this folder. :(
    So used that everything works imediately that i didn't think that there could be restrictions on the folder level.


    Ludo

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!