Delphi 7 turn off creation of DDP files - delphi

How do you turn off the feature or stop the creation of all the .ddp files for your Delphi 7 forms? I read something about removing the designdgm60.bpl, but is that the only way? It seems that there was another way I can't remember any longer.
Update: I tried renaming the designdgm70.bpl and that just creates a ton of program errors.
Also, I'm using Delphi 7.2 on one computer and there is no design tab I can see unless its covered by something in CnWizards. 7.2 definitely creates the ddp files though.

DDP files are for Delphi diagrams (DDP stands for Delphi Diagram Portfolio) in Delphi 6-7. Delphi 5 used the DTI extension for this.
DDP files can have meaningful information. They don't get compiled into .DCU/.EXE./... as they are for documentation purposes only.
Did you create diagrams of components on your form/datamodule? I used to do that (to explain structure to co-workers) so I was actually really happy with the DDP files.
Before deleting them, inspect them to see if they contain documentation you want to keep.
You can safely delete them if they are 51 bytes long and the TDUMP of it looks like this:
000000: 07 18 44 45 4C 50 48 49 2E 44 49 41 47 52 41 4D ..DELPHI.DIAGRAM
000010: 2E 50 4F 52 54 46 4F 4C 49 4F 0F 00 00 E0 40 02 .PORTFOLIO....#.
000020: 01 09 06 09 55 6E 74 69 74 6C 65 64 31 06 00 02 ....Untitled1...
000030: 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

I suppose that it's impossible to turn off .ddp creation in IDE by built-in methods, but DDevExtensions tool includes this option (File Cleaner)

You can install DDevExtensions which is free.
There is an option which you can check that automatically deletes .ddp files.

Related

Find Object Dictionary in CANopen Device

I was reading in the CANopen device number EL6751-0010, of course, using the SDO reading command, which I did as follows:
603 | 40 7A 60 00 00 00 00 00
and gave me the following error:
583 | 80 7A 60 00 00 00 02 06
I realized that this object does not exist.
What should I do to find all the objects of an Object Dictionary?
Finally, I can write and read code in the right place.

How calculate checksum in hdlc frame

I try to find how calculate checksum form hdlc frame. I try with example:
7E A0 0A 00 02 00 23 21 93 [18 71] - checksum 7E
I tried this calculator: https://www.scadacore.com/tools/programming-calculators/online-checksum-calculator/
I put there this part of frame: A0 0A 00 02 00 23 21 93
but result didn't match...
I need your advice, guys...
Without hitting the books, I recall that 7E is not the checksum, just the Tag - first byte in an hdlc message. Do you have the whole message you can share?
Implement on python:
After calculating crc,
write higher bit first and then your lower bits, for eg
crc= "3a3b"
crc_used in packet=3b3a
you can try this:
import crcmod #pip3 install crcmod
import sys
def calculate_crc(packet):
packet=''.join(packet.split(' '))
crc16 = crcmod.mkCrcFun(0x11021, rev=True, initCrc=0x0000, xorOut=0xFFFF)
fcs=str(hex(crc16(bytes.fromhex(packet))))
crc_f=str(fcs[4:6])+str(fcs[2:4])
if len(crc_f)<4:
diff=4-len(crc_f)
crc_f= "0"*diff + crc_f
return str(crc_f).upper()
print(calculate_crc("A0 0A 00 02 00 23 21 93"))
output: 1871

What is the Delphi unit hashcode used for?

