Hi Tobias,

Tobias Krais ha scritto:
> Hi together,
> 
> I have a litte application and need to know the full path of the current
> document. Thus I use the XStorable interface. Using the
> xStorable.getLocation() method returns on a Windows XP system (using OOo
> 2.3): file:/F:/DOKUME1/Tobias/EIGENE1/...
> Correct would be: file:/F:/Dokumente und Einstellungen/Tobias/Eigene
> Dateien/...
> Is there a way to get the REAL full path of the document?

Some time ago it was reported a similar issue on my extension
BasicAddonBuilder:
http://extensions.services.openoffice.org/project/BasicAddonBuilder

This is the thread:
http://extensions.openoffice.org/servlets/BrowseList?list=dev&by=thread&from=1830122

And this is the fix that I've applied:

--------------------------------------
Declare Function GetLongPathName Lib "kernel32.dll" Alias
"GetLongPathNameA" ( _
ByVal lpszShortPath As String, lpszLongPath As String, ByVal cchBuffer
As Long) As Long


Function FixDOSFilePath(ByVal sDOSFilePath As String) As String
Dim lLen As Long
Dim sBuffer As String
        sBuffer = String(260, Chr(0))
        lLen = GetLongPathName(sDOSFilePath, sBuffer, Len(sBuffer))
        FixDOSFilePath = Left(sBuffer, lLen)
End Function
--------------------------------------

HTH
Paolo M


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to