Re: win32 dll vb.net pointers receiving data - HELP



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
>


.



Relevant Pages

  • win32 dll vb.net pointers receiving data - HELP
    ... Declare Function GetTheData Lib "scandll.dll" (ByVal msg As ... StringBuilder, ByRef msgLength As IntPtr) As Integer ... length is displayed as 204430, but when I display the IntPtr.ToInt32, I ... The demo code they supplied is in C++ so it doesn't have this ...
    (microsoft.public.dotnet.languages.vb)
  • Re: help urgent
    ... Declare a dynamic array of stuctures. ... > in the event handler should display an OpenFileDialog allowing the user ... load the date from each array member into the combo box. ...
    (microsoft.public.vb.general.discussion)
  • Re: Where to declare Variables
    ... the input fields have php variables to display the ... Now to prevent notice warning for the variable I set it in the ... first it is a good practice to declare the variables before using them. ... The problem you describe sounds like a Zend IDE problem. ...
    (comp.lang.php)
  • Re: Where to declare Variables
    ... the input fields have php variables to display the ... Now to prevent notice warning for the variable I set it in the ... first it is a good practice to declare the variables before using them. ... The problem you describe sounds like a Zend IDE problem. ...
    (comp.lang.php)
  • Why do I receive no value error message, when parameters do have v
    ... ' Declare the ADO variable for the tbl_Referral_Data recordset ... Dim rstbl_RefSEN As New ADODB.Recordset ... ' Select the required data from tbl_Referral_Data and display the SEN data ...
    (microsoft.public.access.modulesdaovba)