|
donguy76 wrote: How can i do that?
You can do this, same way as simple class,
interface IToyoto : Vehicle
{...
donguy76 wrote: The purpose of doing this is that i should be able to use functions
inside both Base interface(IVehicle) from the drived new interfaces.
You should remember, COM support interface inheritance, not implementation inheritance.
In other words, you need to implement all function inherited by new interface.
Prasad
MS MVP - VC++
|
|
|
|
|
There is question Difference between win32 dll and com dll?
DLL is a comman one there is nothing like win32 dll and COM dll. COM makes use of dll for dynamic linking.
Can you please provide me more information about the same and also Please correct me if I am wrong.
Thanks in advance,
|
|
|
|
|
|
Does anyone have any information about using the function CDefFolderMenu_Create2 to create a standard Explorer context menu for a file? I have been trying in vain to get the correct items in the menu. So far the menu returns 'Cut', 'Copy', 'Create shortcut' and 'Delete' but I need the usual items like 'Send To', 'Properties' etc. I am using IQueryAssociations to return an HKEY but it always returns 0.
I am using C# but any information relating to this command in any language would be very helpful as the MSDN docs are less than helpful and google does not return anything useful.
Thanks
|
|
|
|
|
hi all ,
i m using excel to take a printout on dmp printer and paper is continue sheets . it has no problem at all but i want that the printing starts from the top of the new sheet(this time it is starting after a margin ) automatically after the last sheet is pulled out by the operator.
Nikesh Kr. Yadav
CSS Infotech
Sec- 31
Gurgaon,
Haryana(India)
|
|
|
|
|
Is this question relevant to COM in any way?
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
hi
my first query is how to set the properties in dundas chart
my second query is how to connect these chats to database
my third query is how to write the code
if any one knows pls explain me so tht i gothroww tht
chandrasekhar
|
|
|
|
|
Hi!
I'm developing an application that's burning CD/DVDs using IMAPIv2.0, and need to receive notifications when adding data to the disc image before burning. I've implemented the DFileSystemImageEvents in the same manner as the DDiscFormat2DataEvents interface, but I don't receive any notifications when calling IFsiDirectoryItem::AddTree() on the root directory item retrieved using IFileSystemImage::get_Root().
Also, I call the AddTree() method in a separate thread, COM initialization and pointer marshalling all taken care of (I believe), and the operation for some reason blocks both the separate thread and the primary application thread. But once this operation is done, and I move on to creating result image, retrieving image stream and launching IDiscFormat2Data::Write() (still in the separate thread), the primary thread is unblocked and starts receiving events from the DDiscFormat2DataEvents interface.
This is my how I've implement the interface:
class CIMAPIBurnerImageEvent :<br />
public CIMAPIBurnerEvent,<br />
public ::ATL::CComObjectRootEx<::ATL::CComSingleThreadModel>,<br />
public ::ATL::CComCoClass<CIMAPIBurnerImageEvent>,<br />
public ::ATL::IDispatchImpl<IDispatch, &IID_DFileSystemImageEvents, &LIBID_IMAPILib2, IMAPILib2_MajorVersion, IMAPILib2_MinorVersion>,<br />
public ::ATL::IDispEventImpl<1, CIMAPIBurnerImageEvent, &IID_DFileSystemImageEvents, &LIBID_IMAPILib2, IMAPILib2_MajorVersion, IMAPILib2_MinorVersion><br />
{<br />
DECLARE_NOT_AGGREGATABLE(CIMAPIBurnerImageEvent)<br />
<br />
BEGIN_COM_MAP(CIMAPIBurnerImageEvent)<br />
COM_INTERFACE_ENTRY(IDispatch)<br />
END_COM_MAP()<br />
<br />
BEGIN_SINK_MAP(CIMAPIBurnerImageEvent)<br />
SINK_ENTRY_EX(1, IID_DFileSystemImageEvents, DISPID_DFILESYSTEMIMAGEEVENTS_UPDATE, &Update)<br />
END_SINK_MAP()<br />
<br />
public:<br />
STDMETHOD_(VOID, Update)(IFileSystemImage* fileSystemImage, BSTR currentFile, LONG copiedSectors, LONG totalSectors);<br />
};
This class is hooked up for event listening from the IFileSystemImage interface in the same way as with the DDiscFormat2DataEvents, like this:
m_pImageEvent->DispEventAdvise(m_pFileSystemImage);
To summarize; I don't receive any notifications and both threads are blocked.
What can I possibly be doing wrong?
Regards,
Ole Petter
|
|
|
|
|
|
All,
We have code to call a component remotely from a standard VB.NET Form. I've compiled the code on my machine and it works fine. Calling from another client over the network causes the following error message:
Retrieving the COM class factory for remote component with CLSID {F655F1E8-50B6-31EF-9C5D-B14B7D9B56D3} from machine XP1111 failed due to the following error: 80070005.
The Client Call is made as follows:
Dim svr As Type = Type.GetTypeFromProgID("ZFTestCOMPlus.ZFComPlusOne", _<br />
txtServer.Text) <br />
' txtServer.Text is the name of the server e.g "XP1111"<br />
Dim o As Object = Activator.CreateInstance(svr)<br />
Dim x As ZFTestCOMPlus.ZFComPlusOne = CType(o, ZFTestCOMPlus.ZFComPlusOne)<br />
Dim str As String = x.GetSomeDataFromMe()
The problem occurs on the line Dim o As Object = Activator.CreateInstance(svr).
This is the first COM+ application that has been written here. It is totally client based but users Library COM+ Application (which causes all kinds off issues).
The component is a COM+ Server Application with one class and 2 methods.
Troubleshooting (in the dark) so far...
1. Installed Component into GAC.
2. Created a MSI from COM+ to install the components on remote machine as
a proxy.
2. Added user calling the component from the remote machine to a role
under the COM+ Application. This role has been given access to
ZFTestCOMPlus.ZFComPlusOne class
3. Tried disabling Enforce access checks for this application.
4. Granted full access/remote launch to the user in dcomdnfg in the COM
Security tab.
Anyone have any ideas?
Just fumbling about in the dark at the mo and not come across any decent artices
Andez
|
|
|
|
|
This is permission problem, is the user has the execute permission on the remote machine?
Please try to use the credential of user who has administrator rights on remote m/c
Regards,
Sunil Tonger
|
|
|
|
|
Hey,
I have to define a user defined property but in the "IDL" file i am getting a compilation error
i.e
error MIDL2025 : syntax error : expecting a type specification near "ADO_ROWSET"
at this line
[propget, id(6), helpstring("property FetchRowSet")] HRESULT FetchRowSet([out, retval] ADO_ROWSET *pVal);
Please help me in doing so as my whole of design of dll depends on this problem pls through some light
Regards,
Pankaj Sachdeva
|
|
|
|
|
pan_angel wrote: ADO_ROWSET
MIDL compiler is not recognizing ADO_ROWSET , isn't that declared before using ?
Prasad
MS MVP - VC++
|
|
|
|
|
actually it is a seperate class and i want to use it's object as the argument,
but it is not declared in IDL file before this statement.
This is actuall IDL file that is created in default
<br />
<br />
import "oaidl.idl";<br />
import "ocidl.idl";<br />
<br />
typedef enum<br />
{<br />
connOracle = 1,<br />
connSQLServer = 2,<br />
connAccess = 3<br />
} dbFlag;<br />
<br />
[<br />
object,<br />
uuid(6DD75115-9828-4BA0-9006-D85B1DFDA2A8),<br />
dual,<br />
helpstring("IADO_DB Interface"),<br />
pointer_default(unique)<br />
]<br />
interface IADO_DB : IDispatch<br />
{<br />
[id(1), helpstring("method ConnectDatabase")] HRESULT ConnectDatabase(BSTR sDatabase,BSTR sUserID,BSTR sPassword,BSTR sServer,dbFlag connDB);<br />
[id(2), helpstring("method DisconnectDatabase")] HRESULT DisconnectDatabase();<br />
[id(3), helpstring("method ExecuteSQL")] HRESULT ExecuteSQL(BSTR sQuery);<br />
[propget, id(4), helpstring("property DatabaseName")] HRESULT DatabaseName([out, retval] BSTR *pVal);<br />
[propget, id(5), helpstring("property SQL")] HRESULT SQL([out, retval] BSTR *pVal);<br />
[propput, id(5), helpstring("property SQL")] HRESULT SQL([in] BSTR newVal);<br />
[propget, id(6), helpstring("property RowSet")] HRESULT RowSet([out, retval] ADO_ROWSET *pVal);<br />
};<br />
<br />
[<br />
object,<br />
uuid(DEAD417C-B1EA-401D-8F8B-55A2207BDB52),<br />
dual,<br />
helpstring("IADO_ROWSET Interface"),<br />
pointer_default(unique)<br />
]<br />
interface IADO_ROWSET : IDispatch<br />
{<br />
};<br />
<br />
[<br />
uuid(440FC80A-7700-4291-B683-7B4B2BE7D9E2),<br />
version(1.0),<br />
helpstring("dbcs07 1.0 Type Library")<br />
]<br />
library DBCS07Lib<br />
{<br />
importlib("stdole32.tlb");<br />
importlib("stdole2.tlb");<br />
<br />
<br />
[<br />
uuid(2A6DE5C6-9BEC-49FE-8626-23D4C9656C93),<br />
helpstring("ADO_DB Class")<br />
]<br />
coclass ADO_DB<br />
{<br />
[default] interface IADO_DB;<br />
};<br />
<br />
[<br />
uuid(74FCF560-93D9-4F15-B477-5A62E529C567),<br />
helpstring("ADO_ROWSET Class")<br />
]<br />
coclass ADO_ROWSET<br />
{<br />
[default] interface IADO_ROWSET;<br />
};<br />
};
if it has any problem pls let me know
Thank you
Regards,
Pankaj Sachdeva
|
|
|
|
|
You could use IADO_ROWSET as argument, not it's coclass.
And need to make forward declaration for interface , before using as parameter.
Prasad
MS MVP - VC++
|
|
|
|
|
Thankx Mr. Prasad i got u it worked
Regards,
Pankaj Sachdeva
|
|
|
|
|
Hi All,
QueryInterface call is failing with RPC_E_SYS_CALL_FAILED HRESULT.
Scenario Description:
When many objects are selected, same operation is performed on those objects. For most the objects, the operation is successful. But for some, problem occurs and QueryInterface fails with RPC_E_SYS_CALL_FAILED. The objects in question are of similar sought.
Please let me know if further clarification is required. I am in a fix due to this error and unable to figure out anything on this.
Any help on this will be greatly appreciated.
Thanks,
Suraj
|
|
|
|
|
Hi
I would like to know if somebody knew how to decode the HRESULT values.
I get 2 different values of HRESULT for 2 of my methods.
There are in hexadecimal : 0x7c839aa8 and 0x7c809ba8 and I would like to know what are their meanings. I think it's not an error, else it would have been something like 0x8.......
Thanks in advance
|
|
|
|
|
Have a look at [^].
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.
|
|
|
|
|
|
Go to MSDN to this link ms-help://MS.MSDN.vAug06.en/mobilesdk5/html/mob5lrfHRESULT.htm
and you will see
modified 11-Feb-21 21:01pm.
|
|
|
|
|
hi i want to highlight some text,when the web page first loads through
toolbar, i have used Iobjectwithsite class to notify when page is about to
load etc,i have registered a event handler that notifies me that document is
completely loaded,then i hightlight some text.this solution works fine on
normal webpages, but it fails on AJax enabled wesites bcos these site are not
completed(loaded to browser at once), here is event handler which i m
using,what other event handler should i use that work with AJAX enabled site
as well.
Explorer.DocumentComplete += new
SHDocVw.DWebBrowserEvents2_DocumentCompleteEventHandler(Explorer_DocumentComplete);
Regards.
Tasleem Arif
|
|
|
|
|
Hi.
We're working on migrating a system from vb6 to .Net 2.0, but we've run into a problem. Calling the old vb6 com objects from the new .Net code works fine, and vice versa. However, when using one of the old com objects as parameters in calls from the new .Net code to either old vb6 com objects or the new .Net com objects, things don't work quite as well, and I get an error like this one:
System.Runtime.Remoting.RemotingException : The argument type 'System.__ComObject' cannot be converted into parameter type 'XMLEntities._IXMLEntity'.
The method signauture in this example is:
Public Overrides Function UpdateEntity(ByRef objEntity As _IXMLEntity, ByRef objParent As _IXMLEntity, ByRef ilngBrukerOrganisasjonsNr As Integer) As Object
and the call something like this:
object svar = tomtWriterNew.UpdateEntity(ref object1, ref object2, ref brukerOrganisasjonsNummer); (yeah, we're mixing vb6 and c# a bit, but hey, it's only a test project).
Have anyone ecountered a similar problem and know what happens and how to solve it? Any input would be appriciated. It is quite possible to do a workaround of the problem, but it would be nice to know what's going wrong because it's something I feel we will run into again in the future.
|
|
|
|
|
I have an application in which I want to initialize a COM object.
I have included objbase.h and ole32.lib in the workspace. I have also declared the following in the header file
#define WIN32_LEAN_AND_MEAN
#define _WIN32_WINNT = 0x0500
#define _WIN32_DCOM
But still I get the following errors
error C2065: 'CoInitializeEx' : undeclared identifier
error C2065: 'COINIT_MULTITHREADED' : undeclared identifier
WHY SO??
|
|
|
|
|
koumodaki wrote: I have included objbase.h and ole32.lib in the workspace
In the workplace? Have you included the headers into the proper source files?
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.
|
|
|
|
|