UPnP Control Point API in WinRT

Is there a UPNP Control Point API in WinRT?  I'm looking for something similar to the API defined here: http://msdn.microsoft.com/en-us/library/windows/desktop/aa381122(v=vs.85).aspx
I'm aware of the WinRT APIs in the Windows.Devices.Enumeration and Windows.Devices.Enumeration.Pnp namespaces.  But I can't seem to find a way to invoke UPnP
actions or even discover the devices network name through the DeviceInformation or PnpObject APIs.

There is no UPnP APIs in WinRT. If your UPnP device supports PNP-X then you can discover and pair your device using metro device settings UI. Once the device is paired, you can enumerate your device and
retrieve the device properties such as ServiceControlUrl, ServiceDescriptionUrl, ServiceEventSubscriptionUrl and IP address. Check the sample code snippet below. Once you get these properties you could use SOAP messages to interact with the device. (Note,
there are DLNA APIs
in WinRT, and we recommend using DLAN APIs to interact with DLNA devices such as DMRs and DMSs.)
Regarding UDP multicast port 1900, your application should be able to open it for shared access.
// C# sample code:
// Use SHA1 (version 5 GUID using RFC 4122 -
http://tools.ietf.org/html/rfc4122#section-4.3) to generate Device Interface Class UUID from UPnP device service type
// For Example:
//      For sample UPnP dimmer Device Service Types: "urn:microsoft-com:service:DimmerService:1"
//      the RFC 4122 algorithm produces the class 5 GUID: "{bb66ac6e-4e59-58dc-bafa-ce6af7e50cfc}"
using Windows.Devices.Enumeration;
using Windows.Devices.Enumeration.Pnp;           
// Use the Device Interface Class UUID to get the UPnP device Interface object
// Set the AQS (Advanced Query Syntax) Filter for this query
var selector = "System.Devices.InterfaceClassGuid:=\"" + "{bb66ac6e-4e59-58dc-bafa-ce6af7e50cfc}" + "\"";
// PKEY_PNPX_ServiceDescUrl = "{656A3BB3-ECC0-43FD-8477-4AE0404A96CD},16389"
string serviceDescriptionUrlProperty = "{656A3BB3-ECC0-43FD-8477-4AE0404A96CD},16389";
// PKEY_PNPX_ServiceEventSubUrl = "{656A3BB3-ECC0-43FD-8477-4AE0404A96CD},16390"
string serviceEventSubscriptionUrlProperty = "{656A3BB3-ECC0-43FD-8477-4AE0404A96CD},16390";
// Create Interface properties to read from the interface object
string[] interfaceProperties = { "System.Devices.ServiceAddress", "System.Devices.ServiceId", "System.Devices.DeviceInstanceId", serviceDescriptionUrlProperty, serviceEventSubscriptionUrlProperty };
var interfaceObject = await DeviceInformation.FindAllAsync(selector, interfaceProperties);
// Service Control Url
string[] serviceControlUrlArray = (string[])interfaceObject[0].Properties["System.Devices.ServiceAddress"];
string serviceControlUrl = serviceControlUrlArray[0];
// Service Description Url
var serviceDescriptionUrl = interfaceObject[0].Properties[serviceDescriptionUrlProperty];
// Service Event Subscription Url
var serviceEventSubscriptionUrl = interfaceObject[0].Properties[serviceEventSubscriptionUrlProperty];
// Service ID Property
var serviceId = interfaceObject[0].Properties["System.Devices.ServiceId"];
// Use Interface object and DeviceInstanceId to get the Device Object
// Create a Device properties
string[] deviceProperties = { "System.Devices.IpAddress"};
// Device Instance ID
string deviceInstanceId = (string)interfaceObject[0].Properties["System.Devices.DeviceInstanceId"];
var deviceObject = await PnpObject.CreateFromIdAsync(PnpObjectType.Device, deviceInstanceId, deviceProperties);
// IP Address
string[] ipAddressArray = (string[])deviceObject.Properties["System.Devices.IpAddress"];
string ipAddress = ipAddressArray[0];
OutputText.Text = "Service Control Url: " + serviceControlUrl + "\rService Description Url: " + serviceDescriptionUrl + "\rService Event Subscription Url: " + serviceEventSubscriptionUrl + "\rService ID: " + serviceId + "\rIP Address: " + ipAddress;

