[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.interop

Enums and Import of Type Library

Adnan

8/6/2007 3:52:00 PM

I have written a COM interop DLL in VB.NET for .NET 2.0.50727. In it, I have
defined one of the enums as follows:
Public Enum side : uint
All = &HFFFFFFFF
Left = &H0
Right = &H1
Count = &H2
Both = &H3
Neutral = &H4
Undef = &HEEEEEEEE
End Enum

I generate the type library via regasm.exe. When I load this .tlb in VS
2005, it shows following for "side" type:
Enum side
Constant side_All = -1 (&Hffffffff)
Constant side_Both = 3
.....
.....

Why is it putting "side" in the beginning of my values? I had defined only
"All" but now it has become "side_All"?

Is there a way for me to avoid it from doing so?

Thanks,
Adnan

21 Answers

Johannes Passing

8/7/2007 7:27:00 AM

0

Unlike VB.Net, enums in IDL do not define a namespace. Two different
enums both including a symbol 'All' would thus collide. To avoid such
collisions, regasm prepends the name of the enum to ensure uniqueness.

--Johannes


Adnan wrote:
> I have written a COM interop DLL in VB.NET for .NET 2.0.50727. In it, I have
> defined one of the enums as follows:
> Public Enum side : uint
> All = &HFFFFFFFF
> Left = &H0
> Right = &H1
> Count = &H2
> Both = &H3
> Neutral = &H4
> Undef = &HEEEEEEEE
> End Enum
>
> I generate the type library via regasm.exe. When I load this .tlb in VS
> 2005, it shows following for "side" type:
> Enum side
> Constant side_All = -1 (&Hffffffff)
> Constant side_Both = 3
> ....
> ....
>
> Why is it putting "side" in the beginning of my values? I had defined only
> "All" but now it has become "side_All"?
>
> Is there a way for me to avoid it from doing so?
>
> Thanks,
> Adnan
>


--
Johannes Passing - http:...

70.67.20.208@sjrb.ca

2/5/2013 6:36:00 AM

0

On 04 Feb 2013, =?UTF-8?B?U3Bhbc6ydXN0ZXI=?= <SpamBuster@not.can> posted
some news:H1ZPs.50674$J13.29051@newsfe08.iad:

> From: =?UTF-8?B?U3Bhbc6ydXN0ZXI=?= <SpamBuster@not.can>
> Reply-To: Spam??uster@not.can
> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0)
> Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0
> Newsgroups:
> misc.survivalism,rec.crafts.metalworking,talk.politics.guns,us.politics
> ,alt.california Subject: Re: The NRA and gun control
> References: <577be$510c99c5$414e828e$4742@EVERESTKC.NET>
> <550d08a0-cd34-46ce-a0d1-6da9b3c3bbb6@u7g2000yqg.googlegroups.com>
> <fbf4f705-9833-405a-86f8-782a70076449@d11g2000yqe.googlegroups.com>
> <4de9ae5d-296b-4e18-8713-3ad28d8d3872@r14g2000yqe.googlegroups.com>
> <lf9tg8lb3j7ac46utrrk5hqs8ugg2vhp1d@4ax.com>
> <xuCdncJyyrQsh5LMnZ2dnUVZ_rqdnZ2d@earthlink.com>
> <XnsA15D7869782DAhopewell@216.196.121.131>
> <vd6dnSUak_L70Y3MnZ2dnUVZ_smdnZ2d@earthlink.com> In-Reply-To:
> <vd6dnSUak_L70Y3MnZ2dnUVZ_smdnZ2d@earthlink.com> Content-Type:
> text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding:
> 7bit Lines: 16
> Message-ID: <H1ZPs.50674$J13.29051@newsfe08.iad>
> NNTP-Posting-Host: 70.67.20.208
> X-Complaints-To: internet.abuse@sjrb.ca
> X-Trace: 1360026855 70.67.20.208 (Tue, 05 Feb 2013 01:14:15 UTC)
> NNTP-Posting-Date: Tue, 05 Feb 2013 01:14:15 UTC
> Date: Mon, 04 Feb 2013 17:13:41 -0600
> X-Received-Bytes: 1845

--

70.67.20.208@sjrb.ca

2/5/2013 6:36:00 AM

0

On 04 Feb 2013, =?UTF-8?B?U3Bhbc6ydXN0ZXI=?= <SpamBuster@not.can> posted
some news:B5ZPs.50678$J13.35432@newsfe08.iad:

> From: =?UTF-8?B?U3Bhbc6ydXN0ZXI=?= <SpamBuster@not.can>
> Reply-To: Spam??uster@not.can
> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0)
> Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0
> Newsgroups:
> misc.survivalism,rec.crafts.metalworking,talk.politics.guns,us.politics
> ,alt.california Subject: Re: The NRA and gun control
> References: <577be$510c99c5$414e828e$4742@EVERESTKC.NET>
> <550d08a0-cd34-46ce-a0d1-6da9b3c3bbb6@u7g2000yqg.googlegroups.com>
> <fbf4f705-9833-405a-86f8-782a70076449@d11g2000yqe.googlegroups.com>
> <4de9ae5d-296b-4e18-8713-3ad28d8d3872@r14g2000yqe.googlegroups.com>
> <lf9tg8lb3j7ac46utrrk5hqs8ugg2vhp1d@4ax.com>
> <xuCdncJyyrQsh5LMnZ2dnUVZ_rqdnZ2d@earthlink.com>
> <XnsA15D7869782DAhopewell@216.196.121.131>
> <vd6dnSUak_L70Y3MnZ2dnUVZ_smdnZ2d@earthlink.com>
> <XnsA15DA6F47283Fhopewell@216.196.121.131>
> <-b2dnUxu7N5ryY3MnZ2dnUVZ_sqdnZ2d@earthlink.com>
> <XnsA15DAF3C198E1hopewell@216.196.121.131> In-Reply-To:
> <XnsA15DAF3C198E1hopewell@216.196.121.131> Content-Type: text/plain;
> charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit
> Lines: 13
> Message-ID: <B5ZPs.50678$J13.35432@newsfe08.iad>
> NNTP-Posting-Host: 70.67.20.208
> X-Complaints-To: internet.abuse@sjrb.ca
> X-Trace: 1360027105 70.67.20.208 (Tue, 05 Feb 2013 01:18:25 UTC)
> NNTP-Posting-Date: Tue, 05 Feb 2013 01:18:25 UTC
> Date: Mon, 04 Feb 2013 17:17:52 -0600
> X-Received-Bytes: 1899

--

70.67.20.208@sjrb.ca

2/5/2013 6:36:00 AM

0

On 03 Feb 2013, =?UTF-8?B?U3Bhbc6ydXN0ZXI=?= <SpamBuster@not.can> posted
some news:mIIPs.12805$J13.7333@newsfe08.iad:

> From: =?UTF-8?B?U3Bhbc6ydXN0ZXI=?= <SpamBuster@not.can>
> Reply-To: Spam??uster@not.can
> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0)
> Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0
> Newsgroups:
> misc.survivalism,rec.crafts.metalworking,talk.politics.guns,us.politics
> ,alt.california Subject: Re: The NRA and gun control
> References: <577be$510c99c5$414e828e$4742@EVERESTKC.NET>
> <550d08a0-cd34-46ce-a0d1-6da9b3c3bbb6@u7g2000yqg.googlegroups.com>
> <fbf4f705-9833-405a-86f8-782a70076449@d11g2000yqe.googlegroups.com>
> <4de9ae5d-296b-4e18-8713-3ad28d8d3872@r14g2000yqe.googlegroups.com>
> <lf9tg8lb3j7ac46utrrk5hqs8ugg2vhp1d@4ax.com>
> <xuCdncJyyrQsh5LMnZ2dnUVZ_rqdnZ2d@earthlink.com>
> <ddjug8ljvcg7sla36smbbpc1en0mrvi602@4ax.com> In-Reply-To:
> <ddjug8ljvcg7sla36smbbpc1en0mrvi602@4ax.com> Content-Type: text/plain;
> charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit
> Lines: 9
> Message-ID: <mIIPs.12805$J13.7333@newsfe08.iad>
> NNTP-Posting-Host: 70.67.20.208
> X-Complaints-To: internet.abuse@sjrb.ca
> X-Trace: 1359959954 70.67.20.208 (Mon, 04 Feb 2013 06:39:14 UTC)
> NNTP-Posting-Date: Mon, 04 Feb 2013 06:39:14 UTC
> Date: Sun, 03 Feb 2013 19:38:41 -0800
> X-Received-Bytes: 1745

-=-

70.67.20.208@sjrb.ca

