What Is Marshalling

Feb 24, 2009

What is marshalling in vb.net

View 1 Replies


ADVERTISEMENT

Marshalling And Converting VB6 Code To .NET?

Nov 2, 2009

I am having trouble converting some code from VB6 to VB.NET (I don't have as much experience with .NET). When I run the 'Select function (from the WS2_32.dll library) in .NET, using the same parameters as the VB6 program, it returns a result of -1 (indicating an error). I think the error may be related to an upgrade comment I saw about marshalling, but I was not sure what I needed to do to declare the function differently. Here is the code that I believe is related to the problem (including the upgrade warnings from Visual Studios):

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Ansi)> Private Structure FD_SET
Dim fd_count As Integer
<VBFixedArray(FD_SETSIZE)> Dim fd_array() As Integer
Public Sub Initialize()

[code]....

View 1 Replies

Marshalling Structure OBJECTDESCRIPTOR?

Nov 24, 2011

Trying to read the OBJECTDESCRIPTOR on the clipboard. Almost get it. My guess I don't know how to Marshall the structure. I definetly don't know how to handle: ..."null-terminated string whose offset in bytes is specified in the dwSrcOfCopy "Getting this returned variable length string is what I need help with.

Start with this

typedef struct tagOBJECTDESCRIPTOR {
ULONG cbSize;
CLSID clsid;
DWORD dwDrawAspect;

[code]....

View 3 Replies

Marshalling Data Between Managed And Unmanaged Code?

Feb 19, 2010

I am having a problem marshaling data between managed and unmanaged code. So I need to inspect the data at the byte level. What I need to do is store a number, say 8 into a 4-byte integer then copy it to an array bytArray(4) and compare those bytes with other data. I also need to set up the same array and copy it to an integer variable.

View 2 Replies

Marshalling Variables To The Types Expected By The SDK DLLs?

Apr 3, 2007

I'm trying to interact with the Windows SDK to control a Portable Media Device, and am running into problems correctly marshalling variables to the types expected by the SDK DLLs.I have the following code.

View 2 Replies

Invalid Structure Size When Marshalling C Structure To .NET

Apr 14, 2012

I'm experiencing a problem with the following c-structure:

typedef struct tagTEXTUREPROP
{
DWORD dwSize;

[Code].....

The Marshal.SizeOf obviously calculates a size of 76 and it works with the DLL function, but it leaves me with some bad feelings.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved