G
Guest
Esteemed Developers
I am trying to pin a structure, but compiler does not execute this statement. Can you kindly check where could be the problem is? (I use Visual C++ .NET Standard
Form1.
--------------------------------------------------------------------------------
public __gc class Form1 : public System::Windows::Forms::For
{
public
....
int retBindVal
SOCKET ServerSocket, ClientSocket
sockaddr_in ServerSockAddrIn, ClientSockAddrIn
.....
-------------------------------------------------------------------
=================================================================
Form1.CP
-------------------------------------------------------------------
void Form1::Start_Server(
...
sockaddr_in __pin * pinned_ServerSockAddrIn; //This statement is nor executed. It jumps to next statement directl
pinned_ServerSockAddrIn = &ServerSockAddrIn
retBindVal = bind ( ServerSocket, (struct sockaddr*) &pinned_ServerSockAddrIn, sizeof(*pinned_ServerSockAddrIn) )
...
========================================================
I tried __pin at structure but it did not work,too. My code was as follows
sockaddr_in __pin * pinned_ServerSockAddrIn
pinned_ServerSockAddrIn = &__box(ServerSockAddrIn)
the compiler gave the following error message:
error C3627: Only a value type can be boxe
I am trying to pin a structure, but compiler does not execute this statement. Can you kindly check where could be the problem is? (I use Visual C++ .NET Standard
Form1.
--------------------------------------------------------------------------------
public __gc class Form1 : public System::Windows::Forms::For
{
public
....
int retBindVal
SOCKET ServerSocket, ClientSocket
sockaddr_in ServerSockAddrIn, ClientSockAddrIn
.....
-------------------------------------------------------------------
=================================================================
Form1.CP
-------------------------------------------------------------------
void Form1::Start_Server(
...
sockaddr_in __pin * pinned_ServerSockAddrIn; //This statement is nor executed. It jumps to next statement directl
pinned_ServerSockAddrIn = &ServerSockAddrIn
retBindVal = bind ( ServerSocket, (struct sockaddr*) &pinned_ServerSockAddrIn, sizeof(*pinned_ServerSockAddrIn) )
...
========================================================
I tried __pin at structure but it did not work,too. My code was as follows
sockaddr_in __pin * pinned_ServerSockAddrIn
pinned_ServerSockAddrIn = &__box(ServerSockAddrIn)
the compiler gave the following error message:
error C3627: Only a value type can be boxe