2/5/2013 7:02:00 PM

0

On 04 Feb 2013, =?UTF-8?B?U3Bhbc6ydXN0ZXI=?= <SpamBuster@not.can> posted
some news:OAXPs.55633$On7.20033@newsfe16.iad:

> From: =?UTF-8?B?U3Bhbc6ydXN0ZXI=?= <SpamBuster@not.can>
> Reply-To: Spam??uster@not.can
> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0)
> Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0
> Newsgroups:
> misc.survivalism,rec.crafts.metalworking,talk.politics.guns,us.politics
> ,alt.california Subject: SPAMMED INTO CANADA -----------------Re: The
> NRA and gun control References:
> <577be$510c99c5$414e828e$4742@EVERESTKC.NET>
> <550d08a0-cd34-46ce-a0d1-6da9b3c3bbb6@u7g2000yqg.googlegroups.com>
> <fbf4f705-9833-405a-86f8-782a70076449@d11g2000yqe.googlegroups.com>
> <4de9ae5d-296b-4e18-8713-3ad28d8d3872@r14g2000yqe.googlegroups.com>
> <lf9tg8lb3j7ac46utrrk5hqs8ugg2vhp1d@4ax.com>
> <xuCdncJyyrQsh5LMnZ2dnUVZ_rqdnZ2d@earthlink.com>
> <XnsA15D7869782DAhopewell@216.196.121.131> In-Reply-To:
> <XnsA15D7869782DAhopewell@216.196.121.131> Content-Type: text/plain;
> charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit
> Lines: 7
> Message-ID: <OAXPs.55633$On7.20033@newsfe16.iad>
> NNTP-Posting-Host: 70.67.20.208
> X-Complaints-To: internet.abuse@sjrb.ca
> X-Trace: 1360020910 70.67.20.208 (Mon, 04 Feb 2013 23:35:10 UTC)
> NNTP-Posting-Date: Mon, 04 Feb 2013 23:35:10 UTC
> Date: Mon, 04 Feb 2013 15:34:36 -0600
> X-Received-Bytes: 1640

--

70.67.20.208@sjrb.ca

2/5/2013 7:02:00 PM

0

On 04 Feb 2013, =?UTF-8?B?U3Bhbc6ydXN0ZXI=?= <SpamBuster@not.can> posted
some news:2FYPs.9397$Sq4.4188@newsfe14.iad:

> From: =?UTF-8?B?U3Bhbc6ydXN0ZXI=?= <SpamBuster@not.can>
> Reply-To: Spam??uster@not.can
> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0)
> Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0
> Newsgroups:
> misc.survivalism,rec.crafts.metalworking,talk.politics.guns,us.politics
> ,alt.california Subject: SPAMMED INTO CANADA ------------------ Re:
> The NRA and gun control References:
> <577be$510c99c5$414e828e$4742@EVERESTKC.NET>
> <550d08a0-cd34-46ce-a0d1-6da9b3c3bbb6@u7g2000yqg.googlegroups.com>
> <fbf4f705-9833-405a-86f8-782a70076449@d11g2000yqe.googlegroups.com>
> <4de9ae5d-296b-4e18-8713-3ad28d8d3872@r14g2000yqe.googlegroups.com>
> <lf9tg8lb3j7ac46utrrk5hqs8ugg2vhp1d@4ax.com>
> <xuCdncJyyrQsh5LMnZ2dnUVZ_rqdnZ2d@earthlink.com>
> <XnsA15D7869782DAhopewell@216.196.121.131>
> <vd6dnSUak_L70Y3MnZ2dnUVZ_smdnZ2d@earthlink.com>
> <XnsA15DA6F47283Fhopewell@216.196.121.131>
> <-b2dnUxu7N5ryY3MnZ2dnUVZ_sqdnZ2d@earthlink.com> In-Reply-To:
> <-b2dnUxu7N5ryY3MnZ2dnUVZ_sqdnZ2d@earthlink.com> Content-Type:
> text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding:
> 7bit Lines: 8
> Message-ID: <2FYPs.9397$Sq4.4188@newsfe14.iad>
> NNTP-Posting-Host: 70.67.20.208
> X-Complaints-To: internet.abuse@sjrb.ca
> X-Trace: 1360025278 70.67.20.208 (Tue, 05 Feb 2013 00:47:58 UTC)
> NNTP-Posting-Date: Tue, 05 Feb 2013 00:47:58 UTC
> Date: Mon, 04 Feb 2013 16:47:24 -0600
> X-Received-Bytes: 1819

--

Spamßuster

2/5/2013 7:19:00 PM

0

On 2/5/2013 1:02 PM, 70.67.20.208@sjrb.ca wrote:


Path: not-for-mail
From: "70.67.20.208@sjrb.ca" <70.67.20.208@sjrb.ca>
Newsgroups: misc.survivalism,can.politics,soc.culture.african.american
Subject: Re: SPAMMED INTO CANADA -----------------Re: The NRA and gun
control
Date: Tue, 5 Feb 2013 19:02:10 +0000 (UTC)
Organization: 70.67.16.71@sjrb.ca
Lines: 30
Message-ID: <XnsA15E704657FE5EVX720OYQM@94.75.214.90>
References: <577be$510c99c5$414e828e$4742@EVERESTKC.NET>
<550d08a0-cd34-46ce-a0d1-6da9b3c3bbb6@u7g2000yqg.googlegroups.com>
<fbf4f705-9833-405a-86f8-782a70076449@d11g2000yqe.googlegroups.com>
<4de9ae5d-296b-4e18-8713-3ad28d8d3872@r14g2000yqe.googlegroups.com>
<lf9tg8lb3j7ac46utrrk5hqs8ugg2vhp1d@4ax.com>
<xuCdncJyyrQsh5LMnZ2dnUVZ_rqdnZ2d@earthlink.com>
<XnsA15D7869782DAhopewell@216.196.121.131>
<OAXPs.55633$On7.20033@newsfe16.iad>
NNTP-Posting-Host: s1izKm9zRs9jjh1M93kxcg.user.speranza.aioe.org

X-Complaints-To: abuse@giganews.com <<=========

User-Agent: Xnews/5.04.25
X-Notice: Filtered by postfilter v. 0.8.2
X-Received-Bytes: 2490
Xref: Hurricane misc.survivalism:1091192 can.politics:1451352
soc.culture.african.american:252061



--
=====================================================================
SPAMMED INTO NON-RELEVANT GROUPS / COUNTRY
=====================================================================

Spamßuster

2/5/2013 9:57:00 PM

0

On 2/5/2013 12:36 AM, 70.67.20.208@sjrb.ca wrote:

> Path: not-for-mail
> From: "70.67.20.208@sjrb.ca" <70.67.20.208@sjrb.ca>
> Newsgroups: misc.survivalism,can.politics,soc.culture.african.american
> Subject: Re: SPAMMED INTO CANADA -------------- Re: The NRA and gun control
> Date: Tue, 5 Feb 2013 06:36:01 +0000 (UTC)
> Organization: 70.67.16.71@sjrb.ca
> Lines: 30
> Message-ID: <XnsA15DE5E79FEDEEVX720OYQM@94.75.214.90>
> References: <577be$510c99c5$414e828e$4742@EVERESTKC.NET> <550d08a0-cd34-46ce-a0d1-6da9b3c3bbb6@u7g2000yqg.googlegroups.com> <fbf4f705-9833-405a-86f8-782a70076449@d11g2000yqe.googlegroups.com> <4de9ae5d-296b-4e18-8713-3ad28d8d3872@r14g2000yqe.googlegroups.com> <lf9tg8lb3j7ac46utrrk5hqs8ugg2vhp1d@4ax.com> <xuCdncJyyrQsh5LMnZ2dnUVZ_rqdnZ2d@earthlink.com> <XnsA15D7869782DAhopewell@216.196.121.131> <eFWPs.23764$H22.4715@newsfe13.iad>
> NNTP-Posting-Host: s1izKm9zRs9jjh1M93kxcg.user.speranza.aioe.org

> X-Complaints-To: abuse@aioe.org <<========

> User-Agent: Xnews/5.04.25
> X-Notice: Filtered by postfilter v. 0.8.2




=====================================================================
SPAMMED INTO NON-RELEVANT GROUPS / COUNTRY
=====================================================================

70.67.20.208@sjrb.ca

2/6/2013 2:22:00 AM

0

On 04 Feb 2013, =?UTF-8?B?U3Bhbc6ydXN0ZXI=?= <SpamBuster@not.can> posted
some news:zEYPs.9396$Sq4.3978@newsfe14.iad:

