Click here to Skip to main content
16,008,075 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalgt Pin
28-Nov-01 5:34
suss28-Nov-01 5:34 
GeneralCFileDialog and CFile::Open Pin
RobJones28-Nov-01 5:23
RobJones28-Nov-01 5:23 
GeneralRe: CFileDialog and CFile::Open Pin
Nish Nishant28-Nov-01 5:26
sitebuilderNish Nishant28-Nov-01 5:26 
GeneralRe: CFileDialog and CFile::Open Pin
RobJones28-Nov-01 5:38
RobJones28-Nov-01 5:38 
GeneralRe: CFileDialog and CFile::Open Pin
RobJones28-Nov-01 6:35
RobJones28-Nov-01 6:35 
GeneralRe: CFileDialog and CFile::Open Pin
RobJones28-Nov-01 9:19
RobJones28-Nov-01 9:19 
GeneralRe: CFileDialog and CFile::Open Pin
28-Nov-01 14:27
suss28-Nov-01 14:27 
GeneralGetDiskFreeSpaceEx Pin
RickyC28-Nov-01 5:22
RickyC28-Nov-01 5:22 
Hy everyone,

I'm tryng to do an application that show in some window the current amount of memory in the user's hard disc. But when the user is using win 95 before OSR2 the function GetDiskFreeSpaceEx must be replaced by GetDiskFreeSpace, and the MSDN Library tell's me to "you should dynamically link to it via GetProcAddress"... I do everything they tell me to do... but in win 95 my program do not work...
causes an error on kernel32.dll that can't find de GetDiskFreeSpaceExA... please, if someone can help me it's will be great!
I'll post an part of my code that I do the implementation of the MSDN Library:

P_GDFSE pGetDiskFreeSpaceEx = NULL;
pGetDiskFreeSpaceEx = (P_GDFSE)GetProcAddress (GetModuleHandle ("kernel32.dll"),"GetDiskFreeSpaceExA");
if(pGetDiskFreeSpaceEx)
{
fresult = GetDiskFreeSpaceEx (windowsDir,
(PULARGE_INTEGER)&FreeBytesToCaller,
(PULARGE_INTEGER)&TotalBytes,
(PULARGE_INTEGER)&FreeBytes);


m_strDirSistema = _T( windowsDir );
m_dwQuotaLivreUsuario = /*(DWORD*/FreeBytesToCaller / MEGABYTE; // this lines given
- me warnings of conversion but it's work correctly m_dwEspacoTotal = /*(DWORD)*/TotalBytes / MEGABYTE;
m_dwEspacoLivre = /*(DWORD)*/FreeBytes /MEGABYTE;
}
thanks all, for the attention!
cheers!!
and sorry my english, I'm brazilian Smile | :) Confused | :confused:
GeneralRe: GetDiskFreeSpaceEx Pin
Jon Hulatt28-Nov-01 5:47
Jon Hulatt28-Nov-01 5:47 
GeneralRe: GetDiskFreeSpaceEx Pin
Nish Nishant28-Nov-01 5:53
sitebuilderNish Nishant28-Nov-01 5:53 
GeneralRe: GetDiskFreeSpaceEx Pin
RickyC28-Nov-01 6:19
RickyC28-Nov-01 6:19 
GeneralRe: GetDiskFreeSpaceEx Pin
Michael Dunn28-Nov-01 8:34
sitebuilderMichael Dunn28-Nov-01 8:34 
GeneralRe: GetDiskFreeSpaceEx Pin
jerry0davis19-Mar-02 0:19
jerry0davis19-Mar-02 0:19 
GeneralRe: GetDiskFreeSpaceEx Pin
Nish Nishant19-Mar-02 0:49
sitebuilderNish Nishant19-Mar-02 0:49 
GeneralRe: GetDiskFreeSpaceEx Pin
jerry0davis19-Mar-02 0:47
jerry0davis19-Mar-02 0:47 
GeneralDialog Pin
Peter Liddle28-Nov-01 4:33
Peter Liddle28-Nov-01 4:33 
GeneralRe: Dialog Pin
Nish Nishant28-Nov-01 4:35
sitebuilderNish Nishant28-Nov-01 4:35 
GeneralRe: Dialog Pin
Carlos Antollini28-Nov-01 4:36
Carlos Antollini28-Nov-01 4:36 
GeneralRe: Dialog Pin
Peter Liddle28-Nov-01 4:59
Peter Liddle28-Nov-01 4:59 
GeneralRe: Dialog Pin
Nish Nishant28-Nov-01 5:04
sitebuilderNish Nishant28-Nov-01 5:04 
GeneralCView and Tab in a SDI Pin
Delvi28-Nov-01 4:32
Delvi28-Nov-01 4:32 
GeneralCHook CHookManager Pin
28-Nov-01 4:17
suss28-Nov-01 4:17 
Generalcan't find it: static w/ basic formatting Pin
peterchen28-Nov-01 2:59
peterchen28-Nov-01 2:59 
GeneralNMHDR, i need explain ! Pin
Hadi Rezaee28-Nov-01 2:53
Hadi Rezaee28-Nov-01 2:53 
GeneralRe: NMHDR, i need explain ! Pin
peterchen28-Nov-01 3:03
peterchen28-Nov-01 3:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.