Here is my latest library that is probably no use to anyone except me It should work on .NET 1.0 and later and on device and desktop.
It grew out of playing with the AdaptorsInfo library that I knocked up for Cableguy. AdaptorsInfo returns a byte array which is basically a C Struct containing several different data types detailing a network adaptor's data.
This library takes a specified start position in a byte array and returns the data in the array converted to a required datatype. It can also reverse that process, taking a datatype and returning a byte array. For good measure string conversions to and from byte arrays are provided. As this library is really intended for Win API use the byte arrays representing string data assume that the strings are terminated by a zero character which is C/Win32 convention. Hence, unlike B4ppc/.NET strings they cannot contain a zero character.
With the BytesConverter library there is a help file, demo and the source for merging with compiled exes.
I have also included an improved AdaptorsInfo library that can return data for any of the network adaptors on a system, the original only returned the first. With the library is a demo. For technical reasons it is not possible to merge this library with a compiled exe. This should be possible in the next version of B4ppc - Erel willing!
EDIT: Note that the AdaptorsInfo demo needs the BytesConverter library. I didn't include it in the zip as I don't believe in scattering copies of dlls around in zips too often as they may need to be updated at some time in the future.
EDIT: Version 1.2 with a CodepageFile object added. Updated help, new demo and updated source included.
EDIT: Version 1.3 posted. See post #6 for details.
EDIT: Version 1.4 posted. See post#7 for details.
EDIT: Version 1.4a posted with an omission in the cs file that prevented merged compilation corrected.
It grew out of playing with the AdaptorsInfo library that I knocked up for Cableguy. AdaptorsInfo returns a byte array which is basically a C Struct containing several different data types detailing a network adaptor's data.
This library takes a specified start position in a byte array and returns the data in the array converted to a required datatype. It can also reverse that process, taking a datatype and returning a byte array. For good measure string conversions to and from byte arrays are provided. As this library is really intended for Win API use the byte arrays representing string data assume that the strings are terminated by a zero character which is C/Win32 convention. Hence, unlike B4ppc/.NET strings they cannot contain a zero character.
With the BytesConverter library there is a help file, demo and the source for merging with compiled exes.
I have also included an improved AdaptorsInfo library that can return data for any of the network adaptors on a system, the original only returned the first. With the library is a demo. For technical reasons it is not possible to merge this library with a compiled exe. This should be possible in the next version of B4ppc - Erel willing!
EDIT: Note that the AdaptorsInfo demo needs the BytesConverter library. I didn't include it in the zip as I don't believe in scattering copies of dlls around in zips too often as they may need to be updated at some time in the future.
EDIT: Version 1.2 with a CodepageFile object added. Updated help, new demo and updated source included.
EDIT: Version 1.3 posted. See post #6 for details.
EDIT: Version 1.4 posted. See post#7 for details.
EDIT: Version 1.4a posted with an omission in the cs file that prevented merged compilation corrected.
Attachments
Last edited: