Remove Enum prefix from tlb
-
Hi all When creating COM dll from C# i get TLB file. All enums in the file get a prefix of the enum name is therea way to remove the prefix?
//C# code
public enum OPTIONS
{
Zoom = -1,
FitWindow,
FitWidth,
FitHeight,
Actual
}//TLB
OPTIONS
{
OPTIONS_Zoom = -1,
OPTIONS_FitWindow = 0,
OPTIONS_FitWidth = 1,
OPTIONS_FitHeight = 2,
OPTIONS_Actual = 3
};Have a nice Day
-
Hi all When creating COM dll from C# i get TLB file. All enums in the file get a prefix of the enum name is therea way to remove the prefix?
//C# code
public enum OPTIONS
{
Zoom = -1,
FitWindow,
FitWidth,
FitHeight,
Actual
}//TLB
OPTIONS
{
OPTIONS_Zoom = -1,
OPTIONS_FitWindow = 0,
OPTIONS_FitWidth = 1,
OPTIONS_FitHeight = 2,
OPTIONS_Actual = 3
};Have a nice Day
There is, but you're not going to be keen on how much work it is. Anyway, if you want to do this you need to follow the steps in this[^] blog.
Forgive your enemies - it messes with their heads
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
There is, but you're not going to be keen on how much work it is. Anyway, if you want to do this you need to follow the steps in this[^] blog.
Forgive your enemies - it messes with their heads
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
liqnit wrote:
I was hoping for an easier way...
Nope. Sorry.
Forgive your enemies - it messes with their heads
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
I can confirm that that procedure is as easy as it gets.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
I can confirm that that procedure is as easy as it gets.
A guide to posting questions on CodeProject[^]
Dave KreskowiakHI ALL After trying all weekend i still get an error when trying to run the IDL to tlb using the commnad line . from this article - http://blogs.artinsoft.net/mrojas/archive/2010/05/17/interop-remove-prefix-from-c-enums-for-com.aspx[^]
Save the modified .idl file as ClassLibrary1.dll and run a command like:
midl ClassLibrary1.idl /tlb ClassLibrary1_new.tlb
Shouls i save the modified idl as dll? is this command line ok ? has anyone worked with it? thanks
Have a nice Day