473,503 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Option Strict Error on Const declaration.....

After declaring

Option Strict On

Iam getting the error on.

Private Const ERROR_SUCCESS = &H0

What is the correction needed for the above statement.

..Net Framework 1.1.

Thanks,

Smith


Nov 21 '05 #1
5 1357
Smith Guy wrote:
Private Const ERROR_SUCCESS = &H0


Private Const ERROR_SUCCESS As Integer = &H0

--

(O) e n o n e
Nov 21 '05 #2
Hi,

Private Const ERROR_SUCCESS as integer = &H0

Ken
----------------
"Smith Guy" <gS*********@hotmail.com> wrote in message
news:eG**************@TK2MSFTNGP10.phx.gbl...
After declaring

Option Strict On

Iam getting the error on.

Private Const ERROR_SUCCESS = &H0

What is the correction needed for the above statement.

..Net Framework 1.1.

Thanks,

Smith

Nov 21 '05 #3
"Smith Guy" <gS*********@hotmail.com> schrieb:
Option Strict On

Iam getting the error on.

Private Const ERROR_SUCCESS = &H0

What is the correction needed for the above statement.


\\\
Private Const ERROR_SUCCESS As Int32 = &H0
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #4
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:OW**************@TK2MSFTNGP15.phx.gbl...
"Smith Guy" <gS*********@hotmail.com> schrieb:
Private Const ERROR_SUCCESS = &H0

\\\
Private Const ERROR_SUCCESS As Int32 = &H0
///


Herfried,

Probably been asked before (apologies), but why do you favour
"Int32" over "Integer"? Is it just for clarity or are Our Friends in
Redmond planning to "upgrade" Integer to its 64-bit equivalent
any time soon?

TIA,
Phill W.
Nov 21 '05 #5
"Phill. W" <P.A.Ward@o-p-e-n-.-a-c-.-u-k> schrieb:
> Private Const ERROR_SUCCESS = &H0 \\\
Private Const ERROR_SUCCESS As Int32 = &H0
///


Probably been asked before (apologies), but why do you favour
"Int32" over "Integer"?


I prefer to use the names of the types in the .NET Framework when dealing
with unmanaged code. It's only my personal preference.
Is it just for clarity or are Our Friends in
Redmond planning to "upgrade" Integer to its 64-bit equivalent
any time soon?


'Integer' will remain 32-bit even in the 64-bit world.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
2096
by: Daylor | last post by:
hi. im using option strict on. im doing in ,from the simple reason ,to be warn when there are implict conversion like string to int ,int to string. BUT. the price ,(now i see ), is very bad....
4
398
by: KC | last post by:
I'm trying to export data to Excel, and I found an example routine at microsoft, but I get an "Option Strict On disallows late binding." at 'oBook = oExcel.Workbooks.Add'. Without turning Option...
4
3001
by: Howard Kaikow | last post by:
I am trying to retrive some WMI properties using Option Strict On. This requires the use of InvokeMember. I know that there are alternative ways to get the values, but I want to learn how to...
9
2296
by: YYZ | last post by:
After reading many messages in this group, it seems that the preferred setting for this is ON. Okay, I did that in my project (first with ..Net -- long time VB6 developer) and now a bunch of...
7
2113
by: Owen Mortensen | last post by:
(This code was working in asp.net 1.1 VS2003. After upgrade to VS2005, chokes): in the aspx file: <ItemTemplate> <asp:datagrid id="dg_instr" runat="server" AutoGenerateColumns="False"...
5
5657
by: cranium.2003 | last post by:
hi, Here is my code #include <iostream.h> int main() { cout <<"HI"; return 0; } and using following command to compile a C++ program g++ ex1.cpp -o ex1
13
2306
by: C. Moya | last post by:
I fully expected the lack of a way to set Option Strict globally to be fixed in SP1. I can't seem to figure out if it has been fixed or not. It still seems we have to add the declaration at the top...
9
4737
by: fcvcnet | last post by:
Hi, I write a class class CSegment { public: CSegment(void); public: ~CSegment(void); public: CArray< CList< CPoint, CPoint& >, CList< CPoint, CPoint& >& m_curve;
15
1760
by: Armin Zingler | last post by:
Hi, after dealing with the new possiblities of the current VB version, I again and still wonder why Option Infer can not be used with Option Strict On at class level, i.e. when declaring a...
0
7202
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7084
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7278
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7328
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
380
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.