|
yes my application has already the pointer to main storage using mentioned flags. now can i spawn threads each to write to to the child storages?
|
|
|
|
|
As ususal with COM, if you attempt this you'll have to marshal the interface pointers to the worker threads. Whether this will work as expected depends on the threading model of the storage object (which I'm not sure of).
Steve
|
|
|
|
|
sorry im not sure if i have got what you have explained. i have a thread wrapper class through which I intend to pass the necessary info to the thread, am i close to ur lookout?
could you provide me a small code sample to elaborate?
|
|
|
|
|
In general, it is illegal to pass COM interface pointers from one thread to another directly; they must be marshaled to the other thread. This is not a limitation but a feature however. For example say you have a COM object that is not thread safe and can only safely be called from one thread. In this case passing one of its interface pointers directly to another thread would be disastrous. If you marshal the interface pointer to the other thread COM sets up a proxy in the other thread and a stub in the object’s thread and things will seem to just work. In reality the calls to proxy send information to the stub which calls the real object so all calls to the object still come from it’s own thread and all the details of the inter-thread communication are hidden. The situation if the same inter-process. In short I think you need to look up marshaling.
Steve
|
|
|
|
|
How can i name the untitled SDI application?
|
|
|
|
|
AfxGetApp()->m_pMainWnd->SetWindowText
|
|
|
|
|
AfxGetMainWindow ( from memory, could be AfxGetMainWnd() ) would do the same thing, but I can't imagine why someone 1 voted you for that....
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
yes AfxGetMainWindow i wanted to wrote it but do you know why after four minutes i cant use from codeproject.
I imagine if you write it you get 5 vote
|
|
|
|
|
I got error at
ASSERT(::IsWindow(m_hWnd)); if debug i got unhandled eception
is there any other way?
|
|
|
|
|
Where you use this code and what application type?
|
|
|
|
|
I used it in CMainFrame::OnCreate()
And my Application type is SDI
|
|
|
|
|
You can use this function in your form class(for example if you have CFormView class) now is your problem solve
|
|
|
|
|
Hi Everybody,
I have been doing an application which displays the files and folders in a tree control similar to the left view of the windows explorer .How can we rename and delete the existing folders in the system directory from the application itself.
Thanks in advance,
Radhika.
|
|
|
|
|
radhika28 wrote: How can we rename
Use rename() / _wrename()
radhika28 wrote: How can we delete
To delete the file you can use
RemoveDirectory() or SHFileOperation()
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
radhika28 wrote: How can we rename and delete
use SHFileOperation() for deleting or renaming a folder
nave
|
|
|
|
|
|
Hi,
Is there any article based on the above requirements.
Thanks in advance,
Radhika.
|
|
|
|
|
You dont need to any article you can see MSDN
|
|
|
|
|
Hi,
I am trying on that.But one more problem what i am having is i am getting an assertion error when i click the particular button to display the directory tree in my tree control.When i click ignore 4 times the tree is displayed in the tree control.I am trying for this since 4 days.Can any one help me on this.
Radhika.
|
|
|
|
|
I think its a new problem and does this error is after remove file/folder?also what error ?
|
|
|
|
|
Hi,
This problem is from the starting.I am trying for this for the past 4 days.It is occuring during the loading of the directory tree into the system drive.When i debug the error is coming at the following line,
if ( m_tree.SubclassDlgItem( IDC_TREE1, this ) )
Radhika.
|
|
|
|
|
SubclassDlgItem subclass your control that created and attach it to CWnd (and a thing did you trace to trace your app and what is it?)
|
|
|
|
|
This is what I like to achieve:
1. Copy the selected text from active window such as notepad
2. Modify the text
3. Send back modified text to the active window and replace the selected text in that window.
step 1 can be achieved by monitor the clipboard while user
copy the selected text into the clipboard. But not sure how to paste back the modified text into that window again.
Any ideas will be appreciated.
www.sqlparser.com
|
|
|
|
|
Do you want to send a text to notepad?
|
|
|
|
|