본문 바로가기
반응형

SB 리치 패밀리5247

[개발/delphi] how to register an OCX [delphi] How to register an OCX http://www.delphifaq.com/faq/delphi_windows_API/f515_0.htm program RegisterMyOCX; uses OLECtl, Windows, Dialogs; var OCXHand: THandle; RegFunc: TDllRegisterServer; //add to the uses clause begin OCXHand:= LoadLibrary('c:\windows\system\test.ocx'); RegFunc:= GetProcAddress(OCXHand, 'DllRegisterServer'); //case sensitive if RegFunc 0 then RegFunc else ShowMessage('E.. 2011. 12. 12.
[개발/delphi] Starting and stopping Windows services [delphi] Starting and stopping Windows services http://www.delphifaq.com/faq/delphi_windows_API/f521_0.htm Note: Thanks to Henk Mulder who mailed me about a correction with the assignment to dwCurrentState. I think this code was written originally with Delphi 3 and probably Borland or Microsoft changed something from a signed integer to an unsigned word. { Thanks to Andrea Canu for pointing out .. 2011. 12. 12.
[개발/delphi] how to have an exe file delete itself [delphi] How to have an EXE file delete itself http://www.delphifaq.com/faq/delphi_windows_API/f530_0.htm Both Windows 95 and NT provide mechanisms for doing just this. Under Win95 you use the WinInit.ini file. Create a [rename] section and put in entries like "NewName.txt=OldName.txt" to have files renamed, or "nil=OldName.txt" to have them deleted. Windows will perform this at the next boot. U.. 2011. 12. 12.
[개발/delphi] 외부 프로그램 실행하고 기다리기 Execute and wait [delphi] Execute and wait for termination (16 and 32bit applications) http://www.delphifaq.com/faq/delphi_windows_API/f353_0.htm This unit is based upon the well-known and largely used WinExecAndWait function The former WinexecAndWait function doesn't compile under Delphi 2.0 because the GetModuleUsage function is no longer supported under Win95. I have simply updated the previous code so that i.. 2011. 12. 12.
[delphi] Tracking DLL loading, attaching, detaching and unloading DLL 을 이용할 때 dll 이 로딩되는지 언로딩 되는지 알 수 있다. Library testdll; http://www.delphifaq.com/faq/delphi_windows_API/f534_0.htm The code snippet shows how your DLL can track its usage. uses Windows, // DLL_PROCESS_nnn defined in here SysUtils, Classes; procedure MyDLLProc(Reason: Integer); begin case Reason of DLL_PROCESS_ATTACH: // called when the DLL is loaded begin end; DLL_PROCESS_DETACH: // called when.. 2011. 12. 12.
[개발/delphi] RLINK 32: out of memory 델파이 RLINK32: out of memory 델파이 컴파일을 하다보면 RLINK32 에러가 발생하는 경우가 있다. 이 경우는 코드상의 에러가 아니어서 설정 변경을 통해서 에러를 수정할 수가 있다. 아래의 방법들을 시도해 보는 것으로 에러를 수정할 수가 있다. 1 리소스명을 짧게 한다. 2. dll 파일을 더 작은 리소스 수로 여러개로 나눈다. 3. 이미지 리소스를 여러개의 strips(icons, glyphs, etc)으로 결합한다. 4. 만약 icon 파일에 128x128 크기의 형식이 포함되어 있다면 이것을 제거하면 확실하게 수정된다. 2011. 12. 12.
반응형