|
hai,
i am using a dialog based application & i want to store the user defined values & get that values during the next time program is executing
|
|
|
|
|
Use registry to store them and retrieve them in the next instance.
Cheers,
Suresh
|
|
|
|
|
Initialization file, Registry, Serialization, Database,...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Hi Everyone,
Actually I like to use the GPL MPEG1/2 decoder from the follwing site
http://www.free-codecs.com[^]
I have the decoder source which gives GPLDec.lib and GPLDec.ax files. I had registered the GPLDec.ax file so that I can see that in Graphedit,but can anyone tell me how do I include the GPL MPEG1/2 Decoder in my own graph with the help of the IBaseFilter interface? And also the CLSID mentioned in the source is "CLSID_GpgMpegDecoder" ..When I try to add this with ADDFilterByCLSID(...) function I an getting a "Undefined Symbol" error as there is no header file given to access the GPLDec.lib file. So can anyone help me with this?
Thank You,
With regards
Raja Bose
|
|
|
|
|
Dear all,
Good Day!
I’m writing a windows service(Login with local system) that open a Ms Word document, do some modification and then save the document to a new doc file. I’m using the Microsoft Word 11.0 Object Library (Office 2003) via interlop. It works fine in my XP development PC(VS 2003 , framework v1.1.4322).
However, when deploy it to Windows 2000 Server which have Office 97 installed, the following error message encountered when the system perform Word.Document.Open() function.
'System.NullReferenceException: Object reference not set to an instance of an object.
at Word.Documents.Open(Object& FileName, Object& ConfirmConversions, Object& ReadOnly, Object& AddToRecentFiles, Object& PasswordDocument, Object& PasswordTemplate, Object& Revert, Object& WritePasswordDocument, Object& WritePasswordTemplate, Object& Format, Object& Encoding, Object& Visible, Object& OpenAndRepair, Object& DocumentDirection, Object& NoEncodingDialog, Object& XMLTransform)
at GCMS.RWrite.WriteReminder(RObject oRem)'
The following is my code snipet:
Dim oMainDoc As Word.Document
Dim oApp As Word.Application
If IsNothing(oApp) Then
oApp = New Word.Application
End If
'Error encounter at this line
oMainDoc = oApp.Documents.Open("c:\Test.Doc", isible:=False, OpenAndRepair:=True, Revert:=True, ReadOnly:=False)
The following file are inside the deployment folder.
MSWORD.OLB
office.dll
stdole.dll
Will the MSWORD.OLB (version office 2003) conflict with the version office 97 at the deployment PC? Can anybody give me some advise
I have done some searching but still not able to find the solution Some have suggested to use DCOMCNFG to fix the user profile problem but since the windows service is login as “System”, it shouldn’t have this problem right?
CCN
|
|
|
|
|
Hi,
Is it possible to share the same instance of a COM between multiple client ?
I try to implement this scenario :
----------------------------------
1 - Create a COM service with and interface ITest that open the RS232 port 3.
2 - Create an application that instance the COM and use ITest interface.
3 - Start the service (1).
4 - Start two different instance of the same application (2).
5 - From this two applications send data to RS232 port 3 using ITest interface...
I don't know if it's possible... If some one have a solution, send me a message
I found a solution to share memory segment from multiple instance of a DLL, but for hardware resource....???
Thanks,
Ps: A made the difference between RS232 COM port and Object COM :->...
...
|
|
|
|
|
I think you can solve the problem making an out-of-process (i.e. an excutable) COM object: this way only a single process (the COM server) will access the hardware resource on behalf of its clients.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Thanks for the answer.
- modif 2 -
Thanks, with singleton design implementation it's perfect...
A++
...
|
|
|
|
|
I can't use Word.Application ... in VS 2005. What is the problem here? I've installed Tools for Office
|
|
|
|
|
Hi,
It's not the same problem, and my problem was solved.
But i can help you... I don't use "Tools for Office" to access Word, i use typelib with MFC wrapper or #import command.
1) To use Word typelib, word must be installed on you machine ^_^
2) You can connect to word from different way.
3) There a lot of good article on this this with Excel try one, and replace Excel.Application by Word.Application and remove Excel specific code...
If you can't solve your problem, send me an other message, actually my VC is dead, i need to install VC2005 in the next hours...
Bye...
...
|
|
|
|
|
i wanna customize webbrowser in my own ocx(mfc activex),
according to Sumit Kapoor's method(plz see,
Customize Web Browser ActiveX and change its inbuilt settings[^]
i add
CCustomOccManager *pMgr = new CCustomOccManager;
m_pDispOM = new CImpIDispatch;
AfxEnableControlContainer(pMgr); into ocx's InitInstance, and implement the IDropTarget interface,now i want to do something in Drop() function,i wanna get the point of the main ocx ctrl through AfxGetMainWnd(), ,of course i got the point,and could get the member webbrowser which had been capsulated in the ocx control,hereto,everything is ok,then i call the webbrowser's method through formmer point,(eg
CMyCtrl* pWnd = (CMyCtrl*)AfxGetMainWnd();
pWnd->m_ctrlWeb.Image(strImage);
),
here problem comes,
if (S_OK == m_pCmdTarg->QueryStatus(&CGID_MSHTML, 1, &ocmd, NULL))
return ocmd.cmdf;,
and error msg is:
First-chance exception in ViewTest.exe (MyControl.OCX): 0xC0000005: Access Violation.
what is the meaning? help!?
thanks!
-- modified at 6:41 Friday 18th May, 2007
|
|
|
|
|
XPointer wrote: First-chance exception in ViewTest.exe (MyControl.OCX): 0xC0000005: Access Violation.
what is the meaning? help!?
It means, either m_pCmdTarg or ocmd or CGID_MSHTML is uninitialized , when it is expected otherwise.
Prasad
MS MVP - VC++
|
|
|
|
|
thanks your reply,
i debug my code again,the variables u referred before are all ininitialized,
i suspect that whether i could use AfxGetMainWnd() in my ocx
|
|
|
|
|
XPointer wrote: suspect that whether i could use AfxGetMainWnd() in my ocx
Don't think so. Probably, you can use some other function , usual MFC function on that returned window pointer, to check it's sanity.
Prasad
MS MVP - VC++
|
|
|
|
|
thanks prasad,
without using AfxGetMainWnd(), which other function could i use,
btw, i have no choice but using globle point to webbrowser instead?
any good idea about this?
|
|
|
|
|
Sorry for confusion. What I meant was, use some other MFC function on returned CWd*.
CWnd *pWnd = AfxGetMainWnd(),
pWnd->FlasWindow(TRUE);
Prasad
MS MVP - VC++
|
|
|
|
|
hi,prasad,thanks your kindness,
i adding pWnd->FlasWindow(TRUE); into my program,but it's not ok yet
|
|
|
|
|
I guess, I'm not able to explain you.
This function will not solve problem. I wanted you to check sanity of pointer you suspect.
It is dangling pointer for sure. Doesn't call stack tell you something ?
Prasad
MS MVP - VC++
|
|
|
|
|
u mean the c all stack of AfxGetMainWnd() ,oh,it's too complicated
|
|
|
|
|
hi,prasad,r u here now?
i found the m_pCmdTarg's address that i called it through AfxGetMainWnd(), is different to that one called directly in the ocx control,it's so strange,
do u have any idea about this problem?
thanks
|
|
|
|
|
Hai,
How can I implement more than one interfaces in same coclass using ATL
Thanks
George
|
|
|
|
|
georgekjolly wrote: How can I implement more than one interfaces in same coclass using ATL
This is the easiest way in VC6:
You have to have a typelibrary for the interface you want to implement in your CoClass. This could mean that you define another interface in your IDL-file for your CoClass if it doesn't exist yet.
Right-click your CoClass object in the ClassView and select "Implement interface..." and check the interfaces you want to implement in your CoClass.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Hi Roger,
I tried it, and its working. Now I am able to Query one interface from
another(They belongs to different coclass) .
Thanks
George
|
|
|
|
|
There is an article in MSDN so that we can run multiple version of COM Components at the same time using a .local file.
"DLL/COM Redirection on Windows"
I tried this but it never works. Any Idea?
|
|
|
|
|
The DLL to be redirected to must be placed in the same folder as the application, and the file must be in the same folder and named appname.exe.local. For example, notepad.exe.local to redirect Notepad.
|
|
|
|
|