Hi.
We have a VB app
app.exe
that calls a VB app
worker.exe
that calls a C dll linked with Notes C API for Notes 4.6.2
helper.dll
app.exe has a button run now, which basically builds a command line and passes it to worker.exe via ShellExecute
sub runnow()
shellexecute(,path/to/worker.exe, parameter list,... )
end sub
Once worker.exe is running, it does some work, and then passes a notes server name and notes database to helper.dll.
When we manually hit this button, some work gets done, but once helper.dll is called, it attempts to connect to the remote notes database via NotesInit, OSPathNetConstruct and NSFDbOpen. NSFDbOpen returns an error “Notes Error:2051 = Unable to find path to server”. The other Notes calls leading up to NSFDbOpen all succeed.
If we call worker.exe from the command line with the same parameters given to it by app.exe the NSFDbOpen call succeeds. Can anyone shed some light on why this works from the command line, but not when called via shellexecute? Is there an environment inheritance issue?
Thanks.