Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
1.8 KiB

  1. //****************************************************************************
  2. //
  3. // Module: ISIGNUP.EXE
  4. // File: isignupx.c
  5. // Content: This is the "main" file for the internet signup "wizard".
  6. // History:
  7. // Sat 10-Mar-1996 23:50:40 -by- Mark MacLin [mmaclin]
  8. //
  9. // Copyright (c) Microsoft Corporation 1991-1996
  10. //
  11. //****************************************************************************
  12. #include "isignup.h"
  13. #ifndef EXPORT
  14. #ifdef WIN32
  15. #define EXPORT
  16. #else
  17. #define EXPORT _export
  18. #endif
  19. #endif
  20. typedef int (WINAPI * SIGNUP)
  21. (HANDLE hInstance, HANDLE hPrevInstance,
  22. LPTSTR lpszCmdLine, int nCmdShow);
  23. CHAR szSignup[] = "Signup";
  24. #ifdef WIN32
  25. TCHAR szSignupDll[] = TEXT("isign32.dll");
  26. #else
  27. char szSignupDll[] = "isign16.dll";
  28. #endif
  29. int EXPORT WINAPI Signup(HANDLE hInstance, HANDLE hPrevInstance,
  30. LPTSTR lpszCmdLine, int nCmdShow);
  31. int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
  32. LPSTR lpszCmdLine, int nCmdShow)
  33. {
  34. HINSTANCE hLib;
  35. SIGNUP lpfnSignup;
  36. int iRet = 0;
  37. #ifdef UNICODE
  38. // Initialize the C runtime locale to the system locale.
  39. setlocale(LC_ALL, "");
  40. #endif
  41. hLib = LoadLibrary(szSignupDll);
  42. if (NULL != hLib)
  43. {
  44. lpfnSignup = (SIGNUP)GetProcAddress(hLib, szSignup);
  45. if (NULL != lpfnSignup)
  46. {
  47. #ifdef UNICODE
  48. TCHAR szCmdLineTmp[256];
  49. if(lpszCmdLine)
  50. mbstowcs(szCmdLineTmp, lpszCmdLine, 256);
  51. iRet = lpfnSignup(hInstance, hPrevInstance, szCmdLineTmp, nCmdShow);
  52. #else
  53. iRet = lpfnSignup(hInstance, hPrevInstance, lpszCmdLine, nCmdShow);
  54. #endif
  55. }
  56. FreeLibrary(hLib);
  57. }
  58. return iRet;
  59. }