Skip to content

More C++/WinRT hardening and now with tests!#234

Merged
kennykerr merged 3 commits into
masterfrom
kennykerr-bad-tests
Mar 21, 2019
Merged

More C++/WinRT hardening and now with tests!#234
kennykerr merged 3 commits into
masterfrom
kennykerr-bad-tests

Conversation

@kennykerr

Copy link
Copy Markdown
Contributor

I've added some tests for bad implementations.

Once things settle down I'll add some diagnostics to help pinpoint (blame) bad implementations.

@Scottj1s

Copy link
Copy Markdown
Member

Given the confusion over whether failed calls should initialize out params, here's the definitive statement (yes):
All out pointer parameters must explicitly be set to NULL. These are usually passed in a pointer-to-pointer parameter but can also be passed as members of a structure that the caller allocates and the called code fills. The most straightforward way to ensure this is (in part) to set these values to NULL on function entry. This rule is important because it promotes more robust application interoperability.
https://docs.microsoft.com/en-us/windows/desktop/com/memory-management-rules

@kennykerr kennykerr merged commit b0ddb65 into master Mar 21, 2019
@kennykerr kennykerr deleted the kennykerr-bad-tests branch March 21, 2019 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants