QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: SW on June 14, 2019, 05:13:05 pm

Title: VB to QB64 converting Win API calls
Post by: SW on June 14, 2019, 05:13:05 pm
Just code samples for VB and QB64 convertion. Not found something like this, so can be usefull.

sample #1
Code: Visual Basic: [Select]
  1. Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Long, Source As Long, ByVal Length As Long)
Code: QB64: [Select]
  1.      SUB CopyMemory ALIAS "RtlMoveMemory" (Destination AS LONG, Source AS LONG, BYVAL Length AS LONG)

sample #2
Code: Visual Basic: [Select]
  1. Declare Function GetTickCount Lib "kernel32" () As Long
Code: QB64: [Select]
  1.     FUNCTION GetTickCount&
Pay attention! "as Long" transform to suffix "&"