sajgon Posted December 16, 2007 Share Posted December 16, 2007 hi can someone help me with converting part of this code which is responsible for injection of hookdll.dll file. There is a program called minimizer. When you open exe file it shows up a window with 3 radiobuttons and two normal buttons. To inject dll you have to choose one of radios(choose res.) and then press begin button. After this operation it will minimize window whit pressing f11 button. What i need is to load this dll and call function of choosing one of radios and then press the begin button. Is this possible? Here is the part ofcode: } #endregion private void mnuExit_Click(object sender, System.EventArgs e) { this.Close(); } private void mnuAbout_Click(object sender, System.EventArgs e) { using(FrmAbout abt = new FrmAbout()) { abt.ShowDialog(); } } private void mnuHowTo_Click(object sender, System.EventArgs e) { using(FrmHelp hlp = new FrmHelp()) { hlp.ShowDialog(); } } private void btnStart_Click(object sender, System.EventArgs e) { try { int X,Y = X = 0; if(rbRes1.Checked) { X = 640; Y = 480; } else if(rbRes2.Checked) { X = 800; Y = 600; } else if(rbRes3.Checked) { X = 1024; Y = 768; } else { X = 1280; Y = 1024; } Imports.SR(X,Y); Imports.IH(); btnStart.Enabled = false; btnStop.Enabled = true; bStarted = true; } catch(Exception ex) { Debug.WriteLine(ex); MessageBox.Show("There was an error with HookDLL.dll","Error"); } } private void btnStop_Click(object sender, System.EventArgs e) { try { Imports.UIH(); btnStart.Enabled = true; btnStop.Enabled = false; bStarted = false; } catch(Exception ex) { Debug.WriteLine(ex); MessageBox.Show("There was an error with HookDLL.dll","Error"); } } private void mnuLicense_Click(object sender, System.EventArgs e) { using(GPL gpl = new GPL()) { gpl.ShowDialog(); } } private void WinMuFrm_Load(object sender, System.EventArgs e) { if(!File.Exists("HookDLL.dll")) MessageBox.Show("Can not find HookDLL.dll!","Warning"); } } } And my attemp to do this: DllCall("minimizer.dll","str","loadlibrary") dllcall("minimizer.dll","int","HookDLL.SR", "Int", 1024, "Int", 768) dllcall("minimizer.dll","none","HookDLL.IH") but its not working:/ Is there any hope? Link to comment Share on other sites More sharing options...
martin Posted December 16, 2007 Share Posted December 16, 2007 hi can someone help me with converting part of this code which is responsible for injection of hookdll.dll file. There is a program called minimizer. When you open exe file it shows up a window with 3 radiobuttons and two normal buttons. To inject dll you have to choose one of radios(choose res.) and then press begin button. After this operation it will minimize window whit pressing f11 button. What i need is to load this dll and call function of choosing one of radios and then press the begin button. Is this possible? Here is the part ofcode: } #endregion private void mnuExit_Click(object sender, System.EventArgs e) { this.Close(); } private void mnuAbout_Click(object sender, System.EventArgs e) { using(FrmAbout abt = new FrmAbout()) { abt.ShowDialog(); } } private void mnuHowTo_Click(object sender, System.EventArgs e) { using(FrmHelp hlp = new FrmHelp()) { hlp.ShowDialog(); } } private void btnStart_Click(object sender, System.EventArgs e) { try { int X,Y = X = 0; if(rbRes1.Checked) { X = 640; Y = 480; } else if(rbRes2.Checked) { X = 800; Y = 600; } else if(rbRes3.Checked) { X = 1024; Y = 768; } else { X = 1280; Y = 1024; } Imports.SR(X,Y); Imports.IH(); btnStart.Enabled = false; btnStop.Enabled = true; bStarted = true; } catch(Exception ex) { Debug.WriteLine(ex); MessageBox.Show("There was an error with HookDLL.dll","Error"); } } private void btnStop_Click(object sender, System.EventArgs e) { try { Imports.UIH(); btnStart.Enabled = true; btnStop.Enabled = false; bStarted = false; } catch(Exception ex) { Debug.WriteLine(ex); MessageBox.Show("There was an error with HookDLL.dll","Error"); } } private void mnuLicense_Click(object sender, System.EventArgs e) { using(GPL gpl = new GPL()) { gpl.ShowDialog(); } } private void WinMuFrm_Load(object sender, System.EventArgs e) { if(!File.Exists("HookDLL.dll")) MessageBox.Show("Can not find HookDLL.dll!","Warning"); } }}And my attemp to do this:DllCall("minimizer.dll","str","loadlibrary") dllcall("minimizer.dll","int","HookDLL.SR", "Int", 1024, "Int", 768) dllcall("minimizer.dll","none","HookDLL.IH")but its not working:/ Is there any hope?From what you've shown I couldn't help. Why not just use AutoIt to select the correct radio button and press the right buttons instead? Sounds a lot easier to me. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
sajgon Posted December 17, 2007 Author Share Posted December 17, 2007 Of course it is easier but i prefer not to open an additional .exe file:) Link to comment Share on other sites More sharing options...
martin Posted December 18, 2007 Share Posted December 18, 2007 Of course it is easier but i prefer not to open an additional .exe file:)Oh I see. Silly me, I thought that because you posted your question in the AutoIt General Help and Support forum you were asking for help with AutoIt. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. 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