senatin Posted September 25, 2017 Share Posted September 25, 2017 (edited) I found this tutorial script about dll but is written in other code I want to know what it return or throw when it fails. Im starting to learn calldll and its other related code. Can you please help me convert this code to autoit class MSC_Helper { static _ := MSC_Helper.InitClass() InitClass() { if !A_IsAdmin { Run *RunAs "%A_ScriptFullPath%" ExitApp } this.LoadDll() } LoadDll() { if A_Is64bitOS { dllFile := (A_PtrSize=8) ? "64\mscon64.64.dll" : "64\mscon32.32.dll" } else { dllFile := "32\mscon32.dll" } if !this.hModule := DllCall("LoadLibrary", "Str", dllFile, "Ptr") { if !FileExist(dllFile) { throw, dllFile " not found." } throw, "LoadLibrary failed. DllFile is " dllFile } this.dllFile := dllFile } UnloadDll() { DllCall("FreeLibrary", "Ptr", this.hModule) } } Thank you in advance. Edited September 25, 2017 by senatin 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