PDA

View Full Version : Dll Test



peter
23-10-2012, 18:08
Hi,
May anyone check this DLL, whether it gives a virus alarm?
If yes, you have to live with it, is false arlam.



Uses "ui","A"


Declare Function LoadByte Lib "A.dll" Alias "LoadByte" (ByVal nName As String, ByRef Destination As Any) As Long
Declare Function SaveByte Lib "A.dll" Alias "SaveByte" (ByVal nName As String, ByRef Destination As Any,ByVal count As Long) As Long
Declare Function FileExits Lib "A.dll" Alias "FileExits" (ByVal nName As String) As Long
Declare Function FilePointer Lib "A.dll" Alias "FilePointer" (ByVal FileHandle As Long,ByVal count As Long) As Long
Declare Function OpenFile Lib "A.dll" Alias "OpenFile" (ByVal nName As String) As Long
Declare Function FileSize Lib "A.dll" Alias "FileSize" (ByVal FileHandle As Long) As Long
Declare Function CloseFile Lib "A.dll" Alias "CloseFile" (ByVal FileHandle As Long) As Long
Declare Function ReadLong Lib "A.dll" Alias "ReadLong" (ByVal FileHandle As Long,ByRef Destination As Any,ByVal count As Long) As Long
Declare Function ReadInt Lib "A.dll" Alias "ReadInt" (ByVal FileHandle As Long,ByRef Destination As Any,ByVal count As Long) As Long
Declare Function ReadByte Lib "A.dll" Alias "ReadByte" (ByVal FileHandle As Long,ByRef Destination As Any,ByVal count As Long) As Long
Declare Function WriteLong Lib "A.dll" Alias "WriteLong" (ByVal FileHandle As Long,ByRef Destination As Any,ByVal count As Long) As Long
Declare Function WriteInt Lib "A.dll" Alias "WriteInt" (ByVal FileHandle As Long,ByRef Destination As Any,ByVal count As Long) As Long
Declare Function WriteByte Lib "A.dll" Alias "WriteByte" (ByVal FileHandle As Long,ByRef Destination As Any,ByVal count As Long) As Long
Declare Function PlayWav Lib "A.dll" Alias "PlayWav" (ByVal WavFile As String) As Long


DWord hwnd
hwnd=Canvas_Window("Sine Text",320,240,640,480)
Canvas_Attach(hwnd,0,%TRUE)
Canvas_Font("system",16,%CANVAS_FONTSTYLE_BOLD)


Dim map(1200) As Byte
Dim L As Long=LoadByte("map1-1.txt",map)
PlayWav("success.wav")


Long x,y,z
While IsWindow(hwnd)
Canvas_Clear(0)


For y=0 To 29
For x=0 To 39
z=(y*40+x)+1
SetText(x*16,y*16,Chr$(map(z)),&hFFFFFF,0)
Next
Next
SetText(180,400,L + " BYTES LOADED",&hFFFFFF,0)
Canvas_Redraw
If GetAsyncKeyState(27) Then Exit While
Wend
Canvas_Window End


Sub SetText(x,y As Long, txt As String, xkol,ykol As Long)
Canvas_Color(xkol,ykol)
Canvas_SetPos(x,y)
Canvas_Print(txt)
End Sub