home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.comp.os.windows-xp      Actually wasn't too bad for a M$-OS      17,273 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 16,908 of 17,273   
   R.Wieser to All   
   VBScript OCX receive and supply a safeAr   
   21 May 24 20:44:34   
   
   XPost: alt.windows7.general, comp.os.ms-windows.programmer.win32   
   From: address@is.invalid   
      
   Hello all,   
      
   I've just build an OCX for usage within vbscript, and am running into a   
   problem :   
      
   I'm trying to have a method #1 return a SafeArray of type VT_UI1, and later   
   provide it to a method #2.   
      
   The problem is that when I do this :   
      
   Object.Method2(Object.Method1())   
      
   everything works.   
      
   But when I use an intermediate variable like this   
      
   Data = Object.Method1()   
   Object.Method2(Data)   
      
   VBScript throws a "Type mismatch" error - and I have no idea why or how to   
   solve it. :-(   
      
   Declarations of both methods in the IDL file :   
      
   HRESULT Method1([out, retval] SAFEARRAY(unsigned char)* Result);   
   HRESULT Method2([in] SAFEARRAY(unsigned char) ByteData);   
      
   By the way:   
      
   wscript.echo vartype(Object.Method1())   
   Data = Object.Method1()   
   wscript.echo vartype(Data)   
      
   both of the above return &H2011 (array of VT_UI1)   
      
   Help ?   
      
   Regards,   
   Rudy Wieser   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca