2

I have an ancient program that I use for reading and writing data from AutoCAD. This program is written in Delphi 5. I have tried to update it to a newer release but several of the libraries I use no longer exist and it is a huge program with lots of libraries used.

The program uses the ACAX##ENU.TLB type library that is provided with AutoCAD. Where ## changes for each AutoCAD release. Every time Autodesk sends out a new AutoCAD version I import the new type library and life goes on.

Now I am faced with Windows 10. For some reason the automation links between my program and AutoCAD are not working in Windows 10. Did something change about the way the type libraries work between Windows 7 and Windows 10? Something that Delphi 5 is no longer compatible with? Maybe it's a 16bit vs 32bit vs 64bit issue. That is all over my head but I understand that Windows 10 dropped support for some 16bit operations. But my program itself runs perfectly. Even the BDE can be made to work which is amazing to me.

Is there anything I can do for an experiment? I am really lost about what to even experiment on.

Thanks.

Lee Mac
  • 15,615
  • 6
  • 32
  • 80
FireGuy
  • 29
  • 2
  • Delphi 5 produces 32-bit executables. ActiveX is available on 32 and 64 bit versions of Windows. As Delphi 5 did not ever support 16-bit development (Delphi 1 was included for that purpose), it cannot be a 16-bit issue. Did you contact Autodesk to see what changes were made for Windows 10? Clearly Delpho 5 did not change, and 32-bit Delphi apps run fine on Windows 10 (I have many that are still developed with Delphi 2007 working today). This sounds like an Autodesk support question that has nothing to do with Delphi. – Ken White Sep 20 '19 at 12:45
  • Do you have an error? At which point does your program fail? – Maxence Sep 22 '19 at 18:22
  • I have some idea, but don't sure of it. Is Your project compiled to *.dll ? – CAD Developer Sep 24 '19 at 06:49
  • The program is all one EXE file. No DLL's are involved. – FireGuy Sep 25 '19 at 12:25
  • Autodesk has never been helpful in supporting the type libraries when working with Delphi. Even though my company has a full support license with them. Seems they support VB and anything outside that box is unsupported. I do not recall if I specifically asked about this issue. – FireGuy Sep 25 '19 at 12:27
  • I am still using the program on a Windows 7 computer. Other users have tried to switch to Windows 10 and have had these issues. I am setting up a Windows 10 image now but it is a effort to get to the corporate license servers for AutoCAD and another effort to get Delphi 5 and all the libraries loaded. All of the errors are trapped in the AutoCAD interface section and only spit out a generic "failed" notification. I was running into too much confusion with users and the various errors. Yes, I should be logging them but not at this time. – FireGuy Sep 25 '19 at 12:31

1 Answers1

0

Well, it's been a long time since I asked this question but here is an answer: I was able to get my Delphi 5 compiled program working with AutoCAD 2017 in a Windows 10 environment. I am pretty sure that the solution was to run the program WITHOUT administrative permissions and WITHOUT any compatibility modes switched on. Apparently Windows places restrictions on COM communications as soon as you turn on either of those features. There may have also been issues with Windows 10 still having UAC active even when you set UAC all the way off. There is a registry setting to actually set UAC to off but my corporate IT prevents turning that off even with admin rights.

So in the end it was not a problem with Delphi, my program or with AutoCAD. It was a Windows 10 problem.

There was a bit of a clue that might be helpful to others: with the admin permission and/or windows XP compatibility turned on the program took several extra seconds to boot. With the settings turned off it booted quickly.

Or maybe its something entirely different from any of this. But the program is working now.

Thanks.

FireGuy
  • 29
  • 2