Dear programmers
I have written an dll for my thesis but I can't compile it there are compile time errors and I don't find how I can fixed this errors.
This is the error log report
===================
PowerBASIC for Windows
PB/Win Version 9.00
Copyright (c) 1996-2008 PowerBasic Inc.
Venice, Florida USA
All Rights Reserved
Error 484 in E:\PROGRA~1\PBWin90\Samples\Timers32.bas(14:001): Requires Procedure (Function/Method...)
Line 14: DIM StartTime AS GLOBAL QUAD
==============================
Compile failed at 18:17:32 on 29/10/2008
Can someone help me?
Kind regards
Stephane
I have written an dll for my thesis but I can't compile it there are compile time errors and I don't find how I can fixed this errors.
Code:
#COMPILE DLL #DIM ALL %USEMACROS = 1 #INCLUDE "WIN32API.INC" GLOBAL ghInstance AS DWORD DECLARE SUB TimeInit() DECLARE FUNCTION TimeRead() AS DOUBLE DECLARE SUB Delay(BYVAL ms AS DOUBLE) DECLARE SUB RealTime() DECLARE SUB NormalTime() 'I have need this size of 64 bits integer Int64 DIM StartTime AS GLOBAL QUAD DIM TimeUnit AS GLOBAL DOUBLE : TimeUnit = 0.000838096515 SUB TimeRead() DEF f AS QUAD DEF x AS LONG x = QueryPerformanceFrequency(f) TimeUnit = (1000 / f) x = QueryPerformanceCounter(StartTime) END SUB SUB TimeInit() DEF t AS QUAD DEF x AS LONG x = QueryPerformanceCounter(t) FUNCTION = (TimeUnit * (t - StartTime)) END SUB SUB Delay(dDelayTime AS DOUBLE) DEF TimeStart AS DOUBLE TimeStart = TimeRead() DO WHILE TimeRead < (TimeStart + dDelayTime) : LOOP END SUB SUB RealTime() SetPriorityClass (GetCurrentProcess(), %REALTIME_PRIORITY_CLASS) END SUB SUB NormalTime() SetPriorityClass (GetCurrentProcess(), %NORMAL_PRIORITY_CLASS) END SUB '------------------------------------------------------------------------------- ' Main DLL entry point called by Windows... ' FUNCTION LIBMAIN (BYVAL hInstance AS LONG, _ BYVAL fwdReason AS LONG, _ BYVAL lpvReserved AS LONG) AS LONG SELECT CASE fwdReason CASE %DLL_PROCESS_ATTACH 'Indicates that the DLL is being loaded by another process (a DLL 'or EXE is loading the DLL). DLLs can use this opportunity to 'initialize any instance or global data, such as arrays. ghInstance = hInstance FUNCTION = 1 'success! 'FUNCTION = 0 'failure! This will prevent the EXE from running. CASE %DLL_PROCESS_DETACH 'Indicates that the DLL is being unloaded or detached from the 'calling application. DLLs can take this opportunity to clean 'up all resources for all threads attached and known to the DLL. FUNCTION = 1 'success! 'FUNCTION = 0 'failure! CASE %DLL_THREAD_ATTACH 'Indicates that the DLL is being loaded by a new thread in the 'calling application. DLLs can use this opportunity to 'initialize any thread local storage (TLS). FUNCTION = 1 'success! 'FUNCTION = 0 'failure! CASE %DLL_THREAD_DETACH 'Indicates that the thread is exiting cleanly. If the DLL has 'allocated any thread local storage, it should be released. FUNCTION = 1 'success! 'FUNCTION = 0 'failure! END SELECT END FUNCTION
===================
PowerBASIC for Windows
PB/Win Version 9.00
Copyright (c) 1996-2008 PowerBasic Inc.
Venice, Florida USA
All Rights Reserved
Error 484 in E:\PROGRA~1\PBWin90\Samples\Timers32.bas(14:001): Requires Procedure (Function/Method...)
Line 14: DIM StartTime AS GLOBAL QUAD
==============================
Compile failed at 18:17:32 on 29/10/2008
Can someone help me?
Kind regards
Stephane
Comment