| | |
need help in using FindFirstVolume() API
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Feb 2008
Posts: 6
Reputation:
Solved Threads: 0
i wrote a code to get hard disk info and used FindFirstVolume(). however, the console-based application was ok but when i made an MFC application doing the same thing, it did not compile correctly. i think the problem is with my redeclaration of _WIN32_WINNT in the MFC application. this is because there are header files in the MFC application that already assigns the value of _WIN32_WINNT and i can't seem to find all of the header files that do this.
•
•
Join Date: Feb 2008
Posts: 6
Reputation:
Solved Threads: 0
•
•
•
•
What does the compiler say? What errors are there? I've just tried using FindFirstVolumeW in a MFC-app, but it works fine for me.
Niek
thanks for your help in advance.
•
•
Join Date: Feb 2008
Posts: 6
Reputation:
Solved Threads: 0
•
•
•
•
What does the compiler say? What errors are there? I've just tried using FindFirstVolumeW in a MFC-app, but it works fine for me.
Niek
what definitions and header files did you include? i encounter this error "FindFirstVolume: identifier not found..." in my MFC app.
jov
I looked here
Then I created a MFC-application with unicode with MFC in a shared DLL, and used FindFirstVolumeW as recommended by MSDN.
I'm using a precompiled header, but I have _WIN32_WINNT defined in stdafx.h. So there is no need to redefine it in your sourcecode.
Niek
•
•
•
•
Originally Posted by MSDN
Requirements
Header Declared in WinBase.h; include Windows.h.
Library Use Kernel32.lib.
DLL Requires Kernel32.dll.
Unicode Implemented as FindFirstVolumeW (Unicode) and FindFirstVolumeA (ANSI).
•
•
•
•
Originally Posted by jov0708
ohh... anyway, i defined _WIN32_WINNT in my code
Niek
Last edited by niek_e; Feb 6th, 2008 at 4:25 am.
![]() |
Other Threads in the C++ Forum
- Previous Thread: confused about clarification on class objects
- Next Thread: Which C++ complier to use
| Thread Tools | Search this Thread |
api array arrays based beginner binary bitmap c++ c/c++ calculator char char* class classes coding compile compiler console conversion convert count data database delete desktop developer directshow dll dynamiccharacterarray email encryption error file forms fstream function functions game generator getline google graph homeworkhelper iamthwee ifstream input int integer java lib linkedlist linux list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg sorting string strings struct template templates text tree unix url vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






