Hello All
I am new to the Mobile app development.I am developing an application using VC++ MFC dialog based application for Windows Mobile 5.0 smartphone in Visual Studio 2005. I have to use shockwave flash and Windows Media Player ActiveX control in it. When I am adding the control in the dialog and building the application it builds the solution properly. but while executing it the run time error appears illustrating that the component is not properly registered. The error is mentioned beneath:
CoCreateInstance of OLE control {D27CDB6E-AE6D-11CF-96B8-444553540000} failed.
>>> Result code: 0x80040154
>>> Is the control is properly registered
I have found out that the Active X control need to be registered and few articles have suggested to use regsvrce but it does not work Please let me know how to register the ActiveX control for Motorola Q device Or is there any other alternative to add the ActiveX control
Thanks

Active X Control registration
Bruce Bukovics
The error message suggests that the regsvrce isn't in the path. Please make sure that it is present either in the directory from where you are trying to launch it or in \windows.
One more dumb suggestion :), please make sure that the cpu type for which regsvrce is compiled is the same as your device's.
Hope this helps.
Thanks
GrandpaB
ActiveX control registration is a must for COM infrastructure to identify the right server that implements the class identified by the reported guid, so registration of the control is a must.
Regsvrce is the right tool to register the control. If you can pass on the error message that pops up on using regsvrce, may be, I shall be able to help.
Thanks
Toan
Thanks for your reply.
Let me know if there is any other alternative for the registeration of the activex control in Windows Mobile 5.0 SDK
thanks
Andy Wilbourn
Thanks Avnish for your reply.
Beneath is the error message which I am getting when I am using "regsvrce" command for regestering.
"Windows can not find 'regsvrce'. Make sure you typed the name correctly, and then try again. To search for a file click the Start button, and then click Search."
Please let me know if you can help me.
Thanks
Match Brace
First thing we need to do here is to call GetLastError to get the error value for getting encountered by LoadLibrary. Secondly I don't see this code doing anything useful with the DllRegisterServer. You need to do the same things as you are doing for put_Movie. Fetch the address in a pM like varible and then use it to call the method.
Hope this helps.
Thanks
Michael_317
More often than not, all you need to do to register a dll/control is to call DllRegisterServer method in the dll. This can be done by using LoadLibaray to load the control in a process and then getting the address for this ethod using GetProcAddress. Here after you just need to use that address to call this method.
Alternatively you may like add a dummy project to your solution and set the binary to be deployed to the name of the control and set the register option to yes, then VS shall do the same for you.
Another VS option add the control to additional files in the project properties.
The help information gives the information needed for the syntax needed in this option. All you need to do then is to set the register option to 1.
Hope this helps.
Thanks
nickst
Hi Avinash
Thanks for your quick response.
The same I am trying but not getting success in it.
The code is posted here please let me know if you can find the error in it While debugging I am getting hInstance as Null pointer.
HINSTANCE hInstance = LoadLibrary(TEXT(
"\\Program Files\\FlashDemo\\Flash8.ocx"));GetProcAddress(hInstance,L
"DllRegisterServer"); typedef void (CALLBACK* put_Movie)(LPCTSTR newValue);put_Movie pM;
pM = (put_Movie)GetProcAddress(hInstance,L
"put_Movie");(pM)(L
"tellmenu.swf");Seeing this code can you please help me out in finding the solution for the problem
Thanks