Similar Messages

  • How do I move all of the control points at the same time at the Path Text preset?

    I'm doing motion typography, I used the Bezier Shape Type, it has 4 control points, I saved the custom preset I made, but the problem is, is it possible to move them at the same time? I'm animating per letter to form a word.
    Additional Question: Is it possible to add more control points? If then, how?
    Thanks in advanced.

    Double-click the path shape to invoke the transform box. Read up on how to use the path tools to insert and modify points.
    Mylenium

  • Deactivate the "Control Point # X,Y" labels in Motion 3?

    Is there away to turn off the overlay labels that pop up when you're animating mask and shape control points? They're obstructing my view obscenely.
    I can't figure out how to turn them off. There's not an option to deselect them in the View -> Overlay menu.

    Is there away to turn off the overlay labels that pop up when you're animating mask and shape control points? They're obstructing my view obscenely.
    I can't figure out how to turn them off. There's not an option to deselect them in the View -> Overlay menu.

  • Disable extra control points when selecting objects

    The new control points that Illustrator has when selecting an object (in addition to the regular handles), how do I disable or hide them? I am working on artwork with many small pieces and these are REALLY getting in the way of moving and adjusting them. Looked through preferences and don't see a way to do it (for that matter, what are these annoying things called?)

    View > Hide corner widgets

  • Using more than 2 control points in Interpolater.Spline

    Hello,
    what I'm working on is a bouncing ball, I figured it might work controlling the interpolator to create a multiple control points using the spline. ( a function with x ^n^ , where n is the number of control points)
    In a spline I can use only two control points, is there a way to make it use more than that, or do i have to use another way.
    Thanks for all help.
    Edited by: A.m.z on May 9, 2013 1:49 AM
    Edited by: A.m.z on May 9, 2013 1:49 AM

    Well, I guess it wasn't so hard - at least when there are libraries written by others to borrow from . . .
    This interpolator requires the apache commons math 3.2 lib - you can download commons-math3-3.2-bin.zip from here:
    http://commons.apache.org/proper/commons-math/download_math.cgi
    Extract commons-math3-3.2.jar from the zip and put it on your class path.
    This interpolator differs a little from the Interpolator.SPLINE interpolator that comes with JavaFX.
    Instead of control points which bend the curve but do not lie on the curve, the interpolator takes a set of points and plots a curve of best fit directly through the points.
    import javafx.animation.Interpolator;
    import org.apache.commons.math3.analysis.interpolation.SplineInterpolator;
    import org.apache.commons.math3.analysis.polynomials.PolynomialSplineFunction;
    public class BestFitSplineInterpolator extends Interpolator {
      final PolynomialSplineFunction f;
      BestFitSplineInterpolator(double[] x, double[] y) {
        f = new SplineInterpolator().interpolate(x, y);
      @Override protected double curve(double t) {
        return f.value(t);
    }Here is an example usage:
    import javafx.animation.*;
    import javafx.application.Application;
    import javafx.scene.* ;
    import javafx.scene.paint.*;
    import javafx.scene.shape.*;
    import javafx.stage.Stage;
    import javafx.util.Duration;
    public class BestFitSplineDemo extends Application {
      private static final Duration CYCLE_TIME = Duration.seconds(7);
      private static final int PLOT_SIZE = 500;
      private static final int N_SEGS    = PLOT_SIZE / 10;
      public void start(Stage stage) {
        Path path = new Path();
        path.setStroke(Color.DARKGREEN);
        final Interpolator pathInterpolator = new BestFitSplineInterpolator(
          new double[] { 0.0, 0.25, 0.5, 0.75, 1.0 },
          new double[] { 0.0, 0.5,  0.3, 0.8,  0.0 }
        // interpolated spline function plot.
        plotSpline(path, pathInterpolator, true);
        // animated dot moving along the plot according to a distance over time function.
        final Interpolator timeVsDistanceInterpolator = new BestFitSplineInterpolator(
            new double[] { 0.0, 0.25, 0.5, 0.75, 1.0 },
            new double[] { 0.0, 0.1,  0.4, 0.85, 1.0 }
        Circle dot = new Circle(5, Color.GREENYELLOW);
        PathTransition transition = new PathTransition(CYCLE_TIME, path, dot);
        transition.setInterpolator(timeVsDistanceInterpolator);
        transition.setAutoReverse(true);
        transition.setCycleCount(PathTransition.INDEFINITE);
        transition.play();
        // show a light grey path representing the distance over time.
        Path timeVsDistancePath = new Path();
        timeVsDistancePath.setStroke(Color.DIMGRAY.darker());
        timeVsDistancePath.getStrokeDashArray().setAll(15d, 10d, 5d, 10d);
        plotSpline(timeVsDistancePath, timeVsDistanceInterpolator, true);
        stage.setScene(
          new Scene(
            new Group(
              timeVsDistancePath,
              path,
              dot
            Color.rgb(35,39,50)
        stage.show();
      // plots an interpolated curve in segments along a path
      // if invert is true then y=0 will be in the bottom left, otherwise it is in the top right
      private void plotSpline(Path path, Interpolator pathInterpolator, boolean invert) {
        final double y0 = pathInterpolator.interpolate(0, PLOT_SIZE, 0);
        path.getElements().addAll(
          new MoveTo(0, invert ? PLOT_SIZE - y0 : y0)
        for (int i = 0; i < N_SEGS; i++) {
          final double frac = (i + 1.0) / N_SEGS;
          final double x = frac * PLOT_SIZE;
          final double y = pathInterpolator.interpolate(0, PLOT_SIZE, frac);
          path.getElements().add(new LineTo(x, invert ? PLOT_SIZE - y : y));
      public static void main(String[] args) { launch(args); }
    }Edited by: jsmith on May 11, 2013 5:58 AM

  • Lasso tool control point with delete keyboard shortcut in PS CC

    Hello,
    I can not remove lasso tool control point with delete keyboard shortcut in PS cc. please help

    it's a bug, view this thread
    http://forums.adobe.com/message/6027062#6027062

  • How to convert an anchor point to have a single control point...

    Can anyone tell me if it is possible to convert an existing anchor point on a path from a dual control point with directional handles either side of the point to a single control point with one directional handle?
    In Illustrator this is easy, all you do is drag one directional handle into the anchor point and it deletes that handle leaving just the other handle to control the shape.
    In Photoshop this appears to be much harder to achieve as dragging the handle into the anchor point doesn't work and no matter what combination of keyboard shortcuts I've tried I'm not able to get rid of just one of the handles.
    I am able to achieve what I want by splitting the path then Alt clicking on the end point of the path but this strikes me as being really clumsy compared to Illustrator's perfect solution. Even InDesign works better, as you just Alt Click on the directional handle once and it deletes it.
    What seems totally bewildering is why all these pieces of software (made by the same people) work differently?

    Yes it seems your suggestion to drag the directional point so that it sits directly on top of the anchor point is the best one can do. It doesn't actually delete the direction point like it does in AI merely makes the direction point so small it doesn't actually do anything. Not ideal really.
    Maybe all the separate development teams should meet up for a coffee some time and just iron out all these indifferences, I reckon they could get it done in an afternoon, I'd be happy to write them a list. And don't even get me started on how the Workspaces differ from app to app!

  • Annoying pop-up window whenever I try to move control points ...

    So I'm animating a mask ... and whenever I try to adjust a control point, a little transparent pop-up window appears and tells me what coordinates/values I'm moving the point to.
    This is great and all, but all too often, that little window obscures the area that I need to see in order to make an accurate mask.
    Is there any way to turn that off?
    Thanks!

    I've tried unsuccessfully to turn that off for months. It doesn't seem to respond to any of the "overlays", so I'm going to say that it's NOT possible to turn it off.
    I've had the same problem. My only workaround is to zoom in closer to the subject of the mask so it's not obscuring too much. (CMD+/-)
    Andy

  • Pen tool control points too small

    Is there any way to make it easier to select control points for the pen tool? It's really frustrating trying to edit paths since I keep missing the control point which deselects the whole path.
    Ideally I'd like to be able to increase the size of the control points themselves, but alternatively is there a 'snap to control point' option or something so I don't have to precisely click on a 1x1 pixel dot? It'd even be good if the size of the control points increase as I zoom in, but I can't see how to do that either. I'm using CS3.
    Thanks,
    Sam

    Sam,
    View>Smart Guides may be your friends: they tell you where you are.

  • Making a 3D path (or how do i get Zdepth on a control point?)

    I'm sure this is either really simple or totally impossible:
    I want to draw a path, that has 4 control points. Control point #2 forms a 90degree angle between points 1 and 3 (no problem here).
    However I'd like to have Control point #4 "above" control point 3. I don't see a control for Z depth in Geometry panel, and if i try to edit it manually, all i get is the pen tool with a slash through it.
    Can this be done and if so, how?
    Thx

    If you are using one of the shape tools, they only have 2 dimensions for each control point.
    However, you can create a 3D path with the motion path behavior - just depends on what you are trying to accomplish.

  • Too Many Control Points

    When I use the Paint Stroke Tool to create a line I get over 300 control points. Is there a way to decrease the number of points written. I couldn't find the topic in the manual. I also checked Preferences to see if it could be changed there too. Any thoughts?

    Thanks. That approach works well. I was previously watching an online tutorial that uses a 'write-on' technique and the author use the brush and it made very few points.
    http://web.mac.com/andy.neil/iWeb/Timesaver%20Tutorials/Motion%20Blog/E59D5E33-0 BA5-4D92-874C-8A08F7F428AE.html

  • Baseline control points

    The manual says you can add an unlimited amount of control points to a baseline, I can only have 16 including end points, what am I missing.

    The endpoints are used to make shapes that the text moves along and if you're creating a slide (like a children's slide) then you can do this with just a few points and maybe add a couple bezier handles for a less angular feel.
    I can't visualize the need for all the points, but maybe you see a reason for them.
    And no, you can't join the duplicated tracks but there are other creative approaches you could use. It's hard to know what you're after and what approach I would suggest without being over your shoulder.

  • How will Aperture treat Nikon raw images which have been enhanced using Capture NX2 software?  Some are cropped and "developed" and some have been enhanced using the control point technology.  I have NIK sw as a plug-in in aperture.

    How will Aperture treat Nikon raw images which have been enhanced using Capture NX2 software?  Some are cropped and "developed" and some have been enhanced using the control point technology.  I have NIK sw as a plug-in in aperture.

    Actually, there is a Nik/Nikon connection — but I am pretty sure it is irrelevant to the OP's question. The connection is that Capture NX2 was written as a joint venture between Nikon and Nik. (The name similarity is a coincidence.)
    Capture NX2 is a cool program that incorporates the features of Nik's Viveza and Nikon's Raw processing engine, along with some other powerful image adjustment features. It provides, like Aperture, a losses workflow. Unlike Aperture, the adjustments (Edit Steps in C-NX terminology) are saved in the original NEF file along with the un-altered raw data. Multiple versions can be saved in a single NEF.

  • Vector lines and control points stay onscreen

    Photoshop CS6 64bit WIndows 7 64 Bit.
    Using pen tool to create a mask.
    After de-selection of path (using pointer tool, paintbrush or anything else) the vector line including the control points does not disappear as normal.
    Deleting the layer removes it, but changing the visibility of the layer does not have any effect - it simply stays onscreen.
    Radeon HD4850 card with latest drivers.

    Photoshop CS6 64bit WIndows 7 64 Bit.
    Using pen tool to create a mask.
    After de-selection of path (using pointer tool, paintbrush or anything else) the vector line including the control points does not disappear as normal.
    Deleting the layer removes it, but changing the visibility of the layer does not have any effect - it simply stays onscreen.
    Radeon HD4850 card with latest drivers.

  • 3D curve and control points

    Hello All-
    I'm sure this is an easy answer; just can't seem to figure it out. I've drawn out a curve with a few control points. All I want to do is adjust the control point so the curve is 3D. Each point should have an X,Y and Z value. But when I switch to 3D the points only retain the X and Y. I am not able to move the points in any view other than the one I drew the path in.
    What's up with that? Am I missing something or ...
    And why can't I see the curve in the viewport unless I have Adjust Control Points or Adjust Item Tool active. Shouldn't a curve (shape) inside a group be visible at all times?
    What I want to is create curves that will go around an object and I can attach a brushstroke to the curve. Can I do that some how?

    Curves drawn with the shape tools, as you have discovered, are 2-D: the control points only have X and Y coordinates. They can live in 3D space, but they live on a plane.
    One fix is to instead use a motion path behavior - its control points can be manipulated in x, y, and z.
    There is another fix using a replicator and a frozen sequence replicator behavior, but it all depends on what you are trying to do.

Maybe you are looking for

  • I'm setting up HP office jet Pro 85000 A909n, wireless radio not functioning.

    I/m using Window 7 and have printer connected to my desk top. Now I wish to print for my lap top to the printer and can not get the connection, when I run the test I get: wireless on                    Pass wireless working          Fail Messasge: th

  • Network Drives Missing

    Mapping drives on boot up VBS logon script mapping drives via the DFS name Only appears to affect laptops All laptop have offline files for their U drive Some laptops have hotfix KB2705233 installed, however  this did work with x86 version of windows

  • How does one set up remote access via the internet to access files stored on the Time Capsule using airport utility 6.1

    I was just wondering if anyone can provide me with instructions please on how to set up remote access via the internet to the time capsule when away from home? I am running OS X Mountain Lion operating system and have Airport Utility 6.1. Many thanks

  • Function Module to read xml

    Hi  All, How SAP reads a xml file ? Any function module , or code that can read xml file . Please let me know . Thanks

  • SHD0 and TCODE PC00_M10_CLJN

    Hi, I read the "how to" on creating a transaction variant from the link below. http://wiki.sdn.sap.com/wiki/display/Snippets/Transaction%20Variant%20-%20A%20Step%20by%20Step%20Guide%20for%20Creation I'm having some issues in step 2. I'm not getting a