Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem OCX BSTR data type mismatch
Message
 
To
24/05/1999 21:24:25
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00222297
Message ID:
00222332
Views:
21
>------------------
>nLayer = 1
>nColumn = 1
>store 0 to a,b
>store space(19) to c
>oObject.GetColumnDefinition(nLayer, nColumn, @a, @b, @c)
>
>-----------------
>function declaration from manual:
>
>C++
>void GetColumnDefinition (short nLayer, short nColumn,
> short lpDataType, short *lpnCount, BSTR *lpTitle)

The third parameter should not be passed by reference. FWIW, are these COM interface calls or what? COM manages passing by reference on its own, so you should not pass in anything with the @ in front of it. The string is definitely not passed in with a @.


+++ Rick ---

>
>Visual Basic
>GetColumnDefinition (ByVal nLayer As Integer;
>ByVal nColumn As integer;
>lpDataType As Integer; lpnCount As Integer;
>lpTitle As String)
>
>
>I also tried to call up the function with parameters by value or use createbinary() for the string. Same error. I suspect the string 'c' to be the problem because I can use other just numeric functions of the OCX without problems. Any ideas?
>
>Thanks!
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform