[Libreoffice] ChDir and user written dll

pjpuchyr pjpuchyr at gmail.com
Tue Apr 26 12:46:14 PDT 2011

Running calc, I need to load a dll which is not in the search path, and my
problem is
that the Basic ChDir statement does nothing on Windows 7, so the dll can
never be found.
Is there a solution to this problem?

To elaborate,  I've written an app which runs as a dll loaded by a
spreadsheet.   My clients 
are engineers who do not have administrator privileges on their machines, so
the dll is 
typically not put in the standard search path for dlls.   One of the
spreadsheet inputs is the 
path to the dll, which is picked up by the Basic code.   On systems where
ChDir works,
I simply ChDir to the specified directory and the dll loads.

In OpenOffice/LibreOffice, ChDir does nothing (doesn't work and doesn't
issue an error),
so my alternatives are
1) hard code the full path into the Basic Declare statement, which is
unacceptable because
   I have no control over where the dll is put
2) force the dll to be put in the standard path, which is also unacceptable
because the 
   clients typically don't have administrator privileges.

Apparently the ChDir bug is unlikely to be fixed, as per the discussion in
so has anyone found a workaround?


View this message in context: http://nabble.documentfoundation.org/ChDir-and-user-written-dll-tp2867067p2867067.html
Sent from the Dev mailing list archive at Nabble.com.

More information about the LibreOffice mailing list