ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   DLLs (https://www.excelbanter.com/excel-programming/295013-dlls.html)

ksnapp[_55_]

DLLs
 
Any body know of any good recources to get me started with doing DL
calls and all that with vba

--
Message posted from http://www.ExcelForum.com


AA2e72E[_2_]

DLLs
 
It is a vertical learning curve to start with but it gets very easy after the first few successful calls

Windows API (application programming interface) calls use code in DLLs. These are Win32 Dlls. These are always available to you provided that you include the functions in the Declarations section of your code. E.g

Private Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Lon

This will return the folder where Windows is installed

There are also ActiveX DLLs. You can use these with 'early' binding i.e you need to add a reference to it or you can use 'late' binding: you do not need to add a reference
E.g the File System Object is an ActiveX DLL. (SCRRUN.DLL); it is shown as Microsoft Scripting Runtime when you are in the IDE and click Tools | References. You would use it as follows
(early
DIM FSO as New Scripting.FileSystemObjec

FSO = New Scripting.FileSystemObjec
(late
Dim FSO
Set FSO = CreateObject("Scripting.FileSystemObject"

FSO is ow an instance of the file system object and will expose all its methods and properties

I am unable to recommend any specific book. Search for examples of Windows APIs on the Internet. File System Objectis usually covered in any book dealing with scripting

Good Luck.

K Dales

DLLs
 
MSDN Library has lots of documentation of Windows API and
other functions/procedures:
Here's a good starting point:
http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/winprog/winprog/functions_by_category.asp

-----Original Message-----
Any body know of any good recources to get me started

with doing DLL
calls and all that with vba?


---
Message posted from http://www.ExcelForum.com/

.



All times are GMT +1. The time now is 09:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com