License Compiler will not accept multiple modules

  • Thread starter Thread starter Jens Christian Mikkelsen
  • Start date Start date
J

Jens Christian Mikkelsen

According to the documentation:

http://msdn.microsoft.com/library/en-us/cptools/html/cpgrflicensecompilerlcexe.asp

the License Compiler (lc.exe) should be able to accept multiple modules with
the /i option.

lc /target:targetPE /complist:filename [/outdir:path] /i:modules
[/nologo] [/v]

But it does not seem to work! I have tried:

/i:control1.dll /i:control2.dll
/i:control1.dll,control2.dll
/i:control1.dll+control2.dll

and several other separators. Does anyone know how to reference multiple
modules? If not, is there a way to merge multiple license resources into one
resource in the .exe image?

/Jens
 
Jens Christian Mikkelsen said:
According to the documentation:

http://msdn.microsoft.com/library/en-us/cptools/html/cpgrflicensecompilerlcexe.asp

the License Compiler (lc.exe) should be able to accept multiple modules with
the /i option.

lc /target:targetPE /complist:filename [/outdir:path] /i:modules
[/nologo] [/v]

But it does not seem to work! I have tried:

/i:control1.dll /i:control2.dll
/i:control1.dll,control2.dll
/i:control1.dll+control2.dll

and several other separators. Does anyone know how to reference multiple
modules? If not, is there a way to merge multiple license resources into one
resource in the .exe image?

OK, problem appears to be solved. Sort of....

First I tried merging the assemblies into one by using ILMerge, but this
failed miserably. Not even IL DASM would open the resulting assembly.

Then I started studying the implementation of lc.exe using Reflector.
Reading the code revealed that this form should be the correct one:

/i:control1.dll /i:control2.dll

but it still didn't work. And based on what Reflector told me, I couldn't
find any flaws in the implementation. As a last resort, I made a new C#
command line project in VS.NET and copied the code from the Reflector output
into the project, thinking I then might be able to debug it. Upon running
this reverse-engineered project, however, it all worked perfectly and the
tool generated a new license file.

So where does this leave me/us? There is still a bug in lc.exe, but maybe
another bug in Reflector cancels the first bug out? I am a bit mystified,
but I still believe Microsoft should fix their lc.exe. I assume it is a
trivial bug, for anyone with access to the real source code.

/Jens
 
Back
Top