[AccessD] Office API's

Jim Dettman jimdettman at verizon.net
Fri Dec 10 12:34:25 CST 2010


Susan,

  Stuart hit most of the top ones.  There are others which are more of
"utility" type nature (i.e. GetParent) which you can combine with other
calls to do a lot of different things unlike ones which are a direct call
(i.e. GetComputerNameA).  Here's most of my list:

Private Declare Function BringWindowToTop Lib "user32" (ByVal lngHWnd As
Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal lnghObject As
Long) As Long
Private Declare Function CreateMutex Lib "kernel32" Alias "CreateMutexA"
(lngMutexAttributes As Long, lngInitialOwner As Long, ByVal lpName As
String) As Long
Private Declare Function GetComputerNameA Lib "kernel32" (ByVal lpBuffer As
String, nSize As Long) As Long
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Declare Function GetExitCodeProcess Lib "kernel32" (ByVal hProcess
As Long, lpExitCode As Long) As Long
Private Declare Function GetProp Lib "user32" Alias "GetPropA" (ByVal
lngHWnd As Long, ByVal lpString As String) As Long
Private Declare Function GetUserNameA Lib "advapi32.dll" (ByVal lpBuffer As
String, nSize As Long) As Long
Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal
nRelationship As Long) As Long
Private Declare Function GetActiveWindow Lib "user32" () As Long
Private Declare Function GetParent Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess
As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Declare Function SetProp Lib "user32" Alias "SetPropA" (ByVal hwnd
As Long, ByVal lpString As String, ByVal hdata As Long) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal
nCmdSHow As Long) As Long
Private Declare Function MoveWindow Lib "user32" (ByVal hwnd As Long, ByVal
X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long,
ByVal bRepaint As Long) As Long

Private Declare Function IsIconic Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function IsZoomed Lib "user32" (ByVal hwnd As Long) As Long

Private Declare Function GetProfileString Lib "kernel32" Alias
"GetProfileStringA" (ByVal lpAppName As String, ByVal lpKeyName As String,
ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As
Long) As Long
Private Declare Function WriteProfileString Lib "kernel32" Alias
"WriteProfileStringA" (ByVal LpszSection As String, ByVal lpszKeyName As
String, ByVal lpszString As String) As Long

Private Declare Function GlobalAlloc Lib "kernel32" (ByVal wFlags As Long,
ByVal dwBytes As Long) As Long
Private Declare Function GlobalFree Lib "kernel32" (ByVal hMem As Long) As
Long
Private Declare Function GlobalLock Lib "kernel32" (ByVal hMem As Long) As
Long
Private Declare Function GlobalUnlock Lib "kernel32" (ByVal hMem As Long) As
Long

Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" ( _
                               hpvDest As Any, hpvSource As Any, ByVal
cbCopy As Long)

Jim.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins
Sent: Friday, December 10, 2010 12:06 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Office API's

Stuart, these are great -- anyone else????

Susan H.



> On 9 Dec 2010 at 20:10, Susan Harkins wrote:
>
>> Windows API functions.
>> Susan H.
>>
>> > Susan - did you mean to say "add-ins" ?
>> > I'm not sure what you are referring to....
>> >>
>> >> I'm writing about Office APIs -- if you have a favorite one
>> >> you'd like to see showcased, let me know.
>>
>
>
> Ah Windows APIs.   I use quite a few of them.    Here's a few API calls 
> and functions that I
> use in most systems that I build (I keep them along with a number of other

> functions in a
> module of general functions that I just plug in to new apps by default, 
> Listing from the
> simplest to the most complex:

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list