/* This little C program is using the SAP */ /* automation GUI interface to implement */ /* an automatic login feature. From release */ /* 3.1H SAP remouved it's similar function */ /* (slg_dll.exe, saplogin.exe), because of */ /* of security considerations. This program */ /* has a hardcoded password!! It would be */ /* adviseable to implement some encripting */ /* instead. */ #include#include #include "guilib.h" int putt (char *strControlName); int LogOff (HANDLE hHandle); void main() { char Hostname[50]; char SystemID[5]; char Client[5]; char User[20]; char Passwd[20]; char Language[5]; HANDLE hHandle; PIT_EVENT pEvt = 0; strcpy (Hostname,"hostname"); strcpy (SystemID,"00"); strcpy (Client,"100"); strcpy (User,"UNAME"); strcpy (Passwd,"PASSWD"); strcpy (Language,"E"); hHandle = It_NewConnection(Hostname, SystemID, SAPGUI_FRONT); It_Login (hHandle, Client, User, Passwd, Language ); while ( It_GetEvent(hHandle, &pEvt) ) {} }