|
if u don mind, could u please tell how to use c linker
swaroop
|
|
|
|
|
extern "C"[^] before the name of the method in the declaration in the header
|
|
|
|
|
the function i mentioned in the error is a inbuilt function for handling the mic's and all should i use extern for that also, if so hw?
swaroop
|
|
|
|
|
man, your _imp_mciSendCommandA() function if declared in a header file, right ?
then prepend its declaration with a extern "C"... like this for instance :
extern "C" int _imp_mciSendCommandA(int);
|
|
|
|
|
sorry for troubling u again , Actually i'm not declaring that function in my code...i'm just using that function, where the function is declared in Mmsystem.h(inbuilt header file)...
i use this function to open the mic,close the mic and for recording..
syntax of the function in mmsystem.h
WINMMAPI MCIERROR WINAPI mciSendCommandA(MCIDEVICEID mciID,UINT uMSG,DWORD dwparam1,DWORD dwparam2);
sorry for the trouble..please reply
swaroop
|
|
|
|
|
Did you import Winmm.lib ?
|
|
|
|
|
yes, i imported that library . but still the error showing
swaroop
|
|
|
|
|
swaroopkb wrote: yes, i imported that library .
How? Saying you did it, and doing it right, are not always the same thing.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I was writing some code using IShellFolder to get the file information from the operating system. I could get information like file DisplayName or TypeName from SHFILEINFO structure returned by SHGetFileInfo. The thing is I also need some other attributes like FileSize, LastModified/access time etc. In addition for local disk identifiers, I'd like to know the total size and free space attributes. I think either there is another interface for retrieving those information or I've got into a wrong way.
Many thanks in advance.
Pan
-- modified at 5:00 Wednesday 1st August, 2007
Toe the line
Thread the needle
Think outside of the box
|
|
|
|
|
Any help is welcome. Please don't let this post go down
Toe the line
Thread the needle
Think outside of the box
|
|
|
|
|
be patient... and know that the other part of the earth is still sleeping
|
|
|
|
|
True. I was a bit worried that this message was going to be degraded to NextNextNext page. People who want to be helpful won't have a chance to read it.
Toe the line
Thread the needle
Think outside of the box
|
|
|
|
|
PinuxATSweden wrote: The thing is I also need some other attributes like FileSize, LastModified/access time etc.
So have you tried using GetFileAttributesEx() ?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thanks for your reply.
No. I implement this function by using the IShellFolder interface. When accessing files, I don't really know the logical display name. Therefore, instead of using the display file name or directory, I use an ITEMIDLIST originated from Desktop Item to represent a 'file':
LPITEMIDLIST lpi;
SHFILEINFO sfi;
SHGetFileInfo((LPCWSTR)lpi, 0, &sfi, sizeof(SHFILEINFO), SHGFI_PIDL | SHGFI_TYPENAME);
SHGetFileInfo((LPCWSTR)lpi, 0, &sfi, sizeof(SHFILEINFO), SHGFI_PIDL | SHGFI_SYSICONINDEX | SHGFI_SMALLICON);
This can help me to enumerate anything under an ITEM(file/folder/disk...) and find the target sub-item in a faster way.
But as you can see the definition of SHFILEINTO structure doesn't have some information like file size/access time/disk space that I am retrieving.
typedef struct _SHFILEINFO {
HICON hIcon;
int iIcon;
DWORD dwAttributes;
TCHAR szDisplayName[MAX_PATH];
TCHAR szTypeName[80];
} SHFILEINFO;
Toe the line
Thread the needle
Think outside of the box
|
|
|
|
|
Can't you just use the GetDisplayNameOf() method to convert the PIDL to an actual path/file name (that can then be used with GetFileAttributesEx() )?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
You got me. That seems to be the solution. Thanks for your help.
Toe the line
Thread the needle
Think outside of the box
|
|
|
|
|
Do I suffer from a performance issue if the displayed file list is fairly large by using this conversion. I am trying it.
Toe the line
Thread the needle
Think outside of the box
|
|
|
|
|
Hello Guru's
I got a problem in MFC (Dialog based form ) . I have some text
in a EditBox. And have also a file in my C drive ( or any where ) name
test.txt file is empty till now.
Now i want to save that edit box text in to that test.txt file with the help
of programming . Can any one told me how can i do this.
Please give me brief idea about that.
Regard's
Kaushik
|
|
|
|
|
Y_Kaushik wrote: Can any one told me how can i do this.
I wish, you had refered CFile[^] class.
Prasad
MS MVP - VC++
|
|
|
|
|
can u give me any sample for this
Regard's
Kaushik
|
|
|
|
|
Kaushik,
I could easily give or direct to sample code for this. But, this is very basic stuff. And I don't want to spoil you.
Learn to use google and other powerful tools on web. I'm advising you this for your development.
Prasad
MS MVP - VC++
|
|
|
|
|
On the MSDN you can see an example anyway see here[^] if helpfuls.
|
|
|
|
|
You read your datas with GetWindowText of Edit Control and use of CFile::Write for write to file.
|
|
|
|
|
what about using CStdioFile::WriteString!
use CStdioFile::Open to open file
and CStdioFile::WriteString! to write string into file
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief
|
|
|
|
|
Hi all,
I need to implement some thing similiar to 'power toys' in VC++ which would support thumbnail viewing of the opened dialogs when we press ALT+TAB (or any defined keys).
I thing Shell programming should be applied to achieve this.
As i dont have any idea abt that any help from you on this is very much appreciated...
Thanks in advance.
Selva
|
|
|
|