Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2008 Jan : How to use variant type
| Subject: | How to use variant type |
| Posted by: | "Shahram Shafieha" (shahram.shafie..@gmail.com) |
| Date: | Sun, 6 Jan 2008 09:51:37 +0330 |
Hi,
I have a trouble in using variant types.
I'm developing a software which communicates with canon digital camera by
its SDK.
There is a function that get data from camera. defenition of function as
below:
cdCAPI CDGetDevicePropertyData( cdHSource hSource, cdDevicePropertyID
DevPropID, cdUInt32* pBufSize, cdVoid * pBuf, cdUInt32 Option );
(clear this defined as C)
cdCAPI, cdHSource, cdDevicePropertyID, cdUInt32 are as integer type and
cdVoid as Variant.
DevPropID is input and pBuf is output, by DevPropID the type of pBuf may
change. It may be Integer, String or Boolean.
I define pBuf as below:
var pBuf: Variant;
after calling function (without error) finishing the procedure I got an
error message that says variant type is invalid and any use of the pBuf
raise an error exception.
How can use variant variables?