...
Code Block |
---|
void RegisterSchema() { HINSTANCE instance = AfxGetResourceHandle(); SchemaHandle client = SchemaOpenRegistry(L"MySchemaClientName"); // Type is undefined and handler is null because we never instantiate this class SchemaHandle schemaClass = SchemaRegisterClass(client, LocString(L"MyClassName", instance, IDS_CLASS_NAME, IDS_CLASS_DESCRIPTION), SystemType::Undefined, NULL); // Register a signature called "FileExistsParams" that takes a string SchemaHandle fileExistsParams = SchemaClassRegisterCall(client, schemaClass, L"FileExistsParams"); SchemaCallRegisterParam(fileExistsParams, LocString(L"ParamIdName", instance, IDS_PARAM_FRIENDLY_NAME, IDS_PARAM_DESCRIPTION), SystemType::AString, false); // Register a class member that has a signature that is the previously registered "FileExistsParams" call. SchemaHandle fileExists = SchemaClassRegisterMember(client, schemaClass, LocString(L"FileExists", instance, IDS_FUNC_NAME, IDS_FUNC_DESCRIPTION), eSchemaReadOnly, SystemType::Boolean, eSchemaVarDispCall, FileExistsFunc, -1, L"FileExistsParams"); } |