Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.
Options

Entrypoint DirectX Template

lukaswerzlukaswerz
edited February 2017 in Questions And Answers

I try to understand the holographic DirectX project.

For that I created the project as described in the link.

Under the Holographic app entry point section is written that the "app starts in the main function in AppView.cpp. The main function creates the app's IFrameworkView and starts the CoreApplication with it."

// The main function is only used to initialize our IFrameworkView class.
// Under most circumstances, you should not need to modify this function.
[Platform::MTAThread]
int main(Platform::Array<Platform::String^>^)
{
    AppViewSource^ appViewSource = ref new ::AppViewSource();
    CoreApplication::Run(appViewSource);
    return 0;
}

My created project has this entry point function in the class Programm.cs

    /// <summary>
    /// Defines the entry point of the application.
    /// </summary>
    [MTAThread]
    private static void Main()
    {
        AbstractHolographicMain main = new HolographicApp01Main();
        var exclusiveViewApplicationSource = new AppViewSource(main);
        CoreApplication.Run(exclusiveViewApplicationSource);
    }

In the Package.appxmanifest the entry is point defined as:
<Application .... EntryPoint="HolographicApp01.AppView">

The program runs perfectly, but I don`t get the point how the entry point is handled.
Can anybody please explain me this behavior? Thanks Lukas

Edit:
Class UML

Answers

  • Options
    AmerAmerAmerAmer ✭✭✭
    edited February 2017
    I'll take a look at mine but I believe you have to have iframeworkview interface extended by your class. It looks for the class that extends it as a starting point. For the fun of it, comment out the iframeworkview interface extension in your class and see what happens.

    http://www.redsprocketstudio.com/
    Developer | Check out my new project blog

  • Options

    The Package manifest tells the engine which App or AppView class the WinRT engine needs to instantiate using the ClassActivationFactory. Basically this is the "activatable class ID such as "Office.Winword.Class". Remember WinRT is a modern COM, so when your apps get created there is a Factory that looks up the registration of your class using an "ID". Unlike older COM the ID was a GUID, in modern COM (WinRT) the ID is a string representing your class.

    You can find more information about it here

    Dwight Goins
    CAO & Founder| Independent Architect | Trainer and Consultant | Sr. Enterprise Architect
    MVP | MCT | MCSD | MCPD | SharePoint TS | MS Virtual TS |Windows 8 App Store Developer | Linux Gentoo Geek | Raspberry Pi Owner | Micro .Net Developer | Kinect For Windows Device Developer
    http://dgoins.wordpress.com

  • Options

    @Dwight_Goins_EE_MVP @AmerAmer
    Thank you both to answer my question! I understand now much better what happens.

    AmerAmer, if I remove the Interface IFrameworkView, the solution can not compile because CoreApplication.Run(exclusiveViewApplicationSource); needs an interface implementing class.

Sign In or Register to comment.