Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dealing with Unknown Data Types
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00438106
Message ID:
00438113
Views:
10
Ed Rauh solved a problem like this one for me in thread #258195 , A variation of his solution to handle your problem would look like this.

FUNCTION ConvertSmallIntToVFPNum
LPARAMETER tcSmallInt
* tcSmallInt represents your Small integer data (A small int is an 8-bit string 1 Byte)

DECLARE RtlCopyMemory IN WIN32API ;
INTEGER @DestNumeric, ;
STRING @pVoidSource, ;
INTEGER nLength
LOCAL lnNum

lnNum = 0
=RtlCopyMemory(@lnNum, tcSmallInt, 4)

RETURN lnNum

I did not test this variation of the solution, so let me know if it works.


>Posted this two weeks ago but got little response...anyone got any ideas???
>
>I am using an ActiveX control, as supplied by the manufacturer, to access data in their accounting product.
>
>Despite the fact they don't officially support its use with VFP (tested with VB, VC++ and Delphi only) they say it should work okay.
>
>And it did until I hit a property on the data object with type of "Small Integer". At this point VFP simply returns data type unknown and blows. Properties with data types recognised by VFP are fine.
>
>Am I stuck or is there any way I can wrap this up into some sort of data conversion, in VFP, that is!?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform