|
|
Doesn't seem like you understand the nature of WMI, Windows Management Instrumentation. It is a part of COM/DCOM components.
Jack Rong
|
|
|
|
|
If you want to talk to me stop spamming the forums like a giant arse. Until then frack off.
|
|
|
|
|
Hi,
I could able to create instance of the com server using oleview.
But when i do the same thing in code with cocreateinstance it gives the error E_NOINTERFACE or 0x80004002. By breaking cocreate instance if found that Queryinterface return this error.
How could i resolve it?
Please help
many thanks in advance.
|
|
|
|
|
hi
i have a problem, i want do my project that is we have a client/server system and we have 2printer for example hp1 and hp2,and one server and for example 6 cleint computer in network.
a program is install on server and printer me be connected to any client, and if click on hp1 on program in server , hp1 on any client that have hp1 print,and hp2 too.
i want help me ,what i should learn for this project? what idea you have ?
i do client programing and don`t write program on network.
after finish my project take my result on site.
|
|
|
|
|
#include "stdafx.h"
class A
{
};
class B
{
};
int _tmain(int argc, _TCHAR* argv[])
{
A* pA = NULL;
B* pB = dynamic_cast<B*>(pA);//error C2683: 'dynamic_cast' : 'A' is not a polymorphic type. This is no doubt.
return 0;
}
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
But if A inherits from IUnknow, the dynamic_cast compile successfully, why?
#include "stdafx.h"
#include <ObjBase.h>
class A : IUnknown
{
};
class B
{
};
int _tmain(int argc, _TCHAR* argv[])
{
A* pA = NULL;
B* pB = dynamic_cast<B*>(pA);//Why compile successfully here?
return 0;
}
|
|
|
|
|
"The dynamic_cast operator cannot be used to convert from a non-polymorphic class, that is, a class that does not define any virtual functions." (c) MSDN
So IUnknown is an interface with 3 virtual functions QueryInterface, AddRef and Release.
You can obtain such effect with
class A<br />
{<br />
virtual ~A() {}<br />
};
With best wishes,
Vita
|
|
|
|
|
I wrote some COM+ Applications Using Microsoft .NET Enterprise Services and its work fine.
But i don't know how to debug it.
I try to use "attached to process" and it is not stop on the break point ( the break point is valid - the modules are up ).
Someone know how to debug this thing ? and why its not stopping on the break point ? ? ?
Thanks ...
|
|
|
|
|
I would like to copy file from local to remote machine using WMI in C++. Not quite sure how to do this.
According to MS doc, "Win32_Directory" can be a good candidate. Anybody go idea? Thanks in advance.
Jack Rong
|
|
|
|
|
|
Hi,
i have an dll(using ATL) file in webserver and i included it in my html page ..
and when client requests for that html the ocx gets installed with his permission but the issue it"s getting successfully installed on Admin machine..but in non-admin machine even the message box that prompts to install dll is not displaying.....is there any limitation for non-admin...
pls help me out...
|
|
|
|
|
Did you care about signing the ocx and implementing the safety interfaces: IObjectSafety or IObjectSafetySiteLockImpl?
But I have no ohter clue?
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
ya i have signed and implemented IobjectSafety to mark ATl ActiveX control as safe....
but still i was unable to install and register in non admin only....Every thing works fine in admin machine...
|
|
|
|
|
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
|
|
|
|