How can I consume a c# windows runtime component in a WRL (C++) class?

I would like to instantiate a class of a C# windows runtime project, from a WRL project.
In order to make the C# class I have created a WRL project to generate an interface for it to implement. This has worked, but I would rather do it all in the one C# project. I don't know how to do this, and I also don't know how to finally consume the C#
project (and the resulting .winmd file) from a Wrl project. 

You're right; I'll post back here.
Edit: I asked over here:
https://social.msdn.microsoft.com/Forums/windowsapps/en-US/53a77d09-01b1-4039-8ad3-207b47b08775/how-can-i-consume-a-c-windows-runtime-component-in-a-wrl-c-class?forum=winappswithnativecode#53a77d09-01b1-4039-8ad3-207b47b08775

Similar Messages

  • How to use multi async method in Windows Runtime Component (C#)

    I want to migrate an async method into Windows Runtime Component.
    CookieContainer cc = await utility.GetCookieContainer();
    But the content of async method still contains async methods.
    public async Task<CookieContainer> GetCookieContainer()
    if (stsAuthToken != null)
    if (DateTime.Now > stsAuthToken.Expires)
    this.stsAuthToken = await GetMsoStsSAMLToken();
    AuthCookies cookies = await GetAuthCookies(this.stsAuthToken);
    CookieContainer cc = new CookieContainer();
    Cookie samlAuthCookie = new Cookie("FedAuth", cookies.FedAuth)
    Path = "/",
    Expires = this.stsAuthToken.Expires,
    Secure = cookies.Host.Scheme.Equals("https"),
    HttpOnly = true,
    Domain = cookies.Host.Host
    cc.Add(this.spSiteUrl, samlAuthCookie);
    Cookie rtFACookie = new Cookie("rtFA", cookies.RtFA)
    Path = "/",
    Expires = this.stsAuthToken.Expires,
    Secure = cookies.Host.Scheme.Equals("https"),
    HttpOnly = true,
    Domain = cookies.Host.Host
    cc.Add(this.spSiteUrl, rtFACookie);
    this.cookieContainer = cc;
    And even GetMsoStsSAMLToken and GetAuthCookies contain async methods...
    How to migrate it?

    Hi Matt,
    I'm sorry for my unclear description.
    My WinRT Component is for Javascript. If I use folloiong codes, error occurs.
    public static async Task<bool> GetInternal(string url, string username, string password)
    bool r = await AuthUtility.Create(new Uri(url), username, password);
    return r;
    The error is
    SharePointWindowsRuntimeComponent.Common.GetInternal(System.String, System.String, System.String)' has a parameter of type 'System.Threading.Tasks.Task<System.Boolean>' in its signature. Although this generic type is not a valid Windows Runtime type,
    the type or its generic parameters implement interfaces that are valid Windows Runtime types.  Consider changing the type 'Task' in the method signature to one of the following types instead: Windows.Foundation.IAsyncAction, Windows.Foundation.IAsyncOperation,
    or one of the other Windows Runtime async interfaces. The standard .NET awaiter pattern also applies when consuming Windows Runtime async interfaces. Please see System.Runtime.InteropServices.WindowsRuntime.AsyncInfo for more information about converting managed
    task objects to Windows Runtime async interfaces.
    Some articles said, Task<T> is not WinRT type and should be converted to IAsyncOperation<T>. Only stirng, int, bool, object, array of above types and some 'simple' type can be used. (The
    related article)
    Then I try to convert Task<bool>, but the codes don't work.
    Above is why I ask this question.
    If async method can be used in WinRT component directly, please let me know why I got above error.
    Thanks.

  • HOW CAN I FIX Microsoft Visual c runtime library R6034

    HOW CAN I FIX Microsoft Visual c runtime library R6034

    Uninstall your existing copy of iTunes. Delete any copies of the iTunesSetup.exe (or iTunes64Setup.exe) installer files from your downloads areas for your web browsers and download a fresh copy of the iTunes installer from the Apple website:
    http://www.apple.com/itunes/download/
    (The current build of the 11.1.4.62 installer was changed a few days ago, which fixed the bulk of the reports of MSVCR80.dll/R6034/APSDaemon.exe/Error-7/AMDS-could-not-start trouble ... but the build number on the installer was not changed. So we're trying to make sure you do the reinstall using a "new good" 11.1.4.62 installer instead of an "old bad".)
    Does the install with the new copy of the installer go through properly? If so, does that clear up the error message?
    If you still have the same error messages cropping up, then try the procedures from the following user tip:
    Troubleshooting issues with iTunes for Windows updates

  • How can i get back to windows 8 if i downgrade my laptop to windows 7

    My laptop was been downgrade from windows 8 to windows  7because of graphics not funtioning properly. how can i get back to windows 8 again? is there a recovery disc for this?

    Hi:
    Did you install the correct W7 x64 graphics driver that should work on your model?
    http://h10025.www1.hp.com/ewfrf/wc/softwareDownloadIndex?softwareitem=ob-111285-1&cc=us&dlc=en&lc=en...

  • How can I open a second window in iTunes?

    When I see some albums in the the iTunes Store I want to check whether I have some of the songs already. The Search function in the Store only refers to the store and not to my Library. So how can I open a second window in iTunes (one with the Store and one with my Library) to make it easier to compare?
    Thanks

    My understanding it that was removed from iTunes recently (I still run iTunes 7.5 from 2007), so no, not unless you downgrade iTunes (which is not easy).  You can send feedback to Apple about reinstating it but I have yet to see Apple reinstate something that appeared to have been deliberately removed from its software, despite vociferous complaints on this forum.
    http://www.apple.com/feedback/itunesapp.html

  • How can I have two different windows up on one screen at the same time?

    How can I have to different windows open on my screen at one time? Kind of like a split or shared screen.

    If you want this split screen thingy for a single app, do like captfred suggests or see if the app itself supports some sort of splitting, like MS Excel.
    If you want to do this system-wide, maybe you can get what you want by activating and using Spaces: http://support.apple.com/kb/PH4313

  • How can I move my PC (Windows 7) iTunes library (with my cps ripped) to my Mac iTunes library?

    Just for my curiosity and knowledge,
    I have a PC (Windows 7) and a Mac (OS X 10.10).
    Both of them with the latest version of iTunes.
    Both of them with the exact music library (genre, artist, album, etc).
    All my music is coming from iTunes Store, so very easy to re download at any time I want with my Apple ID
    My PC (Windows 7) computer has a CD/DVD drive. I would like to RIP some music from my CDs and add them to my PC (Windows 7) iTunes library. 
    Once I finished, how can I move my PC (Windows 7) iTunes library (with my cps ripped) to my Mac iTunes library?
    Thank you so much

    If you've downloaded the media idependently to each library so far then thet won't be exactly the same as there are different naming rules for the files and folders in OS X and Windows. See Make a split library portable for some general advice. You can move a portable library between Mac and Windows, but there is a delay opening the library after each change of OS.
    tt2

  • How can i use messages on windows

    im trying to use my imessage on my laptop is there like a software that doesnt require jailbreak to send messages on the laptop?

    ryan10132 wrote:
    how can I use messages on windows
    You can't.

  • How can I switch between multiple windows of the same application (e.g. Safari) over several desktops ?

    Hi All,
    I have one application, for example safari, open and running with multiple windows (with or without tabs) spread over several desktops.
    How can I switch between the windows only via keyboard? CMD+> and CMD+< let me only swicht between windows open on the one desktop I am currently looking at.
    thanks for your replies,
    equi

    Barney,
    many thanks for your efforts and your time (preparing and posting the screenshot, answering to this question,...).
    Unfortunately, moving the focus to the next window only works with windows on the same desktop.
    btw, using a german keyboard layout and german language settings the shortcut is "cmd+<".
    I can switch with this shortcut between different windows of my Safari which reside on the same desktop, but I cannot swith between different safari windows distributed over several desktops.
    Thanks,
    equi    

  • I have hp 430 laptop,how can i re install the windows 7, if i not have original window on my laptop

    I have hp 430 laptop,how can i re install the windows 7, if i not have original windows on my laptop. i have oem number,
    But i have troubol to finishing installation of window.

    Originally the Notebook will have the Recovery Partition and that would give you an option to create a set of Recovery Disk. If you have not created those Recovery Disks when the Notebook was in working condition we cannot do that right now
    As of now if you need to recover your Notebook with the new Operating System you can check if the Recovery Partition is in a working condition or not, If yes you can easily recover/restore your Notebook
    If Recovery Partition is corrupted
    You need to call HP Technical Support and request for a set of Recovery Disks , So you can recover/restore your Notebook at the earliest
    OR
    You need call up Microsoft and purchase an Operating System with the License Key, So you can recover/restore your Notebook at the earliest
    I strongly recommend you to Contact HP Technical Support over the Phone for further assistance without any delay
    Hope this helps, for any further queries reply to the post and feel free to join us again
    **Click the KUDOS star on left to say Thanks**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.
    Thank You,
    K N R K
    Although I am an HP employee, I am speaking for myself and not for HP

  • How can I connect to a windows server from a mac book pro

    How can I connect to a windows server from a mac book pre?

    I have a Dell Power Edge T110 ii in the office that has files and software I need to access when away from the office, when I am on the road I use a mac book pro and an iPad.
    I am sorry if I am being a bit vague but this is all new to me, I have tried 3 IT guys but they can not find a way.
    Any help is greatly appeciated.

  • How can I start a second window of a second profile through the command line?

    I have two profiles set up, 'default' and 'second'. If both are already running how can I start a second window of profile 'second'?
    firefox -p 'second' : opens a new window of the default and,
    firefox -p 'second' -no-remote : tells me that firefox is already running.

    I don't think that this is possible.<br />
    You need to open this second instance (Firefox profile folder) with the -no-remote command line switch and that makes it impossible to open external links via the command line or via a double-click.<br />
    You can only open a link in such an instance by dragging the link on the tab bar of that Firefox window.

  • How can I run 2 Dreamweaver windows at the same time?

    How can I run 2 Dreamweaver windows at the same time on my
    PC?
    basically I have 2 monitors and I want to edit CSS on one
    monitor and have the html page open on the other so I can quickly
    look from one to another with in a split second instead of taking
    that extra time to switch back and forth using the tabs at the top,
    I know I should probably invest into a mac so i can work out side
    of the Dreamweaver application window and I will in the future but
    is there any way i can do this on my windows XP pro PC?
    Thank you
    Maurice

    Open the CSS in DW, and use F10 to open the Code Inspector.
    Place the
    latter as needed.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Random_Yggdrasil" <[email protected]> wrote
    in message
    news:gi2htb$j4j$[email protected]..
    > How can I run 2 Dreamweaver windows at the same time on
    my PC?
    > basically I have 2 monitors and I want to edit CSS on
    one monitor and have
    > the
    > html page open on the other so I can quickly look from
    one to another with
    > in a
    > split second instead of taking that extra time to switch
    back and forth
    > using
    > the tabs at the top, I know I should probably invest
    into a mac so i can
    > work
    > out side of the Dreamweaver application window and I
    will in the future
    > but is
    > there any way i can do this on my windows XP pro PC?
    >
    > Thank you
    > Maurice
    >
    >
    >

  • How can I get rid of windows 8.1 in my new lenovo and get windows 7 put in?

    How can I get rid of Windows 8.1 on my new Lenovo laptop and install Windows 7?

    Hi,
    I'll assume your laptop was upgraded from Windows 7 to Windows 8.1
    1. Start by copying all your personal folders (Documents, Pictures, Music, Videos, Favourites, local databases,
    hosts files, etc) into an external disk, DVD, tape, whatever.
    2. If I were you, I wouldn't use Windows 8.1 backup tool, I'm not sure Windows 7 Restore applet will be able
    to read a Windows 8.1 backup.
    3. Check that you have all the necessary licenses, CDs and executables to reinstall your former Windows 7
    applications, components, browsers, plugins, Java, .NET Frameworks, etc. Be aware that some applications require
    to keep same hostname and/or same IP and/or or same local username (or all of them) as they were on the original
    Windows 7 machine.
    4. Check that you have your Windows 7 CD and license handy.
    5. Do you have a Windows 7 image backup of your laptop (prior to the Windows 8 upgrade)?
    5.a Yes? Then restore that image and restore your personal folders on top. You might need to
    install or reinstall some of the applications I mentioned on #3
    5.b No? You'll have to format your laptop, install Windows 7 from scratch, create your local
    user with administrative rights, install SP1, install necessary updates, reinstall all your
    applications and finally restore your personal folders.
    Sebastian Sajaroff Senior DBA Pharmacies Jean Coutu

  • When I open a file in Photoshop CS4, how can I resize My Open Window File?it is stuck on full screen

    When I Open a File in Photoshop CS4, How can I Resize My Open Window File? It is stuck on Full Screen?

    Which operating system are you using?
    On a windows os, usually one can just double click on the title bar in the open dialog.

Maybe you are looking for

  • ITunes 7.1.1 stops responding after several hours

    My Intel iMac is Wifi connected to the Internet. I like to listen to iTunes(Radio-Jazz Genre) and I have iTunes sending music to my downstairs stereo via AirTunes to an AirPort Express. I will be downstairs reading or cooking and notice that the musi

  • External hard drive not showing up on my iMac

    I am pretty new to the world of Mac but am trying to get used to it. Just bought a iMac desk top and tried connecting my external hard drive via USB to get my photos etc off so i can play with them on iphoto but i dont see it anywhere? Kids have plug

  • My External Hard Drive is NOT opening!!!

    I have an external hard drive (my book) by WD.... When I plugged it in today it did not open and reported this error: Catalog file entry not found for extent The volume could not be verified completely ERROR: This disk needs to be repaired. Click Rep

  • Table name for ( ECR )

    Dear Guru's can u provide me table name where i can get object no.  for the corresponding change number. ( ECR no. ) . I want to check the status of change number by puting the object no. in Table " Jest ". Status means ECR release, ECO release etc.

  • T-bird is stuck on a msg in my main email account. I keep getting that msg over and over again even though it says there are 200+ msg waiting to be received.

    I have t-bird installed on both my desktop and laptop. The laptop is working fine. They were both running 24.6.0 until I updated the version on my desktop today after the problem occurred to 31.1.2. It still doesn't work. I keep getting the same mess