|
Well I figured it out:
You can create a file handle on the folder -- and set the sharing for read and write, but not delete.
m_FolderHandle = CreateFile(m_FolderName, FILE_LIST_DIRECTORY, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL );
closing the handle will unlock the folder.
I guess I didn't specify -- that I needed to only maintain the lock while my application is running...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc.</A>
|
|
|
|
|
Sir,
I have a list coClass under a typelib for a component. I would like to call methods & properties of a coClass, how can i do that.
I am expecting to get some help from you.
Thanks & Regards,
Praveen A.
praveena@navayuga.co.in
|
|
|
|
|
praveen kumar agarwal wrote: I would like to call methods & properties of a coClass, how can i do that.
I'm not clear about your requirement, Can you use IClassFactory::CreateInstance ?
|
|
|
|
|
I have two coClass under a TypeLib. When I call coCreateInstance() method, it reciprocates with one of the default coClass in TypeLib. I can call methods & properties of default class but if i have to change to another coClass, how can i do that?.
example:
TypeLib has coClass1 and coClass2.
Using IDispatch interface, I can call the default coClass1 and its methods can be invoked.
IDispatch->Invoke()-->it executes default coClass1 methods & properties.
But, if I want to execute coClass2 methods & properties, how can i proceed?
I hope now you are clear about my requirement.
Thanks in advance.
Praveen A.
|
|
|
|
|
praveen kumar agarwal wrote: When I call coCreateInstance() method, it reciprocates with one of the default coClass in TypeLib
It gives you interface (coclass) you requested.
praveen kumar agarwal wrote: But, if I want to execute coClass2 methods & properties, how can i proceed?
You need to use CoCreateInstance for different classes.
i.e. you need to call CoCreateInstance again for different interface, as it will have different CLSID .
|
|
|
|
|
Hi all,
I have insert a Splash Screen in my SDI project in VC++ MFC.
Can any body tell me how can i do this?
please help.
Thanks and Regards
Yudhisthira Attry
Yudhisthira Attry
|
|
|
|
|
|
Help-I Don't know how to set environment path for Mycomputer System properties using MFC coding
|
|
|
|
|
|
Thanks for valueable information
|
|
|
|
|
Do not waste your time on things like the C-RTL and Win32 functions (SetEnvironmentVariable(...) ) to set environment variables - these only affect the process' environment space - other processes will not be affected, nor will you see the change when you bring up up the system properties.
If you need to change these values such that the change remains after your application exists and/or are visible to other application and the system, you will need to modify the registry.
Look up the HKCU\Environment and HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment registry keys for more information on how to do this.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Thanks for your valuable information
|
|
|
|
|
Hi!
I've got small (I hope) problem.
I'm using some video player. It has almost all that I need - I miss only one thing in it. It can't made screenshots (no ability to save one frame of played video to image file).
I created graph file with SampleGrabber for this video player, but the problem is how to use SampleGrabber when it is working with other application and create screenshot from Video that actually is played? Video finally goes to VMR9...
Or maybe there's other way to get screenshot from video played in VMR9 in other player... but how?
Greets
|
|
|
|
|
You'd need to be able to communicate with the other player somehow. How do you know the other
player is using DirectShow?
|
|
|
|
|
in an MFC Appl with DB without file support i've a two field (Database in Access) in Table Password -- [User] n [Pass].
The hint box in the m_pSet variable is showing the variable but on tryin to retrieve th data( i'v three records in the table) only "" is returned .
what can be the error. I don't want to use m_pSet->m_strSort rather in the m_pSet->Open(...) i'm pumping the exact query.
what can b the error.
a snippet of the whole code is
<code>Pass p1;
p1.DoModal();
CString str,query,str1;
int flag = 0;
str=p1.m_pass;
m_pSet->Close();
query = "Select * from Password where User='Admin'";
m_pSet->Open(CRecordset::dynaset, (LPCTSTR)query,CRecordset::none);
m_pSet->MoveFirst();
MessageBox(m_pSet->m_Pass.GetBuffer(20));
while(!m_pSet->IsEOF())
{
str1=m_pSet->m_Pass.GetBuffer(20);
if(str1==str)
{
flag=1;
break;
}
m_pSet->MoveNext();
}</code>
actually i've to retriev user n pass from a popup dlg n then verify it from the DB.
here to check i've used default user as Admin.
what can b the error.
plz help
-- modified at 1:37 Thursday 28th December, 2006
Shouvik
|
|
|
|
|
Are you getting any value in the Message Box? I think the problem with GetBuffer menthod. you need to convert it to CString, because the return type of GetBuffer method is LPTSTR.
Subbarao.
|
|
|
|
|
Actually there was a field name mismatch yesterday. So on rectifyin it the appl is working. no need to cast it to LPCTSTR as an overloaded method already is avail.
thanks a lot.
Shouvik
|
|
|
|
|
shouvik.d wrote: m_pSet->m_Pass.GetBuffer(20
Try using CRecordset::GetFieldValue instead.
|
|
|
|
|
Sorry to all,
but i solved the prob. Thanks
Shouvik
|
|
|
|
|
It will be helpful to other, if you post how you'd solved it.
|
|
|
|
|
yes i thought that and replied to Subbarao. It's just a mismatch in the fieldnames defined in C<<proj_Name>>View.cpp n the one existing in the DB. U pointed out the solution to me yesterday.
but strange thing was that the m_pSet->m_Pass was only thing not getting retrieved whereas all other values from table(s)(even other tables) were showing up.
What do u think could be the reason
-- modified at 2:38 Thursday 28th December, 2006
Shouvik
|
|
|
|
|
Again, there might be mismatch in field names. Have you tried using GetFieldValue .
But, you solved your prblem, isn't it?
|
|
|
|
|
no not anymore. had there been the prob existin still now there would ve been a Too few parameters. Expected 1. would've been the message again. all fields are set right so its working fine now.
Shouvik
|
|
|
|
|
hi ,
i am looking for sample programs on tree view control with check boxes. if any body having could u plz send it to sramesh21@gmail.com.
thanks in advance,
regards,
ramesh s
ramesh s
|
|
|
|
|
ramesh_s21 wrote: am looking for sample programs on tree view control with check boxes
A little search would have helped you[^].
ramesh_s21 wrote: if any body having could u plz send it to sramesh21@gmail.com.
No , could not. Above article should suffice.
|
|
|
|