|
toxcct wrote: where else do you think you can dynamically allocate some memory ?
In multiple heap scenarios you can define your own memory segments to specify which area of memory is used to allocate various elements such as messages, semaphores etc. I have a feeling that this is processor dependend and not something that I can do with C standard functions. Is there a way of doing this without depending on the platform being used? I realize that my previous question is not clear enough and I apologize for that. I must stress that this is a Real-Time programming related question.
Time is the fire in which we burn.
|
|
|
|
|
That is platform dependent.
|
|
|
|
|
toxcct wrote: where else do you think you can dynamically allocate some memory ?
In real-time/embedded systems, where you allocate memory is often just as important as the memory you actually allocate. I believe the OP is asking how he can allocate memory in SDRAM instead of SRAM.
I think that is system dependent. I'm trying to remember my VxWorks stuff (haven't used it in a while) ... but I think you have to make a OS API call to allocate memory outside the default heap.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Thank you so much Zac. That answers my question.
Time is the fire in which we burn.
|
|
|
|
|
|
In my Form1 (VC++ .NET framework), I first need to add prototype of WindowProc in header file. Which section shall it be added private, protect, or public??
Is following prototype correct??
LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
Is following implementation function header correct??
LRESULT CALLBACK Form1::WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
}
|
|
|
|
|
if the function is a member of a class, you must declare it static, so that it wont have the implicit this parameter...
by the way, i may be wrong (i see you're talking about the .NET Framework) but the C++/CLI forum may be more appropriate for your question.
|
|
|
|
|
it should be either global or public static of a class.
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
My Blog | Understanding State Pattern
Last modified: Wednesday, August 09, 2006 9:20:41 AM --
|
|
|
|
|
Sarath. wrote: either
nope. it should be both !!!
|
|
|
|
|
ooops.. sorry man.. it was a mistake I meant either in global or in public static scope. I shall correct it
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
My Blog | Understanding State Pattern
|
|
|
|
|
It should be a static function.
|
|
|
|
|
i think answering something that was posted about 2 hours before is not the best thing to do, especially if you don't provide much info...
|
|
|
|
|
hehe, I did not read the other answers
|
|
|
|
|
I'm writing VC++ .net framework code.
I need to retrieve the windows WM_DEVCHANGE message
Shall I use virtual void WndProc( Message* m ) override function or LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) function??
How shall I add either of them to my Form class???
May you write down the format?
|
|
|
|
|
Hi,
I'm backing up files.. i want to know a better way of updating modified files.. now i just delete the old file and make a copy of modified file..
say if the file is in GB and just one line is appended in the last, for this i have to make a copy of data in GB.. is there any way to found which line is modified..
comparing files will be more expensive than make a copy, so any other suggestions or it is possoble to update a file like this..
Do your Duty and Don't expect the Result
|
|
|
|
|
Just a thought...
Check out ezpatch and RTPatch programs. As far as I remember, they store one copy of the file. Later they just store the differences between the file versions.
It might be one way to go.
|
|
|
|
|
I have created an add-in to do many things in the visual studios 6.0 environment. In this add-in I display things to the macro tab which is on the "Output Window" which also has the tabs Build,Debug,Find in Files1,Find in Files2 tabs. I am using IApplication* p_app->PrintToOutputWindow() function for showing messages and other things on the macro tab.
1. Is there a way to automatically display the macro tab after showing a printing a message on it?
2. Is there any way to clear this window programmatically?
Chris
|
|
|
|
|
Thanks but nothing is working i have tried everyting ! my code remaine the same !
Please someone help me !
void CMyList::OnOK()
{
UpdateData();
CWaitCursor wait; // Display a wait cursor
int x = m_list.GetItemCount();
for (int j = 0; j < x; j++) // For each item in the list
{
CString strWord;
strWord = m_list.GetItemText(j, 0); // Get the word
strWord.TrimLeft(); // Remove leading spaces
strWord.TrimRight(); // Remove trailing spaces
// Overwrite the old word with the new trimmed word
m_list.SetItemText(j, 0, strWord);
}
CString sName = _T("Name");
m_name.GetWindowText(sName);
LVFINDINFO stInfo = {0};
stInfo.flags = LVFI_STRING;
stInfo.psz = sName;
int nItem = m_list.FindItem( &stInfo );
if( nItem != -1 )
{
// the item is in the list control
CString sSecondColumnText = m_list.GetItemText( nItem, 1 );
// set the text to the second edit box
m_rezult.SetWindowText( sSecondColumnText );
}
}
///////////////////////////////////////////////////////////////////////
----------------------------------
| Name | City | Country |
----------------------------------
| George| London| England |
-----------------------------------
|George |NewYork | USA |
-----------------------------------
for ex :
all i whant is to find if george - London - England exist !
or
all i whant is to find if george - NewYork - USA exist !
m_name , m_city , m_rezult ! m_rezult <----- Country!!!!
Thank you !
Bravoone
|
|
|
|
|
|
Can you give me an example on how to find an item in second column ?...etc - 3d column... ? Please !!!!!
Bravoone
|
|
|
|
|
<br />
CString find ="test1";<br />
CStringArray string1;<br />
CString search;<br />
for(int nIndex = 0; nIndex < m_Ctrl1.GetItemCount(); nIndex++)<br />
{ <br />
search= m_Ctrl1.GetItemText( nIndex, 0 );
if(search==find)<br />
string1.Add(search);<br />
}<br />
|
|
|
|
|
Flaviu_2006 wrote: Can you give me an example on how to find an item in second column ?...
You could have saved yourself and others a lot of time by specifying this up front rather than after umpteen suggestions have been offered.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi,
Could anyone tell me how to detect the play of a video file (any video file like AVI, WMV, MPEG etc...)?
If any application (like RealPlayer or Windows Media Player) plays the video file, my application should recieve a notification.
Thanks in advance,
Pavan
-- modified at 7:57 Wednesday 9th August, 2006
Regards,
Pavan
|
|
|
|
|
Do you want to play these files?
|
|
|
|
|
I dont want to play the files. I just want a notification when some video file is played by some other application like RealPlayer, Windows Media Player etc...
Regards,
Pavan
|
|
|
|