Windows API:VB6・VBAでの宣言一覧(O)

Windows APIのVB6やVBAでの宣言方法がなかなか覚えられないので一覧を作ってみました。
VB6のAPIビューアにあるものを一通り一覧にしましたが…思ったより多いですね…;
(多すぎてブログの文字数制限を超えたので一覧は分割しています;)
使い方もぼちぼち更新していきます。

絞込:

| A | B | C | D | E | F | G1 | G2 | H | | J | K | L | M | N | O | P | Q | R | S1 | S2 | T | U | V | W | X | Y | Z |

WindowsAPI:VB6・VBA定義一覧
関数名宣言記述例 / 説明
ObjectCloseAuditAlarm Declare Function ObjectCloseAuditAlarm Lib "advapi32.dll" Alias "ObjectCloseAuditAlarmA" (ByVal SubsystemName As String, HandleId As Any, ByVal GenerateOnClose As Long) As Long
ObjectOpenAuditAlarm Declare Function ObjectOpenAuditAlarm Lib "kernel32" Alias "ObjectOpenAuditAlarmA" (ByVal SubsystemName As String, HandleId As Any, ByVal ObjectTypeName As String, ByVal ObjectName As String, pSecurityDescriptor As SECURITY_DESCRIPTOR, ByVal ClientToken A s Long, ByVal DesiredAccess As Long, ByVal GrantedAccess As Long, Privileges As PRIVILEGE_SET, ByVal ObjectCreation As Long, ByVal AccessGranted As Long, ByVal GenerateOnClose As Long) As Long
ObjectPrivilegeAuditAlarm Declare Function ObjectPrivilegeAuditAlarm Lib "advapi32.dll" Alias "ObjectPrivilegeAuditAlarmA" (ByVal SubsystemName As String, HandleId As Any, ByVal ClientToken As Long, ByVal DesiredAccess As Long, Privileges As PRIVILEGE_SET, ByVal AccessGranted As L ong) As Long
OemKeyScan Declare Function OemKeyScan Lib "user32" Alias "OemKeyScan" (ByVal wOemChar As Long) As Long
0〜0x0FF の OEM ASCII コードを、OEM スキャンコードとシフト状態へ変換します。
OemToChar Declare Function OemToChar Lib "user32" Alias "OemToCharA" (ByVal lpszSrc As String, ByVal lpszDst As String) As Long
文字列を、OEM 定義の文字セットから、ANSI またはワイド文字セットのいずれかへ変換します。
OemToCharBuff Declare Function OemToCharBuff Lib "user32" Alias "OemToCharBuffA" (ByVal lpszSrc As String, ByVal lpszDst As String, ByVal cchDstLength As Long) As Long
指定された文字数を、OEM 定義の文字セットから、ANSI またはワイド文字セットのいずれかへ変換します。
OffsetClipRgn Declare Function OffsetClipRgn Lib "gdi32" Alias "OffsetClipRgn" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long
OffsetRect Declare Function OffsetRect Lib "user32" Alias "OffsetRect" (lpRect As RECT, ByVal x As Long, ByVal y As Long) As Long
OffsetRgn Declare Function OffsetRgn Lib "gdi32" Alias "OffsetRgn" (ByVal hRgn As Long, ByVal x As Long, ByVal y As Long) As Long
OffsetViewportOrgEx Declare Function OffsetViewportOrgEx Lib "gdi32" Alias "OffsetViewportOrgEx" (ByVal hdc As Long, ByVal nX As Long, ByVal nY As Long, lpPoint As POINTAPI) As Long
OffsetWindowOrgEx Declare Function OffsetWindowOrgEx Lib "gdi32" Alias "OffsetWindowOrgEx" (ByVal hdc As Long, ByVal nX As Long, ByVal nY As Long, lpPoint As POINTAPI) As Long
OpenBackupEventLog Declare Function OpenBackupEventLog Lib "advapi32.dll" Alias "OpenBackupEventLogA" (ByVal lpUNCServerName As String, ByVal lpFileName As String) As Long
バックアップイベントログのハンドルを開きます。
OpenClipboard Declare Function OpenClipboard Lib "user32" Alias "OpenClipboard" (ByVal hwnd As Long) As Long
検討の目的でクリップボードを開き、他のアプリケーションがクリップボードの内容を変更できないようにします。
OpenDesktop Declare Function OpenDesktop Lib "user32" Alias "OpenDesktopA" (ByVal lpszDesktop As String, ByVal dwFlags As Long, ByVal fInherit As Boolean, ByVal dwDesiredAccess As Long) As Long
既存のデスクトップのハンドルを取得します。
OpenDriver Declare Function OpenDriver Lib "winmm.dll" Alias "OpenDriver" (ByVal szDriverName As String, ByVal szSectionName As String, ByVal lParam2 As Long) As Long
OpenEvent Declare Function OpenEvent Lib "kernel32" Alias "OpenEventA" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal lpName As String) As Long
既存の名前付きイベントオブジェクトを開きます。
OpenEventLog Declare Function OpenEventLog Lib "advapi32.dll" Alias "OpenEventLogA" (ByVal lpUNCServerName As String, ByVal lpSourceName As String) As Long
イベントログのハンドルを開きます。
OpenFile Declare Function OpenFile Lib "kernel32" Alias "OpenFile" (ByVal lpFileName As String, lpReOpenBuff As OFSTRUCT, ByVal wStyle As Long) As Long
この関数は 16 ビットバージョンの Windows との互換性のために残されています。Win32 アプリケーションでは、CreateFile 関数を使ってください。
OpenFileMapping Declare Function OpenFileMapping Lib "kernel32" Alias "OpenFileMappingA" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal lpName As String) As Long
OpenIcon Declare Function OpenIcon Lib "user32" Alias "OpenIcon" (ByVal hwnd As Long) As Long
最小化 (アイコン化) されているウィンドウを元の位置とサイズに戻した後、アクティブにします。
OpenInputDesktop Declare Function OpenInputDesktop Lib "user32" Alias "OpenInputDesktop" (ByVal dwFlags As Long, ByVal fInherit As Boolean, ByVal dwDesiredAccess As Long) As Long
ユーザー入力を受け取るデスクトップのハンドルを取得します。
OpenMutex Declare Function OpenMutex Lib "kernel32" Alias "OpenMutexA" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal lpName As String) As Long
既存の名前付きミューテックスオブジェクトを開きます。
OpenPrinter Declare Function OpenPrinter Lib "winspool.drv" Alias "OpenPrinterA" (ByVal pPrinterName As String, phPrinter As Long, pDefault As PRINTER_DEFAULTS) As Long
指定されたプリンタまたはプリントサーバーを識別するハンドルを取得します。
OpenProcess Declare Function OpenProcess Lib "kernel32" Alias "OpenProcess" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
既存のプロセスオブジェクトのハンドルを開きます。
OpenProcessToken Declare Function OpenProcessToken Lib "advapi32.dll" (ByVal ProcessHandle As Long, ByVal DesiredAccess As Long, TokenHandle As Long) As Long
プロセスに関連付けられているアクセストークンを開きます。
OpenProcessToken Declare Function OpenProcessToken Lib "advapi32.dll" Alias "OpenProcessToken" (ByVal ProcessHandle As Long, ByVal DesiredAccess As Long, TokenHandle As Long) As Long
プロセスに関連付けられているアクセストークンを開きます。
OpenSCManager Declare Function OpenSCManager Lib "advapi32.dll" Alias "OpenSCManagerA" (ByVal lpMachineName As String, ByVal lpDatabaseName As String, ByVal dwDesiredAccess As Long) As Long
指定されたコンピュータ上のサービス制御マネージャとの接続を確立し、サービス制御マネージャの指定されたデータベースを開きます。
OpenSemaphore Declare Function OpenSemaphore Lib "kernel32" Alias "OpenSemaphoreA" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal lpName As String) As Long
既存の名前付きセマフォオブジェクトを開きます。
OpenService Declare Function OpenService Lib "advapi32.dll" Alias "OpenServiceA" (ByVal hSCManager As Long, ByVal lpServiceName As String, ByVal dwDesiredAccess As Long) As Long
既存のサービスのハンドルを開きます。
OpenThreadToken Declare Function OpenThreadToken Lib "advapi32.dll" Alias "OpenThreadToken" (ByVal ThreadHandle As Long, ByVal DesiredAccess As Long, ByVal OpenAsSelf As Long, TokenHandle As Long) As Long
スレッドに関連付けられているアクセストークンを開きます。
OpenWindowStation Declare Function OpenWindowStation Lib "user32" Alias "OpenWindowStationA" (ByVal lpszWinSta As String, ByVal fInherit As Boolean, ByVal dwDesiredAccess As Long) As Long
既存のウィンドウステーションのハンドルを取得します。
OutputDebugStr Declare Sub OutputDebugStr Lib "winmm.dll" Alias "OutputDebugStr" (ByVal lpszOutputString As String)
OutputDebugString Declare Sub OutputDebugString Lib "kernel32" Alias "OutputDebugStringA" (ByVal lpOutputString As String)
現在のアプリケーションのデバッガに文字列を送信します。


コメント
コメントする








    
この記事のトラックバックURL
トラックバック