본문 바로가기

Application/Delphi Lecture126

파일 버젼 구하기 function GetFileVersion(ExePath: String): String; var trans : Pointer; transtring : String; n, aLen, bLen : DWORD; Buf : PChar; Version : PChar; begin n := GetFileVersionInfoSize(PChar(ExePath), n); Buf := AllocMem(n); try GetFileVersionInfo(PChar(ExePath), 0, n, Buf); VerQueryValue(Buf, 'VarFileInfo\Translation', trans, aLen); transtring := IntToHex(MakeLong(HiWord(Longint(trans^)), LoWord(Long.. 2008. 12. 16.
MessageBox if MessageBox(0, '삭제하시겠습니까?', '삭제 확인창', MB_ICONQUESTION or MB_TASKMODAL or MB_YESNO or MB_DEFBUTTON2) = IDYES then ShowMessage('Ok!'); 2008. 12. 11.
파일의 버젼정보 읽어오기 어떤 파일(exe, dll)의 버전을 읽어 오기 위해서는 3개의 함수를 순서대로 사용해야 합니다. 1. GetFileVersionInfoSize 2. GetFileVersionInfo 3. VerQueryValue 결국 VerQueryValue함수를 호출 하고 난후 버전을 구할수 있죠... 위 3개의 API함수들은 도움말을 참조 하시고 간단한 예제를 만들어 봤습니당... 참고 하세요... 폼위에 memo와 버튼하나 놓았습니다. 도움이 되었음 하네요... 그럼 즐프... procedure TForm1.Button1Click(Sender: TObject); var Size, Size2: DWord; Pt, Pt2: Pointer; begin Memo1.Lines.Clear; Size := GetFileVer.. 2008. 12. 5.
JPEG Rotation and EXIF Orientation JPEG Rotation and EXIF Orientation Digital Cameras with orientation sensors allow auto-rotation of portrait images. Unfortunately, support for this feature is not widespread or consistently applied. Digital Cameras with Orientation Sensors Many newer digital cameras (both dSLR and Point & Shoot digicams) have a built-in orientation sensor. Virtually all Canon and Nikon digital cameras have an or.. 2008. 8. 13.