Re: win32 dll vb.net pointers receiving data - HELP
- From: "Patrice" <nobody@xxxxxxxxxxx>
- Date: Thu, 12 Jan 2006 10:49:01 +0100
I would try a byte array for a start...
--
Patrice
<marfi95@xxxxxxxxx> a écrit dans le message de
news:1137053520.893016.176150@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi all,
>
> I'm stuck and hope someone out there knows how to get around this.
>
> I have to interface with a 3rd party vendor win32 dll and on one of
> their calls, they are returning a bunch of data from a scanned image.
> There could be chr(0)'s, etc.... The format they have setup for the
> returned data is really funky. Bytes 2-5 is the length of the entire
> message. I'm trying to receive it into my vb.net app, but am only
> getting partial data back, I'm assuming it's because of the chr(0)
> etc...
>
> How do you declare the function in order to receive all the bytes they
> are sending. Maybe, I just dont have it setup right.
>
> Here is there exported method:
> int WINAPI GetTheData (char *msg, int *Length)
>
> This is the way I have it declared:
> Declare Function GetTheData Lib "scandll.dll" (ByVal msg As
> StringBuilder, ByRef msgLength As IntPtr) As Integer
>
> I was using a StringBuilder because I thought it was all char data,but
> like I said, there could be chr(0)'s in it. Not only am I having a
> problem with the msg data itself, but the length when I print it using
> msgLength.ToInt32 doesn't seem right either, so I'm not sure if I have
> that defined correctly either. For example, when I run their demo, the
> length is displayed as 204430, but when I display the IntPtr.ToInt32, I
> get 42. The demo code they supplied is in C++ so it doesn't have this
> issue, but I need this in vb.net.
>
> Any help would be most appreciated.
>
> Thanks,
> Mark
>
.
- References:
- win32 dll vb.net pointers receiving data - HELP
- From: marfi95
- win32 dll vb.net pointers receiving data - HELP
- Prev by Date: Re: recursive function
- Next by Date: Re: Okay
- Previous by thread: win32 dll vb.net pointers receiving data - HELP
- Next by thread: Re: win32 dll vb.net pointers receiving data - HELP
- Index(es):
Relevant Pages
|