> From: =?UTF-8?B?U3Bhbc6ydXN0ZXI=?= <SpamBuster@not.can>
> Reply-To: Spam??uster@not.can
> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0)
> Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0
> Newsgroups:
> misc.survivalism,rec.crafts.metalworking,talk.politics.guns,us.politics
> ,alt.california Subject: SPAMMED INTO CANADA ------------------ Re:
> The NRA and gun control References:
> <577be$510c99c5$414e828e$4742@EVERESTKC.NET>
> <550d08a0-cd34-46ce-a0d1-6da9b3c3bbb6@u7g2000yqg.googlegroups.com>
> <fbf4f705-9833-405a-86f8-782a70076449@d11g2000yqe.googlegroups.com>
> <4de9ae5d-296b-4e18-8713-3ad28d8d3872@r14g2000yqe.googlegroups.com>
> <lf9tg8lb3j7ac46utrrk5hqs8ugg2vhp1d@4ax.com>
> <xuCdncJyyrQsh5LMnZ2dnUVZ_rqdnZ2d@earthlink.com>
> <XnsA15D7869782DAhopewell@216.196.121.131>
> <vd6dnSUak_L70Y3MnZ2dnUVZ_smdnZ2d@earthlink.com>
> <XnsA15DA6F47283Fhopewell@216.196.121.131> In-Reply-To:
> <XnsA15DA6F47283Fhopewell@216.196.121.131> Content-Type: text/plain;
> charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit
> Lines: 9
> Message-ID: <zEYPs.9396$Sq4.3978@newsfe14.iad>
> NNTP-Posting-Host: 70.67.20.208
> X-Complaints-To: internet.abuse@sjrb.ca
> X-Trace: 1360025247 70.67.20.208 (Tue, 05 Feb 2013 00:47:27 UTC)
> NNTP-Posting-Date: Tue, 05 Feb 2013 00:47:27 UTC
> Date: Mon, 04 Feb 2013 16:46:54 -0600
> X-Received-Bytes: 1853

--

70.67.20.208@sjrb.ca

2/6/2013 2:22:00 AM

0

On 04 Feb 2013, =?UTF-8?B?U3Bhbc6ydXN0ZXI=?= <SpamBuster@not.can> posted
some news:33ZPs.50676$J13.22327@newsfe08.iad:

> From: =?UTF-8?B?U3Bhbc6ydXN0ZXI=?= <SpamBuster@not.can>
> Reply-To: Spam??uster@not.can
> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0)
> Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0
> Newsgroups:
> misc.survivalism,rec.crafts.metalworking,talk.politics.guns,us.politics
> ,alt.california Subject: Re: The NRA and gun control
> References: <577be$510c99c5$414e828e$4742@EVERESTKC.NET>
> <550d08a0-cd34-46ce-a0d1-6da9b3c3bbb6@u7g2000yqg.googlegroups.com>
> <fbf4f705-9833-405a-86f8-782a70076449@d11g2000yqe.googlegroups.com>
> <4de9ae5d-296b-4e18-8713-3ad28d8d3872@r14g2000yqe.googlegroups.com>
> <lf9tg8lb3j7ac46utrrk5hqs8ugg2vhp1d@4ax.com>
> <xuCdncJyyrQsh5LMnZ2dnUVZ_rqdnZ2d@earthlink.com>
> <XnsA15D7869782DAhopewell@216.196.121.131>
> <vd6dnSUak_L70Y3MnZ2dnUVZ_smdnZ2d@earthlink.com>
> <XnsA15DA6F47283Fhopewell@216.196.121.131>
> <-b2dnUxu7N5ryY3MnZ2dnUVZ_sqdnZ2d@earthlink.com> In-Reply-To:
> <-b2dnUxu7N5ryY3MnZ2dnUVZ_sqdnZ2d@earthlink.com> Content-Type:
> text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding:
> 7bit Lines: 12
> Message-ID: <33ZPs.50676$J13.22327@newsfe08.iad>
> NNTP-Posting-Host: 70.67.20.208
> X-Complaints-To: internet.abuse@sjrb.ca
> X-Trace: 1360026943 70.67.20.208 (Tue, 05 Feb 2013 01:15:43 UTC)
> NNTP-Posting-Date: Tue, 05 Feb 2013 01:15:43 UTC
> Date: Mon, 04 Feb 2013 17:15:09 -0600
> X-Received-Bytes: 1852

--