|
Thanks for the reply,
My main thread in each control is based on an ATL wizard anyway so that should be sound and have a message loop etc. Its a worker thread that is locking up. The worker thread can send events (via a global interface table) it does no other COM and it just watches for a c++ flag to drop to quit. The kill method is in the main ATL bit so/and the flag is getting set but then while I sleep waiting for clean up the worker thread seems to stall.
But and this is where it is werid. If i run one control it cleans up, if i use two controls it locks up!. The two controls are very similar. a main ATL wizard body and a worker thread that can dispatch events with a GIT. but apart from a common container (VB6 form) they are independent!
My assumption is that if the event gets fired in the worker thread and a method is invoked in the "main" thread the event is locked until the method returns meaning i can never clean up.
Based on your reply will a message loop in the worker thread help? I'm confused!
|
|
|
|
|
I'm working on a rather large and useful library (with some implementations of it, like shell extensions and ActiveX controls) that I'd like to sell as shareware, but I'm new to the COM licensing model. I've been researching it quite a bit, but I'm curious if anyone here in this forum has any experience with it.
Say I'd like to offer a 30-day/15-uses trial period. Is the COM licensing model a good thing to use for this, or would a home-brewed solution work best (perhaps even a commercial library that does this, although the price I'm selling it for doesn't really warrant such a commercial library)? Any experience out there on this? TIA
"Well, I wouldn't say I've been missing it, Bob." - Peter Gibbons
|
|
|
|
|
Hi,
I'm creating a directshow application with visualc++ 6.
I need to make a selection tool (similar to Paint) that can select rectangular, elliptical and free-hand regions.
Is there a tool already availible for this? If not, what is the best way of retrieving the coordinates of mouse down and up events if they occur within a certain area of the dialog box?
[... still new to this]
|
|
|
|
|
I worked before. Then I did something stupid and my program crash. Then I change it back. Now when I execute the program, it hangs. I trace through the source and find it stops at ::CoCreateInstance (called by CComPtr.CoCreateInstance()). Any idea?
|
|
|
|
|
register the COM component again.
She's so dirty, she threw a boomerang and it wouldn't even come back.
|
|
|
|
|
Hello There,
Can somebody advise me where I can download the sample codes(i.e.control object(CO) and service object(SO) and its testing application) ? I need to know the skeleton and the methods/properties relation for each CO,SO and AP.
Meanwhile, some opos related link to Microsoft is gone !
(i.e.http://www.microsoft.com/business/industry/ret/retoposoverview.asp). If anyone of you knows where to link to Microsoft for OPOS documents, please let me know.
THANKS IN ADVANCE !!!
BEST REGARDS FROM,
Julio
|
|
|
|
|
Hi all,
I'm having trouble getting information on how to enumerate a folder that I created. My folder is under the "System" directory, and I want to display the contents in a menu (much like the "Send To" menu). I found the "Navigating the Namespace" article on MSDN, but but that just finds the "first" folder to enumerate.
I have a an IShellFolder interface pointed to the system folder:
hr = SHGetMalloc(&pMalloc);<br />
hr = SHGetFolderLocation(NULL, CSIDL_SYSTEM, NULL, NULL, &pidlSystem);<br />
hr = SHGetDesktopFolder(&psfDesktop);<br />
<br />
hr = psfDesktop->BindToObject(pidlSystem, NULL, IID_IShellFolder, (LPVOID *) &psfSystem);<br />
<br />
if (SUCCEEDED(hr))<br />
{<br />
hr = psfDesktop->QueryInterface(IID_IShellFolder, (LPVOID *) &psfSystem);<br />
psfDesktop->Release();<br />
}<br />
<br />
hr = psfSystem->EnumObjects(NULL, SHCONTF_FOLDERS, &ppenum);<br />
Now how can I get an this pointed to my folder? I'm familiar with IShellFolder::ParseDisplayName , but I just don't know how to implement this (if this is in fact what I need).
Could someone point me in the right direction?
Thanks,
Matt
|
|
|
|
|
In ATL, a .tlb file is generated automaticly for the component. But in a MFC-based component project, how can I create a .tlb file for it?
I want to become a great programmer just like most of you. But I still have a long way to go, can you help me? Of course, I will be very glad to help some of you, if I can.
|
|
|
|
|
How was your component created? Did you use one of the wizard options?
I have test both an MFC ActiveX control and MFC Application with COM Server support and both generated the expected tlb file in the debug folder?
Michael
"I've died for a living in the movies and tv.
But the hardest thing I'll ever do is watch my leading ladies,
Kiss some other guy while I'm bandaging my knee."
-- The Unknown Stuntman
|
|
|
|
|
The IDispatch interface is useful sometime. But I can't find a sample that use more than one IDispatch-derived interface in one MFC-based component. Can't we use more than one in MFC? How can I use more than one IDispatch-derived interface in one component just like in ATL?
I want to become a great programmer just like most of you. But I still have a long way to go, can you help me? Of course, I will be very glad to help some of you, if I can.
|
|
|
|
|
Hi
I issued this problem recenty but now I know a bit more about its nature.
I'm trying to store some data in MsOffice files and the problem is that MsWord 2000/XP removes my data after I save document from the Word (I tried also MsWord 97,MsExcel 97/2000/XP and here my data remains untouched). Now some explanation how I store my data in doc file:
1. Using StgOpenStorage I open office file as a compound file
2. I create new storage with IStorage::CreateStorage
3. Within newly created storage I create new stream using IStorage::CreateStream
4. I store my data within newly created stream using IStream::Write
5. I release all opened streams and storages
I discovered that when in doc file Word adds stream 0Table (1Table is probably always present) my data doesn't dissapear (I don't know why). I don't know how to prevent Word from deleting my data but I suppose that forcing Word to add 0Table stream could solve my problem (but how can I do this). I would appreciate any hints.
Mariusz Popiolek
|
|
|
|
|
Using Access 2000 and ADO VC++6.0
I am executing the following statement..
VARIANT Params[2];
Params[0].vt = VT_I2; Params[0].iVal = 1;
Params[1].vt = VT_R4; Params[1].fltVal = 8.99;
m_pCommand->adCmdText = "Query4";
m_pCommand->ActiveConnection = m_pConnection;
m_pCommand->Execute(0, Params, adCmdStoredProc);
Generates an exception {DB_E_PARAMNOTOPTIONAL}
Query4 in Access is as follows:
PARAMETERS vID Short, Rad IEEESingle;
INSERT INTO TABLE1 ( ODID, MeasRadius )
VALUES (vID, Rad);
Thanks for your help in advance.
|
|
|
|
|
I have around 500 records to insert into a table in Access 2000. I am using ADO.
Is it possible to pass all of the 500 records to a query using some kind of SafeArray parameters and Insert them all at once?
Any tips how this can be accomplished ?
Thanks
|
|
|
|
|
I need to open MSWord, retrieve information from it, change some information, and then save it. All these will be done using VC++/MFC. Does anybody have some existing code which I can take a look at it?
|
|
|
|
|
hello,
I need your input/advice on a practical (and urgent) problem!
I am currently developping a time critical app on a Windows NT/2000 platform involving pseudo real-time image acquisition.
The app should be flexible, fast and implement some fault-tolerant features. For example, I want to handle 12 cameras "simultaneously" (multitasks) for an acquisition. One channel acquition task may crash. But the whole application (the remaining working channels) should NOT crash! So I thought of using different processes for each channels.
The next question was then: how do I handle (share?) huge chunk of data (512*512 RGB images), among a pool of processes under Windows NT?
Of course, an obvious solution would be to use either PIPES or SHARED MEMORY (using FileMapping). But lots of coding is necessary and I will end up with a LOT of bugs (and I must have NO MEMORY LEAKS at all, it's imperative!!).
I discovered COM, a standard way of doing what I want, but I was wondering how you transfer BIG CHUNKS of data between COM servers???
What should I use to have something efficient, but also flexible in terms of development?
Please just give me some clues!
Thanks!
Bertrand Boichon
Research Assistant
Electrical & Computer Engr
Oregon State University
|
|
|
|
|
as long as all your modules will be located on the same machine, you can just pass HGLOBAL memory handles to and from COM objects. i do it all the time.
-c
No matter how fast light travels it finds the darkness has always got there first, and is waiting for it.
-- Terry Pratchett,
|
|
|
|
|
Hi
I succesfully added new storage into MSWord compound file (and new stream inside this new storage), but the problem is that when I open this doc in MSWord, made some change and save doc, my storage and stream dissapears. I saw application that adds stream(in root storage) which is "word saving proof" but I don't know how to do this. I also encountered strange thing: when I have word doc with stream added by this application, storage and stream added by me doesn't dissapear. I don't know why this happens. Anyone have some idea how to prevent new streams and storages from deleting by Word? Thanks in advance for any hints.
Greetings
Mariusz Popiolek
|
|
|
|
|
Hi All,
I need to know the reason why the function AddRef returns a long integer?
Could somebody explain me?
|
|
|
|
|
From "Platform SDK : COM"
IUnknown::AddRef
The IUnknown::AddRef method increments the reference count for an interface on an object. It should be called for every new copy of a pointer to an interface on a given object.
ULONG AddRef(void);
Return Value
Returns an integer from 1 to n, the value of the new reference count. This information is meant to be used for diagnostic/testing purposes only, because, in certain situations, the value may be unstable.
I hope that helps.
Iain.
|
|
|
|
|
I recently accepted a project that involves writing a COM component that will be used from a Java program. Does anyone have any suggestions or links about a Java2COM bridge or examples?
With best regards,
Daniel
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
|
The project I am involved with at work is using the jintegra product to do just this, not sure what your requirements are but it is working at our level, which is a ~30 engineer project, running for 1 year so far. There are few 'gotchas' relating to things like type conversions and function overloading. Our prototyping effort/trial to get up to speed was about 1 engineer for 6 weeks.
see:
http://www.linar.com/
David
|
|
|
|
|
How in the world can i get this to work
if i use IXMLDOMNode in the idl it compiles
if i use the using namespace in the c++ code i'm still good
however the headers created from the idl result in the following:
error C2872: 'IXMLDOMNode' : ambiguous symbol
Help!
|
|
|
|
|