Hi all,

I'm in the process of rewriting some ini handling to us the functions from 
iniutil.h.
The following is the ini file I'm trying to parse:
[Environment]
CurrentlyActiveLanguage=enu
AppScriptFile=SurfaceReader.JSB
DefScriptFile=DEFAULT.JSB
ActiveSpotFile=C:\Users\tim\AppData\Roaming\Freedom 
Scientific\JAWS\13.0\Settings\enu\PersonalizedSettings\SurfaceReader\SurfaceReader.hsc
CurrentUserSettingsFolder=C:\Users\tim\AppData\Roaming\Freedom 
Scientific\JAWS\13.0\Settings\enu
SharedUsersSettingsFolder=C:\ProgramData\Freedom 
Scientific\JAWS\13.0\Settings\enu
JawsSettingsFolder=C:\Users\tim\AppData\Roaming\Freedom 
Scientific\JAWS\13.0\Settings\enu
I'm testing this with a console application that contains the following code:
#include <stdlib.h>
#include <Windows.h>
#include <dutil.h>
#include <fileutil.h>
#include <iniutil.h>
int main(int argc, char* argv[])
{
                HRESULT hr;
                INI_HANDLE handle;
                            INI_VALUE *rgValues = NULL;
            DWORD cValues = 0;

                hr =IniInitialize(&handle);
                ExitOnFailure(hr, "Unable to initialize the ini handle.");
                hr =FileExistsEx(L"c:\\work\\CurrentJawsEnvironment.ini", NULL);
ExitOnFailure(hr, "The dimension pro hsc set does not exist.");
hr =S_FALSE;
hr =IniParse(handle, L"c:\\work\\CurrentJawsEnvironment.ini", NULL);
ExitOnFailure(hr, "unable to parse the ini.");
hr =IniGetValueList(handle, &rgValues, &cValues);
ExitOnFailure(hr, "Unableto obtain the values.");
LExit:
ReleaseIni(handle);
return 0;
}
After the line that calls GetValueList, cValues still =0, and the rgValues 
array doesn't contain any meaningful data.
Can somebody tell me what I'm doing wrong. I've looked at the unit tests for 
iniutil and thought I'd followed them.
Any help appreciated.
Kind regards
Sean.
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to