|
hi,
so ,are they available with VC++6.0?
|
|
|
|
|
I think you will need to download the Platform SDK first for at least some of them. Anyway, the PSDK is a really nice thing to have
Get it at the PSDK Update Site: http://www.microsoft.com/msdownload/platformsdk/sdkupdate
And to answer the original question, this should work with VC++ 6 once you have the PSDK
Have fun!
-Domenic Denicola-
Geek^n
http://madhamster.50megs.com
"Any technology that is indistinguishable from magic is insufficiently advanced..."
|
|
|
|
|
I would suggest DirectSound.
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
I need to use some functions that uses files. They open file using OpenFile and uses the returned handle in their other functions. I have the data in a memory buffer. I do not want to write that data to HD and then read it again back through that functions.
Is there any way possible by which I can make my memory buffer treated as a file. I mean using the _llseek and other functions but the given handle is something that reads file from memory.
Please help,,,,thanks in advance.
|
|
|
|
|
Check:
FILE,CFile
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
Can you please clarify. As I mentioned earlier... the data of the file is in memory buffer and i do not want to write it to a file. The functions that I want to use take in file handle of OpenFile.
|
|
|
|
|
MFC has a class CMemFile , derived from CFile , supporting memory files.
--
See me: www.magerquark.de
|
|
|
|
|
If you are not using MFC, then you will be interested in memory mapped files.
1. open your file with CreateFile.
2. Call CreateFileMapping with the handle that you received from CreateFile. You will also need to specify things like the size of the file that you want to read into memory and access that you would like to have to the file.
3. Call MapViewOfFile, this function will return a pointer to you that you can treat exactly like memory.
Depending on the settings that you choose, when you close the file mapping, all of the memory that you have changed will already be written to Disk.
In one of the other responses to your question, CMemFile encapsulates this behavios, but you will have to use MFC.
|
|
|
|
|
i need Tmp = "; but i get an error, is there a way of having Tmp = "
|
|
|
|
|
If I understood you right, Tmp = "\""; is what you're after.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
thanks worked great but do you know what to do for a return? Tmp = " go on to a new line? "
|
|
|
|
|
\n new line
\t horizontal tab
\b backspace
\f form feed
\a alert or bell
\r carriage return
\v vertical tab
\\ backslash
\' single quote
\" double quote
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I've a dialog box with radio buttons and i'd like to know how to preselct the radio buttons.
The resource is called ID_DIALOG and was created using the Resource editor the radio buttons added from the Controls Menu and is created in a class derived from CDialog!
Can u help me cheers - Jason
|
|
|
|
|
put this in your OnInitDialog after you define controller:
m_myradio.SetCheck(true);
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
Another way of doing this is assign the radio button in a group and then for the first radio button make a int variable from the Class Wizard. Assigning values 0, 1, 2 ... sets the different check boxes. Assign a value in the initdialog box or the constructor.
|
|
|
|
|
Hi all,
I added new Language to my Win2000 OS ...
It is Farsi language ...
I wanna change my Windows Titlebars and Buttons labels from English U.S. to Farsi strings in my program.
So, I changed my Window Language to Neutral in Resource Tab ...
But when i run the program, i can only see some strange ANSI characters in Titlebars and button labels !!!
NOTICE: I can not write the Farsi strings in VC++ Editor directly !!!
How can i solve it ??? (Please help me ...)
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
yes Hadi,this is the same problem that I had it too,it seems we can't
use farsi in our application in this way,I'm sorry to say that I used it in
Dephi in this way.
I think the only way is we have to buy farsi edition of VC,Do you know where can you buy it?
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
Hi,
I need some pieces of advise regarding the following problem:
I would like to create a program than open safely more than 509 files on Win NT/2K plateforms.
Effectively, Windows NT allows one process to open 2048 files, and WIndows 2K allows even more than 16000 files.
However, an application builded with VC++ 6.0 seems limited to 509 opened files.
I figured out that 509 + 3 (stdin/stdout/stderr) = 512, which is the values of the _NSTREAM_ macro within the CRT source code.
Therefore, I tried to compile the CRT after changing this value to 1024. Bingo ! I could effectively opened 1024 - 3 = 1021 files.
BUT MY APPLICATION CRASHED BECAUSE OF getchar() !!
I guess that my compiled version of the CRT is not exactly the same as the real MSVCRT.DLL.
So, I would appreciate if someone can confirm what to do exactly to open more than 509 files uisng VC++ 6.0
Thanks for any help you can provide.
Regards.
Hassan
Paris, FRANCE
|
|
|
|
|
It might be a good idea to optimize your design a little bit [nothing to do with your nick of course] to avoid having to open 500 plus files at the same time.
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
Hi Nish,
Thanks for answering.
Yes you're right, trying to open so many files is not a good idea.
However, it is not my design.
To tell the full story, I have to find a workaround for some application
which I don't have the source code.
This application is opening files all the day using incoming data from the outside.
The basic idea was to make it runs all the day. Then at "midnight", I stop this application, I do a merge on all files created during the day, and I restart the application.
Unfortunately, the incoming dataflow is so high, that the maximum number of file handle is not enough. Also, there is no way to stop the application at noon for instance because this application must run during all business day.
Now, if I can find a way to "patch" msvcrt to open at least 1200 files, then I can use this custom MSVCRT.DLL and make the application run as planned.
Any better idea is welcome.
Regards.
Hassan
|
|
|
|
|
There are articles on this site that relate to injecting your code in place of other code. You could use dumpbin and figure out exactly what imports your "other" app is using and make replacements for those functions with your modified CRT library.
Good Luck.
|
|
|
|
|
I am new to the curious world of MFC. I used the appwizard that created a resource.h file having the following content. Could someone please tell me what is IDM_ABOUTBOX and IDS_ABOUTBOX here. IDD_ABOUTBOX is the default About Boxs' ID in resource Editor. I am confused about the latter two Constants. Please hold my hand !!!
#define IDR_MAINFRAME 128
#define IDM_ABOUTBOX 0x0010
#define IDD_ABOUTBOX 100
#define IDS_ABOUTBOX 101
#define IDD_DIALOG_DIALOG 102
Dont argue with a fool, audience cannot find the difference.
|
|
|
|
|
Those constants are resource identifiers.
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
IDM prefix I would think would be the resource identifier thats associated with the about menu appended to your dialogs system menu. IDS prefix is for the string table reosurce.
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
void Investors:: addInvestor(Investor& in)
{
Investor* temp = new Investor[numOfInvestors+1]; //create a new investor array of size of prevArray+1
if (investorsList == NULL) //check if there is something in the array
{
investorsList = temp; //save temp in investorsList
investorsList[0] = in; //fill the first element with the investor that you want to add
} //to your list
else //else if the investorsList is not NULL
{
for (int i = 0; i< numOfInvestors; i++) //in this loop you start copying the elements of the prevlist in
{ //the new temp list
temp[i] = investorsList[i];
cout <
|
|
|
|