|
I don't see anything in the above that offers a clue. My only suggestion is to step through the code with the debugger and trap where the exception occurs. You should then be able to see the actual memory that is causing the problem.
It's time for a new signature.
|
|
|
|
|
asr1122 wrote: void CApplication::CreateCallInfo(IDispatch** piResult)
{
CCmdTarget* pTarget = new CCallInfo();
*piResult = pTarget->GetIDispatch(TRUE);
}
Return of IDispatch pointer is not equal to return of _ICallInfo pointer. IDispatch pointer does not have the CallId property (more clearly, the CallId get-property and CallId put-property), presented in _ICallInfo dual interface.
You can heal this by:
1) replacing of "interface _ICallInfo: IDispatch" onto "dispinterface _ICallInfo" in IDL file;
2) replacing of "*piResult = pTarget->GetIDispatch(TRUE);" onto "*piResult = GetInterface(&__uuidof(_ICallInfo))" or "InternalQueryInterface(&__uuidof(_ICallInfo), piResult);" with acceptable casts.
With best wishes,
Vita
|
|
|
|
|
Thanks for the suggestion. I couldn't make it work though. Decided to give up on this way of passing data. Looking at other simpler options.
Thanks for the help.
|
|
|
|
|
HI,
I faced this question in an Interview,
"Difference between COM Component and Class"
What is the Answer.
Thanks & Regards,
Rayalu
|
|
|
|
|
In basic terms a COM component exposes a binary interface which allows a program written in any language to access it, regardless of the language that the component is written in. A class is exposed as source code and can only be used in a program using the same source language.
It's time for a new signature.
|
|
|
|
|
|
You're welcome; good luck in your interviews.
It's time for a new signature.
|
|
|
|
|
Hello Experts,
I am using WScript.Shell to read some values from the Windows Registry. I have seen that the RegRead() method returns the value of the Key. But I need to read all the SubKeys of a given Key.
For example, I want to read all the SubKeys under HKLM\Software . Some of the SubKeys under this path are: "Microsoft", "Windows", "Intel", "Licenses" etc. I want to read them.
Can anyone please suggest how I can do this using the COM API? Any help regarding this is highly appreciated.
Don't forget to Click on [Vote] and [Good Answer] on the posts that helped you.
Regards - Kunal Chowdhury | Software Developer | Chennai | India | My Blog | My Tweets | Silverlight Tutorial
|
|
|
|
|
The RegEnumKeyEx API will enumerate all subkeys under a registry key.
To use this using the Shell object, you will need to write an application using C/C++ and then call it using the Exec method.
|
|
|
|
|
Thanks for the reply, but I don't want to use C/C++. I want to use it in Silverlight to call the COM API to read the registry values. Any URL/Tutorial/CodeSnippet will be helpful.
Don't forget to Click on [Vote] and [Good Answer] on the posts that helped you.
Regards - Kunal Chowdhury | Software Developer | Chennai | India | My Blog | My Tweets | Silverlight Tutorial
|
|
|
|
|
Hello people!
I am quite new to OLE programming and need a kick in the right direction. I tried to google this up but i lack proper knowledge to know what to search for in the first place, so i thought i ask here. So this is basicly what i want to do: I want to create an object that can be inserted into any document like word documents, excell sheets, or anything else that can be an IOleContainer. This object would containa certain kind of data that is inserted into it from an external file. This data should be saved along with the document containing this object (so not hang around as an external file). The object would serve as a "data source" for a few kinds of views. The user should somehow be able to "spawn" such views from the object and edit these to generate different types of representations of the data. He should also be able to perform a few operations on these views that would add additional information the the source data and this additional information could be used in other views as/if needed.
E.g: the user inserts this object into his word document, then double clicks this objects and gets a little GUI where he can add the data from the file system and/or specify some additional information. After adding the data and dismissing this GUI he right-clicks the objects and selects "Span View", gets a list where he can select the type of view, let's say "red diagram", "green diagram", "blue diagram", after selecting the type the view somehow gets inserted into the same document the object is on. After having multiple views, he can select one of these views, edit its appearance as he wants and also add some more information which gest stored inside the source object and the other views also get notified by this and update themselfs as needed.
This might be a trivial, everyday task for you fellas but as i said, i am new to this and needs some directions.
Thanks for any help attempts in advance, feel free to ask if there's something that is not clear about the whole concept.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> "It doesn't work, fix it" does not qualify as a bug report. <
> Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
|
|
|
|
|
Hello,
I need to look up the registry for checking whether a given COM Dll/Exe registered or unregistered? Whether registry contains the entries for that COM DLL/EXE or not?
Programatically how can I be able to do that?
Regards
Usman
|
|
|
|
|
COM components are register under the registry key HKEY_CLASSES_ROOT\CLSID .
For example ole32.dll is registered in HKEY_CLASSES_ROOT\CLSID\{00000319-0000-0000-C000-000000000046} .
So to check if the key exists you can use the RegOpenKeyEx API on this key.
If the API returns success, it means the key exists.
Don't forget to close the key using RegCloseKey .
|
|
|
|
|
Hi,
I hope this is the correct place to post this, I could not find anywhere more suitable.
I just started using Visual Studio 2010, and I thought that some of my old addins from previous versions might be useful to me.
The ones I want generally do things outside of VS, so the bulk of the code should be OK.
Problem is, I have come up against the #includes for header files in the older VS ObjModel/ directory, and also it is full of 'I' prefixed things, like IApplication, IConfiguration, ITextDocument, etc... which obviously do not exist in the VS 2010 world.
Is there any Tutorial that explains how to update these addins to a later release, like Visual Studio 2010?
I guess that many of you have had to go through this process at some time.
Many thanks for any help.
Bryan.
|
|
|
|
|
COleInsertDialog is use to read contents of any doc,pdf,xls etc file. This class open a dialog box and allow to select a file to read its contents.
Is there any other OLE class (or COleInsertDialog) which do not require a dialog box to select a file and read its contents. To read any file data it will take a buffer (any char/wchar array) which contains file data.
Without selecting a file name if i have some file contents in a buffer then which OLE class use this buffer to read the data.
|
|
|
|
|
I have a com server. And i implimented a client to access the server.The code looks,
int main(int argc, char* argv[])
{
::CoInitialize (NULL);
CComPtr<INextGen> pINextGen;
pINextGen.CoCreateInstance (CLSID_Server);
int val;
pINextGen->GetNum (&val);
cout<<val;
::CoUninitialize ();
return 0;
}
This code is giving run time error, when the destructor of CComPtr is called.If I remove ::CoUninitialize() it is not giving the error. How to solve the problem?
Regards,
venkatanarayana
|
|
|
|
|
Release your interface pointer before you return.
pINextGen->Release();
Think you'll find that the problem is with your Interface object when it's being destroyed.
|
|
|
|
|
Hello Friends
I have creared one .jar file with java NetBeans.Now,i want to use this jar file functionalities in c# application.So,I want to register jar file as COM object so that i can use it.
So,is there any way to register as COM object in System Registery?
I found one way thru google is to register thru javareg.exe but I didnt found the javareg.exe.
Do you have any other Ideas?
Thanks In Advance.
Regards
Yogesh Sikri
|
|
|
|
|
Hi Guys
I found on net that we can do it through javaREG.exe tool from MIcrosoft java sdk but I am nt able to find it.
Do u guys have any idea from where I can find it or any other Ideas?
Thanks & Regards
Yogesh
|
|
|
|
|
Hi I have a C++ project as exe , I want to export some of the methods of the classes to use them in .net (C#) . I think better idea would be to create a ATL project and create interfaces and implement the methods by calling the C++ lib methods.
Is there any other way to do this , which would be fessible and efficient ?
thanks
|
|
|
|
|
Per your title, if this is a COM Server, then you already have access to that in .NET. Just open your .NET Project, right-click on References and select "Add references ...", click on the COM tab and find your COM server in the list of named objects. When you select it, Studio will automatically generate a .NET wrapper to your COM interfaces and you can use that code directly in your .NET project.
If it's not already a COM object, you can do it either way: create a DLL that you call into from your .NET project or a COM object that you reference in your .NET Project (as I just mentioned).
Not entirely certain this answers your question, if not, you'll need to provide more details as to what, exactly, you're wanting to accomplish.
|
|
|
|
|
I'm trying to write a bho to get the ocx in IE. I'm a newer to bho. I'm not famailar with com. I really need your help. Please, help me, and I will really appreciate your help!
|
|
|
|
|
Take a look at this page[^] as a good starting point.
It's time for a new signature.
|
|
|
|
|
What do you mean by "get flash handle"? Are you talking about the HWND of the ActiveX control? Be specific and unambitious.
Steve
|
|
|
|
|
Hi, thank you for your reply. I'm trying to write a bho which will be able to connect to .ocx and send message to the flash activex. I don't know which class might provide this function. Please help me, thank you!
|
|
|
|