0

I'm using software that loads my .dll library The sofware is located somewhere on my my hard drive, let's say:

C:\Program Files\UNICODE CHARS\(...)\123.exe

And my dll is located in:

C:\Program Files\UNICODE CHARS\(...)\Addons\Dlls\123.dll

Now I need to be able to perform some operations like fopen(), fclose() etc from inside of dll, passing PATH to dll as fopen parameter.

How to get relative path do 123.dll that will allow me to access this file with short, ansi path, possibly

Addons\Dlls\123.dll
peku33
  • 3,628
  • 3
  • 26
  • 44
  • Does: http://stackoverflow.com/a/6924332/168175 answer for you? (I was about to write exactly that as an answer!) – Flexo Dec 02 '14 at 10:06
  • The EXE and DLL can retrieve their own full paths, you do not need to use relative paths (nor should you ever use relative paths). – Remy Lebeau Dec 02 '14 at 17:50
  • 1
    (Close vote retracted. However, Remy is right; relative paths are bad news. Any particular reason you want the path to be short?) – Harry Johnston Dec 03 '14 at 02:57

0 Answers0