64bit: How to implement working API calls and how to test/debug it?

In a test environment, we have installed a 8.0.1 64bit Domino on Windows 2003 Server.

Some of our LotusScript Agents are running on the server and utilize some more or less complex Notes and Windows API calls- which are causing crashes of our test servers now.

Documentation and example resources on this topic are very rare at the moment. I know there are issues with API calls and data types unter 64bit, but is there any clear guideline how to “migrate” the old API calls to a 64bit version of them?

Example: Even this simple API-Call to the windows subsystem brings the server down, but it is running perfectly on a 32bit Domino Server (even under 64bit Windows) and Domino Designer:

====================

Const MAX_PATH = 260

Declare Function GetTempPath Lib “kernel32” Alias “GetTempPathA” (Byval nBufferLength As Long, Byval lpBuffer As String) As Long

====================

Function GetWindowsTempDir() As String

If IsDefined("WINDOWS") Then

	Dim hlp As String*MAX_PATH

	Dim t As Long

	

	t = GetTempPath(MAX_PATH, hlp)

	If t = 0 Then 

		GetWindowsTempDir = Curdir("C")   'use current directory by default

	Else

		GetWindowsTempDir = Mid$(hlp, 1, t)

	End If

Else

	'currently only for Linux (32bit)

	GetWindowsTempDir = "\tmp"

End If

End Function

====================

I guess that the problem here is the “long” parameter in the declaration, since library and method name should be the same in 32 and 64bit Windows.

Declare Function GetTempPath Lib “kernel32” Alias “GetTempPathA” (Byval nBufferLength As Long, Byval lpBuffer As String) As Long

But: How would this look like “translated” for 64bit Windows?

And - even more interesting - how to develop/debug an agent in the designer when the designer is only running in the 32bit context of windows? Do I have to use the “try and error” method by running an agent on the server, e.g. as a scheduled agent?

Help would really be appreciated.