HighTechTalks DotNet Forums  

Marshal strings / byte arrays / structs

Dotnet Framework (Interop) microsoft.public.dotnet.framework.interop


Discuss Marshal strings / byte arrays / structs in the Dotnet Framework (Interop) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
hkasten@gmail.com
 
Posts: n/a

Default Marshal strings / byte arrays / structs - 12-18-2007 , 07:22 AM






Hello,

I have the following functions that are from a native Win32 dll.

Can someone help me to use them from CSharp?

extern ABS_StatusType ABS_WriteInArea( void* pxPath,
UINT16
iOffset, UINT8* pbData,
UINT16
iAmount, UINT16 iTimeout );

pxPath is a number
pbData is suposed to be an byte array

extern ABS_StatusType ABS_UserSelectPath(
UINT32*
plPathId,
void**
ppxPath );

ppxPath is a string to be retrieved

extern ABS_StatusType ABS_SendMail(
void* pxPath,

ABS_MailboxType* psMail,
UINT16
iTimeout );

How coud I use tha type ABS_MailboxType?


typedef struct ABS_MailboxType
{
/*
** The standard Mailbox header information
*/

UINT16 iId; /* Message
ID */
UINT16 iInfo; /* Message
Information */
UINT16 iCommand; /*
Command */
UINT16 iDataSize; /* Data
size */
UINT16 iFrameCount; /* Fragmentation: Total number of
frames */
UINT16 iFrameNo; /* Fragmentation: This frame
number */
UINT16 iOffsetHi; /* Fragmentation: Data offset
address */
UINT16 iOffsetLo; /* Fragmentation: Data offset
address */

/*
** The header extended and the mailbox data.
*/

UINT16 aiExtended[ 8 ];
UINT8 abData[ 256 ];
}
ABS_MailboxType;

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.