|
This API only tells me if it is a directory or not. what i need is the date the directory is created etc...like File attributes.. is it possible on directory as well?
Thanx
|
|
|
|
|
Try GetFileAttributesEx()
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
I import msdxm.ocx in my porject .it can play avi file in xp os.
but not play avi file in windows98 os
why ?
|
|
|
|
|
Hi
Just a question regarding the performance of CreateFile using Handler (APIs) Vs C Runtime function FILE *fp and fopen
Anyone know which is faster in reading and writing text files and whether any of them has limitations or problems in usage in WinCE environment?
Thank you
|
|
|
|
|
Reading/writing text files using asynchronous handlers is complex and problematic and likely to be slower than buffered i/o. fopen() eventually uses CreateFile, etc., and now offers [nonportable] access to many of the parameters of CreateFile. My only suggestion is to wrap the FILE* in a class, or use a simple Ptr<> template.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
A bit Deep for me..
Are you saying that fread, fwrite is asynchronous handling? or is it WriteFile, ReadFile??
Maybe you could quote an example
Thanx
|
|
|
|
|
You stated "CreateFile using Handler" which I interpreted as meaning using asynchronous i/o since CreateFile/ReadFile/WriteFile... is used by fopen/fread/fwrite.... The latter simply buffers the i/o, which for reading and writing strings will give you better performance.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
So u are saying using fread and fwrite is faster in performance as compared to WriteFile, ReadFile??
Sorry, i am evaluating which is better as i more used to fread and fwrite but now i exposed to another APIs WriteFile, ReadFile...The only gd thing about ReadFile is that the Handler obtained from CreateFile can be used for getting File Attributes..
Anyway, thanx for taking the time to answer my doubts
|
|
|
|
|
WriteFile is a low level call. It simply writes data to the disk. (The OS actually does some minor caching, but it's not significant.)
fwrite() writes data to an intermediate buffer (4k by default, I believe) when the buffer fills, the buffer is written to disk using a single call to WriteFile.
The same thing goes for reading data, only in reverse.
So, if you are reading/writing lots of smaller strings, you will get better performance with fread/fwrite unless you implement your own caching algorithm.
Note that you can get the original file handle by calling _fileno() with the proper FILE* and use that to call other functions directly (though doing any call that affects the file pointer (i.e. ReadFile, SetFilePointer, etc.) withough calling fflush first, will totally mess up the stream buffers.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
In a SDI program, when the user clicked the Open File Button and the standard File Open Dialog pops up I want to filter what type of file extensions the user can select.
J Guds
Masters Student
Kansas University
|
|
|
|
|
One solution is to instantiate a CFileDialog object and pass in a custom file-filter string.
Kuphryn
|
|
|
|
|
The following code opens files with .wav extension
Modify it as per ur need.
void CMyProjectView::OnFileOpen()
{
CFileDialog cfd(TRUE,".wav",NULL,OFN_FILEMUSTEXIST|OFN_PATHMUSTEXIST,"WAV File(*.wav)|*.wav||",this);
cfd.DoModal();
}
...Avenger
Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs
|
|
|
|
|
Where can I find information on how to program interfaces as one in Windows Media Player 9 or something like that?
|
|
|
|
|
You mean you want to design a skinnable GUI?
Kuphryn
|
|
|
|
|
Confused I am indeed...
I have an application that I'd like to use a dedicated display for some
specialized data/graphics..
I've installed an extra display adapter in the machine, and I can find it
using EnumDisplayDevices() and get an identifier string for the DeviceName,
such as {"\\.\DISPLAY2"} . . . .
However, when I attempt to do a CreateDC for this device, I get back a NULL
unless I have configured the system to include this display device as part
of the desktop, and obviously any attempt to write to it doesn't work...
I'd really like to just use the second display for my application specific
graphics without worrying about someone sliding a window over the top of it
and overwriting it...
Any suggestions as to what I should be doing? - and pointers to appropriate
documentation?
Thanks in advance
Carla
|
|
|
|
|
we've used getlastinputinfo API in vc++ but it is showing the error as undeclared identifier. so please explain in detail how to use it?
by example
|
|
|
|
|
Why start a new thread?
http://www.codeproject.com/script/comments/forums.asp?forumid=1647&select=784607&tid=784607#xx784607xx
Does this search provide any more help?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
|
|
Hi;
I am building an SDI application which requires a list control found on Tabs of a DialogBar. I managed to initialise the list control to some value. However, users of the tool are required to log-in and the list control is supposed to fill dynamically according to their log. I tried some piece of code to get it done but i got an ENORMOUS assertion error.
This is what i get when i move to debug mode:
_AFXCMN_INLINE int CListCtrl::InsertColumn(int nCol, const LVCOLUMN* pColumn)
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, LVM_INSERTCOLUMN, nCol, (LPARAM)pColumn); }
Can someone please help me to understand what this means and possibly how to overcome it. I badly need this.
Thank you;
Krugger
|
|
|
|
|
It simplely means that the listcontrol was not created.. are you trying to insert something out of the scopeof the listcontrol variable or out of the dialog ???
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
My company uses Clearcase and VC6 to develop a large application, with thousands of .h/.cpp files, all under source control. My workspace loads up 15 seperate projects, which each contain as many as a hundred seperate source-controlled elements.
The thing is, workspaces open up SLOW. VC6 loads the actual workspace & projects up very quickly, but then stops for up to 10 minutes "Updating Source Control Status". I know Clearcase can, be slow, but this is too much.
Does anyone have any advice on how to speed things up? It seems that VC6 is checking the checked-in/out status of each file individually, blocking the whole app until it is done with the thousands of files I work with. Is there anything I can do make this process go on in the background, or surpress it altogether?
I would appreciate any insights or comments.
|
|
|
|
|
I've something similar except that the application has only two projects and maybe a hundred source files. It can take nearly a minutes to fully load. I think the IDE is just not up to handling that many files. For some of my smaller one-project applications, it loads 'em almost instantly.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
How can I get the contents of the IE's Address Bar using BHO
Jack
|
|
|
|
|
use iwebbrowser2 's function get_addressbar... and u should get the contents..
himanshu
|
|
|
|