Reverse Engineer

  • Thread starter Thread starter Jon Vaughan
  • Start date Start date
J

Jon Vaughan

Let me just start this post by saying I hope what I want to do isnt illegal.

Im looking to reverse engineer some code ( wirelesspower.exe ) not to modify
or steal the code , but to look at how it calls the coredll.dll - so I can
do the samething in my code , as i cant find an example on the internet.

Thanks

Jon
 
Use Lutz's Reflector to disassemble the code.

I used it recently to disassemble production code
left behind by a laid off contractor who's laptop
was formatted prior to getting the source code
off his drive. Yes, the goofy business unit
allowed their developers to operate without
using a source control management system like
VS.NET and didn't bother to make sure they
had his code before letting him walk out the door.

Geez...

I disassembled all of the assemblies and executables
and put humpy dumpty back together again
with maintainable source code.

I always knew this was possible. But, it doesn't
hit you with just how easy it is for someone to
disassemble your .NET apps especially if
you don't obfuscate them.

--
Robbe Morris - 2004/2005 Microsoft MVP C#

Earn money answering .NET Framework
messageboard posts at EggHeadCafe.com.
http://www.eggheadcafe.com/forums/merit.asp
 
Check the EULA, it's probably a violation to reverse engineer it. What
P/Invokes are you after? We can probably help.

-Chris
 
The code that is meant to work to turn wifi off on a pocket pc is :

Public Shared Sub wifi_power_on()
Try
DevicePowerNotify("WLP1:", CEDEVICE_POWER_STATE.D0, 1)
Application.DoEvents()
Catch
End Try

End Sub

this doesnt seem to work on an x30 , so what Im wanting to do is to open up
wirelesspower.exe and check its calls.

Thanks

Jon
 
Its turns out Lutz cant reverse engineer it anyway , something about a cli
header. so if anyone has the PINVOKE that works I will be every grateful.

Thanks
 
The reason for this is probably the driver is named differently on the x30 -
rather than WLP1:. You could look in the registry under HKLM\Drivers\BuiltIn
and find the wireless adapter's name that way

Peter
 
I presume you mean HKLM\Drivers\BuiltIn on my sync pc , as the pocket pc
doesn't have a registry from what I know...

In which case I cant locate a directory called Drivers, under HKLM.

Thanks

Jon
 
That always happens I post something that I believe to be true and then read
up to check mt facts only to find out what I thought I knew was wrong.
 
Nope, he meant a device registry. Microsoft eMbedded Visual C++ (free
download) provides Remote Registry Editor (Ceregedt.exe) to examine and
edit the registry on a remote device.
 
WiFi control is often non-standard, so what works on one device often won't
work on another.

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate
 
They have to be device specific thou ...
so if it works on my x30 it will work on say yours ?

if so here is my code , but it doesnt do anything :

Enum CEDEVICE_POWER_STATE

D0 = 0

D4 = 4

End Enum

<DllImport("coredll.dll")> Public Shared Function DevicePowerNotify(ByVal device As String, ByVal state As CEDEVICE_POWER_STATE, ByVal flags As Integer) As Integer

End Function

Public Shared Sub wifi_power_on()

Try

DevicePowerNotify("NDS0:", CEDEVICE_POWER_STATE.D0, 1)

Application.DoEvents()

Catch

End Try

End Sub

Public Shared Sub wifi_power_off()

Try

DevicePowerNotify("NDS0:", CEDEVICE_POWER_STATE.D4, 1)

Application.DoEvents()

Catch

End Try

End Sub



I got the values NDS0: from looking in the active section of the drivers in the registry.



unfortunatly im getting no furthur......



Jon
 
when I change DevicePowerNotify("NDS0:", CEDEVICE_POWER_STATE.D0, 1)

into

DevicePowerNotify("BKL1:", CEDEVICE_POWER_STATE.D4, 1)

the back light powers off , so the problem doesnt lay in mt code, it seems to layin the device name im calling "NDS0:".

Need to find some more docuemnts on this or anyone who may have tried to do something similar ?

Jon
They have to be device specific thou ...
so if it works on my x30 it will work on say yours ?

if so here is my code , but it doesnt do anything :

Enum CEDEVICE_POWER_STATE

D0 = 0

D4 = 4

End Enum

<DllImport("coredll.dll")> Public Shared Function DevicePowerNotify(ByVal device As String, ByVal state As CEDEVICE_POWER_STATE, ByVal flags As Integer) As Integer

End Function

Public Shared Sub wifi_power_on()

Try

DevicePowerNotify("NDS0:", CEDEVICE_POWER_STATE.D0, 1)

Application.DoEvents()

Catch

End Try

End Sub

Public Shared Sub wifi_power_off()

Try

DevicePowerNotify("NDS0:", CEDEVICE_POWER_STATE.D4, 1)

Application.DoEvents()

Catch

End Try

End Sub



I got the values NDS0: from looking in the active section of the drivers in the registry.



unfortunatly im getting no furthur......



Jon
 
Back
Top