Re: Use of delegate

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



OK. Thanks for all your help. I understand that without the C++ source code,
it is hard to debug. I do know what the C++ side wants, as I have a working
Delphi application which I wrote. I can clearing see that the array elements
are passed padded with ansi nulls(#0). The managed code shows "h"c, "u"c,
"b"c, "0"c, "1"c, nothing, nothing, nothing, nothing, nothing, nothing. The
delphi code is passing 'h','u','b','0','1',#0, #0, #0, #0, #0, #0. I do
appreciate all your time and effort, I can see from your code sample below,
that they should be the same. I will re-group and re-examine my code. There
has to be something changing, as it works with the Delphi code, but not the
VB.NET The whole project of the Point of Sale conversion from Delphi to
VB.NET relies on that Chainlink DLL, and is now on hold.

""Peter Huang" [MSFT]" <v-phuang@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:<nrhjO7lFGHA.224@xxxxxxxxxxxxxxxxxxxxx>...

> Hi

>

> Based on my test with my C++ dll in in the post before last.

> Private Sub Button2_Click(ByVal sender As System.Object, ByVal e

> As

> System.EventArgs) Handles Button2.Click

> a.return_text = "Test" & New String(chr(0), 200 - 4)

> a.size = Marshal.SizeOf(a)

> fnTest1(a)

> End Sub

>

> If I pass a string as above code, in the C++ DLL side I set a debug

> point in the C++ side.

> And find that what I have passed into the C++ side as below.

> T

> e

> s

> t

> 0

> 0

> 0

> 0

> ..

> 0

>

> Which is just we are want to pass in the C++.

>

> That is why I said without the C++ source code we can not do further

> troubleshooting. Because we did not know what the C++ side want and

> know what we are passing into unmanaged code exactly.

>

> Best regards,

>

> Peter Huang

> Microsoft Online Partner Support

>

> Get Secure! - www.microsoft.com/security This posting is provided "AS

> IS" with no warranties, and confers no rights.

>

""Peter Huang" [MSFT]" <v-phuang@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:nrhjO7lFGHA.224@xxxxxxxxxxxxxxxxxxxxxxxx
> Hi
>
> Based on my test with my C++ dll in in the post before last.
> Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles Button2.Click
> a.return_text = "Test" & New String(chr(0), 200 - 4)
> a.size = Marshal.SizeOf(a)
> fnTest1(a)
> End Sub
>
> If I pass a string as above code, in the C++ DLL side I set a debug point
> in the C++ side.
> And find that what I have passed into the C++ side as below.
> T
> e
> s
> t
> 0
> 0
> 0
> 0
> ..
> 0
>
> Which is just we are want to pass in the C++.
>
> That is why I said without the C++ source code we can not do further
> troubleshooting. Because we did not know what the C++ side want and know
> what we are passing into unmanaged code exactly.
>
> Best regards,
>
> Peter Huang
> Microsoft Online Partner Support
>
> Get Secure! - www.microsoft.com/security
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>


.



Relevant Pages

  • Re: Use of delegate
    ... Based on my test with my C++ dll in in the post before last. ... Private Sub Button2_Click(ByVal sender As System.Object, ... Peter Huang ...
    (microsoft.public.dotnet.languages.vb)
  • Re: retreive integer parameter from dll delphi in VB6
    ... >dll return like this. ... >dll parameter, the problem is who I can get this values to vb6? ... Here is a demo VB Form followed by Delphi DLL:- ... Private Sub Command1_Click ...
    (microsoft.public.vb.general.discussion)
  • Re: RaiseEvent fails from a Modal form
    ... trapped by the app that called the dll. ... Private Sub Command1_Click ... Set mobjHost = New AntTestModFormEvent.clsTest'change component ... Friend Sub SetHost(objHost As clsTest) ...
    (microsoft.public.vb.general.discussion)
  • Re: Problem selecting printer
    ... My next problem now is my client wants to have the option of selecting a default paper tray for the selected printer, I have done a default paper size in a delphi application which is the sample as paper trays so I think there might be another post or to on this. ... This is a DLL which was produced by Microsoft presumably because of the device name length problem and also the various memory related problems they would also have been having with the code example I have just described. ... Private Sub Command1_Click ... Then in your main Form add one CommandButton and use the IDE properties window to set its name to cmdSelectPrinter. ...
    (microsoft.public.vb.general.discussion)
  • Re: Problem selecting printer
    ... You can overcome these problems by using the equivalent API method of displaying a print dialog. ... This is a DLL which was produced by Microsoft presumably because of the device name length problem and also the various memory related problems they would also have been having with the code example I have just described. ... Private Sub Command1_Click ... Then in your main Form add one CommandButton and use the IDE properties window to set its name to cmdSelectPrinter. ...
    (microsoft.public.vb.general.discussion)