Digisoul Posted September 6, 2009 Share Posted September 6, 2009 Hello there, I am working with DllCalls, and having trouble on runtime debugging. Here is a sample code of my project local $EDATA = DllStructCreate("byte[537]",$PHANDLE) If @error Then error("Unable to pass the data.") $fdata = DllStructGetData($EDATA,1) if @error Then error("Unable to extract the data.") now the "DllStructGetData($EDATA,1)" never return any error or something in special conditions which i want to debug and the "Don't Send" error occurs. i want to know how can i control these types of conditions ? Thanks in Advance 73 108 111 118 101 65 117 116 111 105 116 Link to comment Share on other sites More sharing options...
trancexx Posted September 6, 2009 Share Posted September 6, 2009 What special conditions? ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Digisoul Posted September 6, 2009 Author Share Posted September 6, 2009 What special conditions? I am making a Compiler Identifier, it works well for all PE32 except PE32 .NET Assembly. When i tried to get its data the error occurs Local $Aoep = 0x47EFBC11 Local $Smod = "D:\ZiPhoneGUI.exe" Local $GHndle = DllCall("kernel32.dll", "hwnd", "GetModuleHandleW", "wstr", $SMod) If @error Then error("Unable to call GetModuleHandleW") EndIf $PHANDLE = $GHndle[0]+$Aoep local $EDATA = DllStructCreate("byte[537]",$PHANDLE) If @error Then error("Unable to pass the data.") $fdata = DllStructGetData($EDATA,1) ; Error in .NET Assembel Files if @error Then error("Unable to extract the data.") 73 108 111 118 101 65 117 116 111 105 116 Link to comment Share on other sites More sharing options...
trancexx Posted September 6, 2009 Share Posted September 6, 2009 And the error number is? ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Digisoul Posted September 6, 2009 Author Share Posted September 6, 2009 And the error number is?No error number, Its Stop working at "DllStructGetData($EDATA,1)" call. 73 108 111 118 101 65 117 116 111 105 116 Link to comment Share on other sites More sharing options...
trancexx Posted September 6, 2009 Share Posted September 6, 2009 (edited) No error number, Its Stop working at "DllStructGetData($EDATA,1)" call.You mean it's crashing?You are likely out of range.Are you sure that entry point address is correct? Edited September 6, 2009 by trancexx ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Digisoul Posted September 6, 2009 Author Share Posted September 6, 2009 You mean it's crashing?You are likely out of range.Are you sure that entry point address is correct?100% sure about Entry Point , i checked it manually, and yes i mean its crash. 73 108 111 118 101 65 117 116 111 105 116 Link to comment Share on other sites More sharing options...
trancexx Posted September 6, 2009 Share Posted September 6, 2009 100% sure about Entry Point , i checked it manually, and yes i mean its crash.Show me ZiPhoneGUI.exe. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Digisoul Posted September 6, 2009 Author Share Posted September 6, 2009 Show me ZiPhoneGUI.exe.Ah! my mistake, the file was infected, thats why its not working , now i clean that file and my app displaying the correct result.But my question is still there what will i do if i have to analyse any invalid file?I mean how can i stop my app to crash.Now would you like to check the clean & infected files (In Invalid Format i mean i just change their MZ sig)?Coz i also test my app on some other infected files and its work properly. 73 108 111 118 101 65 117 116 111 105 116 Link to comment Share on other sites More sharing options...
trancexx Posted September 7, 2009 Share Posted September 7, 2009 But my question is still there what will i do if i have to analyse any invalid file?I mean how can i stop my app to crash.Now would you like to check the clean & infected files (In Invalid Format i mean i just change their MZ sig)?Coz i also test my app on some other infected files and its work properly.Your code should be aware of the change before you reach the point where it would crash. Just add some more checkings and respond properly to errors (either return or do some modification to variables or whatever). ♡♡♡ . eMyvnE 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