Domino 9 und frühere Versionen > Entwicklung
Wo liegt die Notes.exe?
eknori:
@Jens: Es wird die Notes API verwendet !
Semeaphoros:
Ups, da war ich etwas zu oberflächlich --- schade!
Und danke für den Hinweis, also hat M$ immer noch nix gelernt, das muss denen doch schon x-tausendmal unter die Nase gerieben worden sein. Nochmals danke.
eknori:
Kannst ja mal dies hier probieren
Declare Function FindExecutable Lib "shell32.dll" Alias "FindExecutableA" (Byval lpFile As String, Byval lpDirectory As String, Byval sResult As String) As Long
Private Function FindExecutableByExtension( FullPath As String ) As Variant
Dim success&, pos&, sResult$, RetVal$, lpFile$, lpDirectory$, msg$
sResult = Space$ ( MAX_PATH )
lpFile$ = ExtractFileName ( FullPath )
lpDirectory$ = Left$ ( FullPath , Len( FullPath ) - Len( lpFile$ ) )
success = FindExecutable ( lpFile$ , lpDirectory$ , sResult )
Select Case success
Case ERROR_FILE_NO_ASSOCIATION: msg = "no association"
Case ERROR_FILE_NOT_FOUND: msg = "file not found"
Case ERROR_PATH_NOT_FOUND: msg = "path not found"
Case ERROR_BAD_FORMAT: msg = "bad format"
Case Is >= ERROR_FILE_SUCCESS:
pos = Instr ( sResult , Chr$ ( 0 ) )
If pos Then RetVal = Left$ ( sResult , pos - 1 )
End Select
FindExecutableByExtension = RetVal
End Function
Private Function ExtractFileName( FilePath As String ) As String
'// Extract the FileName from FullPath
'// Called by : Function FindExecutableByExtension
'// Calls : Function InstrBack
ExtractFileName = Rightbp$( FilePath , InstrBack ( FilePath , "\" ) )
End Function
Semeaphoros:
Aha, stammt aus der DDE-Ecke, danke für den Hinweis.
animate:
--- Zitat von: eknori am 05.12.03 - 10:18:32 ---
Code: ========================================================================
Following code should be put in "Declaration" section of the object which uses this function.
Declare Function OSGetExecutableDirectory Lib "NNOTES.DLL" Alias "OSGetExecutableDirectory" (_
Byval DirName As String,_
Byval Size As Long) As Long
=========================================================================
Function GetNotesProgramDirectory As String
Dim DirPath As String*512
Dim Size As Long
Dim Handle As Long
GetNotesProgramDirectory=""
Handle=OSGetExecutableDirectory(DirPath,Size)
GetNotesProgramDirectory=DirPath
End Function
--- Ende Zitat ---
wow! muchas gracias
Navigation
[0] Themen-Index
[#] Nächste Seite
[*] Vorherige Sete
Zur normalen Ansicht wechseln