|
There's the Jeff Glatt's very good article series here at CP, follow the link to the first article.
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.
|
|
|
|
|
Hi group,
I have written a COM Addin for Excel so I did add few lines to add a custom menu in Excel. It worked fine but as I was playing with the code I passed a parameter which has made the menus permenant instead of temporary. Now, when you run the Excel the menu comes. How can I remove it or reset the Excel menu bar?
Your help is appreciated greatly.
Regards,
Amit
|
|
|
|
|
Hi group again,
It is solved by using the "Detect and Repait" under Help menu.
Amit
|
|
|
|
|
Hi,
I'm fairly new to COM, despite being late in the game, so to speak.
I've got a COM object that upon unregistering, is removing keys from another COM object.
We've tracked the problem to an offending 'import'.
COM object A.idl imports B.idl, which in turn imports C.idl.
On registration / unregistration, COM object A registers / unregisters (the guids for) COM object C.
Unfortunately, the import calls are needed as both A and B use types defined in C.
Trying to include the header files for B and C are presenting problems due to redefinitions of types in winnt.h.
If I remove the offending import call in A.idl the problem is resolved, but I must remove one of the methods from the interface in order to build the object.
I didn't design this software, but I am faced with having to fix it.
cheekymuppet
|
|
|
|
|
Hi all
I need to OCR a picture box image, the image of the picture box is created by setting bitmap pixels:
Bitmap ^ bmpPenImage = gcnew Bitmap(siPenImageWidth, siPenImageHeight);
pictureBox1->Image::set(bmpPenImage);
bmpPenImage->Save(L"savedImage.bmp",System::Drawing::Imaging::ImageFormat::MemoryBmp);
MODI::Document ^ aDocument = gcnew MODI::Document();
aDocument->Create(L"savedImage.bmp");
aDocument->OCR(MODI::MiLANGUAGES::miLANG_ENGLISH, true, true);
MODI::Image ^ anImage = (MODI::Image ^)aDocument->Images[0];
MODI::Layout ^ aLayout = anImage->Layout;
MODI::Word ^ aWord = (MODI::Word ^)aLayout->Words[0];
label1->Text = aWord->Text;
aDocument->Close(false);
As you can see i'm using a lame approach by saving the image and then reading it again in the lack of something else But this approach gives me the following runtime error:
COMException: OCR Running error
I would appreciate it if someone could help me with maybe a different approach? I can't find much info about document imaging 12. in Visual C++ 2005.
Thanks alot
|
|
|
|
|
Found a solution myself after much experimenting...
setting the image to a pictureBox in some way bounds that image file so that it cannot be used by OCR... if you move the statement "pictureBox1->Image::set(bmpPenImage); to the end, that is after aDocument->Close(false); it works.
OCR also appears to be sensitive to the image size, i'm still experimenting but it seems to like larger scaled images, you sometimes get the same "OCR running error" setting pixels to blue, this is all wierd but if someone can still clear this issue i'll be thankful.
|
|
|
|
|
If I create an instance of an Out of Process Server, what part of Windows actually calls CreateProcess() to launch the executable?
Is it one of the services, or something deeper?
|
|
|
|
|
Is the COM Service Control Manager see [^] for details and references.
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.
|
|
|
|
|
Good day
I have a got a big problem on my hands and it has been bugging me for a week now. I have got a .Net assembly that communicates to an SQL Compact Edition DB file (.sdf) via a web service. Inside this assembly is a thread that, on regular intervals, talks to the DB via the web service. This works well if the assembly is consumed by a .Net application.
My problem is that I have a Delphi application and I was to use the .Net assembly which is exposed as a COM object. The assembly does get registered and everything looks right. I have established that the thread in the now COM object does get triggered and it does what it's supposed to do. What I have noticed though is that i get file violation errors on the .sdf file. This I find disturbing because it is only the processes hosting the web service that is communicating with the DB file, and this only happens when the using Delphi application to use the COM object, it does not happened with .Net applications.
I have also traced the error to the method that is being called by the COM thread. So i would like anyone who has had something to help me. I have run out of ideas as to how to debug this problem. Please point me to the right direction.
Thanks in advance
Kulile --- RSA
|
|
|
|
|
Hi all,
I've created a simple COM component using ATL and itz registered also.When i tried to create the component using CoCreateInstance i get a HRESULT which tells that
<b>"0x80040111 ClassFactory cannot supply requested class ".</b>
There is only one instance of the component present in the registry and the CLSID,Interface ID everything i passed to the COCreateInstance are correct but still the problem is not over.
Any help would be greatly apppreciated.Thanks in advance.
Regards,
Rajeev
|
|
|
|
|
Try to load the component using OLEVIEW tool. Also try to post the CoCreateInstance code snippet.
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.
|
|
|
|
|
CLSID aclsid;
//interface to be created
IMIConverter *m_pToConverter = NULL;
aIUnknown = NULL;
HRESULT hr;
//this step also gets the correct class ID
hr = CLSIDFromProgID(L"MITFConverter.MIConverter",&aclsid);
// This HRESULT gives the problem
hr=CoCreateInstance(aclsid,NULL,CLSCTX_ALL,IID_IMIConverter,(void**)&m_pToConverter);
Thanks for your help
|
|
|
|
|
Have you made an attempt (to load the Component) with OLEVIEW?
The hr value you reported shouldn't happen since MSDN reports S_OK , REGDB_E_CLASSNOTREG or CLASS_E_NOAGGREGATION as possible return values.
You can also try to use CoGetClassObject and then call CreateInstance on the (hopefully) obtained class factory pointer to see what is happening.
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.
|
|
|
|
|
Hi,
When i tried to load the component using OLE view it displays an MK_E_INVALIDEXTENSION error.
I tried calling CoGetClassObject but the return is always the same (Class Factory cannot supply the requested class).I'm Totally lost
Is there Anything else that i can try??
Thanks for your help
|
|
|
|
|
as you can easily find here [^], CoGetClassObject cannot return such a hr value, hence I suggest to you to check well your code. can you post the hexadecimal value of the returned hr ?
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.
|
|
|
|
|
0x80040111..is the returned HRESULT s hexdecimal value...
|
|
|
|
|
It seems something went wrong during registration. I'm sorry I cannot help you with this.
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.
|
|
|
|
|
That alright..Anyhow thanks a lot for ur help
|
|
|
|
|
Hello all,
Can someone provide me interview questions on VC++, COM, ATL.
I need those desperatly.
Thanks...... .
|
|
|
|
|
Why r u not trying to search on Google..
its very best option to search..
shailesh
|
|
|
|
|
Dear all :
I wrote an ActiveX embedded in my web page.
The purpose of this ActiveX is to play Music Video with subtitles.
It will download a file contains informations of subtitle
from internet dynamically.
I want users can select songs they want to play in
web page, and I can use javaScript to write the
play list information to cookie,then the ActiveX
can read the play list from cookie and play it!
My question is how does this ActiveX read and write(delete) cookies .
Can or Can't ?
Thanks a lot !!
Martin Jiang
|
|
|
|
|
I am learning a COM.
I have read COM is nothing but the QueryInterface...
but there is so much importance to HRESULT,GUID and Registry also...
So what does mean about COM..
On which actually COM focusses more???
How to know more about COM
shailesh
|
|
|
|
|
Shaileshvb wrote: I have read COM is nothing but the QueryInterface...
QueryInterface is important in COM, but it is not all there is to it.
Shaileshvb wrote: but there is so much importance to HRESULT,GUID and Registry also...
So what does mean about COM..
HRESULT is a standard return code in COM, and is fairly complicated. GUID means Globally Unique Identifier, which is used to identify interfaces, classes, and other items. QueryInterface takes a GUID as a parameter. Both of these are important.
Shaileshvb wrote: On which actually COM focusses more???
How to know more about COM
COM involves lots of issues, and which ones you need to learn about depend on what you are trying to do with it. I learned most of mine by reading MSDN library. While I usually had it installed on my computer, you can access MSDN library on the web at http://msdn.microsoft.com/[^]
Nathan
|
|
|
|
|
Hi,
Thanks Nathan.
I have going through the Book Gale Rogerson(Inside COM).It is fantastic..but for more details
can u suggest some more books...for more codes....help me out since I am totally new to COM...
shailesh
|
|
|
|
|
Shaileshvb wrote: have going through the Book Gale Rogerson(Inside COM).
Since you have completed Inside COM, you can read Essential COM by Don Box which covers some advanced topics.
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
|
|
|
|