|
swaroopkb wrote: the dll is a plain win32 dll completly in c++
that's contradictory... Win32 is plain C, not C++ at all
|
|
|
|
|
ok, its a win32 dll...tell me how to solve it please...also will this dll work with Applets, if i'm using a bridge using the java native interface..
swaroop
|
|
|
|
|
for that, i can't help, because i never had to use dlls in java code... are you sure you cant obtain some jars that already do what you're looking for by this DLL ?
|
|
|
|
|
No i cant use a jar...bcoz my work is to convert the existing code to an applet. the code is too big to convert it to java...so the only way is to make a dll that is java compatible...
when u tried with a small java program to access the dll it worked , but when i tried with applet it was not working...do u know whether there is any limitation for applets like ths one???
swaroop
|
|
|
|
|
while trying to make a java compatible dll for my application i'm getting a linking error msg in VC++ (VS6.0) as
error LNK2001 : unresolved external symbol _imp_mciSendCommandA@16
i'm using this dll for accessing the mic.
can anybody help me in solving this problem
swaroop
|
|
|
|
|
did you correctly provide the .lib file to you linker settings ?
|
|
|
|
|
yes, all the lib files needed for the function is given in the settings of the VS 6.0.. as per the msdn winmm,lib is the lib file needed for that and still the problem exist. also two more header file is needed for the function is also included.
swaroop
|
|
|
|
|
did you try a C linkage ? because your symbole seems to be mangled...
|
|
|
|
|
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
|
|
|
|