Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use NativeCall;
- enum EnumHWND (
- NULL => 0
- );
- enum EnumMessageBox (
- MB_CANCELTRYCONTINUE => 0x00000006,
- MB_HELP => 0x00004000,
- MB_OK => 0x00000000,
- MB_OKCANCEL => 0x00000001,
- MB_RETRYCANCEL => 0x00000005,
- MB_YESNO => 0x00000004,
- MB_YESNOCANCEL => 0x00000003,
- );
- class HWND is repr('CPointer') {
- sub new (Int $a) { $a }
- }
- sub MessageBoxA(HWND, Str, Str, int32)
- returns int32
- is native('user32')
- { * }
- say MessageBoxA(HWND.new(NULL), "We can haz NCI?", "oh lol", MB_YESNO);
- Default constructor for 'HWND' only takes named arguments
- in block <unit> at a.pl line 28
Advertisement
Add Comment
Please, Sign In to add comment