Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (M_D), 1,430 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
[DELETE]Possibly Zorro bug with RECT and DWORD in windows.h #458474
03/12/16 23:59
03/12/16 23:59
Joined: Nov 2013
Posts: 123
Mithrandir77 Offline OP
Member
Mithrandir77  Offline OP
Member

Joined: Nov 2013
Posts: 123
Edit: Nevermind, I solved it

Trying to test this code created from the zorro manual
Code:
#include <windows.h>
long WINAPI MessageBox(HWND,char *,char *,long);

int main()
{
    long h = LoadLibrary("user32");
    MessageBox = GetProcAddress(h,"MessageBoxA");
    if (MessageBox)			
        (*MessageBox)(NULL,"this is a test","test");
    return 0;
}



It gives this error:

Quote:
>.

PruebaDllCall compiling..
Error in 'windows.h' line 6519:
syntax error
< RECT rcPaint;
>.


In windows.h inside include folder I found this in line 6519

Code:
typedef struct _PAINTSTRUCT{
	long         hdc;
	long         fErase;
	RECT        rcPaint;
	long         fRestore;
	long         fIncUpdate;
	char         rgbReserved[32];
}PAINTSTRUCT;



And there isn't any RECT type, there is RECTL type in line 6462

Code:
typedef struct _RECTL{
	long         Left;
	long         Top;
	long         Right;
	long         Bottom;
}RECTL;



So I changed it to RECTL and then it gives this error

Quote:

Error in 'windows.h' line 6550:
syntax error
< DWORD LowPart;
>.
Time 00:00:00


In windows.h in line 6550 there is:

Code:
typedef struct _ULARGE_INTEGER
{
	DWORD LowPart;
	DWORD HighPart;
}ULARGE_INTEGER;



1) Is it ok to correct RECT for RECTL, ie there was a typo in the release?

2) How to solve the second error, the syntax error with DWORD, isn't it a type?

Thank you!

PS: This happens with Zorro 1.42 and 1.32

Last edited by Mithrandir77; 03/13/16 01:06.
Re: Possibly Zorro bug with RECT and DWORD in windows.h [Re: Mithrandir77] #458475
03/13/16 01:05
03/13/16 01:05
Joined: Nov 2013
Posts: 123
Mithrandir77 Offline OP
Member
Mithrandir77  Offline OP
Member

Joined: Nov 2013
Posts: 123
My bad...I forgot to #include <default.c> -which includes litec.h where RECT is defined- before <windows.h>


Moderated by  jcl, Nems, Spirit, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1