Windows API and DLLs --- Part-II |
| | | | Submitted on: 6/19/2003 7:46:39 AM
By: Deepanjan Datta
Level: Advanced User Rating:
By 2 Users Compatibility:VB 3.0, VB 4.0 (16-bit), VB 4.0 (32-bit), VB 5.0, VB 6.0
Users have accessed this article 535 times. | (About the author) |
| | Covers nature of DLLs and API data types!!!
API viewer in part III (coming soon)!!! Part I on PSC | |
|
Terms of Agreement:
By using this article, you agree to the following terms...
1) You may use
this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.
3) You may link to this article from another website, but ONLY if it is not wrapped in a frame.
4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description. |
Windows
API - Part II
The
nature of DLLs :
The term Dynamic Link Library has special
implications for programmers. When a routine is said to be said to be linked
dynamically to a program, it means that the routine, whether a subroutine or
a function, is not connected to the program until after the program is compiled.
The function is available at runtime only. The DLL files, however, do not merge
with your program. A program has runtime access to these routines but a
program's EXE file does not contain the physical DLL routines at any time.
API functions never add to the size of your
application's files. During program execution, these routines are loaded just
long enough to run; then, if they are no longer needed the Windows operating
system can free up their resources so that more memory and CPU time is left for
new routines that might start.
Understanding
API data types :
One of the reasons the API routines are difficult
to call is that Windows uses a slightly different set of data types than Visual
Basic. Although Windows API uses 'String' and 'Long' data types, it also uses
other data types such as RECT and MSG.
The 'Alias' keyword is used in 'Declare'
statements to convert some string values that contain illegal characters to
legal Visual Basic equivalents.
Following are some of the data types used
by API routines :
-
ANY --- A Windows API routine that
accepts different kinds of data types will list any for those data types.
-
ATOM --- Integer data.
-
BOOL --- Long integer data.
-
CHAR --- Byte data.
-
COLOREF --- Long integer data used
specifying color values.
-
DWORD --- Long integer data.
-
NULL --- Long integer data types used
for uninitialized values.
-
LPSTR, LPCSTR --- Matches the String
data type.
| |
Other 27 submission(s) by this author
|
|
|
Report Bad Submission |
|
|
Your Vote! |
See Voting Log |
|
Other User Comments |
6/19/2003 7:51:04 AM:Deepanjan Datta Expecting votes and comments ;-))
|
6/19/2003 10:31:44 AM: hmm... Were is the rest of it?
|
6/19/2003 12:43:48 PM:me you can go further and explain more to
us especially with the DLLs
|
6/19/2003 4:55:41 PM:Micro X Corp what does OCX stand for???
|
6/20/2003 12:17:28 PM:Jon Williamson Why ask for comments if you are going
to delete the ones that are negative?
This is a poor excuse for an API
tutorial.
|
6/20/2003 2:00:30 PM:Norm Cook OCX has no literal translation. It
represents the file extension for an
ActiveX OLE Control.
|
|
Add Your Feedback! |
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.
NOTICE: The author of this article has been kind enough to share it with you. If you have a criticism, please state it politely or it will be deleted.
For feedback not related to this particular article, please click here. |
|