The following code working Ok in VB.
- Code: Select all Expand view
Public Declare Function GetDeviceTime Lib "DeviceLib" (ByVal nHandleIndex As Long, ByRef nTotalCount As Long, ByRef pnDateTime As Date) As Long
To call the same function in our FWH, I wrote the code as under:
- Code: Select all Expand view
DLL32 Function GetDeviceTime(nHandleIndex AS LONG, nTotalCount AS LONG, pnDateTime AS STRING) AS LONG PASCAL LIB hLib
and
When I called as under:
- Code: Select all Expand view
#include "fivewin.ch"
FUNCTION main()
LOCAL nTotalCount := 0
LOCAL pnDateTime := SPACE(19) // 9999-99-99 99:99:99
GetDeviceTime(nHandleIndex, @nTotalCount @pnDateTime)
?nTotalCount, pnDateTime
RETURN nil
I am not getting the Referenced date type variable populated with correct value and getting some junk characters.
Not only Date type, even (LONG) type of referenced parameters are not returning correct values but
returning only the Initial values originally assigned to them at the the time of their declaration.
Can anybody help me please.
Thanks,
- Ramesh Babu P