newbie regasm mytest.DLL /out:mytest.tlb

  • Thread starter Thread starter S Hall
  • Start date Start date
S

S Hall

I'm doing a CSharp example of a DLL.
It has two classes:
// Add two numbers
using System;
namespace MyMethods
{
public class AddClass
{
public static long Add(long i, long j)
{
return(i+j);
}
}
}

// Multiply two numbers
using System;
namespace MyMethods
{
public class MultiplyClass
{
public static long Multiply(long x, long y)
{
return (x*y);
}
}
}

I made it into a DLL and I did not get any errors.
I made it into an EXE and it worked OK.
However when I try to do a

regasm mytest.DLL /out:mytest.tlb

I get: regasm error: unknown option: /out

I also tried to :

regasm mytest.dll /reg:mytest.reg

I get: regasm error: Ambiguous option: /reg

Any comments of how to correct this?

TIA
Steve
 
Steve,

I don't understand how you are getting anything useful, as static
methods are not exported through COM.

As for calling regasm with the /reg flag, there is no indication that
/reg is a valid flag in the documentation for regasm.exe.

Hope this helps.
 
I made it into a DLL and I did not get any errors.
I made it into an EXE and it worked OK.
However when I try to do a

regasm mytest.DLL /out:mytest.tlb

I get: regasm error: unknown option: /out

I also tried to :

regasm mytest.dll /reg:mytest.reg

I get: regasm error: Ambiguous option: /reg

Any comments of how to correct this?

I haven't used regasm at all myself, but running it without any
parameters seems to give a pretty intelligible help message - which
doesn't include any of the options you're trying to give it. I suspect
you want:

regasm mytest.dll /tlb:mytest.tlb
 
Thanks a bunch. That did it!!!
Steve

Jon Skeet said:
I haven't used regasm at all myself, but running it without any
parameters seems to give a pretty intelligible help message - which
doesn't include any of the options you're trying to give it. I suspect
you want:

regasm mytest.dll /tlb:mytest.tlb
 
Back
Top