OSGetEnvironmentString using wrong notes.ini

In a C-based application I use NotesInitExtended to initialize the Lotus Notes backend. When calling NotesInitExtended I do pass “=<notes.ini filename>” as the second argument to use a notes.ini file located in a custom directory for initialization. NotesInitExtended returns with success (status = 0).

When running OSGetEnviromentString afterwards, OSGetEnvironmentString returns the requested value from a different notes.ini file than the one specified when calling NotesInitExtended.

Any ideas why this is the case?