|
Wasnt there something with "per user" installations?
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Ya but i need to install the ActiveX dll using IE .....
pls let me know regarding the same....
|
|
|
|
|
Hi,
I have an AddIn application where I am adding a one menu "Test" in Winword -->File menu. I am able to add it but i am able to sink events on this. I tried this in various ways but I am able to do that.
Any idea will help.
Thanks
SNI
|
|
|
|
|
Create a new COM ATL project. Insert new ATL Object(select sample object). Then go to class pane in solution explorer. Right click on class name and select implement interface. Choose a tlb/dll file and pick any one interface and click finish. Everyting works fine.
But when i try to implement interface in one existing COM project, after selection interface of tlb file when click on finish button i got following error
"g_opchfcm.imports is null or not an object"
Any idea to solve this issue
|
|
|
|
|
Hi,
We have developed add in for Office 2003 suite. For Word I am able to sink DocumentOpen, DocumentChange, DocumentBeforeClose events...(and other events also). When I am trying to close Word Document from word container (I am not closing Word Application but only the document) using following code
DocumentBeforeClose(IDispatch*, VARIANT_BOOL *pvtCancel)
{
MSWORD::_DOcumentPtr pDoc;
msWordApp->get_ActiveDocument(&pDoc);
pDoc->Close();
}
After closing document my winword application gets crash. I want to know what could be the problem here. I have wriiten it as a Word AddIn using .Net framework(VC++).
Pls suggest me.
Thanks
SNI
|
|
|
|
|
Crashing the application often is because you are using a NULL pointer. You can check for this simply by adding an if statement before you close..
|
|
|
|
|
I have checked with pointer and poiter is valid. But the thing is that when we close document using File-->Close (File Menu). there are two close calls are coming to winword. first that we are calling pDoc->close() and other is winword calls close when we use File-->Close (File Menu). If I open two documents and close the file then instead of closing a single document it closes both the documents and the container remain.
COnclusion is there are two close calls are going but since we are opening only one document, only one document gets closed and there is no other document to close and hence crashed. Pls let me know how to handle this?
Any idea if we can use IDispatch* use in DocumentBeforeClose....
or something else we can do.
Actually there are two close event which winword fires and one that we are explicitely calling (this is required for our logic to work) inside DocumentBeforeClose...
How can we tell winword that close has been already fired...
SNI
modified on Thursday, April 23, 2009 3:54 AM
|
|
|
|
|
Hi,
I am using excel RTD in my project, its work fine,
Using following event (SelectionChange) I am changing color of cell based on data.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
But this spreadsheet must be protected from some of our users from destroying the cells that have formulas or conditional formats.
But if I protect sheet I am not able to change color of cell.
So I want to protect sheet as well as change cell color using macro.
My first thought was to unprotect sheet in the beginning of the code, change colore and then at the end, protect it back down.
But this would mean protecting and unprotect every time that cell change color.
Changing cell color is so fast so I think it is inefficient.
Can you suggest what to do in this scenario.
Thanks
hiren shah
|
|
|
|
|
I want to disable one of the row when service is either starting or stopping which should not allow user to do anything with that row and it will be enable only when service will be Start/Stop fully.
I am not getting how to do it.
Please help me out.
Thanks.
shailesh
|
|
|
|
|
|
Sending WM_DROPFILES seems not work. Is it possible to 'Simulate' the Drag and Drop operation to a target application? Or, is it possible to get the IDropTarget interface of the target application?
Thanks in advance.
|-|3llo Wo|2ld
|
|
|
|
|
QueryInterface() ???
but you got to know which object to ask for. I guess the aprrobiate doc/window...
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
I am trying to make a touchscreen friendly skin in ms Access 07. Things are going well, but I hit a road block. What I dont know how to do is get access to add a track to a user playlist called "Controller".
If anyone is feeling particularly helpful, heres what the whole event should be. What vba code will
1. delete what ever tracks happen to be in user playlist "Controller"
2. add the recordset to user playlist "Controller"
3. Start playing user playlist "Controller" starting with me.songname.
If anyone could help me with any part of this, that would be much appreciated!
|
|
|
|
|
Why does this give a syntax error????
Private Sub SongName_Click()<br />
<br />
Dim pl As IITUserPlaylist<br />
Dim song As IITTrackCollection<br />
Dim upl As IITTrack<br />
<br />
pl.AddTrack (song(me.SongName),upl.Playlist("Controller"))<br />
<br />
End Sub<br />
|
|
|
|
|
after successful cocreateinstance. When i access a method in class it returns the error:
"First-chance exception in XYZ.exe (OLEAUT32.DLL): 0xC0000005: Access Violation".
By step by step debugging i found it gives this error while calling
// make the call
SCODE sc = m_lpDispatch->Invoke(dwDispID, IID_NULL, 0, wFlags,
&dispparams, pvarResult, &excepInfo, &nArgErr);
in OLEDIST2.CPP file.
please help
|
|
|
|
|
hi,
could you please be more specific on this?
1) check you called the CoInitialize() and the component is register in the machine and the instance is created properly.
2)check the component created and being accessed are on the same thread.
^-^
@|@
- redCat
|
|
|
|
|
Hi,
i checked coInitialize and cocreateinstance they return successfull...
How could i check wheter the component created and being accessed are on same thread?
please help.
|
|
|
|
|
Did you check always HRESULT return values?
Could you please post the relevant code?
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi
this is the code segment:
CLSIDFromString(L"{AF684922-D245-11D3-8DE8-00A024ACAB85}", &CLSID_MSDiscMasterObj);
CLSIDFromString(L"{AF684924-D245-11D3-8DE8-00A024ACAB85}", &IID_IDiscMaster);
hr = CoInitialize(NULL);
if(SUCCEEDED(hr))
{
hr = CoCreateInstance(CLSID_MSDiscMasterObj, NULL, CLSCTX_LOCAL_SERVER, IID_IDiscMaster, (void**)&IV2WObj);
if(SUCCEEDED(hr))
{
VARIANT ReturnValue;
ReturnValue = IV2WObj->MakeConnection(1,"VPCI",65536,0);
}
}
it fails at method call.
CoInitialize successful,
cocreateinstance is also successful.
the COM object is obtained as an executable.
Which is sucessfully launched after executing cocreateinstance.
please help
|
|
|
|
|
try sending the second parameter as widechar L"VPCI" or as BSTR.
and if the last parameter is string, do not send as 0. try sending NULL or empty string L"".
^-^
@|@
- redCat
|
|
|
|
|
Hi redCat,
Actually there are around 10 to 20 member functions in that class. I couldn't able to call any one of the functions. even the one which doesn't have any arguments.
The probable reason seems to me is like the class object pointer returned by cocreateinstance(returns successfully) is accessing a memory location which is not part of the process memory area. But iam not sure. even if this is the problem i don't know how to resolve it?.
please help
|
|
|
|
|
Some updates which i verified.
I could check the typelib registration process in REGISTRY and found it to be perfect according to the procedure shown @ link :
http://blogs.msdn.com/larryosterman/archive/2006/01.aspx
"Minimal COM object registration"
"COM registration for cross process access"
"COM registration if you need a typelib"
"COM registration of PROGIDs."
"What registry entries are needed to register a COM object."
but still the problem persists
please help
|
|
|
|
|
You call your function with bad parameters. Make correct bstr and so on.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Hi all,
thanks for your time.
the problem is solved at my end.
Problem lies in importing the type library (tlb) of the COM server in to my client application. Because of which, object gets a corrupted pointer. when a member function is called it gives ACCESS VOILATION error.
I actually imported the typelibrary in my Visual C++ application using "CLASS WIZARD" as mentioned @ MSDN link:
http://msdn.microsoft.com/en-us/library/aa279228(VS.60).aspx
Which actually caused the above problem.
Later I found by importing typelibrary using simple #import "xyz.tlb"
it generates two files .tlh and .tli files which also contains all the classes and member function definitions.
When i used these files in my project it worked.
Sorry for bothering you......
thanks and regards
sandeep r.
|
|
|
|
|
Hi everybody, this is my first post on this forum.
I am trying to find a way to call a constructor of my managed (C#) class registered as a COM object
(with regasm gacutil etc ...)
I can build an object calling:
<br />
HRESULT hr = CoInitialize(NULL);<br />
MyNamespace::IMyClassIntf l_myObject;<br />
l_myObject = MyNamespace::IMyClassIntf(__uuidof(MyNamespace::IMyClass));<br />
I suppose this calls my managed class's the constructor without parameters.
Is there a way to call a constructor with parameters.
Reguards.
|
|
|
|