Last active
March 17, 2020 11:53
-
-
Save trueroad/beca65328fd5c165e32c25457729a0a7 to your computer and use it in GitHub Desktop.
Perl Win32 -W API sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use utf8; | |
use Encode; | |
use Win32::API; | |
my $messagebox = Win32::API::More->new ( | |
"user32.dll", | |
"int MessageBoxW (HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType)" | |
) or die ("failed new"); | |
my $r = $messagebox->Call ( | |
0, # NULL | |
encode ("UTF-16LE", "☃テキスト☃"), | |
encode ("UTF-16LE", "🍣キャプション🍣"), | |
0 # MB_OK | |
); | |
print "$r\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment