Problem for run lake 2k

99 views
Skip to first unread message

da.pul...@gmail.com

unread,
Sep 19, 2024, 9:04:26 PM9/19/24
to QUAL2K-user
Dear all, 

I have a problem running lake 2k, when I try to run it I get the following message: compile error, the code in this project must be updated for use on 64-bit systems. Please review and update declare statments and then mark them with PtrSafe attribute

Can someone guide me on how to solve the problem?

Thank you very much in advance

Xavier Casamitjana

unread,
Sep 30, 2024, 11:45:56 AM9/30/24
to QUAL2K-user
I have the same problem. However in the beta version the L2K runs well.
Xavier

El dia divendres, 20 de setembre del 2024 a les 3:04:26 UTC+2, da.pul...@gmail.com va escriure:

Greg Pelletier

unread,
Sep 30, 2024, 1:12:45 PM9/30/24
to QUAL2K-user
For compatibility with 64-bit Excel, try adding the following code to a VBA module in LAKE2K:

#If VBA7 Then
  Declare PtrSafe Function OpenProcess Lib "kernel32" _
    (ByVal dwDesiredAccess As Long, _
    ByVal bInheritHandle As Long, _
    ByVal dwProcessId As Long) As Long
  Declare PtrSafe Function GetExitCodeProcess Lib "kernel32" _
    (ByVal hProcess As Long, _
    lpExitCode As Long) As Long
  Declare PtrSafe Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
#Else
  Declare Function OpenProcess Lib "kernel32" _
    (ByVal dwDesiredAccess As Long, _
    ByVal bInheritHandle As Long, _
    ByVal dwProcessId As Long) As Long
  Declare Function GetExitCodeProcess Lib "kernel32" _
    (ByVal hProcess As Long, _
    lpExitCode As Long) As Long
  Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
#End If

Xavier Casamitjana

unread,
Oct 10, 2024, 7:05:52 AM10/10/24
to QUAL2K-user
In which module should I insert this text in a new one or in an old one?
I tried both without success. 
Thanks a lot. Any hint is appreciated
Xavier

El dia dilluns, 30 de setembre del 2024 a les 19:12:45 UTC+2, g.j.pe...@gmail.com va escriure:
Reply all
Reply to author
Forward
0 new messages