Discussion Board
How to get the Application object?
2004-03-26, 05:42
#1
Registered User
I have project made with Appwizard on Visual Studio 6.0. It created *app, *container, *doc, *ui - classes. So, How can I get the pointer to the app object?(or to doc, container, ui object)
Nokia Developer Expert
whay do you need it ? and where in the system you would like to use it ?
yucca
Registered User
I have a library that uses some function, i.e. Myfunc();
i want to do something like this:
#define Myfunc() GetApp()->GetMyEngine()->Myfunc()
Nokia Developer Expert
hmmm
all processes are using their own memory space, processes can't use pointers from other processes in side them.
So if you are thingking of using a pointer from other app that is running in different process, then you should forget it.
yucca
Registered User
Yucca, you didn't understand me, i call Myfunc() from the same app. In my project there are no globals, so I don't know how to get the pointer to the current application.
Nokia Developer Expert
inside you app you could get pointer to your appui like this:
CCoeEnv::static()->AppUi() ,or
CEikonEnv::Static()->EikAppUi()
Look the appui class headers & SDK documentation and you'll see how to get application & document class pointers from appUi.
yucca
Registered User
Thank you very much, Yucca.
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules