Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement avrt with regard to #316 #348

Merged
merged 3 commits into from
Jan 15, 2017
Merged

implement avrt with regard to #316 #348

merged 3 commits into from
Jan 15, 2017

Conversation

k-brac
Copy link
Contributor

@k-brac k-brac commented Dec 2, 2016

I am creating a new pull request in order to conform avrt to #316 (hopefully)

extern crate winapi;
use winapi::*;

extern "system" {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These functions really should be defined in src/um/avrt.rs.

use um::winnt::LONGLONG;

ENUM_NEG!{enum AVRT_PRIORITY {
AVRT_PRIORITY_VERYLOW = -2,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather this be written as -2i32 as u32 and just using ENUM! instead of creating a new macro.


pub const THREAD_ORDER_GROUP_INFINITE_TIMEOUT: LONGLONG = -1;

FN!(stdcall AvSetMmThreadCharacteristicsA(TaskName: LPCSTR,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FN! is the wrong macro to use. You should be using EXTERN! here. Also the indentation is wrong.
https://github.com/retep998/winapi-rs/blob/dev/CONTRIBUTING.md#functions

@retep998 retep998 merged commit 7b05181 into retep998:dev Jan 15, 2017
@k-brac k-brac mentioned this pull request Jan 17, 2017
@k-brac k-brac deleted the dev branch January 17, 2017 12:28
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