Skip to content
This repository was archived by the owner on Mar 30, 2019. It is now read-only.
This repository was archived by the owner on Mar 30, 2019. It is now read-only.

Function mapping guideline question #1115

Open
@battlebottle

Description

@battlebottle

Some function Create* functions are mapped with a MyType CreateMyType() pattern, and others are mapped to something like void CreateMyType(out MyType). Are there any general rules to follow in deciding which should be used?

I'm looking at cleaning up and submitting some fixed I've made in MediaFoundation specifically. In mapping-core.xml there's an example for DXGIDeviceManager like this:

<map param="MFCreateDXGIDeviceManager::ppDeviceManager" attribute="out fast"/>

and then there's this for SinkWriter:

<map param="MFCreateSinkWriterFromURL::ppSinkWriter" return="true"/>

Is there any reason in particular these should be different? My intuition would be that creating these rarely created objects, that would generally not be made every frame for example would be better off using the MyType CreateMyType() pattern. I'm interested in any insights here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions