/*-------------------------------------------------------------- migutilstest.c --------------------------------------------------------------*/ #include #include #include "migutilslib.h" #define MAXBUFFCHARS 3000 int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow) { char buff[MAXBUFFCHARS] ; char buffstat[128]; DWORD chars =0; chars = GetAllEnvars(buff, MAXBUFFCHARS) ; if(chars>=MAXBUFFCHARS){ sprintf(buffstat, "Buffer too small to hold all environment variables\ \n(Buffer size required >= %u)", chars); MessageBox (NULL, TEXT (buffstat), TEXT("Environment Variables - M. Gallant 2002"), MB_ICONHAND) ; } else MessageBox (NULL, TEXT (buff), TEXT("Environment Variables - M. Gallant 2002"), MB_ICONINFORMATION) ; return 0 ; }