|
Hi,
I'm working on an intranet site where users can bring up their excel spreadsheet (accounting template) and complete their quarterly numbers. It was easy to create this page by taking the xls file in Windows Explorer and dropping it on a FrontPage web page. Really neat stuff, it looks and acts just like excel but with many limitations. I want the users to enter their info in and then save the spreadsheet - not to their computer (which they can by clicking on the export button which goes to excel) but back to the web server. Does anyone have any suggestions on how to do this with an existing spreadsheet/workbook? Any example code?
Thanks,
Mike
|
|
|
|
|
Hi there,
Can We have same ProgId for two different compoenents?
If yes,
(say "MyApp.MyDll.1" is the ProgId for both Components)
Then what will happen if an application is using "MyApp.MyDll.1"?
modified 21-Apr-21 21:01pm.
|
|
|
|
|
No. Only the component that was registered last would have it.
Edward
|
|
|
|
|
You can, however have a version-independent ProgID. If someone requests that ProgID, it'll use the version specified in the CurVer subkey.
For example, you have 3 versions of a COM object: MyApp.MyObject.1 , MyApp.MyObject.2 , and MyApp.MyObject.3 . You can have a ProgID of MyApp.MyObject , and if you want them to use version 3, set the CurVer 's default value to MyApp.MyObject.3 .
|
|
|
|
|
Thanx.
ian mariano wrote:
"We are all wave equations in the information matrix of the universe"
I liked ur quote
Have a nice day.
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Hi all
Suppose i create COM object with event what use interface as parameter.
CATLWrappedClass<...>{
Fire_MyEvent(ISomeInterface* pIface)
{
...
}
}
Now from elsewhere i arise this event
...
//This routine query interface from internal object and add
//referience number of one
ISomeInterface* pIface = GetSomeIface();
Fire_MyEvent(pIface);
//My question is - "should client release this interface
//or this my labour?"
pIface->Release();//Do i???
Thanks
|
|
|
|
|
No you shouldn't
The caller controls (allocates and frees) all [in] parameters.
[out] parameters allocated by callee and been freed by caller
Edward
|
|
|
|
|
real_space_monkey wrote:
//This routine query interface from internal object and add referience number of one
ISomeInterface* pIface = GetSomeIface();
Fire_MyEvent(pIface);
//My question is - "should client release this interface or this my labour?"
pIface->Release();//Do i???
YES, you should, because the pIface is in your ownership.
With best wishes,
Vita
|
|
|
|
|
I am trying to create an ActiveX control to be used within MS Access. I want to bind it in a field within an Access form, like you can do with the objects access provides.
Is this possible?
Does anyone have an idea what interfaces should I implement?
Thanks in advance for any hints.
...Plug & Pray...
|
|
|
|
|
I need to catch and handle the WM_DEVICECHANGE message in my COM dll server. I tried to force one of the class inherit from CWindowImp, but it doesn't work. Any idea? Thanks.
Linn
|
|
|
|
|
Hi all
I use in my COM interafse some method which receive BSTR as parameter ie
HRESULT MyObject::SomeFun(BSTR str)
{
SysFreeString(str);//exception is here
}
And i invoke this method from VB client
As far as is known i should free BSTR what had been created by myself directly with SysFreeString(...)
and in my example i free it in this way.But i had unhandled exception at my VB client during SysFreeString(str)
Thats wrong???
Thanks all
|
|
|
|
|
The object that creates the string should be responsible for freeing it again. In your case, whoever calls SomeFun() will create the string (say by SysAllocString) and will also be responsible for calling SysFreeString on the object they created as a parameter, once the call returns:
BSTR bstrNewString = ::SysAllocString(L"Test");
pIMyObjectPtr->SomeFun(bstrNewString);
::SysFreeString(bstrNewString);
|
|
|
|
|
|
The rules are:
[in] data initialized before passed to method, and is expected to be initialized when the method returns. COM-objects living in the same apartment can modify parameters (i.e. strings) eventhough they're labeled as [in] . It may or may not work - it sure won't work across apartment boundaries.
[out] has no reference to any valid data. If it does, that's just a coincidence - don't rely on it. You, the method callee, are responsible for allocating data to return through this parameter (or nothing/NULL if you're dealing with reference semantics).
[in, out] If you are to update the value of such a parameter, you must first free the passed in value, and allocate a new one for the return. Note that if [in, out] long* param is passed, you don't have to allocate memory, just *param = value; . If you get a [in, out] IInterface** p , then (*p)->Release(); *p = ... .
[edit][out, retval] has the exact semantics as a [out]. Clients such as VB uses the retval attribute only to synthesize a return type for methods.[/edit]
--
Din mamma.
|
|
|
|
|
THAKS ALL
|
|
|
|
|
|
please tell me how can i initialize ITBasicCallControl
interface of tapi3lib.dll component in VC.net using type library
thanx....
babur
|
|
|
|
|
Hi gurus,
I'm working on a ATL plug-in for MS Outlook, but I would like to make it work on Outlook Express as well. I understand that it's not possilble via COM technology (as OE does not expose any COM interfaces ), but something with hooks? Any documentation on the subject?
Any help / hint would be much appreciated.
Thanks in advance,
Doru K.
|
|
|
|
|
There are articles here on codeproject. The guy is Amit Dey.
|
|
|
|
|
Hi,
I only found his article about Outlook add-ins, but Outlook Express is a COMPLETELLY different thing. Maybe there is an article about Outlook Express as well, but I didn't find it...could you send me the link?
Thanks,
Doru
|
|
|
|
|
I recently used the interface that I found in this article
http://www.codeproject.com/useritems/email.asp?target=MAPI[^]
Some of the code is perhaps a bit rusty, and may not be fully implemented, but working with the example code made it easy for me to understand the mechanisms involved, and it was straightforward to sort out any problems and adapt the COM interface for my own needs. I was extremely grateful for the help provided by this article.
|
|
|
|
|
Thank you! I hope this is what I need, although I'm not sure...I would like to add buttons to Outlook Express' toolbars, etc (like I did for MS Outlook).
Thanks again,
Doru K.
|
|
|
|
|
What is the difference between objects and interfaces in COM...?
For instance I use CoCreateInstance to create a COM object: ie IWebBrowser2
Then I use QueryInterface to get other interfaces like...IHTMLDocument2 or IHTMLEditDesign .
Can I create a COM object from IHTMLEditDesign as well or can I only get to IHTMLEditDesign via QueryInterface once an IWebBrowser2 object has been created...?
Thanks
How do I print my voice mail?
|
|
|
|
|
I think you have got a little mixed up with the terminology. CoCreateInstance creates the COM object that supports the IWebBrowser2 interface and returns you an pointer to that interface. COM rules state that once you've obtained an interface from a COM object, you can use that interface pointer to QueryInterface for any other interface supported by that object.
|
|
|
|
|
Hockey wrote:
What is the difference between objects and interfaces in COM...?
Interfaces must always adhere to a binary layout, while objects don't. When developing COM classes in C++, the objects will be laid out just like ordinary C++ objects in memory. In VB - who knows? This is why interfaces are the lingo of COM - it serves as a protocol to communicate with objects.
Interfaces also allow for advanced proxying. If you can wire the vtable so that proxy functions are called instead of the virtual methods, then you can add things like network transparency, apartment marshalling, etc, without having to require too much of a burden of the caller!
So the crude answer to your question would be; an object is a binary blob of data, and an interface is a structured and well formed table of function pointers, which points to functions which know how to manipulate the binary blob of data in a meaningful way. In C++ this distinction is not very obvious.
--
Din mamma.
|
|
|
|