The information in this article applies to:
SUMMARY
Advanced: Requires expert coding, interoperability, and multiuser skills.
MORE INFORMATION
When an OLE object is stored in a table, the ClassKey is the second
null-terminated string after the 20th byte in the object. It can be
read as text with the following Access Basic code:
The GetObjectClass$() function first checks to see if the object is
null and returns the value "n/a" if it is. If the object is not null,
it assigns bytes 21 through 40 of the OLE object to the string
MyChunk$ and then searches for the first null character, the next null
character, and so forth. Finally, it sets the GetObjectClass$()
function equal to the string between the two null characters.
Using the function provided above, a control on the Employees form of the sample database NWIND.MDB, with the properties below, displays the ClassKey for the Photo control:
This example returns "PBRUSH" for the first photo in the Employees
table.
There are several different ways to use this information. RegQueryValue(), a function contained in the Microsoft Windows SHELL.DLL file, uses the ClassKey to obtain information about that class from the REG.DAT file. REFERENCESFor more information about calling the RegQueryValue() function to get the Class Name of an OLE object, please see the following article here in the Microsoft Knowledge Base. Q99322 ACC: Calling RegQueryValue() to get an OLE Object Class NameMicrosoft Windows "Programmer's Reference," version 3.1, Volume 2, page 282 Additional query words: dll classname class key
Keywords : IntpOle |
Last Reviewed: October 21, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |