1

My code is like this:

#include <Windows.h>
#include <tchar.h>

int main () {
    TCHAR conffigPath[MAX_PATH] = {0};
    GetCurrentDirectory(MAX_PATH, conffigPath);
    _tcscat_s(conffigPath, MAX_PATH, _T("\\config.ini"));

    TCHAR szValue[MAX_PATH] = {0};
    GetPrivateProfileString(_T("361"), _T("DLL"), NULL, szValue, MAX_PATH, conffigPath);

    return 0;
}

The context of config.ini is following:

[361]
Dll=daemon.dll

But when GetPrivateProfileString was called, the context of szValue is empty! And when I disable the pageheap, the context of szValue is "daemon.dll". And when I enable pageheap with flags(full traces),the context of szVaule is "daemon.dll".

Is there a bug of the API GetPrivateProfileString?

jeJee
  • 61
  • 4
  • I observed similar behavior (API failure) for gethostbyname API: http://stackoverflow.com/questions/18500669/gethostbyname-api-fails-when-app-verifier-is-on – glagolig Aug 31 '13 at 17:33

0 Answers0