ACC: ????? ????? ??????? ??????? ??? ????? ??? ????? ????? ????

?????? ????????? ?????? ?????????
???? ???????: 96475 - ??? ???????? ???? ????? ????? ??? ???????.
??? ????? ??? ???????. ????? "??? ??" ??? ??? ??????? ??? ????.
????? ???? | ?? ????

?? ??? ??????

??????

??????: ????? ????? ?????? ??????? ??????? ???????? ? ?????? ?????? ??????????.

???? ????? ?? ????? ??????? ?? ?? ????? ???????? ?????? ???????? ?????? (DLLs) ??? ???? ???? ????? 2 ????. ?? ????? Visual Basic for Applications (?? ?? Access Basic) ??? ??? ???????? ???. ???? ???? ???? ???? ????? Microsoft Access ??? ????? ?? ????????, ????? ??? ????? ?? ??? ???? ???? ????? ??? ??? ?????? "??? ???? ????".

????? ??? ??????? ???? ?????? ?? Visual Basic for Applications ?????? ????? ??????? Microsoft Access ??????? ????? ??????? ???????? ?? Microsoft Access. ????? ?? ????????? ??? Visual Basic for Applications ?????? ?????? ??? ??????? ????? ?? ?? ???? "????? ??????? ?? Microsoft Access".

??????: Visual Basic for Applications ???? ?? Access Basic ?? 1.x ??????? Microsoft Access 2.0. ????? ?? ????????? ??? ?? Access Basic ?????? ?????? ??? ???? "????? ??? ???????" ?? Microsoft Access ??????? 1.x "??" ???? "????? ???????" ?? Microsoft Access ??????? 2.0

??????? ????

??? ???????? ??? ???? ????? ???? -32,768 ??? 32,767. ??? ???? ???? ????? ????? ??? ???? ?? 0 ??? 65,536.

?????? Microsoft Access ?? ?????? ????? ????? ????? ??????. ????? ??? ????? ???? 32,767 ? ??? ????? ?? 16 ???? ??? ????. ????? ??? ???? ???? ????? ? ??? ???? ?????? ??? 16 ??.

???? ??????? ?????? ?? ????? ??? ???? ???? ????? ??? ??? ???????? "??? ???? ????". ?????? ??????? ????? ??????? ???????? (65,536 ??? ??? ?? ????? ??? ??? ???? ???? ?????). ?????? ?????? ????? ??????? ??? ???? ????. ???? ??????? ????? ???????? ??? ????? ???? ????; ??? ???? ?? ???? ????? ????? ???? ?????? ??????? ????? ?? ???? ???? ??? ????? repetitively ????? ???? ????.

???? ???? ????? ????? ?? ???? ????? ??????? ?????? ?? ???? ???????? ???????? ???????:
      '*************************************************************
      'Declarations section of the module.
      '*************************************************************

      Option Explicit

      '=============================================================
      ' Arithmetic Method:
      ' ------------------
      ' Create the following ar_ConvertFromUnsignedInteger& (Uint%)
      '    and ar_ConvertToUnsignedInteger% (Bytes&) function in the
      '    Module. This first function reads in an unsigned integer
      '    and returns the converted value as a long. The second
      '    function reads in a long and returns an unsigned integer.
      '=============================================================

      Function ar_ConvertFromUnsignedInteger& (Uint%)
         If Uint% < 0 Then
            ar_ConvertFromUnsignedInteger& = Uint% + 65536
         Else
            ar_ConvertFromUnsignedInteger% = Uint%
         End If
      End Function

      Function ar_ConvertToUnsignedInteger% (Bytes&)
         If Bytes& > 32767 Then
            ar_ConvertToUnsignedInteger% = Bytes& - 65536
         Else
            ar_ConvertToUnsignedInteger% = Bytes&
         End If
      End Function

      '=============================================================
      ' Bitwise Method:
      ' ---------------
      ' Create the following bw_ConvertFromUnsignedInteger& (Uint%)
      '    and bw_ConvertToUnsignedInteger% (Bytes&) function in the
      '    Module. This first function reads in an unsigned integer
      '    and returns the converted value as a long. The second
      '    function reads in a long and returns an unsigned integer.
      '    The message box statement in the second function is used
      '    to prevent an overflow message when the value passed to
      '    the function is greater than 64 kilobytes.
      ' To illustrate what is taking place in the first bitwise function:
      '    Uint% equals -23584, a value returned from an external dynamic
      '    link library that is an unsigned integer and must be
      '    converted to an long:
      '        1010001111100000 (-23584)
      '    AND   11111111111111 (7FFF)
      '        ----------------
      '          10001111100000 (41952)
      '=============================================================

      Function bw_ConvertToUnsignedInteger% (Bytes&)
         Dim x%
         If Bytes& > 65535 Then
            MsgBox "You passed a value larger than 65535"
            Exit Function
         End If

         x% = Bytes& And &H7FFF
         bw_ConvertToUnsignedInteger% = x% Or -(Bytes& And &H8000)
      End Function

      Function bw_ConvertFromUnsignedInteger& (Uint%)
         bw_ConvertFromUnsignedInteger& = Uint% And &HFFFF&

      '-------------------------------------------------------------
      ' The &HFFFF& requires the & at the end of the hex number. This
      '    qualifies the hex number as 32-bit versus 16-bit.
      '-------------------------------------------------------------

      End Function
				

????? ??? ??????? ??? ???????

????? ????? ???????? ?????? ????? (DLL) ????? ?????? ??? ???? ???? ?????. ???? Declare ???? ??????:
   Declare Function External_Call% Lib "your.dll" (ByVal ValueToPass%)
				
??????? "??????" ?????? ????? ???????? ??? ???? ??? Microsoft Access ?? ????? ????? ????? ???? ?????. ??? ???? ?? ???? ??? ????? ???????? ?????????? ?????? ????? ?????? ??? ???? ???? ????? ??? ????? ?????????; ????? ?? ???? ????????? ???????? ??? ???:
   x% = External_Call(bw_ConvertToUnsignedInteger%(41952))
   y& = bw_ConvertFromUnsignedInteger&(x%)
				

?????

????? ?? ????????? ??? ????? ????????? ???????? ?? ????????? ??????? ?? Microsoft Access ???? ?? "????" ????????? "??"???? Declare"??"????? ??? ???? ?????? DLL."

???????

???? ???????: 96475 - ????? ??? ??????: 06/???? ??????/1435 - ??????: 2.3
????? ???
  • Microsoft Access 1.0 Standard Edition
  • Microsoft Access 1.1 Standard Edition
  • Microsoft Access 2.0 Standard Edition
  • Microsoft Access 95 Standard Edition
  • Microsoft Access 97 Standard Edition
????? ??????: 
kbnosurvey kbarchive kbmt kbhowto kbprogramming KB96475 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????96475

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com