Source code of Windows XP (NT5)
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.

65 lines
1.2 KiB

  1. #include "precomp.h"
  2. #include "atlbase.h"
  3. #include "resource.h"
  4. #include "clcnflnk.hpp"
  5. #include "launstub.h"
  6. #define DISPLAYNAME_STRING _T( "+displayName=" )
  7. void WINAPI NewMediaPhone( HWND hwndParent,
  8. HINSTANCE hinst,
  9. PSTR pszCmdLine,
  10. int nShowCmd)
  11. {
  12. CULSLaunch_Stub MyLaunchStub;
  13. ULS_HTTP_RESP br;
  14. if(SUCCEEDED(MyLaunchStub.ParseUlsHttpRespFile(pszCmdLine, &br)))
  15. {
  16. long l = lstrlen( br.szIPAddress ) + 1; // We will always have an IP address
  17. if(br.pszUID)
  18. {
  19. l += lstrlen(DISPLAYNAME_STRING);
  20. l += lstrlen(br.pszUID);
  21. }
  22. LPTSTR sz = new TCHAR[l];
  23. if( sz != NULL )
  24. {
  25. lstrcpy( sz, br.szIPAddress );
  26. if(br.pszUID)
  27. {
  28. lstrcat( sz, DISPLAYNAME_STRING );
  29. lstrcat( sz, br.pszUID );
  30. }
  31. shellCallto(sz, true);
  32. delete [] sz;
  33. }
  34. MyLaunchStub.FreeUlsHttpResp(&br);
  35. }
  36. }
  37. //--------------------------------------------------------------------------//
  38. // CallToProtocolHandler. //
  39. //--------------------------------------------------------------------------//
  40. extern "C"
  41. void
  42. WINAPI
  43. CallToProtocolHandler
  44. (
  45. HWND ,//parent,
  46. HINSTANCE ,//instance,
  47. PSTR commandLine,
  48. int //cmdShow
  49. ){
  50. shellCallto( commandLine, true );
  51. } // End of CallToProtocolHandler.