wcglorioso
Programmer
This post is in relation to the post entitled "How to resolve Error 1440 in VFP7? (No such thing in VB6 equivalent)" - thread184-741015
I think I found the cause of Error 1440. I believe it is due to uninitialized properties whose data type is undefined.
I have read all the properties and queried their types using the function TYPE() and found out that two properties are left undefined namely UserData and UserDataHeader (see partial type library entry below)
[propget, helpstring("property UserData"]
HRESULT _stdcall UserData(
[in] long index,
[out, retval] unsigned char* pVal);
[propput, helpstring("property UserData"]
HRESULT _stdcall UserData(
[in] long index,
[in] unsigned char pVal);
[propget, helpstring("property UserDataHeader"]
HRESULT _stdcall UserDataHeader(
[in] long index,
[out, retval] unsigned char* pVal);
[propput, helpstring("property UserDataHeader"]
HRESULT _stdcall UserDataHeader(
[in] long index,
[in] unsigned char pVal);
Hence the properties expects a data structure (filled byte by byte according to documentation)
I would like to create a class that has two properties only for this reason.
DEFINE CLASS usrdat AS XXXXX
index=0
pVal=0
ENDDEFINE
I would like it to inherit from a class XXXXX that is empty and assign the resulting object to properties UserData and UserDataHeader.
If there is a different approach to this I am open to suggestions and corrections.
Thanks in advance.
I think I found the cause of Error 1440. I believe it is due to uninitialized properties whose data type is undefined.
I have read all the properties and queried their types using the function TYPE() and found out that two properties are left undefined namely UserData and UserDataHeader (see partial type library entry below)
[propget, helpstring("property UserData"]
HRESULT _stdcall UserData(
[in] long index,
[out, retval] unsigned char* pVal);
[propput, helpstring("property UserData"]
HRESULT _stdcall UserData(
[in] long index,
[in] unsigned char pVal);
[propget, helpstring("property UserDataHeader"]
HRESULT _stdcall UserDataHeader(
[in] long index,
[out, retval] unsigned char* pVal);
[propput, helpstring("property UserDataHeader"]
HRESULT _stdcall UserDataHeader(
[in] long index,
[in] unsigned char pVal);
Hence the properties expects a data structure (filled byte by byte according to documentation)
I would like to create a class that has two properties only for this reason.
DEFINE CLASS usrdat AS XXXXX
index=0
pVal=0
ENDDEFINE
I would like it to inherit from a class XXXXX that is empty and assign the resulting object to properties UserData and UserDataHeader.
If there is a different approach to this I am open to suggestions and corrections.
Thanks in advance.