| |
|
|
- Page 1 - |
|
supernova | Hi,
i'm Beginner what XProfan concerns. means already time excuse if The one or others stupid question comes. I have Forum already search too any Aids, come simply not further.
I must whom currently eingeloggten User detect. I have with MSDN nachgeschaut which API best in question comes and be then on "WNetGetUser" from the mpr.dll bumped. the description standing too in the win32.hlp. means in Profan umgesetzt but It's all right not. I knows not any more moreover.
moreover have generally yet ask
1 The function means "WNetGetUser" becomes but with "WNetGetUserA" called Why ?
2 The mpr.dll is as 32 and 64 bit Version in windows present. Do I expliziet whom Dateipfad in the function to 32 bit Version indicate or power the windows automatically ?
3 What is on my function wrong ? I have me bemueht and so far It's all right Auskommentiert.
Download |
|
|
| |
|
|
|
« this Posting watts as Solution marked. » |
|
Julian Schmidt | Hello Funkheld.
supernova (07.12.13)
1 The function means "WNetGetUser" becomes but with "WNetGetUserA" called Why ?
usually becomes one Text always with a byte per characters zurückgegeben (ANSI). but there's too whom Unicode-Standart where two byte per characters needed go. Unicode contain plenty More characters. Unicode-functions go with a W hinten completed and ANSI-functions with a A. often there The functions twice, once results the return in ANSI and once in Unicode.
supernova (07.12.13)
2 The mpr.dll is as 32 and 64 bit Version in windows present. Do I expliziet whom Dateipfad in the function to 32 bit Version indicate or power the windows automatically ?
the power windows automatically, You must only whom right Filenames for your DLL present.
supernova (07.12.13)
3 What is on my function wrong ? I have me bemueht and so far It's all right Auskommentiert.
have now not your code angeschaut. But if You times the Search ready would have, would already one code for you thereby been. z.B. this here [...] Kürzer would against it yet: CompileMarkSeparation I recommend you this Workshop To API-Grundlagen.durchzulesen[...]
Greeting
Julian |
|
|
| |
|
|
|
|
Jörg Sellmeyer | |
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 12/08/13 ▲ |
|
|
|
|
supernova | thanks for speedy Help,
though would so did i gladly know what on my PRG wrong is. If I these function not ans walk get, I will probably too no others ans walk get. I have already many hours the Search and try spent but come simply not further. the frustiert a little bit. thereby suspect I the it How often right simply is. |
|
|
| |
|
|
|
Andreas Koch | Hello supernova,
here another others Version your Source code, CompileMarkSeparation' Beschreibung Funktion WNetGetUserA aus win32.hlp
'The WNetGetUser function retrieves the current default user name or the user name
'used to establish a network connection.
'
'DWORD WNetGetUser(
'
' LPCTSTR lpName, // pointer to local name to get user name for
' LPTSTR lpUserName, // pointer to buffer for user name
' LPDWORD lpnLength // pointer to buffer size variable
' );
' Variable fuer VZ C:\Windows\SysWOW64 defeninieren "32 Bit"
Declare WIN_SWow$
' Variable fuer fuer Funktion definieren
Declare Dll_Path$
' Variablen fuer MessageBox definieren
Declare AusgabeText$,TitelText$
' Variable WIN_SWow$ Wert zuweisen
WIN_SWow$=$WinPath + "\SysWOW64"
' Variable Dll_Path$ die mpr.dll fuer Funktion GetUserName zuweisen
Dll_Path$=WIN_SWow$ + "\mpr.dll"
'Funktion fuer API mpr.dll "WNetGetUserA" definieren
'Def GetUserName(3) ! Dll_Path$,"WNetGetUserA"
DEF GetUserName(2) !"ADVAPI32","GetUserNameA"
DECLARE USize#, UName#, User$
DIM USize#,4
DIM UName#,256
LONG Usize#,0=256
' Konstante fuer Fehler Abfrage
Def $NOERROR 0
GetUserName
Proc GetUserName
' Variablen fuer Funktion GetUserName definieren
Declare lpName$,lpUserName$,lpnLength&,Status%
'lpUserName$ mit Leerzeichen auffuellen
'steht bei MSDN in Beschreibung ?
lpUserName$ = @Space$(255)
'Ermittelt den Namen der Angemeldeten Person, die den Rechner benutzt.
'Status% gibt den Rueckgabewert der Funktion wieder Ok oder Fehler
Status% = GetUserName(UName#, USize#, lpnLength&)
' Zeigt den Namen der Person, die an dem Computer angemeldet
TitelText$ = "Rückgabe Funktion WNetGetUser"
AusgabeText$= String$(UName#,0) + " " + lpUserName$ + " " + lpName$
Messagebox(AusgabeText$,Titeltext$,4160)
ENDPROC
under one Pointer becomes The address one Bereichs understood, not a Stringvariable. Perhaps helps you the moreover. Greeting Andreas |
|
|
| |
|
|
|
supernova | Hello mr cook,
thanks for Tipp. the was is. to lauter Search and try have I so festgelaufen that I whom woods to lauter Trees not More seen have.
Greeting Supernova |
|
|
| |
|
|