I am wondering if anyone can point me in the right direction
I am getting strange results
When I try to move a DWORD to a char I am running in 64 bit mode and it my understanding that both are 32 bits long
The DWORD has 4 bytes of a ebcdic character string
I want to move the DWORD to char 4 so that I can access every character and convert it to ascii when I try to move 1 of the chars to a unsigned int e.g. Unsigned int c = str the result in c is a negative number maybe the high order bit in str byte is on but by moving it to a unsigned int shouldn't that do away with making the result negative for example moving a D0 results in FFF2
Any help appreciated
I think the problem comes from the way bytes are ordered in memory.
When you treat a 4-byte block as a DWORD, the bytes are not in order from MSB to LSB. It depends upon your hardware.
You can verify this in the debugger. Place a breakpoint anywhere you are using the DWORD variable, and then when it breaks, switch to Disassembly view. (Make sure "Show code bytes" is on.) You'll see the way the bytes are ordered, and it's not what you expect!
The difficult we do right away...
...the impossible takes slightly longer.
In this case we have to implement an algorithm for packing 4 bytes to a single dword programmatically.
Also, there's no default conversion. DWORD data type is 32 bits = 4 bytes long regardless of it's x64 or x86 mode.
Hercules has a function FETCH_FW which will take a MainFrame fullword 4 bytes and put in the right sequence for Windows/Linux However it is still coming in EBCDIC and I need to convert it to ASCII thus I need to access every byte and convert it the function FETCH_FW takes as 1st param a DWORD I thought using unsigned char would produce the same result apparently not
I'm currently doing my Masters in Computer Network Engg and I have decided to do my Final semester project in optimisation of firewalls.
I'm thinking of implementing firewall optimisation using rule re-ordering and rule conflict detection, but I don't have a clue on how to get started.
I got to know that I can make use of Windows Firewall API (NetFwTypeLib) and work on top of Windows Firewall but I'm not quite sure if this would help me or not.
If you have done anything similar or have some pointers for me please guide me.