|
Inside COM by Dale Rogerson is a good book for beginners but I dont know u will get it as ebook
never say die
|
|
|
|
|
I have read the article "Building an Office2K COM addin with VC++/ATL"
Although I followed the steps one by one as it has been specified in the article and the registry entry for the dll was entered correctly by the code
HKCU
{
Software
{
Microsoft
{
Office
{
Outlook
{
Addins
{
'OutlookAddin.Addin'
{
val FriendlyName = s 'ADOutlook2K Addin'
val Description = s 'ATLCOM Outlook Addin'
val LoadBehavior = d '00000008'
val CommandLineSafe = d '00000000'
}
}
}
}
}
}
}
no addin is appeared in "Tools->Options, under Other tab,
Advanced Options->COM Addins "
would you help me with the matter, please
|
|
|
|
|
have u created the entries in HKEY_CLASSES_ROOT with the friendly anem and clsid?
hello
|
|
|
|
|
have u created the entries in HKEY_CLASSES_ROOT with the friendly name and clsid?
-- modified at 0:06 Wednesday 9th August, 2006
Sudeesh
|
|
|
|
|
What's the relation of ComBStr, _bstr_t, BStr??
|
|
|
|
|
|
|
|
|
In short: CComBSTR is a thin wrapper around the BSTR API, while _bstr_t is a rather thick one. By thick I mean that it wraps associated HRESULTs into exceptions.
_bstr_t is more suitable for applications, in which it's almost always possible to throw exceptions across calls. In certain scenarios however, such as in COM components, it's not advisable to do that because of threading/apartment issues (it's downright dangerous!). In such scenarios, CComBSTR is far better suitable, as it does not throw exceptions.
--
Mr. Bender's Wardrobe by ROBOTANY 500
|
|
|
|
|
|
Hi all,
i am trying to create GUID with CoCreateGuid but it is
not creating guid.
I am working on windows XP.
ole32.lib is added in link tab.
then what is the problem?
what is wrong in this code?
#include <iostream.h>
#include<objbase.h>
int main(void)
{
HRESULT Res;
GUID *pGuid=NULL;
LPVOID pIni = NULL;
if(CoInitialize(pIni) == S_OK)
{
Res = CoCreateGuid(pGuid);
if(Res == S_OK)
{
cout<<"Created";
}
CoUninitialize();
}
return 0;
}
Thanks in advance
|
|
|
|
|
Its failing because you are passing a NULL pointer into CoCreateGuid(), try this instead.
<br />
GUID guid;
LPVOID pIni = NULL;<br />
<br />
if(CoInitialize(pIni) == S_OK)<br />
{ <br />
HRESULT Res = CoCreateGuid(&guid);
if(Res == S_OK)<br />
{<br />
cout<<"Created";<br />
} <br />
CoUninitialize();<br />
}<br />
-- modified at 3:40 Friday 4th August, 2006
Darka [ Xanya]
"When you're taught to love everyone, to love your enemies, then what value does that place on love?"
|
|
|
|
|
how can i handling IHTMLElement event?
i want to process the onclick(maybe other) event in IE
|
|
|
|
|
I am trying to create an activex object using VBScript and I want to release the object after usage. I used the following to do it:
//create
Set obj = CreateObject(SomeProgId)
//code
....
....
//release
Set obj = Nothing
The last part "Set obj = Nothing" which is supposed to release the object from the IE memory does not seem to work. Can some one help me in this regard because this looks like a generic problem that someone would have faced earlier.
sunil
|
|
|
|
|
There is a delay between the last reference to an in-process COM object being released and the DLL actually being unloaded. The DLL is unloaded when IE calls CoFreeUnusedLibraries(Ex) . You have no control over when IE will call this API.
|
|
|
|
|
I have created an Activex object and registered it. I can instantiate the object in VBScript -CreateObject works fine without any problem.
However, I have noticed that if the browser (IE in this case) is not closed the object OCX file cannot be deleted and unregistered. As far as VBScript it is sufficient to set the object to "nothing" to release it, so I think there's something I need to add in the Activex code.
In the Activex object I'm also using the IObjectSafety interface the AddRef() and Release() function are added as bellow
------------------------ CODE STARTS HERE
ULONG FAR EXPORT CMyCtrl::XObjSafe::AddRef()
{
METHOD_PROLOGUE(CMyCtrl, ObjSafe)
return pThis->ExternalAddRef();
}
ULONG FAR EXPORT CMyCtrl::XObjSafe::Release()
{
METHOD_PROLOGUE(CMyCtrl, ObjSafe)
return pThis->ExternalRelease();
}
------------------------ CODE ENDS
I have a naive question: do I need to add something in the Release() function to properly delete the object? and where can I find an example of how this is done? From what I've read so far I know there is a reference count I need to maintain and check at Release() but I'm confused on where do I add this.
Any suggestions is welcome!
|
|
|
|
|
There's a delay between when the last reference is released and when the DLL containing the objects is unloaded. Periodically, a component host will (or should) call CoFreeUnusedLibraries(Ex) . This API in turn calls your DllCanUnloadNow function. The MFC AppWizard should have implemented this function for you.
So you just have to wait for IE to call CoFreeUnusedLibrariesEx .
|
|
|
|
|
I'm designing Excel Sheet using my ASP.NET web Application. In that worksheet I want to on autofilter mode on any specific row from my C# Web application.I've written following code
Cellules=m_oSheet.get_Range("A3","E3");
Cellules.AutoFilter (5,m_oMissing ,m_oMissing ,m_oMissing,true);
using above two line of code dropdown arrows are available in the row whose range I'm giving but when we click on dropdown arrow then it not open popup.
But when from excel menu we make off-on to Autofilter property then it's work properly.
Any body can help me for this....?
Vaibhav Jain
Lecturer, MCA
Medi-Caps Institute of Techno Management, Indore
|
|
|
|
|
Hi all
Iam using WMI(windows management Instrumentation) to PING other Systems. I ahve developed a sample Application which is working fine on WINdows XP operating System . But when aim trying to run same application on WIndows 2000 it is giving me error.
I know the problem is with CoInitializeSecurity .
CAn u please suggest me how to proceed further to ping using windows 2000.
Thanks in Advance
abhi
|
|
|
|
|
|
I have some DLL files which I have cerated few yrs back but nwo fund that the source code of thos files I have lost but that source code i want so is their any way to open the DLL files and get the Source Code.
Can anybody give me the solusion of this or any code in DOTNET do open the DLL files OR any code to crack the DLL files, Coz I have lots of such files of which Source Code i have lost and some of the code i lost bcoz of the virus
Is anyone have such program to open the DLL files so please give me that or any solusion fo that it's very urgent.
Harshad
|
|
|
|
|
nope, you cant do that. its gone.
-Prakash
|
|
|
|
|
Hi,
Having a problem with sink and wondering if any one can help. The problem is i want revieve notifications back from a COM object (Netmeeting SDK INmCall and INmCallNotify). I assumed it would be a case of overriding INmCallNotify and replacing how it handles callbacks with how i want it to handle call backs, however this doesnt seem to be the case.
Can any one offer any light on the subject please, i have read a post about this but still am a little unsure.
Tbanks
|
|
|
|
|
Can you be more specific? Perhaps post some of your code.
Steve
|
|
|
|