flashcoder Posted December 30, 2015 Share Posted December 30, 2015 I have a code example in Delphi and I want "translate" this code to Autoit. Someone can help me please?Here is Delphi code:procedure ForceRemove(const ModuleName: string); var hMod: HMODULE; begin hMod := GetModuleHandle(PChar(ModuleName)); if hMod=0 then exit; repeat until not FreeLibrary(hMod); end;Usage:ForceRemove('anydll.dll'); Link to comment Share on other sites More sharing options...
Danyfirex Posted December 30, 2015 Share Posted December 30, 2015 Hello. #include <WinAPI.au3> _ForceRemove("anydll.dll") Func _ForceRemove($sModuleName) Local $hModule=_winapi_GetModuleHandle($sModuleName) If Not $hModule then Return Do ;Some sleep if is needed Until _winapi_FreeLibrary($hModule)=True EndFuncSaludos flashcoder and Skysnake 2 Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
flashcoder Posted December 30, 2015 Author Share Posted December 30, 2015 Hello. #include <WinAPI.au3> _ForceRemove("anydll.dll") Func _ForceRemove($sModuleName) Local $hModule=_winapi_GetModuleHandle($sModuleName) If Not $hModule then Return Do ;Some sleep if is needed Until _winapi_FreeLibrary($hModule)=True EndFuncSaludosThank you very much friend! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now