Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
M1 Oversampling
by 11honza11. 04/20/24 20:57
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 533 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: send_data [Re: Ch40zzC0d3r] #452429
06/11/15 19:49
06/11/15 19:49
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
your right it should really be as easy as that , like the test I did between two functions which worked no problem , but somehow I am missing something here ,maby the string in the class/structure should be converted . I don't know and that's why I am jumping on the delusional highway lol , I wil figure it out sooner or later .

I don't believe that I will really need it , because I stil have to try out skills ,if it turns out that I need it for some reason and I still couldn't figure out what I did wrong I wil simply resort to a dll function or two .


Compulsive compiler
Re: send_data [Re: Wjbender] #452434
06/11/15 20:31
06/11/15 20:31
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
aaaaah and like magic I jumped on the issue without realising it , I took away the string in the packet class and dropped in a int value which should be supported across from c# to the engine dll and what do you know , tadaaa it works as it was supposed to .

so the conclusion : I need to marshal/convert the string or any unsupported members of the packet class ,or use different supported types .


Last edited by Wjbender; 06/11/15 20:38. Reason: I am only human

Compulsive compiler
Re: send_data [Re: Wjbender] #452435
06/11/15 20:38
06/11/15 20:38
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
so you used a string and no char array? lol

Re: send_data [Re: Ch40zzC0d3r] #452436
06/11/15 20:40
06/11/15 20:40
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
yup but I am sure I can still marshal it as an array or whatever (man I am really tired of writing marshal ) hurpy durpy


Compulsive compiler
Re: send_data [Re: Wjbender] #452453
06/12/15 11:49
06/12/15 11:49
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
thanks for the help this was my solution
Code:
[StructLayout(LayoutKind.Sequential)]
public class packet
{
   [MarshalAs (UnmanagedType.ByValTStr,SizeConst=256)] public string message;
   public int id;
}



Compulsive compiler
Page 2 of 2 1 2

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