How to:Let my application support automation like m$ word
-
Hi: I know microsoft word support automation,I can use the fillow two method access word object: #import ..... IApplicationPtr pApp; (1) // Start up existing word, if available HRESULT hr = pApp.GetActiveObject(L"Word.Application"); (2) // Start up fresh instance of word HRESULT hr = pApp.CreateInstance("Word.Application", NULL,LSCTX_LOCAL_SERVER); I wonder how to implement it in my application. I use Windows API RegisterActiveObject to register my application interface,but it can only use the first method to access my object.Can someone help me? Thanks! I am seeking... For what? Why did you ask me for what? I don't know!
-
Hi: I know microsoft word support automation,I can use the fillow two method access word object: #import ..... IApplicationPtr pApp; (1) // Start up existing word, if available HRESULT hr = pApp.GetActiveObject(L"Word.Application"); (2) // Start up fresh instance of word HRESULT hr = pApp.CreateInstance("Word.Application", NULL,LSCTX_LOCAL_SERVER); I wonder how to implement it in my application. I use Windows API RegisterActiveObject to register my application interface,but it can only use the first method to access my object.Can someone help me? Thanks! I am seeking... For what? Why did you ask me for what? I don't know!
For
CreateInstance()
to work, you need to register your class factory with aCoRegisterClassObject()
call. (RegisterActiveObject()
is only for existing app instances).
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site. Support for development will ship at the same time as the Windows XP Service Pack 1 (SP1) release.
-
For
CreateInstance()
to work, you need to register your class factory with aCoRegisterClassObject()
call. (RegisterActiveObject()
is only for existing app instances).
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site. Support for development will ship at the same time as the Windows XP Service Pack 1 (SP1) release.
-
Hi: I know microsoft word support automation,I can use the fillow two method access word object: #import ..... IApplicationPtr pApp; (1) // Start up existing word, if available HRESULT hr = pApp.GetActiveObject(L"Word.Application"); (2) // Start up fresh instance of word HRESULT hr = pApp.CreateInstance("Word.Application", NULL,LSCTX_LOCAL_SERVER); I wonder how to implement it in my application. I use Windows API RegisterActiveObject to register my application interface,but it can only use the first method to access my object.Can someone help me? Thanks! I am seeking... For what? Why did you ask me for what? I don't know!
Check this out: http://www.microsoft.com/mind/1097/extreme1097.asp[^] ÿVOTD:"The harvest is plentiful, but the workers are few. Ask the Lord of the harvest, therefore, to send out workers into his harvest field." - Luke 10:2
-
Check this out: http://www.microsoft.com/mind/1097/extreme1097.asp[^] ÿVOTD:"The harvest is plentiful, but the workers are few. Ask the Lord of the harvest, therefore, to send out workers into his harvest field." - Luke 10:2