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
2 registered members (AndrewAMD, Nymphodora), 1,592 guests, and 4 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
CloseClipboard Parameter #409418
10/16/12 21:14
10/16/12 21:14
Joined: Sep 2007
Posts: 101
Luxembourg
K
krial057 Offline OP
Member
krial057  Offline OP
Member
K

Joined: Sep 2007
Posts: 101
Luxembourg
I wonder what I have to pass as parameter to CloseClipboard. The declaration in windows.h is:
long WINAPI CloseClipboard(long);

msdn says, that CloseClipboard sholdn't get any parameters:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms649035%28v=vs.85%29.aspx

If I pass NULL, the engine crashes. I replaced the line with
long WINAPI CloseClipboard();
in windows.h and now everything appears to work fine.
Is it a bug in 3dgs or am I doing something wrong? :S

regards Alain

Example code:
Click to reveal..
Code:
#include <acknex.h>
#include <windows.h>
function main()
{
	if(OpenClipboard(hWnd))
	{
		HANDLE hClipboardData = GetClipboardData(CF_TEXT);
		char *pchData = (char*)GlobalLock(hClipboardData);
		printf(pchData);		
		GlobalUnlock(hClipboardData);
		if(CloseClipboard(NULL)) //What to pass as parameter? oO
			printf("should be alright :S");
	}
}



EDIT: I think its not only CloseClipboard but also some others(like EmptyClipboard)

Last edited by krial057; 10/16/12 21:17.
Re: CloseClipboard Parameter [Re: krial057] #424115
06/10/13 18:06
06/10/13 18:06
Joined: Sep 2007
Posts: 101
Luxembourg
K
krial057 Offline OP
Member
krial057  Offline OP
Member
K

Joined: Sep 2007
Posts: 101
Luxembourg
*Bump*
It is still not working(tried A7 and A8). Can anyone confirm this? Should I make a Bug-report?

Re: CloseClipboard Parameter [Re: krial057] #424122
06/10/13 19:27
06/10/13 19:27
Joined: Mar 2003
Posts: 4,264
Wellington
Nems Offline

.
Nems  Offline

.

Joined: Mar 2003
Posts: 4,264
Wellington
Try your question in Higher Languages or Ask the Developers etc...

Cheers...

Re: CloseClipboard Parameter [Re: Nems] #424123
06/10/13 19:38
06/10/13 19:38
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Crashing makes it look like it really should be void. Afair all WinAPI calls are stdcall, so you end up with a broken stack and jump to some undefined return address (if you make it to the ret of the function that is).

Post to the bugs forum (or ask a mod (this is your cue, Nems :p) to move it).


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: CloseClipboard Parameter [Re: WretchedSid] #424241
06/12/13 09:17
06/12/13 09:17
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Thanks! Yes, that's indeed wrong, and some other clipboard function prototypes also have a wrong argument. This will be fixed.


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