How to call methods of an appobject directly?
-
Hello everybody, I am a beginner in com programming, and i have a question: I have created an ATL 3.0 project including a simple object named MyObj with the attribute of 'appobject' on it's coclass. It has a property named MyString that holds string values. I have successfully built it and then tested it from vb. I have access to MyString property directly without instantiating MyObj. everythings is Ok. but I have problem with VC. From a Console application which has access to that type library (via import directive) MyString property cannot be accessed without qualification. With the statement: MyString = "Hello world!"; compiler generates following error: error C2065: 'MyString' : undeclared identifier what is the problem? do you think i should use a special syntax? if so, would you please help me to know how i can use it? thanks in advance Roozbeh