Help and Support

文書番号: 147781 - 最終更新日: 2007年1月19日 - リビジョン: 3.3

[ACC API を変換する方法の呼び出しから 16 ビットから 32 ビット

目次

すべて展開する | すべて折りたたむ

概要

詳細は、次の項目を参照してください。 エキスパート コーディング、相互運用性、およびマルチユーザーのスキルが必要です。

Windows NT と Windows 95 以降のアーキテクチャは、32 ビットであるためには、16 ビット API の Windows 3.x からいくつかの違い、アプリケーション プログラミング インターフェイス (API) があります。 ここでは 32 ビット オペレーティング環境では、コードが正常に実行されるよう 32 ビット API 呼び出しを 16 ビット API 呼び出しを含むコードを変換する方法。 この記事では次の項目を取り扱います:
  • 32 ビットの環境で 16 ビット API 呼び出しは動作しません理由
  • 変換処理を簡単に方法のヒント
  • 変換の宣言ステートメント、モジュールにコピーできますを共通の API 関数の一覧。

詳細

32 ビットの運用環境で 16 ビット API 呼び出しが機能しない理由

次の理由により 16 ビット API 呼び出し以降のバージョンの Windows 95 でまたは Windows NT で 32 ビットの環境を使用することはできません。

  • API のライブラリ名 (DLL) は異なりますが、たとえば:
          16-bit       32-bit
          -------------------------
          User.dll     User32.dll
          Kernel.dll   Kernel32.dll
          GDI.dll      GDI32.dll
    					
  • パラメーターのデータ型はたとえば、異なる多くの場合:
    
          16-bit       32-bit
          -------------------
          Integer      Long
          Integer      Byte
          Double       Long
    						
    注: これは完全な一覧ではありません。 必要があります見る密接に異なるパラメーターのデータ型コードにより、API 呼び出しまたは API 呼び出しのパラメーターを提供することを変換するとします。
  • API 関数の名前は大文字と小文字が区別されます。 これに対し、16 ビット API は、大文字と小文字は区別されません。 たとえば、16 ビット API 呼び出しで、次のステートメントは等価:
          Declare Function GetVersion Lib "KERNEL" () as Long
          Declare Function gEtVeRsIoN Lib "KERNEL" () as Long
    						
    ただし、32 ビット API への変換をするとき次ステートメントはいない同等、関数名は大文字と小文字を区別するため:
          Declare Function GetVersion Lib "KERNEL32" () as Long
          Declare Function gEtVeRsIoN Lib "KERNEL32" () as Long
    					
  • 一部の API 関数ない ANSI と Unicode の文字列に対応する別のバージョン。 この資料に記載されている API 限定場合は、特定のオペレーティング システムで 32 ビットを使用するは、API 関数を使用に注意します。

変換プロセスの簡略化する方法に関するヒント

これらのプラクティスを採用することによって、既存のコードを変換するのには、作業を削減できます。
  • API を持つプロシージャを宣言するときに、プロシージャ名に別名を使用します。 エイリアスを関数名から一意になければなりません。 、ない場合、別名が自動的に削除されます。
  • 関数によって返されるデータ型または関数に渡されたパラメーターのデータ型を宣言する場合は、型宣言文字 (%、$ という) ではなく As 句を使用します。
Microsoft Access 開発者用ツールキットの Windows 95、Microsoft Office 97 開発 Edition、および Visual Basic 4. 0 API の使用が簡単が含まれている便利なユーティリティもあります。 API ビューアーと呼ばれます。 宣言、定数、および任意のテキスト ファイルまたは API の情報が含まれている Microsoft Jet データベースに含まれている型を参照できます。 これらの項目をクリップボードにコピーでき、コードに貼り付けます。

共通の API 関数の変換済みの宣言ステートメントの一覧

次は、コードを 32 ビットに変換するときの参照として使用できる共通の API 呼び出しの 16 ビットおよび 32 ビットの Declare ステートメントの一覧です。

注: 次の 16 ビット宣言 Access 2. 0 またはそれ以前のいずれかを使用するは行の末尾にアンダースコア (_) は行連結文字として使用されます。 これらの宣言を再作成するときは、アンダースコア、行の末尾から削除します。

BitBlt

16-bit:
 Declare Function BitBlt Lib "GDI" (ByVal hDestDC As Integer, _
         ByVal X As Integer, ByVal Y As Integer, ByVal nWidth As _
         Integer,  ByVal nHeight As Integer, ByVal hSrcDC As Integer, _
         ByVal XSrc As Integer, ByVal YSrc As Integer, ByVal dwRop As _
         Long) As Long
				
32-bit:
 Declare Function apiBitBlt Lib "gdi32" Alias "BitBlt" (ByVal _
         hDestDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth _
         As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal _
         XSrc  As Long, ByVal YSrc As Long, ByVal dwRop As Long) As Long
				

CheckMenuItem

16 ビット:
 Declare Function CheckMenuItem Lib "User" (ByVal hMenu As _
         Integer, ByVal wIDCheckItem As Integer, ByVal wCheck As _
         Integer) As Integer
				
32 ビット:
 Declare Function apiCheckMenuItem Lib "user32" Alias _
         "CheckMenuItem" (ByVal hMenu As Long, ByVal wIDCheckItem _
         As Long, ByVal wCheck As Long) As Long
				
注: で Microsoft Access の Windows 95 バージョン 7. 0 を使用して、"SetMenuItem/メニューの設定"マクロ アクション (有効または無効、オンまたはオフ) のメニュー項目の状態を設定、カスタム メニュー バーで、アクティブなウィンドウのグローバル メニュー バー。 "SetMenuItem/メニューの設定"アクションの詳細については「"SetMenuItem/メニューの設定"アクション」をヘルプを検索します。

Access 97 ではカスタム メニュー バーおよびメニュー バー マクロを使用して作成されたグローバル メニュー バーでのみ、"SetMenuItem/メニューの設定"マクロ アクションを使用できます。 "SetMenuItem/メニューの設定"アクションは、Microsoft Access 97 の以前のバージョンの互換性含まれます。 Access 97 で、CommandBars コレクションと同じ機能を実装するには、を有効または無効にするには、確認またはメニュー バー、ツールバー、およびショートカット メニューの項目をオフの Visual Basic アプリケーションのコマンド バーのおよび状態プロパティを使用します。 これらのプロパティについての詳細について、[有効] の状態をヘルプを検索または、Microsoft Access 97 の Office アシスタントを確認します。

ChooseColor

16 ビット:
 Declare Function ChooseColor_API Lib "COMMDLG.DLL" Alias _
         "ChooseColor" (pCHOOSECOLOR As ChooseColor) As Integer
				
32 ビット:
 Type CHOOSECOLOR
            lStructSize As Long
            hwndOwner As Long
            hInstance  As Long
            RgbResult As Long
            lpCustColors As Long
            Flags As Long
            lCustData As Long
            lpfnHook As Long
            lpTemplateName As Long
         End Type

         Declare Function apiChooseColor Lib "comdlg32.dll" Alias _
         "ChooseColorA" (pChoosecolor As CHOOSECOLOR) As Long
				
注: この API、Microsoft Access 開発者の演習用ツールキットの Windows 95 および Microsoft Office 97 開発エディションに含まれる共通ダイアログの ActiveX コントロールを使うの ChooseColor 機能を使用することができます。

CloseClipboard

16-bit:
 Declare Function CloseClipboard Lib "User" () As Integer
				
32-bit:
 Declare Function apiCloseClipboard Lib "user32" Alias _

         "CloseClipboard" () As Long
				

CommDlgExtendedError

16-bit:
 Declare Function CommDlgExtendedError Lib "COMMDLG.DLL" () _
         As Long
				
32-bit:
 Declare Function apiCommDlgExtendedError Lib "comdlg32.dll" _
         Alias "CommDlgExtendedError" () As Long
				

CopyFile

16 ビット。

使用できない 16 ビットです。

32 ビット:
 Declare Function apiCopyFile Lib "kernel32" Alias "CopyFileA" _
         (ByVal lpExistingFileName As String, ByVal lpNewFileName As _
         String, ByVal bFailIfExists As Long) As Long
				
注: ファイルの属性 (FILE_ATTRIBUTE_ *)、既存のファイルを新しいファイルにコピーされます。 たとえば、既存のファイルは、FILE_ATTRIBUTE_READONLY ファイルの属性が CopyFile への呼び出しによって作成されるコピーも与えられます、FILE_ATTRIBUTE_READONLY ファイルの属性。 ファイル属性に関する詳細情報は、CreateFile を参照してください。

注: 同じ結果を実現するには Microsoft Access 7. 0 または 97 から FileCopy ステートメントを使用できます。

CopyMemory

16-bit:
 Declare Sub hmemcpy Lib "kernel" (hpvDest As Any, hpvSrc As _
         Any, ByVal cbBytes As Long)
				
32-bit:
 Global Const GMEM_MOVEABLE = &H2
         Global Const GMEM_ZEROINIT = &H40
         Global Const GHND = (GMEM_MOVEABLE Or GMEM_ZEROINIT)

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

CreateCompatibleBitmap

16-bit:
 Declare Function CreateCompatibleBitmap Lib "GDI" (ByVal _
         hDC As Integer, ByVal nWidth As Integer, ByVal nHeight As _
         Integer) As Integer
				
32-bit:
 Declare Function apiCreateCompatibleBitmap Lib "gdi32" Alias _
         "CreateCompatibleBitmap" (ByVal hdc As Long, ByVal nWidth As _
         Long, ByVal nHeight As Long) As Long
				

CreateCompatibleDC

16-bit:
 Declare Function CreateCompatibleDC Lib "GDI" (ByVal hdc As _
         Integer) As Integer
				
32-bit:
 Declare Function apiCreateCompatibleDC Lib "Gdi32" (ByVal hdc _
         As Long) As Long
				

DeleteDC

16-bit:
 Declare Function DeleteDC Lib "GDI" (ByVal hDC As Integer) _
         As Integer
				
32-bit:
 Declare Function apiDeleteDC Lib "gdi32" Alias "DeleteDC" _
         (ByVal hdc As Long) As Long
				

DrawMenuBar

16-bit:
 Declare Sub DrawMenuBar Lib "User" (ByVal hWnd As Integer)
				
32-bit:
 Declare Function apiDrawMenuBar Lib "user32" Alias _
         "DrawMenuBar" (ByVal hwnd As Long) As Long
				

EmptyClipboard

16-bit:
 Declare Function EmptyClipboard Lib "User" () As Integer
				
32-bit:
 Declare Function apiEmptyClipboard Lib "user32" Alias _
         "EmptyClipboard" () As Long
				

EnableMenuItem

16-bit:
 Declare Function EnableMenuItem Lib "User" (ByVal hMenu As _
         Integer, ByVal wIDEnableItem As Integer, ByVal wEnable _
         As Integer) As Integer
				
32-bit:
 Declare Function apiEnableMenuItem Lib "user32" Alias _
         "EnableMenuItem" (ByVal hMenu As Long, ByVal wIDEnableItem _
         As Long, ByVal wEnable As Long) As Long
				

ExitWindows

16-bit:
 Declare Function ExitWindows Lib "User" (ByVal dwReturnCode _
         As Long, ByVal wReserved As Integer) As Integer
				
32-bit:
 Declare Function apiExitWindows Lib "user32" Alias _
         "ExitWindows" (ByVal dwReserved As Long, ByVal uReturnCode _
         As Long) As Long
				

FindExecutable

16-bit:
 Declare Function FindExecutable Lib "Shell" (ByVal _
         lpszFile As String, ByVal lpszDir As String, ByVal _
         lpszResult As String) As Integer
				
32-bit:
 Declare Function apiFindExecutable Lib "shell32.dll" Alias _
         "FindExecutableA" (ByVal lpFile As String, ByVal lpDirectory _
         As String, ByVal lpResult As String) As Long
				

FindWindow

16-bit:
 Declare Function FindWindow Lib "user"(ByVal lpclassname As _
         Any, ByVal lpCaption As Any) As Integer
				
32-bit:
 Declare Function apiFindWindow Lib "User32" Alias "FindWindowA" _
         (ByVal lpclassname As Any, ByVal lpCaption As Any) as Long
				

fRead

16-bit:
Declare Function fRead Lib "kernel" Alias "lread" (ByVal _
         hFile As Integer, ByVal lpBuff As Long, ByVal nBuff _
         As Integer) As Long
				
32-bit:
 Use the FileCopy Statement within Microsoft Access 7.0 and 97, or
         see the CopyFile API call above.
				

Fwrite

16-bit:
 Declare Function fWrite Lib "kernel" Alias "_lwrite" (ByVal _
         hFile As Integer, ByVal lpBuff As Long, ByVal nBuff As Integer) _
         As Long
				
32-bit:
 Use the FileCopy Statement within Microsoft Access 7.0, or
         see the CopyFile API call above.
				

GetActiveWindow

16-bit:
 Declare Function GetActiveWindow Lib "User" () As Integer
				
32-bit:
 Declare Function apiGetActiveWindow Lib "user32" Alias _
         "GetActiveWindow" () As Long
				

GetClassName

16-bit:
 Declare Function GetClassName Lib "User" (ByVal hWnd _
         As Integer, ByVal lpClassName As String, ByVal nMaxCount _
         As Integer) As Integer
				
32-bit:
 Declare Function apiGetClassName Lib "user32" Alias _
         "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName _
         As String, ByVal nMaxCount As Long) As Long
				

GetClipboardData

16-bit:
 Declare Function GetClipboardData Lib "User" (ByVal _
         wFormat As Integer) As Integer
				
32-bit:
 Declare Function apiGetClipboardData Lib "user32" Alias _
         "GetClipboardDataA" (ByVal wFormat As Long) As Long
				

GetCursorPos

16-bit:
 Declare Sub GetCursorPos Lib "User" (lpPoint As POINTAPI)
				
32-bit:
 Type POINTAPI
            x as Long
            y as Long
         End Type

         Declare Sub apiGetCursorPos Lib "User32" (lpPoint _
         As POINTAPI)
				

GetDC

16-bit:
 Declare Function GetDC Lib "User" (ByVal hWnd As Integer) _
         As Integer
				
32-bit:
 Declare Function apiGetDC Lib "user32" Alias "GetDC" (ByVal _
         hwnd As Long) As Long
				

GetDesktopWindow

16 ビット:
 Declare Function GetDesktopWindow Lib "User" () As Integer
				
32 ビット:
 Declare Function apiGetDesktopWindow Lib "user32" Alias _
         "GetDesktopWindow" () As Long
				
注: GetWindow を使用して、同じ機能を実行することもできます。

GetDeviceCaps

16-bit:
 Declare Function GetDeviceCaps Lib "GDI" (ByVal hDC _
         As Integer, ByVal nIndex As Integer) As Integer
				
32-bit:
 Declare Function apiGetDeviceCaps Lib "gdi32" Alias _
         "GetDeviceCaps" (ByVal hdc As Long, ByVal nIndex As Long) _
         As Long
				

GetDriveType

16-bit:
 Declare Function GetDriveType Lib "Kernel" (ByVal nDrive _
         As Integer) As Integer
				
32-bit:
 Declare Function apiGetDriveType Lib "kernel32" Alias _
         "GetDriveTypeA" (ByVal nDrive As String) As Long
				

GetFileVersionInfo

16-bit:
 Declare Function GetFileVersionInfo Lib "VER.DLL" _
         (ByVal lpszFileName As String, ByVal lpdwHandle As Long, _
         ByVal cbbuf As Long, ByVal lpvdata As String) As Integer
				
32-bit:
 Declare Function apiGetFileVersionInfo Lib "version.dll" _
         Alias "GetFileVersionInfoA" (ByVal lptstrFilename As _
         String, ByVal dwHandle As Long, ByVal dwLen As Long, _
         lpData As Any) As Long
				

GetFileVersionInfoSize

16-bit:
 Declare Function GetFileVersionInfoSize Lib "VER.DLL" _
         (ByVal lpszFileName As String, lpdwHandle As Long) As Long
				
32-bit:
 Declare Function apiGetFileVersionInfoSize Lib _
         "version.dll" Alias "GetFileVersionInfoSizeA" _
         (ByVal lptstrFilename As String, lpdwHandle As Long) As Long
				

GetKeyState

16-bit:
 Declare Function GetKeyState Lib "User" (ByVal nVirtKey _
         As Integer) As Integer
				
32-bit:
 Declare Function apiGetKeyState Lib "user32" Alias _
         "GetKeyState" (ByVal nVirtKey As Long) As Integer
				

GetMenu

16-bit:
 Declare Function GetMenu Lib "User" (ByVal hWnd As _
         Integer) As Integer
				
32-bit:
 Declare Function apiGetMenu Lib "user32" Alias "GetMenu" _
         (ByVal hwnd As Long) As Long
				

GetMenuState

16-bit:
 Declare Function GetMenuState Lib "User" (ByVal hMenu _
         As Integer, ByVal wId As Integer, ByVal wFlags As _
         Integer) As Integer
				
32-bit:
 Declare Function apiGetMenuState Lib "user32" Alias _
         "GetMenuState" (ByVal hMenu As Long, ByVal wID As Long, _
         ByVal wFlags As Long) As Long
				

GetModuleFileName

16-bit:
 Declare Function GetModuleFileName Lib "Kernel" (ByVal _
         hModule As Integer, ByVal lpFilename As String, ByVal _
         nSize As Integer) As Integer
				
32-bit:
 Declare Function apiGetModuleFileName Lib "kernel32" Alias _
         "GetModuleFileNameA" (ByVal hModule As Long, ByVal _
         lpFileName As String, ByVal nSize As Long) As Long
				

GetModuleHandle

16-bit:
 Declare Function GetModuleHandle Lib "Kernel" (ByVal _
         lpModuleName As String) As Integer
				
32-bit:
 Declare Function apiGetModuleHandle Lib "kernel32" Alias _
         "GetModuleHandleA" (ByVal lpModuleName As String) As Long
				

GetModuleUsage

16 ビット:
 Declare Function GetModuleUsage Lib "Kernel" (ByVal _
         hModule As Integer) As Integer
				
32 ビット。

この関数は削除されました。 各 Win32 アプリケーションは、独自のアドレス空間で実行します。

GetOpenFileName

16-bit:
 Declare Function GetOpenFileName Lib "COMMDLG.DLL" _
         (OPENFILENAME As tagOPENFILENAME) As Integer
				
32-bit:
 Type tagOPENFILENAME
            lStructSize As Long
            hwndOwner As Long
            hInstance As Long
            lpstrFilter As String
            lpstrCustomFilter As String
            nMaxCustFilter As Long
            nFilterIndex As Long
            lpstrFile As String
            nMaxFile As Long
            lpstrFileTitle As String
            nMaxFileTitle As Long
            lpstrInitialDir As String
            lpstrTitle As String
            flags As Long
            nFileOffset As Integer
            nFileExtension As Integer
            lpstrDefExt As String
            lCustData As Long
            lpfnHook As Long
            lpTemplateName As String
         End Type

         Declare Function apiGetOpenFileName Lib "comdlg32.dll" _
            Alias "GetOpenFileNameA" (OPENFILENAME as tagOPENFILENAME) _
            As Long
				

GetParent

16-bit:
 Declare Function GetParent Lib "User" (ByVal hWnd As _
         Integer) As Integer
				
32-bit:
 Declare Function apiGetParent Lib "user32" Alias _
         "GetParent" (ByVal hwnd As Long) As Long
				

GetPrivateProfileString

16-bit:
 Declare Function GetPrivateProfileString Lib "Kernel" _
         (ByVal lpApplicationName As String, ByVal lpKeyName As _
         Any, ByVal lpDefault As String, ByVal lpReturnedString As _
         String, ByVal nSize As Integer, ByVal lpFileName As String) _
         As Integer
				
32-bit:
 Declare Function apiGetPrivateProfileString Lib "kernel32" _
         Alias "GetPrivateProfileStringA" (ByVal lpApplicationName _
         As String, ByVal lpKeyName As Any, ByVal lpDefault As _
         String, ByVal lpReturnedString As String, ByVal nSize As _
         Long, ByVal lpFileName As String) As Long
				

GetSaveFileName

16 ビット:
 Declare Function GetSaveFileName Lib "COMMDLG.DLL" _
         (OPENFILENAME As tagOPENFILENAME) As Integer
				
32 ビット:
 Type OPENFILENAME
            lStructSize As Long
            hwndOwner As Long
            hInstance As Long
            lpstrFilter As String
            lpstrCustomFilter As String
            nMaxCustFilter As Long
            nFilterIndex As Long
            lpstrFile As String
            nMaxFile As Long
            lpstrFileTitle As Long
            nMaxFileTitle As Long
            lpstrInitialDir As String
            lpstrTitle As String
            Flags As Long
            nFileOffset As Integer
            nFileExtension As Integer
            lpstrDefExt As String
            lCustData As Long
            lpfnHook As Long
            lpTemplateName As String
         End Type

         Declare Function apiGetSaveFileName Lib "comdlg32.dll" _
         Alias "GetSaveFileNameA" (pOpenfilename as OPENFILENAME) _
         As Long
				
注: 共通ダイアログ OLE コントロールと、Microsoft Access 開発者の演習用ツールキットの Windows 95 および Microsoft Office 97 のプロフェッショナル エディションに含まれる、同じ機能を実現することができます。

GetSubMenu

16-bit:
 Declare Function GetSubMenu Lib "User" (ByVal hMenu _
         As Integer, ByVal nPos As Integer) As Integer
				
32-bit:
 Declare Function apiGetSubMenu Lib "user32" Alias _
         "GetSubMenu" (ByVal hMenu As Long, ByVal nPos As Long) _
         As Long
				

GetSystemDirectory

16-bit:
 Declare Function GetSystemDirectory Lib "Kernel" _
         (ByVal lpBuffer As String, ByVal nSize As Integer) As _
         Integer
				
32-bit:
 Declare Function apiGetSystemDirectory Lib "kernel32" _
         Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, _
         ByVal nSize As Long) As Long
				

GetSystemMenu

16-bit:
 Declare Function GetSystemMenu Lib "user" (ByVal _
         hWnd As Integer, ByVal flag As Integer) As Integer
				
32-bit:
 Declare Function apiGetSystemMenu Lib "user32" Alias _
         "GetSystemMenu" (ByVal hWnd As Long, ByVal flag As Long) _
         As Long
				

GetSystemMetrics

16-bit:
 Declare Function GetSystemMetrics Lib "User" (ByVal _
         nIndex As Integer) As Integer
				
32-bit:
 Declare Function apiGetSystemMetrics Lib "user32" Alias _
         "GetSystemMetrics" (ByVal nIndex As Long) As Long
				

バージョンの取得

16-bit:
 Declare Function GetVersion Lib "Kernel" () As Long
				
32-bit:
 Declare Function apiGetVersion Lib "kernel32" Alias _
         "GetVersion" () As Long
				

GetWindow

16-bit:
 Declare Function GetWindow Lib "User" (ByVal hWnd As _
         Integer, ByVal wCmd As Integer) As Integer
				
32-bit:
 Declare Function apiGetWindow Lib "user32" Alias _
         "GetWindow" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
				

GetWindowLong

16-bit:
 Declare Function GetWindowLong Lib "User" (ByVal hWnd _
         As Integer, ByVal nIndex As Integer) As Long
				
32-bit:
 Declare Function apiGetWindowLong Lib "user32" Alias _
         "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As _
         Long) As Long
				

GetWindowRect

16-bit:
 Declare Sub GetWindowRect Lib "GDI" (ByVal hWnd As _
         Integer, lpRect As RECT)
				
32-bit:
 Type RECT_Type
            left As Long
            top As Long
            right As Long
            bottom As Long
         End Type

         Declare Function apiGetWindowRect Lib "user32" Alias _
         "GetWindowRect" (ByVal hwnd As Long, lpRect As RECT_Type) _
         As Long
				

GetWindowText

16-bit:
 Declare Function GetWindowText Lib "User" (ByVal hWnd As _
         Integer, ByVal lpString As String, ByVal aint As Integer) As _
         Integer
				
32-bit:
 Declare Function apiGetWindowText Lib "user32" Alias _
         "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString _
         As String, ByVal cch As Long) As Long
				

GetWindowWord

16-bit:
 Declare Function GetWindowWord Lib "User" (ByVal _
         hWnd As Integer, ByVal nIndex As Integer) As Integer
				
32-bit:
 Declare Function apiGetWindowWord Lib "user32" Alias _
         "GetWindowWord" (ByVal hwnd As Long, ByVal nIndex As _
         Long) As Integer
				

GetWindowsDirectory

16-bit:
 Declare Function GetWindowsDirectory Lib "Kernel" _
         (ByVal lpbuffer As String, ByVal nsize As Integer) As Integer
				
32-bit:
 Declare Function apiGetWindowsDirectory Lib _
         "Kernel32" Alias "GetWindowsDirectoryA" (ByVal _
         lpbuffer As String, ByVal nsize As Long) As Long
				

GlobalAlloc

16-bit:
 Declare Function GlobalAlloc Lib "Kernel" (ByVal _
         wFlags As Integer, ByVal dwBytes As Long) As Integer
				
32-bit:
 Declare Function apiGlobalAlloc Lib "kernel32" Alias _
         "GlobalAlloc" (ByVal wFlags As Long, ByVal dwBytes _
         As Long) As Long
				

GlobalFree

16-bit:
 Declare Function GlobalFree Lib "Kernel" (ByVal hMem _
         As Integer) As Integer
				
32-bit:
 Declare Function apiGlobalFree Lib "kernel32" Alias _
         "GlobalFree" (ByVal hMem As Long) As Long
				

GlobalLock

16-bit:
 Declare Function GlobalLock Lib "Kernel" (ByVal hMem _
         As Integer) As Long
				
32-bit:
 Declare Function apiGlobalLock Lib "kernel32" Alias _
         "GlobalLock" (ByVal hMem As Long) As Long
				

GlobalSize

16-bit:
 Declare Function GlobalSize Lib "Kernel" (ByVal hMem _
         As Integer) As Long
				
32-bit:
 Declare Function apiGlobalSize Lib "kernel32" Alias _
         "GlobalSize" (ByVal hMem As Long) As Long
				

GlobalUnlock

16-bit:
 Declare Function GlobalUnlock Lib "Kernel" (ByVal _
         hMem As Integer) As Integer
				
32-bit:
 Declare Function apiGlobalUnlock Lib "kernel32" Alias _
         "GlobalUnlock" (ByVal hMem As Long) As Long
				

hmemcpy

16-bit:
 Declare Sub hmemcpy Lib "kernel" (hpvDest As Any, _
         hpvSrc As Any, ByVal cbBytes As Long)
				
32-bit:
 This subfunction is not available in 32-bit environments.
         The function CopyMemory is the replacement for hmemcpy.
				

IsIconic

16-bit:
 Declare Function IsIconic Lib "User" (ByVal hWnd As _
         Integer) As Integer
				
32-bit:
 Declare Function apiIsIconic Lib "user32" Alias _
         "IsIconic" (ByVal hwnd As Long) As Long
				

IsWindowVisible

16-bit:
 Declare Function IsWindowVisible Lib "User" (ByVal _
         hWnd As Integer) As Integer
				
32-bit:
 Declare Function apiIsWindowVisible Lib "user32" Alias _
         "IsWindowVisible" (ByVal hwnd As Long) As Long
				

IsZoomed

16-bit:
 Declare Function IsZoomed Lib "User" (ByVal hWnd As _
         Integer) As Integer
				
32-bit:
 Declare Function apiIsZoomed Lib "user32" Alias _
         "IsZoomed" (ByVal hwnd As Long) As Long
				

lstrcpy

16-bit:
 Declare Function lstrcpy Lib "Kernel" (ByVal lpString1 As _
         Any, ByVal lpString2 As Any) As Long
				
32-bit:
 Declare Function apilstrcpy Lib "kernel32" Alias "lstrcpyA" _
         (ByVal lpString1 As Any, ByVal lpString2 As Any) As Long
				

NetWkstaGetInfo

16 ビット:
 Declare Function NetWkstaGetInfo Lib "NetAPI.DLL" _
         (ByVal lServer As Long, ByVal sLevel As Integer, _
         ByVal pbBuffer As Long, ByVal cbBuffer As Integer, _
         pcbTotalAvail As Integer) As Integer
				
32 ビット:
 Declare Function apiNetWkstaGetInfo Lib "NetAPI32.dll"_
         Alias NetWkstaGetInfo (ByVal lServer as Integer, ByVal _
         sLevel as Integer, ByVal pbBuffer as Long, cbBuffer as _
         Integer, pcbTotalAvail as Integer) As Integer
				
注: この関数は、Windows NT 環境でのみ使用できます。

注: Microsoft Access 7. 0 および 97 で使えます CurrentUser() 関数は、現在ログオンしているユーザーを取得します。

OpenClipboard

16-bit:
 Declare Function OpenClipboard Lib "User" (ByVal _
         hWnd As Integer) As Integer
				
32-bit:
 Declare Function apiOpenClipboard Lib "user32" Alias _
         "OpenClipboard" (ByVal hwnd As Long) As Long
				

Playsound

16-bit:
 Declare Function sndplaysound Lib "mmsystem" (ByVal _
         filename as String, ByVal snd_async as Integer) As Integer
				
32-bit:
 Declare Function apisndPlaySound Lib "winmm" Alias _
         "sndPlaySoundA" (ByVal filename As String, ByVal snd_async _
         As Long) As Long
				

ReleaseDC

16-bit:
 Declare Function ReleaseDC Lib "User" (ByVal hWnd _
         As Integer, ByVal hDC As Integer) As Integer
				
32-bit:
 Declare Function apiReleaseDC Lib "user32" Alias _
         "ReleaseDC" (ByVal hwnd As Long, ByVal hdc As Long) _
         As Long
				

"SelectObject/オブジェクトの選択"

16-bit:
 Declare Function SelectObject Lib "GDI" (ByVal hDC _
         As Integer, ByVal hObject As Integer) As Integer
				
32-bit:
 Declare Function apiSelectObject Lib "GDI32" Alias _
         "SelectObject" (ByVal hdc As Long, ByVal hObject As _
         Long) As Long
				

SetActiveWindow

16-bit:
 Declare Function SetActiveWindow Lib "User" (ByVal _
         hWnd As Integer) As Integer
				
32-bit:
 Declare Function apiSetActiveWindow Lib "user32" _
         Alias "SetActiveWindow" (ByVal hwnd As Long) As Long
				

SetClipBoardData

16-bit:
 Declare Function SetClipboardData Lib "User" _
         (ByVal wFormat As Integer, ByVal hMem As Integer) As Integer
				
32-bit:

 Declare Function apiSetClipboardData Lib "User32.dll" _
         Alias "SetClipboardData" (ByVal wFormat as Long, _
         ByVal hMem as Long) as Long
				

SetKeyboardState

16-bit:
 Declare Sub SetKeyboardState Lib "User" (lpKeyState As Any)
				
32-bit:
 Declare Function apiSetKeyboardState Lib "user32" Alias_
         "SetKeyboardState" (lppbKeyState As Byte) As Long
				

SetSysModalWindow

16 ビット:
 Declare Function SetSysModalWindow Lib "User" _
         (ByVal hwnd As Integer) As Integer
				
32 ビット。

この関数は削除されました。

SetWindowLong

16-bit:
 Declare Function SetWindowLong Lib "User" (ByVal hWnd _
         As Integer, ByVal nIndex As Integer, ByVal dwNewLong _
         As Long) As Long
				
32-bit:
 Declare Function apiSetWindowLong Lib "user32" Alias _
         "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex _
         As Long, lNewLong as Long) As Long
				

SetWindowPos

16-bit:

 Declare Sub SetWindowPos Lib "User" (ByVal hWnd As Integer,_
         ByVal hWndInsertAfter As Integer, ByVal X As Integer, _
         ByVal Y As Integer, ByVal cx As Integer, ByVal cy _
         As Integer, ByVal wFlags As Integer)
				
32-bit:
 Declare Function apiSetWindowPos Lib "user32" Alias _
         "SetWindowPos" (ByVal hwnd As Long, ByVal _
         hWndInsertAfter As Long, ByVal x As Long, ByVal y _
         As Long, ByVal cx As Long, ByVal cy As Long, _
         ByVal wFlags As Long) As Long
				

ShellExecute

16-bit:
 Declare Function ShellExecute Lib "SHELL" (ByVal _
         hwnd As Integer, ByVal lpszOp As String, ByVal lpszFile _
         As String, ByVal lpszParams As String, ByVal lpszDir As _
         String, ByVal fsShowCmd As Integer) As Integer
				
32-bit:
 Declare Function apiShellExecute Lib "shell32.dll" Alias _
         "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As _
         String, ByVal lpFile As String, ByVal lpParameters As _
         String, ByVal lpDirectory As String, ByVal nShowCmd As _
         Long) As Long
				

ShowWindow

16-bit:
 Declare Function ShowWindow Lib "User" (ByVal hWnd _
         As Integer, ByVal nCmdShow As Integer) As Integer
				
32-bit:
 Declare Function apiShowWindow Lib "user32" Alias _
         "ShowWindow" (ByVal hwnd As Long, ByVal nCmdShow As _
         Long) As Long
				

WNetAddConnection

16-bit:
 Declare Function WNetAddConnection Lib "User" (ByVal _
         lpszNetPath As String, ByVal lpszPassword As String, _
         ByVal lpszLocalName As String) As Integer
				
32-bit:
 Declare Function apiWNetAddConnection Lib "mpr.dll" Alias _
         "WNetAddConnectionA" (ByVal lpszNetPath As String, ByVal _
         lpszPassword As String, ByVal lpszLocalName As String) As Long
				

WNetCancelConnection

16-bit:
 Declare Function WNetCancelConnection Lib "User" (ByVal _
         lpszName As String, ByVal bForce As Integer) As Integer
				
32-bit:
 Declare Function apiWNetCancelConnection Lib "mpr.dll" _
         Alias "WNetCancelConnectionA" (ByVal lpszName As _
         String, ByVal fForce As Long) As Long
				

WNetGetUser

16-bit:
 Declare Function WNetGetUser Lib "USER.EXE" (ByVal _
         szUser As String, lpnBufferSize As Integer) As Integer
				
32-bit:

 Declare Function apiWNetGetUser Lib "mpr.dll" Alias _
         "WNetGetUserA" (ByVal lpName As String, ByVal _
         lpUserName As String, lpnLength As Long) As _
         Long

         Declare Function WNetGetUser Lib "mpr" Alias _
         "WNetGetUserA" (ByVal lpName As String, ByVal _
         lpUserName As String, lpnLength As Long) As Long
				

WritePrivateProfileString

16-bit:
 Declare Function WritePrivateProfileString Lib _
         "Kernel" (ByVal lpApplicationName As String, ByVal _
         lpKeyName As Any, ByVal lpString As Any, ByVal _
         lplFileName As String) As Integer
				
32-bit:
 Declare Function apiWritePrivateProfileString Lib _
         "kernel32" Alias "WritePrivateProfileStringA" _
         (ByVal lpApplicationName As String, ByVal lpKeyName _
         As Any, ByVal lpString As Any, ByVal lpFileName As _
         String) As Long
				

関連情報

Win32 API 宣言ファイルおよびビューアー

"Microsoft Windows 3. 1 プログラマーズ リファレンス、"ボリューム 2 を「関数」

"Microsoft Win32 プログラマーズ リファレンス、"1-4 のボリューム

この資料は以下の製品について記述したものです。
  • Microsoft Access 95 Standard Edition
  • Microsoft Access 97 Standard Edition
キーワード:?
kbmt kbfaq kbhowto kbprogramming KB147781 KbMtja
機械翻訳機械翻訳
重要: このサポート技術情報 (以下「KB」) は、翻訳者による翻訳の代わりに、マイクロソフト機械翻訳システムによって翻訳されたものです。マイクロソフトは、お客様に、マイクロソフトが提供している全ての KB を日本語でご利用いただけるように、翻訳者による翻訳 KB に加え機械翻訳 KB も提供しています。しかしながら、機械翻訳の品質は翻訳者による翻訳ほど十分ではありません。誤訳や、文法、言葉使い、その他、たとえば日本語を母国語としない方が日本語を話すときに間違えるようなミスを含んでいる可能性があります。マイクロソフトは、機械翻訳の品質、及び KB の内容の誤訳やお客様が KB を利用されたことによって生じた直接または間接的な問題や損害については、いかなる責任も負わないものとします。マイクロソフトは、機械翻訳システムの改善を継続的に行っています。
英語版 KB:147781? (http://support.microsoft.com/kb/147781/en-us/ )
"Microsoft Knowledge Baseに含まれている情報は、いかなる保証もない現状ベースで提供されるものです。Microsoft Corporation及びその関連会社は、市場性および特定の目的への適合性を含めて、明示的にも黙示的にも、一切の保証をいたしません。さらに、Microsoft Corporation及びその関連会社は、本文書に含まれている情報の使用及び使用結果につき、正確性、真実性等、いかなる表明・保証も行ないません。Microsoft Corporation、その関連会社及びこれらの権限ある代理人による口頭または書面による一切の情報提供またはアドバイスは、保証を意味するものではなく、かつ上記免責条項の範囲を狭めるものではありません。Microsoft Corporation、その関連会社 及びこれらの者の供給者は、直接的、間接的、偶発的、結果的損害、逸失利益、懲罰的損害、または特別損害を含む全ての損害に対して、状況のいかんを問わず一切責任を負いません。(Microsoft Corporation、その関連会社 またはこれらの者の供給者がかかる損害の発生可能性を了知している場合を含みます。) 結果的損害または偶発的損害に対する責任の免除または制限を認めていない地域においては、上記制限が適用されない場合があります。なお、本文書においては、文書の体裁上の都合により製品名の表記において商標登録表示、その他の商標表示を省略している場合がありますので、予めご了解ください。"
Retired KB Articleサポート期間が終了した「サポート技術情報」資料に関する免責事項
この資料は、マイクロソフトでサポートされていない製品について記述したものです。そのため、この資料は現状ベースで提供されており、今後更新されることはありません。

サポート技術情報の翻訳