Text Only
|
Text with Attachments
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]
Declare
Sub
CopyMemory Lib
"kernel32"
Alias
"RtlMoveMemory"
(Destination
As
Long
, Source
As
Long
,
ByVal
Length
As
Long
)
Code: QB64:
[Select]
DECLARE
DYNAMIC
LIBRARY
"kernel32"
SUB
CopyMemory
ALIAS
"RtlMoveMemory"
(
Destination
AS
LONG
,
Source
AS
LONG
,
BYVAL
Length
AS
LONG
)
END
DECLARE
sample #2
Code: Visual Basic:
[Select]
Declare
Function
GetTickCount Lib
"kernel32"
()
As
Long
Code: QB64:
[Select]
DECLARE
DYNAMIC
LIBRARY
"kernel32"
FUNCTION
GetTickCount&
END
DECLARE
Pay attention! "as Long" transform to suffix "&"
Text Only
|
Text with Attachments