Portable executables compiled using Delphi have a PACKAGEINFO resource that lists the units the program requires & contains.
Documentation of the structure can be found in this version of SysUtils.pas, which shows each TUnitName entry is:
One byte containing flags.
One byte which is a hash code.
The name of the unit, as a null terminated string.
An example can be seen in the PACKAGEINFO structure below:
00000000 00 00 10 cc 00 00 00 00 81 00 00 00 01 59 46 6f |...Ì.........YFo|
00000010 72 6d 31 33 00 10 6d 62 73 55 74 69 6c 73 00 10 |rm13..mbsUtils..|
00000020 55 54 79 70 65 73 00 00 81 53 79 73 49 6e 69 74 |UTypes...SysInit|
The first unit defined (after the header) is named YForm13 with a hash code of 0x59. The second is bsUtils with a hash code of 0x6D.
A comparison between different Delphi compiled executables shows that units like SysInit and System seem to have the same hash code across two files, but this is not a large study.
What is this hash code used for? Can it be correlated to other parts of the compiled executable?
The hash code is used to check whether or not the units are good and can be loaded. Inspecting the code, it is used at runtime and not at compile time.
The part is not documented, however you may inspect the VCL Source code (which cannot be posted here): unit System.SysUtils, look for InternalUnitCheck.
The module name will is used as a part of the hash, and the unit name is used as the last part.

APDU request through NFC in iPhone 6?

Using an android mobile device I could read the card details(authorized by the client with touch id) from iphone6, for payment transaction through NFC. I got it working through the APDU request.
APDU request
Send : 00 A4 04 00 07 A0 00 00 00 03 10 10 00
and response
Response: 6F 39 84 07 A0 00 00 00 03 10 10 A5 2E 9F 38 1B 9F 66 04 9F 02 06 9F 03 06 9F 1A 02 95 05 5F 2A 02 9A 03 9C 01 9F 37 04 9F 4E 14 BF 0C 0D 9F 4D 02 14 01 9F 5A 05 11 08 40 08 40 90 00
Now my concern is, can I send the same APDU request from iPhone 6 through NFC or some other means to get the appropriate response from another iPhone 6? Is it possible?
Though I can understand that NFC chip in iPhone6 does not allow iPhone-Iphone NFC communication, this question clearly states that THERE IS NO WAY to read passive NFC tags using an iPhone6. Okay, but there are comments saying it might be possible after september2014?
There must be some way to do this, Please do give out your thoughts on this. Thanks.
As I pointed out in this thread, the iPhone6 is not designed for Discovery mode or to act as a master in Peer-to-peer mode. You can however use a mobile NFC reader to proxy NFC data between 2 iPhones. Flomio offers a line of mobile and PC compatible NFC readers that you may consider.
Also worth mentioning, there's another option in reading unique data off the iPhone6 that may address your needs as well. Check this thread for details.

4 byte checksum, sum32 algorithm for Epson printers

I'm programming a low level communication with an Epson tm-t88iv thermal printer on a Linux device, which receives only hexadecimal packages. I have read the manual trying to understand how the checksum is built but i can't manage to recreate it.
the manual says that the checksum are 4 bytes representing the 2 bytes sum of all the data in the package sent.
I have currently four working examples I found by listening to a port on a windows computer with a different program. the last 4 hexadecimals are the checksum (03 marks the end of the data and is included in the checksum calculation, according to the manual).
02 AC 00 01 1C 00 00 03 30 30 43 45
02 AC 00 00 1C 80 80 1C 00 00 1C 00 00 1C 03 30 32 32 31
02 AD 07 01 1C 00 00 1C 31 30 03 30 31 35 33
02 AD 00 00 1C 80 80 1C 00 00 1C 00 00 1C 03 30 32 32 32
I have read somewhere that there is a sum32 algorithm but i can't find any example of it or how to program it.
Wow, this is a bad algorithm! If someone else finds himself trying to understand Epson's terrible low-level communication manual, this is how the check-sum is done:
The checksum base is 30 30 30 30
Sum in hexadecimals all of the data package (for example, 02+89+00+00+1C+80+80+1C+00+01+1C+09+0C+1C+03 = 214)
Then separate the result digit by digit, if its a letter add 1 to the value (for example B2 would be 2|1|4).
sum it to the checksum base number by number starting from right to left (this would be a checksum of 30 32 31 34).
Note: It works perfectly, but for some reason the examples I posted above don't seem to match so much. They are all the printers response, but slightly after it got a hardware problem and had to be reformatted by technical support, so maybe it got fixed.
I hope it helps somebody somewhere.

Resources