Add files to components using CMI

  • Thread starter Thread starter Mikhail Mintchenkov
  • Start date Start date
M

Mikhail Mintchenkov

Hi,

I' d like to have a script that automaticaly update the component in DB when
the new version of software is issued.
I feel that I have to use something like "AddFile" or "Files" of IComponent.
But I can't see no suitable things.

Is it possible to create new revision of component with newer version of
files?

Kind Regards,
M.M.
 
Mikhail,

It is definitely possible what you are trying to archive here.
Basically the method you are looking for is ImportCarrier of ICMI interface. Though DCMIEvents disp interface you will get
OnImportRepository event which is fired during CMI.ImportCarrier so that the application can copy repository files to their
destination directory (\Windows Embedded Data by default but you would better read the path from registry).

As to the new revision of a component. You just have to load the component, change its properties including the revision/version and
import it in the database again - very simple.
 
Back
Top