Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Code Block
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sleep 500

We want no declaration and calls like this:


To make things more interesting this Declare was in a module that was shared throughout the system;  the declaration is being moved into a host project using the Shared

Code Block

<Compile Condition="%SrcName%=='AppCommon'">
      <Migrate id="GlobalDeclarations.Sleep" nPram="2" migName="System.Threading.Thread.Sleep" migStatus="external" />

Changes the calls in AppCommon as expected


Code Block

      <method id="Sleep" migName="System.Threading.Thread.Sleep" type="Void">
         <argument id="dwMilliseconds" type="Integer" status="ByVal"/>

The IDF change makesmigName attribute alters calls made to the migrationmethod in allthe codes that reference the AppCommon .DLL.

Note that in this case, a "migrated" declaration is authored in the generated DLL code; it must be removed with an Author\Fix.

Code Block
<Author Condition="%SrcName%=='AppCommon'">
<Fix host="%SrcName%" name="PostEdit">
   <Replace name="Remove GlobalDeclaration.Sleep">
         public static extern void System.Threading.Thread.Sleep(int dwMilliseconds);

Note: The XML above uses the Condition attribute of the ScriptRules feature.