
; Function CurToULngs(ucValue As Currency, _
;            Optional unHigh As Long) As Long

 .486          ; 32-bit instruction set
 .model flat   ; Protected memory, 4GB limit
 .code         ; Start of code

; Unsigned dword and qword values assigned to the
; Currency data type will display incorrectly in VB.

; Also, the Long data type in VB will interpret the
; sign of values above 2,147,483,647 as negative.

CurToULngs proc near

  mov edx,[esp+8]
  mov ecx,[edx+4]
  mov eax,[edx]
  mov edx,[esp+12]
  mov [edx],ecx
  mov edx,[esp+16]
  mov [edx],eax
  xor eax, eax
  ret 16

CurToULngs endp
end CurToULngs
