본문 바로가기

Code

(117)
[PerlNET] Regex (Perl C# Mix) Regex.pmpackage MixPerl::Regex;use strict;use namespace "System";use PerlNET qw(AUTOCALL); #Constructor=for interface [interface: pure] static Regex();=cut #Methods=for interface static string Replace(str SourceString, str FindPattern, str ReplacePattern); static string Replaceg(str SourceString, str FindPattern, str ReplacePattern); static string Replacegi(str SourceString, str FindPattern, str..
[Perl] Cocoa (pl pm sample) Cocoa.plpackage MixPerl::Cocoa; =for interface [interface: pure] public static Cocoa Cocoa(); public static string Drink();=cut require Cocoa; Cocoa.pmpackage Cocoa;use strict; sub new { my $class = shift; my $self = bless {}, $class; return $self;} sub Drink { my $line = "Drink Cocoa"; return $line;} 1; testCocoa.pl#!/usr/bin/perl -wuse strict; push (@INC, 'pwd');use Cocoa; my $cup = new Cocoa;..
[PerlNET] CIty (Mix Perl & C#) Program.cs using System; using MixPerl; namespace CityClient { class Program { static void Main(string[] args) { City myCity1 = new City("SmallVille", 4); City myCity2 = new City("Crowdedburg", 40); myCity1.PrintCityInfo(true); myCity2.Population = 500000; myCity2.PrintCityInfo(false); } } } City.pm package MixPerl::City; use strict; use namespace "System"; use PerlNET qw(AUTOCALL ); #Consturct..
[Perl] BeeConverter (Convert HTML Entity to Unicode Character) use warnings; print "+----------------------+\r\n"; print "| BeeConverter 1.0.0.3 |\r\n"; print "| by Wing4Bee |\r\n"; print "| http://wing4bee.com |\r\n"; print "+----------------------+\r\n"; my ($source, $result) = @ARGV; open(FILE_GET, ":utf8", $result); my %c2dHash = ( quot => 34, amp => 38, apos => 39, lt => 60, gt => 62, nbsp => 160, iexcl => 161, cent => 162, pound => 163, curren => 164,..
[C/C++] Dely #include #include int _tmain(int argc, TCHAR *argv[]) { DWORD sleepTime = (DWORD)(_ttoi(argv[1]) * 1000); Sleep(sleepTime); }
[C/C++] Beep #include #include int _tmain(int argc, TCHAR *argv[]) { int frequency = _ttoi(argv[1]); int duration = _ttoi(argv[2]); Beep(frequency, duration); }
[C/C++] Change Cursor Sample Project IME Hooking 과 연동해서 Cursor 모양을 바꾸는 것을 시도해보기 위해서, 만들어본 샘플이다. IME Hooking이 성공하면, 그때 이 코드를 참고해보자.
[Project] imeHook ME Hooking을 시도해봤는데, 생각보다 어렵다. 아직 성공하지 못했다. 일단 현재까지 진행된 부분을 압축해서 올린다. 2008-11-07 13:13 업데이트 일단 한영키 누름을 후킹하는 것은 성공했다. 하지만 입력하는 어플리케이션과 상황에 따라서 반응이 달라진다. 이 문제는 어떻게 풀지? 아래 코드를 올린다. 2008-11-08 12:53 업데이트 한영키 후킹 성공. 한영상태 검출 성공. 하지만 문제점이 남아있음. 한영키 누를때, ime 값이 반대로 나오는 이유를 아직 모름. (꼼수로 해결했음). Sandboxie로 실행된 브라우저는 후킹이 안됨. 2008-11-08 14:33 업데이트 마우스 커서 바꾸는데 까지 성공. 이제 Caret 바꾸는 것에 도전할 차례 2008-11-09 03:06 업데이트..