/
Forside
/
Teknologi
/
Udvikling
/
VB/Basic
/
Nyhedsindlæg
Login
Brugernavn
*
Kodeord
*
Husk mig
Brugerservice
Kom godt i gang
Bliv medlem
Seneste indlæg
Stil et spørgsmål
Skriv et tip
Pointsystemet
Kontakt Kandu.dk
Emnevisning
Kategorier
Alfabetisk
Karriere
Interesser
Teknologi
Reklame
Top 10 brugere
VB/Basic
#
Navn
Point
1
berpox
2425
2
pete
1435
3
CADmageren
1251
4
gibson
1230
5
Phylock
887
6
AntonV
790
7
strarup
750
8
Benjamin...
700
9
tom.kise
610
10
EXTERMINA..
600
Rundll32.exe
Fra :
Guillot David
Dato :
20-06-03 16:08
Use Rundll32.exe for runing API, it's OK. But how to have the value returned
by API and not by Shell ?
Example : lngRetour_Ini = Shell("Rundll32.exe
kernel32.dll,GetWindowsDirectoryA strChemin_tmp, 1024)", vbMinimizedNoFocus)
lngRetour_Ini has the value of Shell and not of
GetWindowsDirectoryA
Tim Sørensen (
20-06-2003
)
Kommentar
Fra :
Tim Sørensen
Dato :
20-06-03 23:16
why are you running RunDll32 instead of just calling the API directly?
Declare Function GetWindowsDirectory Lib "kernel32" _
Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, _
ByVal nSize As Long) As Long
Function WindowsDir() As String
Dim x As Long
Dim sPath As String
strPath = Space$(1024)
x = GetWindowsDirectory(sPath, Len(sPath))
sPath = Left$(sPath, x)
If Right$(strPath, 1) <> "\" Then sPath = sPath & "\"
WindowsDir = sPath
End Function
And please... Next time in Danish :)
--
Mvh.... Tim Sørensen
56º 24'209 N / 10º 55'631 E
Søg
Alle emner
Teknologi
Udvikling
VB/Basic
Indstillinger
Spørgsmål
Tips
Usenet
Reklame
Statistik
Spørgsmål :
177818
Tips :
31980
Nyheder :
719565
Indlæg :
6410969
Brugere :
218912
Månedens bedste
Årets bedste
Sidste års bedste
Copyright © 2000-2026 kandu.dk. Alle rettigheder forbeholdes.