AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Mindest Passwort länge unter NT

Ein Thema von Luckie · begonnen am 10. Okt 2005 · letzter Beitrag vom 12. Okt 2005
 
Olli
(Gast)

n/a Beiträge
 
#16

Re: Mindest Passwort länge unter NT

  Alt 12. Okt 2005, 13:07
Zitat von Luckie:
Die Doku habe ich gelesen.
Ich hoffe das ist als Witz gemeint. Schau mal was im PSDK bei der Beschreibung von MSDN-Library durchsuchenNetUserModalsGet steht.

Zitat:
bufptr
[out] Pointer to the buffer that receives the data. The format of this data depends on the value of the level parameter. This buffer is allocated by the system and must be freed using the MSDN-Library durchsuchenNetApiBufferFree function. For more information, see Network Management Function Buffers and Network Management Function Buffer Lengths.
Dann wäre da noch folgendes Beispiel, wo dir spätestens dein Fehler hätte bewußt werden müssen:
Code:
#ifndef UNICODE
#define UNICODE
#endif

#include <stdio.h>
#include <windows.h>
#include <lm.h>

int wmain(int argc, wchar_t *argv[])
{
   DWORD dwLevel = 0;
   [color=red]USER_MODALS_INFO_0 *pBuf = NULL;[/color]
   NET_API_STATUS nStatus;
   LPTSTR pszServerName = NULL;

   if (argc > 2)
   {
      fwprintf(stderr, L"Usage: %s [\\\\ServerName]\n", argv[0]);
      exit(1);
   }
   // The server is not the default local computer.
   //
   if (argc == 2)
      pszServerName = argv[1];
   //
   // Call the NetUserModalsGet function; specify level 0.
   //
   nStatus = NetUserModalsGet(pszServerName,
                              dwLevel,
                              [color=red](LPBYTE *)&pBuf);[/color]
   //
   // If the call succeeds, print the global information.
   //
   [color=red]if (nStatus == NERR_Success)
   {
      if (pBuf != NULL)[/color]
      {
         printf("\tMinimum password length: %d\n", pBuf->usrmod0_min_passwd_len);
         printf("\tMaximum password age (d): %d\n", pBuf->usrmod0_max_passwd_age/86400);
         printf("\tMinimum password age (d): %d\n", pBuf->usrmod0_min_passwd_age/86400);
         printf("\tForced log off time (s): %d\n", pBuf->usrmod0_force_logoff);
         printf("\tPassword history length: %d\n", pBuf->usrmod0_password_hist_len);
      }
   }
   // Otherwise, print the system error.
   //
   else
      fprintf(stderr, "A system error has occurred: %d\n", nStatus);
   //
   // Free the allocated memory.
   //
   [color=red]if (pBuf != NULL)
      NetApiBufferFree(pBuf);[/color]

   return 0;
}
Zitat von Luckie:
Was habe ich denn falsch gesmcht?
Habe ich oben als Punkt 1 und 2 geschrieben. Deinen und meinen Prototypen zu vergleichen sollte nicht zuviel verlangt sein, oder? ... aber ich will mal nicht so sein:
Code:
[b]function[/b] NetUserModalsGet(Servername: LPCWSTR; Level: DWORD; [color=red][u]var[/u][/color] bufptr: Pointer): DWORD; [b]stdcall[/b]; [b]external[/b] 'Netapi32.dll';
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 19:37 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz