+ Reply to Thread
Results 1 to 3 of 3

Access 365 error: The code in this project must be updated for use on 64-bit systems

  1. #1
    Registered User
    Join Date
    12-17-2021
    Location
    Genoa,Italy
    MS-Off Ver
    365
    Posts
    2

    Exclamation Access 365 error: The code in this project must be updated for use on 64-bit systems

    I have a running Access 365 project since long on my old Notebook and Windows 32-bit system. Now when trying to launch it
    on my brand new 64-bit Notebook, I receive the following message:
    Compile error
    The code in this project must be updated for use on 64-bit systems.
    Please review
    basGDIPlus
    And some of the VB Code present in the Class modules Forminfo and basGDIPlus becomes red coloured.

    I do not know what to do and how to update the code.

    CAN YOU HELP Me???' Thankyou

    Hereunder attache the VB Code in RED :

    ----------------------- Forminfo-----------------------------------------------

    Private Declare Function SendMessage Lib "user32" _
    Alias "SendMessageA" _
    (ByVal hWnd As Long, ByVal wMsg As Long, _
    ByVal wParam As Long, ByVal lParam As Long) As Long

    Private Declare Function SetWindowLong Lib "user32" _
    Alias "SetWindowLongA" (ByVal hWnd As Long, _
    ByVal nIndex As Long, ByVal dwNewLong As Long) As Long

    Private Declare Function GetWindowLong Lib "user32" _
    Alias "GetWindowLongA" (ByVal hWnd As Long, _
    ByVal nIndex 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 GetWindowRect _
    Lib "user32" _
    (ByVal hWnd As Long, _
    lpRect As RECT) As Long

    Private Declare Function GetParent _
    Lib "user32" _
    (ByVal hWnd 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 GetClientRect _
    Lib "user32" _
    (ByVal hWnd As Long, _
    lpRect As RECT) As Long

    Private Declare Function GetDeviceCaps _
    Lib "gdi32" _
    (ByVal hdc As Long, ByVal nIndex As Long) As Long

    Private Declare Function GetSystemMetrics _
    Lib "user32" _
    (ByVal nIndex As Long) As Long

    Private Declare Function GetDC _
    Lib "user32" _
    (ByVal hWnd As Long) As Long

    Private Declare Function ReleaseDC _
    Lib "user32" _
    (ByVal hWnd As Long, ByVal hdc As Long) As Long

    Private Declare Function SystemParametersInfoRect _
    Lib "user32" Alias "SystemParametersInfoA" _
    (ByVal uAction As Long, ByVal uParam As Long, _
    ByRef lpvParam As RECT, ByVal fuWinIni As Long) As Long

    Private Declare Function ClientToScreen _
    Lib "user32" _
    (ByVal hWnd As Long, lpPoint As POINTAPI) As Long

    ------------------------------------------------------------------------------------------------
    -------------------- basGDIPlus--------------------------------------------------------------
    'API-Declarations: ----------------------------------------------------------------------------

    'Convert a windows bitmap to OLE-Picture :
    Private Declare Function OleCreatePictureIndirect Lib "oleaut32.dll" (lpPictDesc As PICTDESC, riid As GUID, ByVal fPictureOwnsHandle As Long, IPic As Object) As Long
    'Retrieve GUID-Type from string :
    Private Declare Function CLSIDFromString Lib "ole32" (ByVal lpsz As Any, pclsid As GUID) As Long

    'Memory functions:
    Private Declare Function GlobalAlloc Lib "kernel32" (ByVal uFlags As Long, ByVal dwBytes As Long) As Long
    Private Declare Function GlobalSize Lib "kernel32.dll" (ByVal hMem As Long) As Long
    Private Declare Function GlobalLock Lib "kernel32.dll" (ByVal hMem As Long) As Long
    Private Declare Function GlobalUnlock Lib "kernel32.dll" (ByVal hMem As Long) As Long
    Private Declare Function GlobalFree Lib "kernel32" (ByVal hMem As Long) As Long
    Private Declare Sub CopyMemory Lib "kernel32.dll" Alias "RtlMoveMemory" (ByRef Destination As Any, ByRef Source As Any, ByVal Length As Long)
    Private Declare Sub MoveMemory Lib "kernel32" Alias "RtlMoveMemory" (ByVal Destination As Long, ByRef Source As Byte, ByVal Length As Long)

    'Modules API:
    Private Declare Function FreeLibrary Lib "kernel32.dll" (ByVal hLibModule As Long) As Long
    Private Declare Function LoadLibrary Lib "kernel32.dll" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
    Private Declare Function GetModuleHandle Lib "kernel32.dll" Alias "GetModuleHandleA" (ByVal lpModuleName As String) As Long

    'Timer API:
    Private Declare Function SetTimer Lib "user32" (ByVal hWnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
    Private Declare Function KillTimer Lib "user32" (ByVal hWnd As Long, ByVal nIDEvent As Long) As Long


    'OLE-Stream functions :
    Private Declare Function CreateStreamOnHGlobal Lib "ole32" (ByVal hGlobal As Long, ByVal fDeleteOnRelease As Long, ByRef ppstm As Any) As Long
    Private Declare Function GetHGlobalFromStream Lib "ole32.dll" (ByVal pstm As Any, ByRef phglobal As Long) As Long

    'GDIPlus Flat-API declarations:

    'Initialization GDIP:
    Private Declare Function GdiplusStartup Lib "gdiplus" (token As Long, inputbuf As GDIPStartupInput, Optional ByVal outputbuf As Long = 0) As Long
    'Tear down GDIP:
    Private Declare Function GdiplusShutdown Lib "gdiplus" (ByVal token As Long) As Long
    'Load GDIP-Image from file :
    Private Declare Function GdipCreateBitmapFromFile Lib "gdiplus" (ByVal FileName As Long, BITMAP As Long) As Long
    'Create GDIP- graphical area from Windows-DeviceContext:
    Private Declare Function GdipCreateFromHDC Lib "gdiplus" (ByVal hdc As Long, GpGraphics As Long) As Long
    'Delete GDIP graphical area :
    Private Declare Function GdipDeleteGraphics Lib "gdiplus" (ByVal graphics As Long) As Long
    'Copy GDIP-Image to graphical area:
    Private Declare Function GdipDrawImageRect Lib "gdiplus" (ByVal graphics As Long, ByVal Image As Long, ByVal X As Single, ByVal Y As Single, ByVal Width As Single, ByVal Height As Single) As Long
    'Clear allocated bitmap memory from GDIP :
    Private Declare Function GdipDisposeImage Lib "gdiplus" (ByVal Image As Long) As Long
    'Retrieve windows bitmap handle from GDIP-Image:
    Private Declare Function GdipCreateHBITMAPFromBitmap Lib "gdiplus" (ByVal BITMAP As Long, hbmReturn As Long, ByVal background As Long) As Long
    'Retrieve Windows-Icon-Handle from GDIP-Image:
    Public Declare Function GdipCreateHICONFromBitmap Lib "gdiplus" (ByVal BITMAP As Long, hbmReturn As Long) As Long
    'Scaling GDIP-Image size:
    Private Declare Function GdipGetImageThumbnail Lib "gdiplus" (ByVal Image As Long, ByVal thumbWidth As Long, ByVal thumbHeight As Long, thumbImage As Long, Optional ByVal callback As Long = 0, Optional ByVal callbackData As Long = 0) As Long
    'Retrieve GDIP-Image from Windows-Bitmap-Handle:
    Private Declare Function GdipCreateBitmapFromHBITMAP Lib "gdiplus" (ByVal hbm As Long, ByVal hpal As Long, BITMAP As Long) As Long
    'Retrieve GDIP-Image from Windows-Icon-Handle:
    Private Declare Function GdipCreateBitmapFromHICON Lib "gdiplus" (ByVal hicon As Long, BITMAP As Long) As Long
    'Retrieve width of a GDIP-Image (Pixel):
    Private Declare Function GdipGetImageWidth Lib "gdiplus" (ByVal Image As Long, Width As Long) As Long
    'Retrieve height of a GDIP-Image (Pixel):
    Private Declare Function GdipGetImageHeight Lib "gdiplus" (ByVal Image As Long, Height As Long) As Long
    'Save GDIP-Image to file in seletable format:
    Private Declare Function GdipSaveImageToFile Lib "gdiplus" (ByVal Image As Long, ByVal FileName As Long, clsidEncoder As GUID, encoderParams As Any) As Long
    'Save GDIP-Image in OLE-Stream with seletable format:
    Private Declare Function GdipSaveImageToStream Lib "gdiplus" (ByVal Image As Long, ByVal stream As IUnknown, clsidEncoder As GUID, encoderParams As Any) As Long
    'Retrieve GDIP-Image from OLE-Stream-Object:
    Private Declare Function GdipLoadImageFromStream Lib "gdiplus" (ByVal stream As IUnknown, Image As Long) As Long
    'Create a gdip image from scratch
    Private Declare Function GdipCreateBitmapFromScan0 Lib "gdiplus" (ByVal Width As Long, ByVal Height As Long, ByVal stride As Long, ByVal PixelFormat As Long, scan0 As Any, BITMAP As Long) As Long
    'Get the DC of an gdip image
    Private Declare Function GdipGetImageGraphicsContext Lib "gdiplus" (ByVal Image As Long, graphics As Long) As Long
    'Blit the contents of an gdip image to another image DC using positioning
    Private Declare Function GdipDrawImageRectRectI Lib "gdiplus" (ByVal graphics As Long, ByVal Image As Long, ByVal dstx As Long, ByVal dsty As Long, ByVal dstwidth As Long, ByVal dstheight As Long, ByVal srcx As Long, ByVal srcy As Long, ByVal srcwidth As Long, ByVal srcheight As Long, ByVal srcUnit As Long, Optional ByVal imageAttributes As Long = 0, Optional ByVal callback As Long = 0, Optional ByVal callbackData As Long = 0) As Long

    '-----------------------------------------------------------------------------------------
    Last edited by Maurizio Ortona; 12-17-2021 at 03:58 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Access 365 error: The code in this project must be updated for use on 64-bit systems

    Please show us all the code by copying it and pasting it into your post.

    This will not be hard to do but it depends very specifically on what your code looks like.

    Our rules required code tags for code.

    There are two ways to add code tags. One is to select the code part of the text so it is highlighted, then press the "#" button in the edit controls. The other is to simply type in the tags:

    [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code]
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    12-17-2021
    Location
    Genoa,Italy
    MS-Off Ver
    365
    Posts
    2

    Re: Access 365 error: The code in this project must be updated for use on 64-bit systems

    Ok Thankyou . Hereunder attached are the Forminfo code and basGDIPlus code :

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. The code in this project must be updated for use on 64-bit systems
    By Soriahview in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 11-30-2021, 12:10 PM
  2. [SOLVED] The code in this project must be updated for use on 64-bit systems
    By jaslake in forum Excel Programming / VBA / Macros
    Replies: 25
    Last Post: 12-13-2019, 05:24 AM
  3. Compile error The code in this project must be updated for use on 64-bit systems.
    By raj.12_33 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-14-2017, 07:03 AM
  4. Intro - xl/access since year 2000 - a Systems Analyst by trade
    By tweedle in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 08-13-2012, 05:34 AM
  5. [SOLVED] Access query to excel and back to access updated??
    By jwr in forum Excel General
    Replies: 0
    Last Post: 03-19-2006, 08:50 PM
  6. Replies: 5
    Last Post: 10-13-2005, 09:05 AM
  7. [SOLVED] How can I access a SAS systems file and save it in Excel
    By pmw101 in forum Excel General
    Replies: 2
    Last Post: 03-03-2005, 12:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1