|
In MS-outlook calenders are inside pst file, Is there only one pst file?
modified on Wednesday, December 24, 2008 1:01 AM
|
|
|
|
|
Thank you
I am not sure about this. can you pls put some lights on this
|
|
|
|
|
Hi all,
I have posted same question again, Nobody is responding me Please respond the query.
I uesd FSCTL_GET_VOLUME_BITMAP to get free cluster list but When bitmap is very large it can not be fit into buffer, So I tried to read the bitmap in small chunks of bytes but I am always getting the bitmap from startting 0 offset, How could I read bitmap in small chunks.
my code is here, Please correct if i am wrong
BOOL CFreeCluster::GetBitmap()
{
STARTING_LCN_INPUT_BUFFER StartingLCN;
VOLUME_BITMAP_BUFFER *Bitmap = NULL;
ULONGLONG BitmapSize;
DWORD BytesReturned;
BOOL Result;
StartingLCN.StartingLcn.QuadPart = 0;
BitmapSize = sizeof (VOLUME_BITMAP_BUFFER) + 4;
Bitmap = (VOLUME_BITMAP_BUFFER *) malloc (BitmapSize);
HANDLE hHandle=OpenDrive();
Result = DeviceIoControl
(
hHandle,
FSCTL_GET_VOLUME_BITMAP,
&StartingLCN,
sizeof (StartingLCN),
Bitmap,
BitmapSize,
&BytesReturned,
NULL
);
if (Result == FALSE && GetLastError () != ERROR_MORE_DATA)
{
free (Bitmap);
return (false);
}
BitmapSize = (Bitmap->BitmapSize.QuadPart / 8) + 1;
int nBufferSize=8*512*3;
ULONGLONG ullItr=BitmapSize/nBufferSize;
if(BitmapSize%nBufferSize!=0)
ullItr++;
Bitmap = (VOLUME_BITMAP_BUFFER *) realloc (Bitmap, nBufferSize+1);
ULONGLONG ullClusterNo=0;
for (ULONGLONG ullTmp=0; ullTmp < ullItr; ullTmp++)
{
if(BitmapSize < nBufferSize)
nBufferSize=BitmapSize;
memset(Bitmap->Buffer,0x0,nBufferSize+1);
StartingLCN.StartingLcn.QuadPart=ullTmp*nBufferSize;
Result = DeviceIoControl
(
hHandle,
FSCTL_GET_VOLUME_BITMAP,
&StartingLCN,
nBufferSize,
Bitmap,
nBufferSize,
&BytesReturned,
NULL
);
int p=GetLastError();
if (Result == FALSE && GetLastError () != ERROR_MORE_DATA)
{
free (Bitmap);
return (false);
}
BitmapSize=BitmapSize-nBufferSize;
}
return (true);
}
modified on Wednesday, December 24, 2008 12:18 AM
|
|
|
|
|
Is nobody able to solve my problem?
|
|
|
|
|
i am trying to open .txt text file using ShellExecute() method but it is not getting opened.
thanks in advance
|
|
|
|
|
Sorry, but that's not enough information for someone to help you fix it.
You should show the code you're using to call ShellExecute, and say what error it's giving or what other behavior is happening.
No one can read your mind.
thanks in advance
|
|
|
|
|
CString str="D:\\abc.txt";
ShellExecute(NULL,"open","Notepad.exe",NULL,NULL,SW_HIDE);
ShellExecute(NULL,"open",str,NULL,NULL,SW_SHOWNORMAL);
now it is working, my program is able to open .txt file.
|
|
|
|
|
try file path instead of Notepad.exe
|
|
|
|
|
Hi,
I am working with MFCFeature pack . i created a toolbar with PNG file.
in that toolbar i am dynamically adding 3 buttons. i am trying to set icon to these buttons, but icon is not comming.
i tried with CMFCToolBarImages::AddIcon(hIcon);
can any one suggest how to do that one.
|
|
|
|
|
Is there a special pen that I can use to draw lines on a bitmap that simply invert the pixels that are already there?
I need draw rectangles on a bitmap and I need to update their dimensions every few seconds, so the old rectangles need to be erased before the new ones are drawn.
This means that if I erase the old rectangles with a white pen, after a while large chunks of my bitmap will be missing because of having been overwritten by the rectangles.
I figure that if I can draw rectangles that simply invert the pixels that are already there, then I can erase the rectangles by drawing the same ones a second time, meaning that the pixels will then become inverted back to what they were originally.
Can anyone suggest a way to do this?
|
|
|
|
|
Sounds like you want rubberbanding[^]
You can apply the concept to drawing any drawing primitive like rectangles. You would probably want to have already drawn the bitmap to your client area on the screen to get the effect you are describing.
Also, you will probably enjoy CRectTracker if you use MFC.
|
|
|
|
|
Thanks a million, Bob!
I'm using straight C, not MFC, so I will have to use the SetROP2() GDI function instead of that demo code, but I think it will work out the same.
Thanks again!
|
|
|
|
|
Wishing you all a great break.
To those regulars who post great answers, thanks for educating me.
To those posting interesting questions - thanks for helping me educate myself!
Merry christmas all - those presents need opening, and I can't find the API...
Iain.
|
|
|
|
|
Merry Christmas to you, Iain (an anonymous fan ).
Iain Clarke wrote: To those regulars who post great answers, thanks for educating me.
To those posting interesting questions - thanks for helping me educate myself!
BTW it looks like you missed the meritorious George_George.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Cheers Iain!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Iain Clarke wrote: Merry christmas all - those presents need opening, and I can't find the API...
You too Iain. Merry Christmas!!!
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
|
Merry Christmas Iain and all the others
|
|
|
|
|
Merry Christmas Iain... and Happy New Year... and Happy birthday... and Happy easter...
|
|
|
|
|
Getting your wishes in early, eh? Don't think I'm letting you off from clubbing together to but me a birthday present in april...
Iain.
|
|
|
|
|
Merry Christmas!!! and Happy New Year Iain..
Regards,
Sandip.
|
|
|
|
|
Merry Christmas sir. I'm a little late though (was still on vacation).
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
I have four or five kinds of objects, all derived from an indexedObject. indexedObject's have an integer id which can be set and they can be compared with <, >, etc to facilitate sorting, pretty simple class.
I would like to create one class that wraps a list and adds some other functionality and can hold all these kinds of objects. Problem is if I use a std::list<indexedObject> to hold the objects, I lose access to the functions not in indexedObject.
I would store pointers but then sorting and looking up the objects would require lots of extra code.
Is there a way to use the std::list<indexedObject> list to store the objects and cast them back to their derived type as appropriate? I can't use the assignment operator, I get an error.
I thought about all kinds of things like memcpy or something but it seems as if I resort to that I am getting pretty far off the reservation.
Any suggestions?
|
|
|
|
|
Is RTTI [^] what are you looking for?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
If i understood you right, what you are doing is a bit dangerous... however, if you are sure about what you are doing, you could try simply get the address of the certain item and convert it to a pointer of the right class and access it thorough that pointer, so what i mean is something like this:
((CIndexedObjectDerivant *)(&list_of_CIndexedObjects[12]))->MyRequiredMethod();
Good luck and marry xmass!
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|