void GetIP(char* pszIP) { struct hostent* h; WSADATA wsaData; UCHAR ucAddress[4]; CHAR szHostName[MAX_PATH]; int x; WSAStartup(MAKEWORD(1, 1), &wsaData); if (SOCKET_ERROR != gethostname(szHostName, NUM_ELEMENTS(szHostName))) { if (NULL != (h = gethostbyname(szHostName))) { for(x = 0; (h->h_addr_list[x]); x++) { ucAddress[0] = h->h_addr_list[x][0]; ucAddress[1] = h->h_addr_list[x][1]; ucAddress[2] = h->h_addr_list[x][2]; ucAddress[3] = h->h_addr_list[x][3]; wsprintf(IP_ADRESSE, "%d.%d.%d.%d", ucAddress[0], ucAddress[1], ucAddress[2], ucAddress[3]); } } } WSACleanup(); }
Kategorien
-
Neueste Beiträge
- [ABAP] Dokumente per URL im Document Viewer anzeigen
- [ABAP] Systeminformationen anzeigen
- [ABAP] XML-Editor in der SAPGUI anzeigen, XML-Daten editieren
- [ABAP] QR-Codes als Bitmap erzeugen
- [ABAP] Code128-Barcode als Bitmap erzeugen
- [ABAP] Mehrere interne Tabellen in eigenem Fullscreen-Fenster (cl_gui_dialogbox_container) anzeigen
- [ABAP] SALV: Eventhandler für Auswahl einer Zeile (Row) bzw. Spalte (Col)
- [ABAP] Höhe einer Dynpro-Zeile bzw. Breite einer Dynpro-Spalte in Pixeln ausgeben
- [ABAP] Statusinformationen des ICMAN lesen
- [ABAP] SAP-ShortCode-Datei (*.sap) erzeugen