Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Quad, AndrewAMD, 7th_zorro), 868 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 4 1 2 3 4
Re: A stable free IDE [Re: TWO] #202999
04/18/08 18:58
04/18/08 18:58
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline OP
Serious User
Dark_samurai  Offline OP
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
Yep, that was the problem. Thanks!

But like I expected there is still another problem with using sscanf_s.

In Dev-Cpp the following Code worked:

DLLFUNC void string_test()
{
char buffer[50];
short reseiver;

sprintf_s(buffer,50,"%d",10);
sscanf_s(buffer,"%d",&reseiver);
}

But if I use this function in GS i get this runtime error:
Debug Error!

Run-Time Check Failure #2 - Stack around the variable 'reseiver' was corrupted.

What am I doing wrong?

[edit]I found out that this problem only occurs in a dll. If I build the whole thing as console application everything works. Maybe some settings are affecting this.

Dark_Samurai

Last edited by Dark_samurai; 04/18/08 19:18.

ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: A stable free IDE [Re: Dark_samurai] #203093
04/19/08 13:32
04/19/08 13:32
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline OP
Serious User
Dark_samurai  Offline OP
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
I uploaded a testproject which should show my problem. There are 2 folders, one with the VC++ 2008 project and one with the C-Script test. Just open test.wdl with SED and than debug->set main to current and then debug->testrun. Than you will notice my problem.
You will need winrar to unpack.

Link: rightclick->save as

Thanks for your help!

Dark_Samurai


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: A stable free IDE [Re: Dark_samurai] #203181
04/20/08 08:14
04/20/08 08:14
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline OP
Serious User
Dark_samurai  Offline OP
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
I found out that this problem only occurs, when reseiver is short. With int everything works.
It would be interesting why this doesn't work with short...

Dark_Samurai


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: A stable free IDE [Re: Dark_samurai] #203201
04/20/08 12:10
04/20/08 12:10
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
you could try adding a __asm pop ax or a __asm push ax after your function, if dev-cpp supports that.

Re: A stable free IDE [Re: Joey] #203381
04/21/08 18:21
04/21/08 18:21
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline OP
Serious User
Dark_samurai  Offline OP
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
It works now.
By the way I'm using VC++ 2008, not Dev-Cpp now.

And after some testing I found out, that a dll written with VC++ doesn't open correct on some computers. I tested it on 4 different pc and only on one it' was opened. Did somebody already had this problem? What are typical mistakes when this problem occurs? Wrong headers/libraries, wrong project settings?

Dark_Samurai


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: A stable free IDE [Re: Dark_samurai] #203399
04/21/08 20:10
04/21/08 20:10
Joined: Jan 2004
Posts: 2,013
The Netherlands
E
Excessus Offline
Expert
Excessus  Offline
Expert
E

Joined: Jan 2004
Posts: 2,013
The Netherlands
The users of your dll must have the VC++ 2008 redistributable libraries installed.

Re: A stable free IDE [Re: Excessus] #203440
04/22/08 06:28
04/22/08 06:28
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline OP
Serious User
Dark_samurai  Offline OP
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
Are there any libaries which are already pre-installed on the most systems?
Because I don't want that my end users have to install more than my game it self...

Dark_Samurai


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: A stable free IDE [Re: Dark_samurai] #203520
04/22/08 16:00
04/22/08 16:00
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline OP
Serious User
Dark_samurai  Offline OP
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
I installed the libraries on the other pcs but it still doesn't work.
If I would use an older Version of VC++ (like 2005), would there also be such a problem? Which Version should I choose?

Dark_Samurai


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: A stable free IDE [Re: Dark_samurai] #203523
04/22/08 16:16
04/22/08 16:16
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
T
TWO Offline

Serious User
TWO  Offline

Serious User
T

Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
I think that behavior of microsoft appeared in vs service pack 1.

I'm not really sure, but not using "multithreaded-dll" and instead "multitreaded" in C++/Codegeneration in the compiler options may fix the problem.

Re: A stable free IDE [Re: TWO] #203528
04/22/08 16:30
04/22/08 16:30
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline OP
Serious User
Dark_samurai  Offline OP
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
Ok I tried that, but with the new settings I get this error:

"mt.exe : general error c101008a: Failed to save the updated manifest to the file ".\Debug\enet.dll.embed.manifest". Wrong parameter."

Dark_Samurai


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Page 3 of 4 1 2 3 4

Moderated by  TWO 

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