473,395 Members | 1,653 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Supress error/warning of winapi in class?

I have this error:

Warning 1 Access of shared member, constant member, enum member or nested
type through an instance; qualifying expression will not be evaluated....

This because i have a call in a win32 dll:
Public Declare Ansi Function TheCall Lib "MyDll.DLL" Alias "TheCall" (ByVal
szKey As String) As Int32

Option Explict or Strict don't do anything here.

I'm looking for a solution hopefully placed in the class itself if possible.
The call is executed through the dimensioned class var.

??
Dec 13 '05 #1
2 1203
you are referencing a static method from an instance rather than its class.
use ClassName.MethodName (class referenece), not myObj.MethodName (instance
reference)

-- bruce (sqlwork.com)
"Edwin Knoppert" <ne**@hellobasic.com> wrote in message
news:43**********************@text.nova.planet.nl. ..
I have this error:

Warning 1 Access of shared member, constant member, enum member or nested
type through an instance; qualifying expression will not be evaluated....

This because i have a call in a win32 dll:
Public Declare Ansi Function TheCall Lib "MyDll.DLL" Alias "TheCall"
(ByVal szKey As String) As Int32

Option Explict or Strict don't do anything here.

I'm looking for a solution hopefully placed in the class itself if
possible.
The call is executed through the dimensioned class var.

??

Dec 13 '05 #2
Hey, thanks, thought the declares where not public, brain-dead of course.
It says: PUBLIC :)

To bad i couldn't reuse my WITH statement with these calls.
I swapped it for the dimmed object but MS does not like that :)

Thanks,
"Bruce Barker" <br******************@safeco.com> schreef in bericht
news:eM**************@TK2MSFTNGP11.phx.gbl...
you are referencing a static method from an instance rather than its
class. use ClassName.MethodName (class referenece), not myObj.MethodName
(instance reference)

-- bruce (sqlwork.com)
"Edwin Knoppert" <ne**@hellobasic.com> wrote in message
news:43**********************@text.nova.planet.nl. ..
I have this error:

Warning 1 Access of shared member, constant member, enum member or nested
type through an instance; qualifying expression will not be evaluated....

This because i have a call in a win32 dll:
Public Declare Ansi Function TheCall Lib "MyDll.DLL" Alias "TheCall"
(ByVal szKey As String) As Int32

Option Explict or Strict don't do anything here.

I'm looking for a solution hopefully placed in the class itself if
possible.
The call is executed through the dimensioned class var.

??


Dec 13 '05 #3

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

Similar topics

0
by: Cary | last post by:
Trying to install on SuSE 8.2 from source. ../configure --with-apxs=/usr/local/apache/bin/apxs --with-mysql --with-unixODBC=/usr/lib getting this error: /root/php-4.3.2/ext/odbc/php_odbc.c -o...
14
by: kosuke | last post by:
I keep getting the following error/warning message when using the python based program getmail4: /usr/lib/python2.3/optparse.py:668: FutureWarning: %u/%o/%x/%X of negative int will return a...
7
by: Matthew Del Buono | last post by:
Don't try to solve the problem. I've found a way -- around or fixing it. I'm just curious as to whether this is Microsoft's problem in their compiler or if there's a standard saying this is to be...
4
by: David Boothe | last post by:
is there a way to suppress the standard Access warning when a user attempts to add a record that violates a unique index/primary key? I would prefer to have a custom message box... Thanks!
1
by: David | last post by:
I have a custom control that contains a class that Inherits the panel control. I am trying to catch a keydown event in this class and then supress it from the rest of the control as well as the...
7
by: jg | last post by:
or would I have to use C# or C++?
1
by: ehabaziz2001 | last post by:
First time for writing the program it goes well but when rebuilding it issueing that message : Linking... LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main...
0
by: b.coolsaet | last post by:
Hi, like the title says simplexml is giving me a "Node no longer exists" error while using the addChild() function. Note that it's not giving an error on the first addChild(); Can somebody...
2
by: ppuniversal | last post by:
hello, my program snippet: /*****************************/ /******runThread Function*****/ /*to accept other client connections*/ /*****************************/ DWORD WINAPI...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.