Windows.Networking.EndpointPair constructor parameters

Posted by ComFreek on Stack Overflow See other posts from Stack Overflow or by ComFreek
Published on 2012-09-04T12:20:09Z Indexed on 2012/09/04 15:39 UTC
Read the original article Hit count: 384

I want to create a new EndpointPair object:

// hostname is a string
// port is an integer

var endpointPair = new Windows.Networking.EndpointPair(null, null, hostname, port);

But I always get this error:

0x800a000d - JavaScript runtime error: Type mismatch

I've already tried the following:

  • converting port to a string
  • passing "" instead of null for the first two Parameters. (null should be okay if the documentation here, under the section Remarks, is right)
  • passing no Parameters, but that ends up in an "too few parameters" error message

Above all, the documentation about the constructor has been removed (as of September 4, 2012): http://msdn.microsoft.com/en-us/library/windows/apps/windows.networking.endpointpair.endpointpair.aspx

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about windows-8