0

I am writing Delphi XE expert. The expert switch the build configuration from "debug" to "release", perform build and switch back to "release" back to "debug".

While switch the build configuration, only the .dproj file has modified. The project state become modified.

Is that possible to revert back the project file state with ToolsAPI?

RRUZ
  • 134,889
  • 20
  • 356
  • 483
Chau Chee Yang
  • 18,422
  • 16
  • 68
  • 132
  • You don't want to change anything in the project, just to change the "project has been modified" state. Is that correct? – David Heffernan Mar 28 '11 at 07:49
  • Also, did you sort out the AV in your previous question? If so could you please add an answer to the question explaining what the solution was. – David Heffernan Mar 28 '11 at 07:50
  • Once the build configuration changed, the project state change to modified. I just want to revert the project state to "clean" or "unmodified" as I didn't change anything in the project files. – Chau Chee Yang Mar 28 '11 at 14:34
  • The .dproj file is modified by a change to the active build configuration. – David Heffernan Mar 28 '11 at 14:36
  • I don't have solution for the previous [question](http://stackoverflow.com/questions/5439666/how-to-implement-iotaprojectcompilenotifier-of-delphis-toolsapi). I still encounter AV no matter how I use the RemoveCompileIdentifier. I feel this is Delphi IDE bug. – Chau Chee Yang Mar 28 '11 at 14:36
  • @Chau It won't be a bug. It's a brand new feature in XE. They won't have added it without making sure it runs. – David Heffernan Mar 28 '11 at 14:43
  • @David: Have you tested? Or if you don't have the environment to test, I can let you access my desktop via remote desktop. – Chau Chee Yang Mar 29 '11 at 02:25

1 Answers1

0

You can change the project's modified state easily using the IOTAProjectOptions40 interface from ToolsAPI. It contains a property "ModifiedState", simply assign this to False to specify the project as "unmodified".

Enjoy :)

LaKraven
  • 5,804
  • 2
  • 23
  • 49