Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

error C2664???

Empfohlene Antworten

Veröffentlicht

Hallo,

bin grade dabei ein Programm in C++ zu kompilieren, es kommt aber der Fehler: error C2664: 'NetWkstaGetInfo': Konvertierung des Parameters 1 von 'LPTSTR' in 'LPSTR' nicht möglich

Was habe ich falsch gemacht?

Habe bei MSDN geschaut aber nichts hat mich weiter gebracht!

Kann mir jemand von euch helfen?

Danke!!!

Hier der Code!

könntest du mal gucken ob er bei dir geht?

KP was falsch ist!

#ifndef UNICODE

#define UNICODE

#endif

#include <stdio.h>

#include <windows.h>

#include <lm.h>

int wmain(int argc, wchar_t *argv[])

{

DWORD dwLevel = 102;

LPWKSTA_INFO_102 pBuf = NULL;

NET_API_STATUS nStatus;

LPTSTR pszServerName = NULL;

//

// Check command line arguments.

//

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 NetWkstaGetInfo function, specifying level 102.

//

nStatus = NetWkstaGetInfo(pszServerName,

dwLevel,

(LPBYTE *)&pBuf);

//

// If the call is successful,

// print the workstation data.

//

if (nStatus == NERR_Success)

{

printf("\n\tPlatform: %d\n", pBuf->wki102_platform_id);

wprintf(L"\tName: %s\n", pBuf->wki102_computername);

printf("\tVersion: %d.%d\n", pBuf->wki102_ver_major,

pBuf->wki102_ver_minor);

wprintf(L"\tDomain: %s\n", pBuf->wki102_langroup);

wprintf(L"\tLan Root: %s\n", pBuf->wki102_lanroot);

wprintf(L"\t# Logged On Users: %d\n", pBuf->wki102_logged_on_users);

}

//

// Otherwise, indicate the system error.

//

else

fprintf(stderr, "A system error has occurred: %d\n", nStatus);

//

// Free the allocated memory.

//

if (pBuf != NULL)

NetApiBufferFree(pBuf);

return 0;

}

OK habs schon fertig!!!:bimei

aber trotzdem danke

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.