Re: Reading a byte array from a Variant

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Possible reason is the VB (VB6) returns the variable which name is
equal to the function name:
Public Function GetArray(ByRef b() As Byte) As Byte()
GetArray = b
End Function
Otherwise the function returns the empty array, which has the right
type, but doesn't contain any value. I.e. vaRet.vt will be (VT_ARRAY |
VT_UI1), but vaRet.parray will be NULL.

.



Relevant Pages

  • Re: Microsoft and trust
    ... If everytime someone posts to the wrong group due to the naming issue, they then take it upon themselves to use that as a soapbox for bashing .net, then it's reasonable for people who use and like both VB6 and VB7+ to speak up against that. ... If I know the answer I will post it: I'm not going to make the person go through un-necessary delays because some folks don't want to see it. ... |> Tried 2008 as well and just don't see any reason to convert. ... Why do we not give such warnings? ...
    (microsoft.public.vb.general.discussion)
  • Re: VB.NET Discussion
    ... >Then I took a large, to me, VB6 project and let VB2005 do it's thing. ... That reason is that it is now far ... >> It would be extremely foolish to do so and akin to being deaf and ... >> walking down the railroad track assuming that, ...
    (microsoft.public.vb.general.discussion)
  • Re: Hows dot.net doing nowadays?
    ... There are things that VB6 will forever be better suited for than a .NET app. ... why is it that 8 of 10 .Notters will quote something out of context so they can twist its meaning? ... If some one is moving to .NET, or if the reason some one changing ANY platform is simply because it's the fashionable thing to do for the week, then it's a bad decision. ...
    (microsoft.public.vb.general.discussion)
  • Re: VB.NET Discussion
    ... Then I took a large, to me, VB6 project and let VB2005 do it's thing. ... That reason is that it is now far ... >>recommend against upgrading to .Net unless there is a compelling reason ... >>that's not a problem with .Net, it is a problem with those programmers. ...
    (microsoft.public.vb.general.discussion)
  • Re: Point me in the right direction - Mouse utility...
    ... I'm considering writing my own using VB6... ... >> Private Type KBDLLHOOKSTRUCT ... >> Public Sub stopKeyboardHook() ... >> Public Function KeyboardProc(ByVal nCode As Long, ...
    (microsoft.public.vb.general.discussion)