473,385 Members | 1,877 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,385 software developers and data experts.

WinAPI constant search for C#

Often, I need to call Windows APIs in C#. Signatures and macro
constants can be easily found at MSDN but the constants values are not
shown. I have to search the .h file for those constants values. Is
there any online site that I can search real values for WinAPI
constatns such as PBM_SETSTATE?

Jan 29 '07 #1
3 2775


"Sin Jeong-hun" <ty*******@gmail.comwrote in message
news:11**********************@a34g2000cwb.googlegr oups.com...
Often, I need to call Windows APIs in C#. Signatures and macro
constants can be easily found at MSDN but the constants values are not
shown. I have to search the .h file for those constants values. Is
there any online site that I can search real values for WinAPI
constatns such as PBM_SETSTATE?
Quite a few are listed at www.pinvoke.net

HTH,
Mythran
Jan 29 '07 #2
Search google for API Viewer. The older ones are for VB only, but the newer
ones work for both VB and C# 2005. They usually install to the Tools menu
in VS.

Mike Ober.

"Sin Jeong-hun" <ty*******@gmail.comwrote in message
news:11**********************@a34g2000cwb.googlegr oups.com...
Often, I need to call Windows APIs in C#. Signatures and macro
constants can be easily found at MSDN but the constants values are not
shown. I have to search the .h file for those constants values. Is
there any online site that I can search real values for WinAPI
constatns such as PBM_SETSTATE?

Jan 29 '07 #3
"Sin Jeong-hun" <ty*******@gmail.comwrote in message
news:11**********************@a34g2000cwb.googlegr oups.com...
Often, I need to call Windows APIs in C#. Signatures and macro
constants can be easily found at MSDN but the constants values are not
shown. I have to search the .h file for those constants values. Is
there any online site that I can search real values for WinAPI
constatns such as PBM_SETSTATE?

The only valid resource for WinAPI constants, macro's, API declarations etc... are the
header files. You can't expect a web site to publish the header files don't you? Note that
before using you to find out whether the constant, API etc.. is supported on the target
system anyway.
Searching the header files isn't that hard, all you need is a tool like findstr.exe that you
run from the commandline to search the API constant whatever.

For instance following command:
findstr /N "PBM_SETSTATE" *.h
searches all header files in the current folder for a string PBM_SETSTATE, and takes no more
than a couple of seconds to print:

CommCtrl.h:3218:#define PBM_SETSTATE (WM_USER+16) // wParam = PBST_[State]
(NORMAL, ERROR, PAUSED)
All you need to do now is open the file in your favorite editor and go to the line number
3218 to find the constant and inspect it's context, this is a lot faster than searching a
site with the added benefit that you get the correct data.

Willy.

Jan 29 '07 #4

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

Similar topics

5
by: NJSG | last post by:
In english ========== It exists any way to copy directly the content of a file to ano- ther file using a Win32 (WinAPI) C application, that doesn't uses ms-dos "copy" and doesn't needs to ...
3
by: Yura Tigiev | last post by:
Hello! Is it possible to write (classical windows with My computers, My Desctop, My networks Places end etc ) FolderBrowseDialog without use WinApi? If yes, can you send source code ? Yuri
1
by: Nikolay Petrov | last post by:
I use some of Windows Terminal Services APIs in my app. The is an API function which enumerates sessions on a terminal server. It uses a pointer from another API function to know on which...
7
by: jg | last post by:
or would I have to use C# or C++?
2
by: Edwin Knoppert | last post by:
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...
6
by: Amit Bhatia | last post by:
Hi, I am not sure if this belongs to this group. Anyway, my question is as follows: I have a list (STL list) whose elements are pairs of integers (STL pairs, say objects of class T). When I create...
33
by: desktop | last post by:
In the C++ standard sec 23.1.2 table 69 it says that erase(q) where q is a pointer to an element can be done in amortized constant time. I guess that is not worst case since std::set is...
4
by: jaime | last post by:
Hi again all. Given the line: const int x=5; Can I then use "x" as a constant expression? (By "constant expression", I mean "constant expression" as defined in the C99 standard) I've been...
5
by: =?Utf-8?B?UnlhbiBBbmRydXM=?= | last post by:
Is there a way to configure\create a datatable (strongly typed or untyped) that can have a row accessed in constant time if you are searching on the primary key? If there isn't a way, then what...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.